Cleaned up some code.

This commit is contained in:
rheiny 2007-02-10 15:56:13 +00:00
parent 652c36be53
commit 1644cb0762
9 changed files with 604 additions and 480 deletions

View File

@ -2408,7 +2408,6 @@ int pause = 0;
**/
static BOOL CALLBACK BasicBotCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DSMFix(uMsg); // stops sound on 5 of the messages...
switch(uMsg)
{
case WM_INITDIALOG:

View File

@ -26,7 +26,6 @@ extern HWND hAppWnd;
extern HINSTANCE fceu_hInstance;
extern int NoWaiting;
void DSMFix(UINT msg);
extern int eoptions;

View File

@ -42,16 +42,16 @@ static CFGSTRUCT fceuconfig[] = {
ACS(recent_files[8]),
ACS(recent_files[9]),
ACS(rdirs[0]),
ACS(rdirs[1]),
ACS(rdirs[2]),
ACS(rdirs[3]),
ACS(rdirs[4]),
ACS(rdirs[5]),
ACS(rdirs[6]),
ACS(rdirs[7]),
ACS(rdirs[8]),
ACS(rdirs[9]),
ACS(recent_directories[0]),
ACS(recent_directories[1]),
ACS(recent_directories[2]),
ACS(recent_directories[3]),
ACS(recent_directories[4]),
ACS(recent_directories[5]),
ACS(recent_directories[6]),
ACS(recent_directories[7]),
ACS(recent_directories[8]),
ACS(recent_directories[9]),
AC(ntsccol),AC(ntsctint),AC(ntschue),

View File

@ -56,8 +56,6 @@ void RedoText(void)
**/
BOOL CALLBACK LogCon(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DSMFix(uMsg);
switch(uMsg)
{
case WM_INITDIALOG:

View File

@ -64,7 +64,7 @@ void ResetVideo(void);
void ShowCursorAbs(int w);
void HideFWindow(int h);
void FixWXY(int pref);
int SetMainWindowStuff(void);
void SetMainWindowStuff(void);
int GetClientAbsRect(LPRECT lpRect);
void UpdateFCEUWindow(void);
@ -400,13 +400,13 @@ int DriverInitialize(void)
static void DriverKill(void)
{
sprintf(TempArray,"%s/fceu98.cfg",BaseDirectory);
SaveConfig(TempArray);
DestroyInput();
ResetVideo();
if(soundo) TrashSound();
CloseWave();
ByebyeWindow();
sprintf(TempArray,"%s/fceu98.cfg",BaseDirectory);
SaveConfig(TempArray);
DestroyInput();
ResetVideo();
if(soundo) TrashSound();
CloseWave();
ByebyeWindow();
}
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);

Binary file not shown.

View File

@ -185,13 +185,44 @@
#define MENU_MSGLOG 40047
#define MENU_CHEATS 40048
#define MENU_BASIC_BOT 40049
#define MENU_AUTOFIRE_PATTERN_1 40050
#define MENU_AUTOFIRE_PATTERN_2 40051
#define MENU_AUTOFIRE_PATTERN_3 40052
#define ID_DEBUG_DEBUGGER 40053
#define MENU_AUTOFIRE_PATTERN_4 40053
#define ID_DEBUG_PPUVIEWER 40054
#define MENU_AUTOFIRE_PATTERN_5 40054
#define ID_DEBUG_NAMETABLEVIEWER 40055
#define MENU_AUTOFIRE_PATTERN_6 40055
#define ID_DEBUG_HEXEDITOR 40056
#define MENU_AUTOFIRE_PATTERN_7 40056
#define ID_DEBUG_TRACELOGGER 40057
#define MENU_AUTOFIRE_PATTERN_8 40057
#define MENU_AUTOFIRE_PATTERN_9 40058
#define ID_DEBUG_GAMEGENIEDECODER 40059
#define MENU_AUTOFIRE_PATTERN_10 40059
#define ID_DEBUG_CDLOGGER 40060
#define MENU_AUTOFIRE_PATTERN_11 40060
#define MENU_AUTOFIRE_PATTERN_12 40061
#define MENU_AUTOFIRE_PATTERN_13 40062
#define MENU_AUTOFIRE_PATTERN_14 40063
#define MENU_AUTOFIRE_PATTERN_15 40064
#define MENU_AUTOFIRE_OFFSET_1 40065
#define MENU_AUTOFIRE_OFFSET_2 40066
#define MENU_AUTOFIRE_OFFSET_3 40067
#define MENU_AUTOFIRE_OFFSET_4 40068
#define MENU_AUTOFIRE_OFFSET_5 40069
#define MENU_AUTOFIRE_OFFSET_6 40070
#define MENU_ALTERNATE_AB 40071
#define MENU_EXTERNAL_INPUT 40072
#define MENU_DEBUG 40073
#define MENU_PPUVIEWER 40074
#define MENU_NAMETABLEVIEWER 40075
#define MENU_HEXEDITOR 40076
#define MENU_TRACELOGGER 40077
#define MENU_CDLOGGER 40078
#define MENU_GAMEGENIEDECODER 40079
#define MENU_DEBUGGER 40080
#define MENU_LOG_SOUND 40120
#define GUI_BOT_DEBUG 65436
#define GUI_BOT_ERROR 65438
@ -202,7 +233,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40050
#define _APS_NEXT_COMMAND_VALUE 40081
#define _APS_NEXT_CONTROL_VALUE 1117
#define _APS_NEXT_SYMED_VALUE 101
#endif

File diff suppressed because it is too large Load Diff

View File

@ -229,24 +229,35 @@ static DECLFR(ARAMH)
static void CloseGame(void)
{
if(GameInfo)
{
if(FCEUnetplay)
FCEUD_NetworkClose();
FCEUI_StopMovie();
if(GameInfo->name)
{
free(GameInfo->name);
GameInfo->name=0;
}
if(GameInfo->type!=GIT_NSF)
FCEU_FlushGameCheats(0,0);
GameInterface(GI_CLOSE);
ResetExState(0,0);
CloseGenie();
free(GameInfo);
GameInfo = 0;
}
if(GameInfo)
{
if(FCEUnetplay)
{
FCEUD_NetworkClose();
}
FCEUI_StopMovie();
if(GameInfo->name)
{
free(GameInfo->name);
GameInfo->name=0;
}
if(GameInfo->type!=GIT_NSF)
{
FCEU_FlushGameCheats(0,0);
}
GameInterface(GI_CLOSE);
ResetExState(0,0);
CloseGenie();
free(GameInfo);
GameInfo = 0;
}
}
void ResetGameLoaded(void)