From 18d42ec1af014fe4f2a563607bdcce0964fa678e Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 1 Jul 2010 22:50:11 +0100 Subject: [PATCH] Rename reInit() method to 'resetSimulator', and document that it's hooked up to the 'reset' command. --- src/GUI/gui.h | 1 - src/Main/fg_commands.cxx | 2 +- src/Main/fg_init.cxx | 2 +- src/Main/fg_init.hxx | 5 +++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/GUI/gui.h b/src/GUI/gui.h index 2563251d8..4a02d0a5e 100644 --- a/src/GUI/gui.h +++ b/src/GUI/gui.h @@ -55,7 +55,6 @@ extern fntTexFont *guiFntHandle; extern int gui_menu_on; // from gui_funcs.cxx -extern void reInit(void); extern void fgDumpSnapShotWrapper(); #ifdef TR_HIRES_SNAP extern void fgHiResDumpWrapper(); diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 96acc84e3..1dd37d387 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -223,7 +223,7 @@ do_exit (const SGPropertyNode * arg) static bool do_reset (const SGPropertyNode * arg) { - reInit(); + doSimulatorReset(); return true; } diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 27cc0866b..e4bec1548 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1652,7 +1652,7 @@ void fgReInitSubsystems() } -void reInit(void) // from gui_local.cxx -- TODO merge with fgReInitSubsystems() +void doSimulatorReset(void) // from gui_local.cxx -- TODO merge with fgReInitSubsystems() { static SGPropertyNode_ptr master_freeze = fgGetNode("/sim/freeze/master", true); diff --git a/src/Main/fg_init.hxx b/src/Main/fg_init.hxx index 1fc53a6ff..58b48a8c2 100644 --- a/src/Main/fg_init.hxx +++ b/src/Main/fg_init.hxx @@ -65,6 +65,11 @@ bool fgInitSubsystems(); // Reset void fgReInitSubsystems(); +/** + * this is what the 'reset' command (and hence, GUI) is attached too + * it overlaps with fgReInitSubsystems quite substantially + */ +void doSimulatorReset(void); // Set the initial position based on presets (or defaults) bool fgInitPosition(); -- 2.39.2