From c0eb61d875e31bc6669e1c7c8d92b096a35a7ac2 Mon Sep 17 00:00:00 2001 From: avolkov Date: Thu, 10 Dec 2009 21:01:05 +0000 Subject: [PATCH] Dead variable MENU_STATE.MenuRepeatDelay removed git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3419 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/uqm/battle.c | 1 - sc2/src/uqm/battle.h | 1 - sc2/src/uqm/cnctdlg.c | 2 -- sc2/src/uqm/comm.c | 5 ----- sc2/src/uqm/confirm.c | 1 - sc2/src/uqm/controls.h | 1 - sc2/src/uqm/credits.c | 2 -- sc2/src/uqm/gameinp.c | 1 - sc2/src/uqm/gameopt.c | 1 - sc2/src/uqm/intro.c | 5 ----- sc2/src/uqm/melee.c | 1 - sc2/src/uqm/melee.h | 1 - sc2/src/uqm/menustat.h | 2 +- sc2/src/uqm/netplay/netmelee.c | 6 ------ sc2/src/uqm/pickmele.h | 2 +- sc2/src/uqm/planets/lander.c | 2 -- sc2/src/uqm/planets/pstarmap.c | 1 - sc2/src/uqm/setupmenu.c | 3 +-- sc2/src/uqm/uqmdebug.c | 1 - 19 files changed, 3 insertions(+), 36 deletions(-) diff --git a/sc2/src/uqm/battle.c b/sc2/src/uqm/battle.c index 77fa51cae..2ef664964 100644 --- a/sc2/src/uqm/battle.c +++ b/sc2/src/uqm/battle.c @@ -266,7 +266,6 @@ DoBattle (BATTLE_STATE *bs) RECT r; BYTE battle_speed; - bs->MenuRepeatDelay = 0; SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); #if defined (NETPLAY) && defined (NETPLAY_CHECKSUM) diff --git a/sc2/src/uqm/battle.h b/sc2/src/uqm/battle.h index 3f0e1a65f..16ef076b8 100644 --- a/sc2/src/uqm/battle.h +++ b/sc2/src/uqm/battle.h @@ -33,7 +33,6 @@ typedef void (BattleFrameCallback) (void); typedef struct battlestate_struct { BOOLEAN (*InputFunc) (struct battlestate_struct *pInputState); - COUNT MenuRepeatDelay; BOOLEAN first_time; DWORD NextTime; BattleFrameCallback *frame_cb; diff --git a/sc2/src/uqm/cnctdlg.c b/sc2/src/uqm/cnctdlg.c index 88df9d68e..371be377f 100644 --- a/sc2/src/uqm/cnctdlg.c +++ b/sc2/src/uqm/cnctdlg.c @@ -37,7 +37,6 @@ typedef struct connect_dialog_state { BOOLEAN (*InputFunc) (struct connect_dialog_state *pInputState); - COUNT MenuRepeatDelay; DWORD NextTime; BOOLEAN Initialized; @@ -355,7 +354,6 @@ OnTextEntryEvent (WIDGET_TEXTENTRY *widget) // text entry setup tes.Initialized = FALSE; - tes.MenuRepeatDelay = 0; tes.NextTime = GetTimeCounter () + MENU_FRAME_RATE; tes.BaseStr = widget->value; tes.MaxSize = widget->maxlen; diff --git a/sc2/src/uqm/comm.c b/sc2/src/uqm/comm.c index 5b4ba622c..5ac878fd3 100644 --- a/sc2/src/uqm/comm.c +++ b/sc2/src/uqm/comm.c @@ -82,7 +82,6 @@ typedef struct response_entry typedef struct encounter_state { BOOLEAN (*InputFunc) (struct encounter_state *pES); - COUNT MenuRepeatDelay; COUNT Initialized; TimeCount NextTime; // framerate control @@ -561,7 +560,6 @@ typedef struct talking_state { // Fields required by DoInput() BOOLEAN (*InputFunc) (struct talking_state *); - COUNT MenuRepeatDelay; TimeCount NextTime; // framerate control COUNT waitTrack; @@ -803,7 +801,6 @@ typedef struct summary_state { // standard state required by DoInput BOOLEAN (*InputFunc) (struct summary_state *pSS); - COUNT MenuRepeatDelay; // extended state BOOLEAN Initialized; @@ -825,7 +822,6 @@ DoConvSummary (SUMMARY_STATE *pSS) pSS->PrintNext = TRUE; pSS->NextSub = GetFirstTrackSubtitle (); pSS->LeftOver = NULL; - pSS->MenuRepeatDelay = 0; pSS->InputFunc = DoConvSummary; pSS->Initialized = TRUE; DoInput (pSS, FALSE); @@ -1079,7 +1075,6 @@ typedef struct last_replay_state { // Fields required by DoInput() BOOLEAN (*InputFunc) (struct last_replay_state *); - COUNT MenuRepeatDelay; TimeCount NextTime; // framerate control TimeCount TimeOut; diff --git a/sc2/src/uqm/confirm.c b/sc2/src/uqm/confirm.c index b6c30bf58..3aa7720e8 100644 --- a/sc2/src/uqm/confirm.c +++ b/sc2/src/uqm/confirm.c @@ -173,7 +173,6 @@ typedef struct popup_state { // standard state required by DoInput BOOLEAN (*InputFunc) (struct popup_state *self); - COUNT MenuRepeatDelay; } POPUP_STATE; static BOOLEAN diff --git a/sc2/src/uqm/controls.h b/sc2/src/uqm/controls.h index 4b9eb68fd..a3b6f982b 100644 --- a/sc2/src/uqm/controls.h +++ b/sc2/src/uqm/controls.h @@ -131,7 +131,6 @@ typedef struct textentry_state { // standard state required by DoInput BOOLEAN (*InputFunc) (struct textentry_state *pTES); - COUNT MenuRepeatDelay; // these are semi-private read-only BOOLEAN Initialized; diff --git a/sc2/src/uqm/credits.c b/sc2/src/uqm/credits.c index 72b128da4..24d2e96ad 100644 --- a/sc2/src/uqm/credits.c +++ b/sc2/src/uqm/credits.c @@ -691,7 +691,6 @@ typedef struct { // standard state required by DoInput BOOLEAN (*InputFunc) (void *pInputState); - COUNT MenuRepeatDelay; BOOLEAN AllowCancel; BOOLEAN AllowSpeedChange; @@ -825,7 +824,6 @@ Credits (BOOLEAN WithOuttakes) // nothing to do now but wait until credits // are done or canceled by user - cis.MenuRepeatDelay = 0; cis.InputFunc = DoCreditsInput; cis.AllowCancel = !WithOuttakes; cis.CloseWhenDone = !WithOuttakes; diff --git a/sc2/src/uqm/gameinp.c b/sc2/src/uqm/gameinp.c index 8d94f8ffc..6d7eaa4bf 100644 --- a/sc2/src/uqm/gameinp.c +++ b/sc2/src/uqm/gameinp.c @@ -40,7 +40,6 @@ typedef struct { BOOLEAN (*InputFunc) (void *pInputState); - COUNT MenuRepeatDelay; } INPUT_STATE_DESC; /* These static variables are the values that are set by the controllers. */ diff --git a/sc2/src/uqm/gameopt.c b/sc2/src/uqm/gameopt.c index 40bbe025c..a2d12caad 100644 --- a/sc2/src/uqm/gameopt.c +++ b/sc2/src/uqm/gameopt.c @@ -337,7 +337,6 @@ DoNaming (MENU_STATE *pMS) // text entry setup tes.Initialized = FALSE; - tes.MenuRepeatDelay = 0; tes.BaseStr = buf; tes.CursorPos = 0; tes.CbParam = pMS; diff --git a/sc2/src/uqm/intro.c b/sc2/src/uqm/intro.c index 4608805b3..7895a73ee 100644 --- a/sc2/src/uqm/intro.c +++ b/sc2/src/uqm/intro.c @@ -41,7 +41,6 @@ typedef struct { /* standard state required by DoInput */ BOOLEAN (*InputFunc) (void *pInputState); - COUNT MenuRepeatDelay; /* Presentation state */ TimeCount StartTime; @@ -79,7 +78,6 @@ typedef struct typedef struct { /* standard state required by DoInput */ BOOLEAN (*InputFunc) (void *pInputState); - COUNT MenuRepeatDelay; /* Spinanim state */ STAMP anim; @@ -91,7 +89,6 @@ typedef struct { // standard state required by DoInput BOOLEAN (*InputFunc) (void *pInputState); - COUNT MenuRepeatDelay; LEGACY_VIDEO_REF CurVideo; @@ -778,7 +775,6 @@ ShowSlidePresentation (STRING PresStr) UnlockMutex (GraphicsLock); SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); - pis.MenuRepeatDelay = 0; pis.InputFunc = DoPresentation; pis.LastDrawKind = -1; pis.TextVPos = 'B'; @@ -874,7 +870,6 @@ ShowLegacyVideo (LEGACY_VIDEO vid) if (!ref) return FALSE; - vis.MenuRepeatDelay = 0; vis.InputFunc = DoVideoInput; vis.CurVideo = ref; SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); diff --git a/sc2/src/uqm/melee.c b/sc2/src/uqm/melee.c index d894c08ed..9ae49713c 100644 --- a/sc2/src/uqm/melee.c +++ b/sc2/src/uqm/melee.c @@ -1128,7 +1128,6 @@ DoEdit (MELEE_STATE *pMS) UnlockMutex (GraphicsLock); tes.Initialized = FALSE; - tes.MenuRepeatDelay = 0; tes.BaseStr = pMS->SideState[pMS->side].TeamImage.TeamName; tes.CursorPos = 0; tes.MaxSize = MAX_TEAM_CHARS + 1; diff --git a/sc2/src/uqm/melee.h b/sc2/src/uqm/melee.h index 278176b2c..f8ba39dd5 100644 --- a/sc2/src/uqm/melee.h +++ b/sc2/src/uqm/melee.h @@ -103,7 +103,6 @@ struct melee_side_state struct melee_state { BOOLEAN (*InputFunc) (struct melee_state *pInputState); - COUNT MenuRepeatDelay; BOOLEAN Initialized; MELEE_OPTIONS MeleeOption; diff --git a/sc2/src/uqm/menustat.h b/sc2/src/uqm/menustat.h index f614259d5..ed37d24ea 100644 --- a/sc2/src/uqm/menustat.h +++ b/sc2/src/uqm/menustat.h @@ -26,8 +26,8 @@ typedef struct menu_state { + // Standard field required by DoInput() BOOLEAN (*InputFunc) (struct menu_state *pMS); - COUNT MenuRepeatDelay; SIZE Initialized; diff --git a/sc2/src/uqm/netplay/netmelee.c b/sc2/src/uqm/netplay/netmelee.c index 32accd51b..79e043ef7 100644 --- a/sc2/src/uqm/netplay/netmelee.c +++ b/sc2/src/uqm/netplay/netmelee.c @@ -550,7 +550,6 @@ struct NegotiateReadyState { // Common fields of INPUT_STATE_DESC, from which this structure // "inherits". BOOLEAN(*InputFunc)(void *pInputState); - COUNT MenuRepeatDelay; NetConnection *conn; NetState nextState; @@ -593,7 +592,6 @@ bool negotiateReady(NetConnection *conn, bool notifyRemote, NetState nextState) { NegotiateReadyState state; state.InputFunc = (BOOLEAN(*)(void *)) negotiateReadyInputFunc; - state.MenuRepeatDelay = 0; state.conn = conn; state.nextState = nextState; state.done = false; @@ -639,7 +637,6 @@ struct WaitReadyState { // Common fields of INPUT_STATE_DESC, from which this structure // "inherits". BOOLEAN(*InputFunc)(void *pInputState); - COUNT MenuRepeatDelay; NetConnection *conn; NetConnection_ReadyCallback readyCallback; @@ -677,7 +674,6 @@ bool waitReady(NetConnection *conn) { WaitReadyState state; state.InputFunc =(BOOLEAN(*)(void *)) waitReadyInputFunc; - state.MenuRepeatDelay = 0; state.conn = conn; state.readyCallback = NetConnection_getReadyCallback(conn); state.readyCallbackArg = NetConnection_getReadyCallbackArg(conn); @@ -698,7 +694,6 @@ struct WaitResetState { // Common fields of INPUT_STATE_DESC, from which this structure // "inherits". BOOLEAN(*InputFunc)(void *pInputState); - COUNT MenuRepeatDelay; NetConnection *conn; NetState nextState; @@ -743,7 +738,6 @@ bool waitReset(NetConnection *conn, NetState nextState) { WaitResetState state; state.InputFunc = (BOOLEAN(*)(void *)) waitResetInputFunc; - state.MenuRepeatDelay = 0; state.conn = conn; state.nextState = nextState; state.done = false; diff --git a/sc2/src/uqm/pickmele.h b/sc2/src/uqm/pickmele.h index 78fefda9b..22dbe608d 100644 --- a/sc2/src/uqm/pickmele.h +++ b/sc2/src/uqm/pickmele.h @@ -45,7 +45,7 @@ BOOLEAN selectShipNetwork (NetworkInputContext *context, GETMELEE_STATE *gms); struct getmelee_struct { BOOLEAN (*InputFunc) (struct getmelee_struct *pInputState); - COUNT MenuRepeatDelay; + BOOLEAN Initialized; struct { diff --git a/sc2/src/uqm/planets/lander.c b/sc2/src/uqm/planets/lander.c index 70ca08f9c..9e6bcc7cf 100644 --- a/sc2/src/uqm/planets/lander.c +++ b/sc2/src/uqm/planets/lander.c @@ -56,7 +56,6 @@ typedef struct LanderInputState LanderInputState; struct LanderInputState { // Fields required by DoInput() BOOLEAN (*InputFunc) (LanderInputState *pMS); - COUNT MenuRepeatDelay; BOOLEAN Initialized; TimeCount NextTime; @@ -1614,7 +1613,6 @@ DoPlanetSide (LanderInputState *pMS) if (GLOBAL (CurrentActivity) & CHECK_ABORT) return (FALSE); - pMS->MenuRepeatDelay = 0; if (!pMS->Initialized) { COUNT landerSpeedNumer; diff --git a/sc2/src/uqm/planets/pstarmap.c b/sc2/src/uqm/planets/pstarmap.c index 7fa3e80b8..ffdc6fc49 100644 --- a/sc2/src/uqm/planets/pstarmap.c +++ b/sc2/src/uqm/planets/pstarmap.c @@ -1209,7 +1209,6 @@ DoStarSearch (MENU_STATE *pMS) // text entry setup tes.Initialized = FALSE; - tes.MenuRepeatDelay = 0; tes.BaseStr = pss->Text; tes.MaxSize = sizeof (pss->Text); tes.CursorPos = 0; diff --git a/sc2/src/uqm/setupmenu.c b/sc2/src/uqm/setupmenu.c index 2ec016b97..3ea8c0225 100644 --- a/sc2/src/uqm/setupmenu.c +++ b/sc2/src/uqm/setupmenu.c @@ -42,7 +42,7 @@ static STRING SetupTab; typedef struct setup_menu_state { BOOLEAN (*InputFunc) (struct setup_menu_state *pInputState); - COUNT MenuRepeatDelay; + BOOLEAN initialized; int anim_frame_count; DWORD NextTime; @@ -550,7 +550,6 @@ OnTextEntryEvent (WIDGET_TEXTENTRY *widget) // text entry setup tes.Initialized = FALSE; - tes.MenuRepeatDelay = 0; tes.NextTime = GetTimeCounter () + MENU_FRAME_RATE; tes.BaseStr = widget->value; tes.MaxSize = widget->maxlen; diff --git a/sc2/src/uqm/uqmdebug.c b/sc2/src/uqm/uqmdebug.c index c6a50982f..f6997cfdd 100644 --- a/sc2/src/uqm/uqmdebug.c +++ b/sc2/src/uqm/uqmdebug.c @@ -1838,7 +1838,6 @@ typedef struct wait_state { // standard state required by DoInput BOOLEAN (*InputFunc) (struct wait_state *self); - COUNT MenuRepeatDelay; } WAIT_STATE;