diff --git a/lua.cpp b/lua.cpp index 697572d..9984144 100644 --- a/lua.cpp +++ b/lua.cpp @@ -64,7 +64,7 @@ std::string g_pauseFile; int g_pauseLine = 0; bool function_has_breakpoints = false; std::stack funBreakStack; -bool debug_enabled = false; +bool debug_enabled = true; enum StepMode { STEP_NONE, @@ -2874,20 +2874,9 @@ void lua_call_update() { lua_pop(L, 1); // quitar handler if (status != LUA_OK) { - //log_msg(LOG_LUART, "%s\n", lua_tostring(L, -1)); - //lua_pop(L,1); is_playing = false; - lastExceptionMessage = lastExceptionTraceback; - - // Limpiar stack anterior - //lastExceptionStack.clear(); - - // Parsear traceback en frames - //parseLuaTraceback(tb, lastExceptionStack); - - lua_pop(L, 1); // pop traceback y error - + lua_pop(L, 1); hasException = true; if (exceptionFilters.count("all") || exceptionFilters.count("uncaught")) { @@ -2896,6 +2885,7 @@ void lua_call_update() { } sendLogOutput(lastExceptionMessage); + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Mini Runtime Exception", lastExceptionTraceback.c_str(), NULL); return; } } diff --git a/main.cpp b/main.cpp index 5560253..d668b17 100644 --- a/main.cpp +++ b/main.cpp @@ -1,9 +1,27 @@ #include "mini.h" +uint16_t ants = 0xc936; +float t = 0; + void loop() { - settrans(255); - setcolor(0,0xff0000); - const int w=scrw(); - const int h=scrh(); - rect(0,0,w-1,h-1,0); + //if (t==0) t= time(); + if (time()-t > 0.25) { + t = time(); + clip(); + origin(0,0); + setdest(0); + settrans(255); + setcolor(0,0xffffff00); + setcolor(1,0xff000000); + const int w=scrw(); + const int h=scrh(); + set_draw_mode(0); + rect(0,0,w,h,1); + rect(1,1,w-2,h-2,1); + set_draw_mode(1); + fillp(ants); + rect(0,0,w,h,0); + rect(1,1,w-2,h-2,0); + ants = (ants<<12) | (ants>>4); + } } \ No newline at end of file diff --git a/mini.cpp b/mini.cpp index dc6fc5b..829634c 100644 --- a/mini.cpp +++ b/mini.cpp @@ -568,7 +568,7 @@ void createDisplay() { if (screen_zoom <= 0) screen_zoom = 1; while (screen_width*screen_zoom > desktop_width || screen_height*screen_zoom > desktop_height) screen_zoom--; - mini_win = SDL_CreateWindow(window_title, screen_width*screen_zoom, screen_height*screen_zoom, SDL_WINDOW_OPENGL|(screen_fullscreen?SDL_WINDOW_FULLSCREEN:0)); + mini_win = SDL_CreateWindow(window_title, screen_width*screen_zoom, screen_height*screen_zoom, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE|(screen_fullscreen?SDL_WINDOW_FULLSCREEN:0)); windowID = SDL_GetWindowID(mini_win); SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl"); mini_ren = SDL_CreateRenderer(mini_win, NULL);