- [WIP] Mode debug activat per defecte
- [WIP] Canvis visuals al rebre una excepció de Lua - [WIP] MessageBox al rebre excepcions - [WIP] Finestra resizable
This commit is contained in:
16
lua.cpp
16
lua.cpp
@@ -64,7 +64,7 @@ std::string g_pauseFile;
|
||||
int g_pauseLine = 0;
|
||||
bool function_has_breakpoints = false;
|
||||
std::stack<bool> 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;
|
||||
}
|
||||
}
|
||||
|
||||
22
main.cpp
22
main.cpp
@@ -1,9 +1,27 @@
|
||||
#include "mini.h"
|
||||
|
||||
uint16_t ants = 0xc936;
|
||||
float t = 0;
|
||||
|
||||
void loop() {
|
||||
//if (t==0) t= time();
|
||||
if (time()-t > 0.25) {
|
||||
t = time();
|
||||
clip();
|
||||
origin(0,0);
|
||||
setdest(0);
|
||||
settrans(255);
|
||||
setcolor(0,0xff0000);
|
||||
setcolor(0,0xffffff00);
|
||||
setcolor(1,0xff000000);
|
||||
const int w=scrw();
|
||||
const int h=scrh();
|
||||
rect(0,0,w-1,h-1,0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
2
mini.cpp
2
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);
|
||||
|
||||
Reference in New Issue
Block a user