Fix bugs switching between game and editor and back: make sure ModeFlag is set to 0 before it has any chance to show an alert message, fixing a crash; allow OBJ_NONE in Assert; make Game_wind invisible when loading editor in case we show an alert; call mouse_flush() in ui_init() to fix mouse issues
This commit is contained in:
parent
ef6e5180db
commit
b80b863f49
|
@ -6,6 +6,7 @@ main/gamesave.c: Fix crash when loading a level in the editor
|
||||||
editor/segment.c, include/editor/editor.h, main/gamesave.c: Set Gamesave_current_version to correct version when making a new mine, move create_new_mine to gamesave.c
|
editor/segment.c, include/editor/editor.h, main/gamesave.c: Set Gamesave_current_version to correct version when making a new mine, move create_new_mine to gamesave.c
|
||||||
main/gamesave.c: Don't bother generating a game text file (.txm) every time a level is loaded, even if the EDITOR is compiled. Just when a level is saved
|
main/gamesave.c: Don't bother generating a game text file (.txm) every time a level is loaded, even if the EDITOR is compiled. Just when a level is saved
|
||||||
editor/med.c, main/game.c, main/gamecntl.c: Delete-E while playing a level now works properly - it closes Game_wind and sets Cursegp if necessary when going to the editor
|
editor/med.c, main/game.c, main/gamecntl.c: Delete-E while playing a level now works properly - it closes Game_wind and sets Cursegp if necessary when going to the editor
|
||||||
|
editor/med.c, main/dumpmine.c, main/gamecntl.c, ui/ui.c: Fix bugs switching between game and editor and back: make sure ModeFlag is set to 0 before it has any chance to show an alert message, fixing a crash; allow OBJ_NONE in Assert; make Game_wind invisible when loading editor in case we show an alert; call mouse_flush() in ui_init() to fix mouse issues
|
||||||
|
|
||||||
20120412
|
20120412
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -464,9 +464,9 @@ void init_editor()
|
||||||
FNTScaleX = FNTScaleY = 1; // No font scaling!
|
FNTScaleX = FNTScaleY = 1; // No font scaling!
|
||||||
ui_pad_goto(padnum);
|
ui_pad_goto(padnum);
|
||||||
|
|
||||||
gamestate_restore_check();
|
|
||||||
|
|
||||||
ModeFlag = 0;
|
ModeFlag = 0;
|
||||||
|
|
||||||
|
gamestate_restore_check();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ShowAbout()
|
int ShowAbout()
|
||||||
|
|
|
@ -50,7 +50,7 @@ char *object_types(int objnum)
|
||||||
{
|
{
|
||||||
int type = Objects[objnum].type;
|
int type = Objects[objnum].type;
|
||||||
|
|
||||||
Assert((type >= 0) && (type < MAX_OBJECT_TYPES));
|
Assert((type == OBJ_NONE) || ((type >= 0) && (type < MAX_OBJECT_TYPES)));
|
||||||
return Object_type_names[type];
|
return Object_type_names[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -822,6 +822,7 @@ int HandleTestKey(int key)
|
||||||
#ifdef EDITOR //editor-specific functions
|
#ifdef EDITOR //editor-specific functions
|
||||||
|
|
||||||
case KEY_E + KEY_DEBUGGED:
|
case KEY_E + KEY_DEBUGGED:
|
||||||
|
window_set_visible(Game_wind, 0); // don't let the game do anything while we set the editor up
|
||||||
init_editor();
|
init_editor();
|
||||||
window_close(Game_wind);
|
window_close(Game_wind);
|
||||||
break;
|
break;
|
||||||
|
|
2
ui/ui.c
2
ui/ui.c
|
@ -52,6 +52,8 @@ void ui_init()
|
||||||
CBRIGHT = gr_find_closest_color( 58, 58, 58 );
|
CBRIGHT = gr_find_closest_color( 58, 58, 58 );
|
||||||
CRED = gr_find_closest_color( 63, 0, 0 );
|
CRED = gr_find_closest_color( 63, 0, 0 );
|
||||||
|
|
||||||
|
mouse_flush();
|
||||||
|
|
||||||
//key_init();
|
//key_init();
|
||||||
|
|
||||||
gr_set_fontcolor( CBLACK, CWHITE );
|
gr_set_fontcolor( CBLACK, CWHITE );
|
||||||
|
|
Loading…
Reference in a new issue