Resource cleanup part 2: remove (nearly all) obsolete, unreferenced resources and ID macros
This commit is contained in:
parent
c208a2012d
commit
c013dd96e6
|
@ -36,6 +36,21 @@
|
||||||
#include "basicbot.h"
|
#include "basicbot.h"
|
||||||
#include "../../input.h" // qfox: fceu_botmode() fceu_setbotmode()
|
#include "../../input.h" // qfox: fceu_botmode() fceu_setbotmode()
|
||||||
|
|
||||||
|
// Cleanup: static function declarations moved here
|
||||||
|
static void BotSyntaxError(int errorcode);
|
||||||
|
static void StopBasicBot();
|
||||||
|
static void StartBasicBot();
|
||||||
|
static int debug(int n);
|
||||||
|
static char * debugS(char * s);
|
||||||
|
static int error(int n);
|
||||||
|
static void FromGUI();
|
||||||
|
static void UpdateStatics();
|
||||||
|
static bool LoadBasicBotFile(char fn[]);
|
||||||
|
static bool LoadBasicBot();
|
||||||
|
static bool SaveBasicBotFile(char fn[]);
|
||||||
|
static bool SaveBasicBot();
|
||||||
|
static void PlayBest();
|
||||||
|
|
||||||
// v0.1.0 will be the last release by Luke, mine will start at v0.2.0 and
|
// v0.1.0 will be the last release by Luke, mine will start at v0.2.0 and
|
||||||
// go up each time something is released to the public, so you'll
|
// go up each time something is released to the public, so you'll
|
||||||
// know your version is the latest or whatever. Version will be
|
// know your version is the latest or whatever. Version will be
|
||||||
|
@ -2437,9 +2452,9 @@ static BOOL CALLBACK BasicBotCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
||||||
bool p1 = false; // if a input radiobutton is pressed, this tells me which one
|
bool p1 = false; // if a input radiobutton is pressed, this tells me which one
|
||||||
switch(LOWORD(wParam))
|
switch(LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case GUI_BOT_P1:
|
case GUI_BOT_INTERNAL:
|
||||||
p1 = true;
|
p1 = true;
|
||||||
case GUI_BOT_P2:
|
case GUI_BOT_EXTERNAL:
|
||||||
// set the botmode
|
// set the botmode
|
||||||
FCEU_SetBotMode(p1?0:1);
|
FCEU_SetBotMode(p1?0:1);
|
||||||
break;
|
break;
|
||||||
|
@ -2575,7 +2590,7 @@ void CreateBasicBot()
|
||||||
*/
|
*/
|
||||||
void InitCode()
|
void InitCode()
|
||||||
{
|
{
|
||||||
CheckDlgButton(hwndBasicBot, FCEU_BotMode() ? GUI_BOT_P2 : GUI_BOT_P1, 1); // select the player1 radiobutton
|
CheckDlgButton(hwndBasicBot, FCEU_BotMode() ? GUI_BOT_EXTERNAL : GUI_BOT_INTERNAL, 1); // select the player1 radiobutton
|
||||||
//if (LoadBasicBotFile("default.bot"))
|
//if (LoadBasicBotFile("default.bot"))
|
||||||
if (false)
|
if (false)
|
||||||
{
|
{
|
||||||
|
@ -2615,13 +2630,13 @@ void UpdateExternalButton()
|
||||||
{
|
{
|
||||||
if (FCEU_BotMode())
|
if (FCEU_BotMode())
|
||||||
{
|
{
|
||||||
CheckDlgButton(hwndBasicBot, GUI_BOT_P1, 0);
|
CheckDlgButton(hwndBasicBot, GUI_BOT_INTERNAL, 0);
|
||||||
CheckDlgButton(hwndBasicBot, GUI_BOT_P2, 1);
|
CheckDlgButton(hwndBasicBot, GUI_BOT_EXTERNAL, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CheckDlgButton(hwndBasicBot, GUI_BOT_P1, 1);
|
CheckDlgButton(hwndBasicBot, GUI_BOT_INTERNAL, 1);
|
||||||
CheckDlgButton(hwndBasicBot, GUI_BOT_P2, 0);
|
CheckDlgButton(hwndBasicBot, GUI_BOT_EXTERNAL, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,24 +5,11 @@
|
||||||
void UpdateBasicBot();
|
void UpdateBasicBot();
|
||||||
void CreateBasicBot();
|
void CreateBasicBot();
|
||||||
extern char *BasicBotDir;
|
extern char *BasicBotDir;
|
||||||
static void BotSyntaxError(int errorcode);
|
|
||||||
static void StopBasicBot();
|
|
||||||
static void StartBasicBot();
|
|
||||||
static int debug(int n);
|
|
||||||
static char * debugS(char * s);
|
|
||||||
static int error(int n);
|
|
||||||
static void FromGUI();
|
|
||||||
static void UpdateStatics();
|
|
||||||
void UpdateExternalButton();
|
void UpdateExternalButton();
|
||||||
static bool LoadBasicBotFile(char fn[]);
|
|
||||||
static bool LoadBasicBot();
|
|
||||||
static bool SaveBasicBotFile(char fn[]);
|
|
||||||
static bool SaveBasicBot();
|
|
||||||
void CrashWindow();
|
void CrashWindow();
|
||||||
void InitCode();
|
void InitCode();
|
||||||
void ResetStats();
|
void ResetStats();
|
||||||
void UpdateBestGUI();
|
void UpdateBestGUI();
|
||||||
static void PlayBest();
|
|
||||||
void UpdateLastGUI(int last[]);
|
void UpdateLastGUI(int last[]);
|
||||||
void UpdateAvgGUI();
|
void UpdateAvgGUI();
|
||||||
void UpdateFullGUI();
|
void UpdateFullGUI();
|
||||||
|
|
|
@ -154,23 +154,6 @@ END
|
||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
CREATEMOVIE DIALOG 0, 0, 371, 133
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Record Movie"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",101,257,112,50,14
|
|
||||||
PUSHBUTTON "Cancel",102,314,112,50,14
|
|
||||||
EDITTEXT 201,7,24,300,14,ES_AUTOHSCROLL
|
|
||||||
LTEXT "Movie File:",65525,7,13,132,10
|
|
||||||
RTEXT "Author Info:",65524,14,51,79,8
|
|
||||||
GROUPBOX "Record from:",65523,7,74,103,31
|
|
||||||
CONTROL "Now",401,"Button",BS_AUTORADIOBUTTON | WS_GROUP,19,87,31,10
|
|
||||||
CONTROL "Reset",402,"Button",BS_AUTORADIOBUTTON,59,87,35,10
|
|
||||||
EDITTEXT 301,100,51,264,14,ES_AUTOHSCROLL
|
|
||||||
PUSHBUTTON "Browse...",202,314,24,50,14
|
|
||||||
END
|
|
||||||
|
|
||||||
DIRCONFIG DIALOGEX 63, 7, 305, 276
|
DIRCONFIG DIALOGEX 63, 7, 305, 276
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Directories Configuration"
|
CAPTION "Directories Configuration"
|
||||||
|
@ -495,30 +478,6 @@ BEGIN
|
||||||
PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14
|
PUSHBUTTON "Clear",BTN_CLEAR,95,45,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
OPENMOVIE DIALOG 0, 0, 381, 183
|
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Replay Movie"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
DEFPUSHBUTTON "OK",101,267,162,50,14
|
|
||||||
PUSHBUTTON "Cancel",102,324,162,50,14
|
|
||||||
EDITTEXT 201,7,24,310,14,ES_AUTOHSCROLL
|
|
||||||
LTEXT "Movie File:",65470,7,13,132,10
|
|
||||||
CONTROL "Open as Read-Only",203,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,42,78,10
|
|
||||||
RTEXT "Number of Frames:",65469,14,70,79,8
|
|
||||||
RTEXT "Length:",65468,14,81,79,8
|
|
||||||
RTEXT "Re-record Count:",65467,14,92,79,8
|
|
||||||
RTEXT "Author Info:",65466,14,103,79,8
|
|
||||||
LTEXT "FRAMES",301,96,70,79,8
|
|
||||||
LTEXT "LENGTH",302,96,81,79,8
|
|
||||||
LTEXT "RERECORD",303,96,92,79,8
|
|
||||||
LTEXT "AUTHOR",304,96,103,278,8
|
|
||||||
GROUPBOX "Recorded from:",65465,7,118,103,31
|
|
||||||
CONTROL "Now",401,"Button",BS_AUTORADIOBUTTON | WS_GROUP,19,132,31,10
|
|
||||||
CONTROL "Reset",402,"Button",BS_AUTORADIOBUTTON,59,132,35,10
|
|
||||||
PUSHBUTTON "Browse...",202,324,24,50,14
|
|
||||||
END
|
|
||||||
|
|
||||||
PALCONFIG DIALOGEX 16, 81, 228, 116
|
PALCONFIG DIALOGEX 16, 81, 228, 116
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Palette Configuration"
|
CAPTION "Palette Configuration"
|
||||||
|
|
|
@ -105,7 +105,6 @@
|
||||||
#define MENU_SAVE_STATE 110
|
#define MENU_SAVE_STATE 110
|
||||||
#define CB_ASK_EXIT 110
|
#define CB_ASK_EXIT 110
|
||||||
#define COMBO_FAM 110
|
#define COMBO_FAM 110
|
||||||
#define IDB_BITMAP1 110
|
|
||||||
#define IDB_TE_ARROW 110
|
#define IDB_TE_ARROW 110
|
||||||
#define IDC_CHECK_LOG_REGISTERS 110
|
#define IDC_CHECK_LOG_REGISTERS 110
|
||||||
#define IDC_DEBUGGER_BREAK_ON_BAD_OP 110
|
#define IDC_DEBUGGER_BREAK_ON_BAD_OP 110
|
||||||
|
@ -126,9 +125,6 @@
|
||||||
#define IDC_CHECK_LOG_NEW_DATA 115
|
#define IDC_CHECK_LOG_NEW_DATA 115
|
||||||
#define LBL_CLEAR_AH 116
|
#define LBL_CLEAR_AH 116
|
||||||
#define IDC_CHECK_LOG_UPDATE_WINDOW 116
|
#define IDC_CHECK_LOG_UPDATE_WINDOW 116
|
||||||
#define LBL_AUTO_HOLD2 118
|
|
||||||
#define LBL_AUTO_HOLD3 120
|
|
||||||
#define LBL_AUTO_HOLD4 122
|
|
||||||
#define CHECK_SOUND_8BIT 122
|
#define CHECK_SOUND_8BIT 122
|
||||||
#define CHECK_SOUND_GLOBAL_FOCUS 124
|
#define CHECK_SOUND_GLOBAL_FOCUS 124
|
||||||
#define CHECK_SOUND_ENABLED 126
|
#define CHECK_SOUND_ENABLED 126
|
||||||
|
@ -306,22 +302,17 @@
|
||||||
#define IDC_NTVIEW_MIRROR_SS_TABLE_3 1007
|
#define IDC_NTVIEW_MIRROR_SS_TABLE_3 1007
|
||||||
#define GUI_BOT_A_2 1008
|
#define GUI_BOT_A_2 1008
|
||||||
#define IDC_NTVIEW_SHOW_SCROLL_LINES 1008
|
#define IDC_NTVIEW_SHOW_SCROLL_LINES 1008
|
||||||
#define GUI_BOT_END 1009
|
|
||||||
#define GUI_BOT_INVALID 1009
|
#define GUI_BOT_INVALID 1009
|
||||||
#define GUI_BOT_X 1010
|
#define GUI_BOT_X 1010
|
||||||
#define MW_ADDR03 1010
|
#define MW_ADDR03 1010
|
||||||
#define GUI_BOT_TIE1 1011
|
|
||||||
#define GUI_BOT_SCORE2 1011
|
#define GUI_BOT_SCORE2 1011
|
||||||
#define GUI_BOT_TIE2 1012
|
|
||||||
#define GUI_BOT_SCORE3 1012
|
#define GUI_BOT_SCORE3 1012
|
||||||
#define GUI_BOT_TIE3 1013
|
|
||||||
#define GUI_BOT_SCORE4 1013
|
#define GUI_BOT_SCORE4 1013
|
||||||
#define MW_ADDR04 1013
|
#define MW_ADDR04 1013
|
||||||
#define GUI_BOT_SAVE 1014
|
#define GUI_BOT_SAVE 1014
|
||||||
#define GUI_BOT_LOAD 1015
|
#define GUI_BOT_LOAD 1015
|
||||||
#define GUI_BOT_RUN 1016
|
#define GUI_BOT_RUN 1016
|
||||||
#define MW_ADDR05 1016
|
#define MW_ADDR05 1016
|
||||||
#define GUI_BOT_MAX 1017
|
|
||||||
#define GUI_BOT_SCORE1 1017
|
#define GUI_BOT_SCORE1 1017
|
||||||
#define GUI_BOT_Y 1018
|
#define GUI_BOT_Y 1018
|
||||||
#define GUI_BOT_KEYS 1019
|
#define GUI_BOT_KEYS 1019
|
||||||
|
@ -330,7 +321,6 @@
|
||||||
#define GUI_BOT_BEST 1021
|
#define GUI_BOT_BEST 1021
|
||||||
#define GUI_BOT_Z 1022
|
#define GUI_BOT_Z 1022
|
||||||
#define MW_ADDR07 1022
|
#define MW_ADDR07 1022
|
||||||
#define GUI_BOT_CHECK 1023
|
|
||||||
#define GUI_BOT_COMMENTS 1023
|
#define GUI_BOT_COMMENTS 1023
|
||||||
#define GUI_BOT_UPDATE 1024
|
#define GUI_BOT_UPDATE 1024
|
||||||
#define GUI_BOT_BOTMODE 1025
|
#define GUI_BOT_BOTMODE 1025
|
||||||
|
@ -348,14 +338,13 @@
|
||||||
#define GUI_BOT_MAXPARTS 1033
|
#define GUI_BOT_MAXPARTS 1033
|
||||||
#define GUI_BOT_B_2 1034
|
#define GUI_BOT_B_2 1034
|
||||||
#define MW_ADDR11 1034
|
#define MW_ADDR11 1034
|
||||||
#define GUI_BOT_P1 1035
|
|
||||||
#define GUI_BOT_INTERNAL 1035
|
#define GUI_BOT_INTERNAL 1035
|
||||||
#define GUI_BOT_CLEAR 1036
|
#define GUI_BOT_CLEAR 1036
|
||||||
#define GUI_BOT_ATTEMPTS 1037
|
#define GUI_BOT_ATTEMPTS 1037
|
||||||
#define MW_ADDR12 1037
|
#define MW_ADDR12 1037
|
||||||
#define GUI_BOT_SELECT_2 1038
|
#define GUI_BOT_SELECT_2 1038
|
||||||
#define GUI_BOT_START_2 1039
|
#define GUI_BOT_START_2 1039
|
||||||
#define GUI_BOT_P2 1040
|
#define GUI_BOT_EXTERNAL 1040
|
||||||
#define GUI_BOT_EXTERNAL 1040
|
#define GUI_BOT_EXTERNAL 1040
|
||||||
#define MW_ADDR13 1040
|
#define MW_ADDR13 1040
|
||||||
#define GUI_BOT_UP_2 1041
|
#define GUI_BOT_UP_2 1041
|
||||||
|
@ -370,15 +359,9 @@
|
||||||
#define GUI_BOT_INIT_ATTEMPT 1048
|
#define GUI_BOT_INIT_ATTEMPT 1048
|
||||||
#define GUI_BOT_FRAMES 1049
|
#define GUI_BOT_FRAMES 1049
|
||||||
#define MW_ADDR16 1049
|
#define MW_ADDR16 1049
|
||||||
#define GUI_BOT_BESTRESULT 1050
|
|
||||||
#define GUI_BOT_LAST 1051
|
|
||||||
#define GUI_BOT_U 1052
|
#define GUI_BOT_U 1052
|
||||||
#define MW_ADDR17 1052
|
#define MW_ADDR17 1052
|
||||||
#define GUI_BOT_AVGMAX 1053
|
|
||||||
#define GUI_BOT_AVGTIE1 1054
|
|
||||||
#define MW_ADDR18 1055
|
#define MW_ADDR18 1055
|
||||||
#define GUI_BOT_AVGTIE2 1056
|
|
||||||
#define GUI_BOT_AVGTIE3 1057
|
|
||||||
#define MW_ADDR19 1058
|
#define MW_ADDR19 1058
|
||||||
#define GUI_BOT_OK 1061
|
#define GUI_BOT_OK 1061
|
||||||
#define MW_ADDR20 1061
|
#define MW_ADDR20 1061
|
||||||
|
@ -492,7 +475,6 @@
|
||||||
#define MENU_AUTOFIRE_OFFSET_6 40070
|
#define MENU_AUTOFIRE_OFFSET_6 40070
|
||||||
#define MENU_ALTERNATE_AB 40071
|
#define MENU_ALTERNATE_AB 40071
|
||||||
#define MENU_EXTERNAL_INPUT 40072
|
#define MENU_EXTERNAL_INPUT 40072
|
||||||
#define MENU_DEBUG 40073
|
|
||||||
#define MENU_PPUVIEWER 40074
|
#define MENU_PPUVIEWER 40074
|
||||||
#define MENU_NAMETABLEVIEWER 40075
|
#define MENU_NAMETABLEVIEWER 40075
|
||||||
#define MENU_HEXEDITOR 40076
|
#define MENU_HEXEDITOR 40076
|
||||||
|
@ -502,26 +484,6 @@
|
||||||
#define MENU_DEBUGGER 40080
|
#define MENU_DEBUGGER 40080
|
||||||
#define MENU_MEMORY_WATCH 40081
|
#define MENU_MEMORY_WATCH 40081
|
||||||
#define MENU_RAMFILTER 40082
|
#define MENU_RAMFILTER 40082
|
||||||
#define MENU_OPEN 40083
|
|
||||||
#define MENU_CLOSE 40084
|
|
||||||
#define MENU_SAVEAS 40085
|
|
||||||
#define MENU_SAVE 40086
|
|
||||||
#define MENU_RECENT 40087
|
|
||||||
#define MENU_CLEARTEXT 40088
|
|
||||||
#define MENU_LOADSTART 40089
|
|
||||||
#define ID_OPTIONS_LOADLASTFILEONSTARTUP 40090
|
|
||||||
#define ID_OPTIONS_LOADLASTFILE 40091
|
|
||||||
#define OPTIONS_LOADSTART 40092
|
|
||||||
#define FILE_OPEN 40093
|
|
||||||
#define FILE_CLOSE 40094
|
|
||||||
#define FILE_SAVE 40095
|
|
||||||
#define FILE_SAVEAS 40096
|
|
||||||
#define FILE_RECENT 40097
|
|
||||||
#define FILE_CLEARTEXT 40098
|
|
||||||
#define ID_HELP_COMMANDS 40099
|
|
||||||
#define About 40100
|
|
||||||
#define ID_HELP_ABOUT 40101
|
|
||||||
#define FILE_NEW 40102
|
|
||||||
#define MEMW_FILE_NEW 40103
|
#define MEMW_FILE_NEW 40103
|
||||||
#define MEMW_FILE_OPEN 40104
|
#define MEMW_FILE_OPEN 40104
|
||||||
#define MEMW_FILE_SAVE 40105
|
#define MEMW_FILE_SAVE 40105
|
||||||
|
@ -529,20 +491,11 @@
|
||||||
#define MEMW_FILE_RECENT 40107
|
#define MEMW_FILE_RECENT 40107
|
||||||
#define MEMW_FILE_CLOSE 40108
|
#define MEMW_FILE_CLOSE 40108
|
||||||
#define MEMW_OPTIONS_LOADSTART 40109
|
#define MEMW_OPTIONS_LOADSTART 40109
|
||||||
#define MEMW_ID_OPTIONS_LOADLASTFILE 40110
|
|
||||||
#define MEMW_WCOMMANDS 40111
|
|
||||||
#define MEMW_HELP_ABOUT 40112
|
|
||||||
#define MEMW_HELP_WCOMMANDS 40113
|
#define MEMW_HELP_WCOMMANDS 40113
|
||||||
#define MEMW_OPTIONS_LOADLASTFILE 40114
|
#define MEMW_OPTIONS_LOADLASTFILE 40114
|
||||||
#define ID_RECENT_ 40115
|
|
||||||
#define ID_RECENT_1 40116
|
|
||||||
#define ID_FILE_RECENT 40117
|
#define ID_FILE_RECENT 40117
|
||||||
#define ID_FILE_RECENT40118 40118
|
|
||||||
#define ID_ACCELERATOR_CTRL_O 40119
|
|
||||||
#define MENU_LOG_SOUND 40120
|
#define MENU_LOG_SOUND 40120
|
||||||
#define ID_TOOLS_TASEDIT 40123
|
|
||||||
#define MENU_TASEDIT 40124
|
#define MENU_TASEDIT 40124
|
||||||
#define ID_CONFIG_PAUSEAFTERPLAYBACK 40125
|
|
||||||
#define MENU_PAUSEAFTERPLAYBACK 40126
|
#define MENU_PAUSEAFTERPLAYBACK 40126
|
||||||
#define ACCEL_CTRL_O 40130
|
#define ACCEL_CTRL_O 40130
|
||||||
#define ACCEL_CTRL_E 40131
|
#define ACCEL_CTRL_E 40131
|
||||||
|
@ -556,7 +509,6 @@
|
||||||
#define MW_ValueLabel1 65426
|
#define MW_ValueLabel1 65426
|
||||||
#define GUI_BOT_DEBUG 65436
|
#define GUI_BOT_DEBUG 65436
|
||||||
#define GUI_BOT_ERROR 65438
|
#define GUI_BOT_ERROR 65438
|
||||||
#define LBL_INPUT_HELP 65488
|
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue