Move the editor call out of the Function_mode loop, for later overhaul
This commit is contained in:
parent
e3ccb8e6cf
commit
b6b9cc1546
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20100123
|
||||
--------
|
||||
main/gamecntl.c, main/inferno.c, main/menu.c: Move the editor call out of the Function_mode loop, for later overhaul
|
||||
|
||||
20100121
|
||||
--------
|
||||
main/newdemo.c: Removed the new Demo Interpolating code and added the improvements to the old one
|
||||
|
|
|
@ -754,6 +754,14 @@ void HandleGameKey(int key)
|
|||
case KEY_E + KEY_DEBUGGED:
|
||||
network_leave_game();
|
||||
Function_mode = FMODE_EDITOR;
|
||||
|
||||
keyd_editor_mode = 1;
|
||||
editor();
|
||||
if ( Function_mode == FMODE_GAME ) {
|
||||
Game_mode = GM_EDITOR;
|
||||
editor_reset_stuff_on_level();
|
||||
N_players = 1;
|
||||
}
|
||||
break;
|
||||
case KEY_C + KEY_SHIFTED + KEY_DEBUGGED:
|
||||
if (!( Game_mode & GM_MULTI ))
|
||||
|
|
|
@ -356,12 +356,6 @@ int main(int argc, char *argv[])
|
|||
switch( Function_mode ) {
|
||||
case FMODE_MENU:
|
||||
DoMenu();
|
||||
#ifdef EDITOR
|
||||
if ( Function_mode == FMODE_EDITOR ) {
|
||||
create_new_mine();
|
||||
SetPlayerFromCurseg();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case FMODE_GAME:
|
||||
#ifdef EDITOR
|
||||
|
@ -375,13 +369,7 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
#ifdef EDITOR
|
||||
case FMODE_EDITOR:
|
||||
keyd_editor_mode = 1;
|
||||
editor();
|
||||
if ( Function_mode == FMODE_GAME ) {
|
||||
Game_mode = GM_EDITOR;
|
||||
editor_reset_stuff_on_level();
|
||||
N_players = 1;
|
||||
}
|
||||
Int3(); // meant to be calling editor from do_option, for now
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
|
11
main/menu.c
11
main/menu.c
|
@ -265,6 +265,17 @@ void do_option ( int select)
|
|||
case MENU_EDITOR:
|
||||
Function_mode = FMODE_EDITOR;
|
||||
init_cockpit();
|
||||
|
||||
create_new_mine();
|
||||
SetPlayerFromCurseg();
|
||||
|
||||
keyd_editor_mode = 1;
|
||||
editor();
|
||||
if ( Function_mode == FMODE_GAME ) {
|
||||
Game_mode = GM_EDITOR;
|
||||
editor_reset_stuff_on_level();
|
||||
N_players = 1;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case MENU_VIEW_SCORES:
|
||||
|
|
Loading…
Reference in a new issue