home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Read default order of windows from file config/toggle_win_order.
[plomrogue]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index 247ec507173c9af85e02d6549926f08e3d5b6db4..06f53ab39d14945c11d04a4bf89ce9aad8da683d 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-21,12
+21,12
@@
* build_map_objects()
*/
#include "map.h" /* for struct Map, init_map() */
* build_map_objects()
*/
#include "map.h" /* for struct Map, init_map() */
-#include "misc.h" /* for update_log(), toggle_window(), find_passable_pos(),
- * save_game()
- */
+#include "misc.h" /* for update_log(), find_passable_pos(), save_game() */
+#include "wincontrol.h" /* for toggle_window() */
#include "rrand.h" /* for rrand(), rrand_seed() */
#include "rexit.h" /* for exit_game() */
#include "control.h" /* for meta_control() */
#include "rrand.h" /* for rrand(), rrand_seed() */
#include "rexit.h" /* for exit_game() */
#include "control.h" /* for meta_control() */
+#include "command_db.h" /* for init_command_db() */
@@
-34,6
+34,9
@@
int main(int argc, char *argv[])
{
struct World world;
{
struct World world;
+ init_command_db(&world);
+ set_cleanup_flag(CLEANUP_COMMAND_DB);
+
/* Check for corrupted savefile / recordfile savings. */
char * recordfile = "record";
char * savefile = "savefile";
/* Check for corrupted savefile / recordfile savings. */
char * recordfile = "record";
char * savefile = "savefile";
@@
-99,7
+102,7
@@
int main(int argc, char *argv[])
world.player = &player;
world.monster = 0;
world.item = 0;
world.player = &player;
world.monster = 0;
world.item = 0;
- init_map_object_defs(&world, "defs");
+ init_map_object_defs(&world, "
config/
defs");
/* For interactive mode, try to load world state from savefile. */
char * err_o = "Trouble loading game (fopen() in main()) / "
/* For interactive mode, try to load world state from savefile. */
char * err_o = "Trouble loading game (fopen() in main()) / "
@@
-217,10
+220,7
@@
int main(int argc, char *argv[])
struct Win win_map = init_win(&win_meta, "Map",
0, width_mapwin, &world, draw_map_win);
world.wins.map = &win_map;
struct Win win_map = init_win(&win_meta, "Map",
0, width_mapwin, &world, draw_map_win);
world.wins.map = &win_map;
- toggle_window(&win_meta, world.wins.keys);
- toggle_window(&win_meta, world.wins.map);
- toggle_window(&win_meta, world.wins.info);
- toggle_window(&win_meta, world.wins.log);
+ sorted_wintoggle(&world);
/* Replay mode. */
int key;
/* Replay mode. */
int key;
@@
-244,7
+244,7
@@
int main(int argc, char *argv[])
draw_all_wins(&win_meta);
key = getch();
if ( EOF != action
draw_all_wins(&win_meta);
key = getch();
if ( EOF != action
- && key == get_action_key(world.keybindings, "wait
/ next turn
"))
+ && key == get_action_key(world.keybindings, "wait"))
{
action = getc(file);
if (EOF != action)
{
action = getc(file);
if (EOF != action)