1
0
Fork 0

- remove unused puObject args in gui fgcommands

- remove no longer used PU macros
This commit is contained in:
mfranz 2008-06-23 18:28:02 +00:00
parent 889f3926f2
commit ecd5521bf8
5 changed files with 20 additions and 49 deletions

View file

@ -56,20 +56,20 @@ extern fntTexFont *guiFntHandle;
extern int gui_menu_on; extern int gui_menu_on;
// from gui_funcs.cxx // from gui_funcs.cxx
extern void reInit(puObject *); extern void reInit(void);
extern void fgDumpSnapShotWrapper(puObject *); extern void fgDumpSnapShotWrapper();
#ifdef TR_HIRES_SNAP #ifdef TR_HIRES_SNAP
extern void fgHiResDumpWrapper(puObject *); extern void fgHiResDumpWrapper();
extern void fgHiResDump(); extern void fgHiResDump();
#endif #endif
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
extern void printScreen(puObject *); extern void printScreen();
#endif #endif
extern void helpCb(puObject *); extern void helpCb();
typedef struct { typedef struct {
const char *name; const char *name;
void (*fn)(puObject *); void (*fn)();
} __fg_gui_fn_t; } __fg_gui_fn_t;
extern const __fg_gui_fn_t __fg_gui_fn[]; extern const __fg_gui_fn_t __fg_gui_fn[];
@ -79,30 +79,4 @@ extern void maybeToggleMouse( void );
extern void TurnCursorOn( void ); extern void TurnCursorOn( void );
extern void TurnCursorOff( void ); extern void TurnCursorOff( void );
// MACROS TO HELP KEEP PUI LIVE INTERFACE STACK IN SYNC
// These insure that the mouse is active when dialog is shown
// and try to the maintain the original mouse state when hidden
// These will also repair any damage done to the Panel if active
// Activate Dialog Box
inline void FG_PUSH_PUI_DIALOG( puObject *X ) {
maybeToggleMouse();
puPushLiveInterface( (puInterface *)X ) ;
X->reveal() ;
}
// Deactivate Dialog Box
inline void FG_POP_PUI_DIALOG( puObject *X ) {
X->hide();
puPopLiveInterface();
maybeToggleMouse();
}
// Finalize Dialog Box Construction
inline void FG_FINALIZE_PUI_DIALOG( puObject *X ) {
((puGroup *)X)->close();
X->hide();
puPopLiveInterface();
}
#endif // _GUI_H_ #endif // _GUI_H_

View file

@ -197,7 +197,7 @@ ____________________________________________________________________*/
// on Sunday 3rd of December // on Sunday 3rd of December
void helpCb (puObject *) void helpCb ()
{ {
string command; string command;
@ -489,7 +489,7 @@ GLubyte *hiResScreenCapture( int multiplier )
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
// win32 print screen function // win32 print screen function
void printScreen ( puObject *obj ) { void printScreen () {
bool show_pu_cursor = false; bool show_pu_cursor = false;
TurnCursorOff(); TurnCursorOff();
if ( !puCursorIsHidden() ) { if ( !puCursorIsHidden() ) {
@ -511,12 +511,12 @@ void printScreen ( puObject *obj ) {
#endif // #ifdef WIN32 #endif // #ifdef WIN32
void fgDumpSnapShotWrapper ( puObject *obj ) { void fgDumpSnapShotWrapper () {
fgDumpSnapShot(); fgDumpSnapShot();
} }
void fgHiResDumpWrapper ( puObject *obj ) { void fgHiResDumpWrapper () {
fgHiResDump(); fgHiResDump();
} }

View file

@ -24,7 +24,6 @@
// stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0); // stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0);
static float _quat0[4]; static float _quat0[4];
float lastGuiQuat[4];
float curGuiQuat[4]; float curGuiQuat[4];
// To apply our mouse rotation quat to VIEW // To apply our mouse rotation quat to VIEW
@ -46,7 +45,7 @@ void initMouseQuat(void) {
} }
void reInit(puObject *cb) void reInit(void)
{ {
Quat0(); Quat0();

View file

@ -23,12 +23,10 @@ typedef enum {
extern MouseMode mouse_mode; extern MouseMode mouse_mode;
extern int gui_menu_on; extern int gui_menu_on;
extern float lastGuiQuat[4];
extern float curGuiQuat[4]; extern float curGuiQuat[4];
extern float GuiQuat_mat[4][4]; extern float GuiQuat_mat[4][4];
extern void initMouseQuat( void ); extern void initMouseQuat( void );
extern void Quat0( void ); extern void Quat0( void );
class puObject; extern void reInit(void);
extern void reInit(puObject *cb);

View file

@ -26,39 +26,39 @@
// user-configured dialogs and new commands where necessary. // user-configured dialogs and new commands where necessary.
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
extern void reInit (puObject *); extern void reInit (void);
static bool static bool
do_reinit_dialog (const SGPropertyNode * arg) do_reinit_dialog (const SGPropertyNode * arg)
{ {
reInit(0); reInit();
return true; return true;
} }
#if defined(TR_HIRES_SNAP) #if defined(TR_HIRES_SNAP)
extern void dumpHiResSnapShot (puObject *); extern void dumpHiResSnapShot ();
static bool static bool
do_hires_snapshot_dialog (const SGPropertyNode * arg) do_hires_snapshot_dialog (const SGPropertyNode * arg)
{ {
dumpHiResSnapShot(0); dumpHiResSnapShot();
return true; return true;
} }
#endif // TR_HIRES_SNAP #endif // TR_HIRES_SNAP
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
extern void printScreen (puObject *); extern void printScreen ();
static bool static bool
do_print_dialog (const SGPropertyNode * arg) do_print_dialog (const SGPropertyNode * arg)
{ {
printScreen(0); printScreen();
return true; return true;
} }
#endif #endif
extern void helpCb (puObject *); extern void helpCb ();
static bool static bool
do_help_dialog (const SGPropertyNode * arg) do_help_dialog (const SGPropertyNode * arg)
{ {
helpCb(0); helpCb();
return true; return true;
} }