This commit is contained in:
parent
7d786c4c7b
commit
34c60610ea
|
@ -0,0 +1,81 @@
|
|||
#include "common.h"
|
||||
#include "../../fceu.h" //mbg merge 7/18/06 added
|
||||
#include "basicbot2.h"
|
||||
#include "../../input.h" // qfox: fceu_botmode() fceu_setbotmode()
|
||||
|
||||
// static variables and functions are only used in this file
|
||||
static HWND hwndBasicBot = 0; // GUI handle
|
||||
|
||||
void BotCreateBasicBot() {
|
||||
if(hwndBasicBot) {
|
||||
// If already open, give focus
|
||||
SetFocus(hwndBasicBot);
|
||||
}
|
||||
else {
|
||||
// create window
|
||||
hwndBasicBot = CreateDialog(fceu_hInstance,"BASICBOT2",NULL,WindowCallback);
|
||||
// set title
|
||||
SetWindowText(hwndBasicBot,"anything?");
|
||||
// create menu
|
||||
HMENU hmenu = LoadMenu(fceu_hInstance,"BASICBOTMENU");
|
||||
// add menu to window
|
||||
SetMenu(hwndBasicBot, hmenu);
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL CALLBACK WindowCallback(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
// cant change gui controls in this event
|
||||
// seems to be a inherited "feature", for backwards
|
||||
// compatibility.
|
||||
SetWindowPos(
|
||||
hwndDlg, // window handle
|
||||
0, // z-index (ignored)
|
||||
0,0, // x,y
|
||||
0,0, // width,height (ignored, uses default)
|
||||
SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER // flags
|
||||
);
|
||||
break;
|
||||
}
|
||||
case WM_MOVE:
|
||||
{
|
||||
break;
|
||||
};
|
||||
case WM_CLOSE:
|
||||
case WM_QUIT:
|
||||
{
|
||||
BotCloseWindow();
|
||||
break;
|
||||
}
|
||||
case WM_COMMAND:
|
||||
{
|
||||
switch(HIWORD(wParam))
|
||||
{
|
||||
case BN_CLICKED: // mouse click on item in gui
|
||||
{
|
||||
break;
|
||||
}
|
||||
case GUI_BOT_TEST:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
break; // WM_COMMAND
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void BotCloseWindow() {
|
||||
if (hwndBasicBot) {
|
||||
DestroyWindow(hwndBasicBot);
|
||||
hwndBasicBot = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef _BASICBOT2_H_
|
||||
#define _BASICBOT2_H_
|
||||
void BotCreateBasicBot();
|
||||
static BOOL CALLBACK WindowCallback(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
void BotCloseWindow();
|
||||
#endif // _BASICBOT2_H_
|
|
@ -58,6 +58,7 @@
|
|||
|
||||
#include "main.h"
|
||||
#include "basicbot.h"
|
||||
#include "basicbot2.h" // qfox: new bot
|
||||
#include "args.h"
|
||||
#include "config.h"
|
||||
#include "sound.h"
|
||||
|
|
|
@ -99,6 +99,7 @@ BEGIN
|
|||
MENUITEM "&Memory Watch...", MENU_MEMORY_WATCH
|
||||
MENUITEM "&RAM Filter...", MENU_RAMFILTER
|
||||
MENUITEM "&Basic Bot...", MENU_BASIC_BOT
|
||||
MENUITEM "New Basic Bot...", MENU_BASIC_BOT2
|
||||
MENUITEM "TAS Edit", MENU_TASEDIT
|
||||
MENUITEM "Convert FCM...", MENU_CONVERT_MOVIE
|
||||
MENUITEM SEPARATOR
|
||||
|
@ -1478,6 +1479,55 @@ BEGIN
|
|||
LTEXT "(Hex)",IDC_STATIC,226,34,19,8
|
||||
END
|
||||
|
||||
BASICBOT2 DIALOGEX 0, 0, 335, 222
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT1,44,5,281,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT2,44,19,281,12,ES_AUTOHSCROLL
|
||||
LTEXT "Rom",IDC_STATIC,5,5,39,14,SS_CENTERIMAGE
|
||||
LTEXT "Comment",IDC_STATIC,5,19,39,13,SS_CENTERIMAGE
|
||||
LTEXT "A",IDC_STATIC,5,44,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT3,45,44,136,13,ES_AUTOHSCROLL
|
||||
LTEXT "B",IDC_STATIC,5,57,40,12,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT4,45,57,136,12,ES_AUTOHSCROLL
|
||||
LTEXT "Start",IDC_STATIC,5,69,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT5,45,69,136,13,ES_AUTOHSCROLL
|
||||
LTEXT "Select",IDC_STATIC,5,82,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT6,45,82,136,13,ES_AUTOHSCROLL
|
||||
LTEXT "Up",IDC_STATIC,5,95,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT7,45,95,136,13,ES_AUTOHSCROLL
|
||||
LTEXT "Down",IDC_STATIC,5,108,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT8,45,108,136,13,ES_AUTOHSCROLL
|
||||
LTEXT "Left",IDC_STATIC,5,121,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT9,45,121,136,13,ES_AUTOHSCROLL
|
||||
LTEXT "Right",IDC_STATIC,5,134,40,13,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT10,45,134,136,13,ES_AUTOHSCROLL
|
||||
CTEXT "Player 1",IDC_STATIC,45,33,136,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT
|
||||
EDITTEXT IDC_EDIT11,189,44,136,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT12,189,57,136,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT13,189,69,136,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT14,189,82,136,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT15,189,95,136,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT16,189,108,136,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT17,189,121,136,13,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT18,189,134,136,13,ES_AUTOHSCROLL
|
||||
CTEXT "Player 2",IDC_STATIC,189,32,136,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT
|
||||
PUSHBUTTON "Run",IDC_BUTTON2,275,186,50,14
|
||||
LTEXT "Score 1",IDC_STATIC,5,158,39,14,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT20,44,158,50,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT19,94,158,136,14,ES_AUTOHSCROLL
|
||||
LTEXT "Score 2",IDC_STATIC,5,172,39,14,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT21,44,172,50,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT22,94,172,136,14,ES_AUTOHSCROLL
|
||||
LTEXT "Score 3",IDC_STATIC,5,186,39,14,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT23,44,186,50,14,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT24,94,186,136,14,ES_AUTOHSCROLL
|
||||
CTEXT "Description",IDC_STATIC,44,147,50,11,SS_CENTERIMAGE
|
||||
CTEXT "Condition",IDC_STATIC,94,147,135,11,SS_CENTERIMAGE
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -1619,6 +1669,36 @@ BEGIN
|
|||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 171
|
||||
END
|
||||
|
||||
"BASICBOT2", DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 5
|
||||
RIGHTMARGIN, 325
|
||||
VERTGUIDE, 44
|
||||
VERTGUIDE, 94
|
||||
VERTGUIDE, 181
|
||||
VERTGUIDE, 189
|
||||
VERTGUIDE, 229
|
||||
VERTGUIDE, 325
|
||||
VERTGUIDE, 331
|
||||
TOPMARGIN, 5
|
||||
BOTTOMMARGIN, 212
|
||||
HORZGUIDE, 19
|
||||
HORZGUIDE, 31
|
||||
HORZGUIDE, 44
|
||||
HORZGUIDE, 57
|
||||
HORZGUIDE, 69
|
||||
HORZGUIDE, 82
|
||||
HORZGUIDE, 95
|
||||
HORZGUIDE, 108
|
||||
HORZGUIDE, 121
|
||||
HORZGUIDE, 134
|
||||
HORZGUIDE, 147
|
||||
HORZGUIDE, 158
|
||||
HORZGUIDE, 172
|
||||
HORZGUIDE, 186
|
||||
HORZGUIDE, 197
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
@ -1726,6 +1806,37 @@ IDB_TE_ARROW BITMAP "res/te_arrow.bmp"
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Dutch (Netherlands) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLD)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_DUTCH
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
BASICBOTMENU MENU
|
||||
BEGIN
|
||||
POPUP "File"
|
||||
BEGIN
|
||||
MENUITEM "Clear", ID_FILE_CLEAR
|
||||
MENUITEM "Load", ID_FILE_LOAD
|
||||
MENUITEM "Save", ID_FILE_SAVE40223
|
||||
MENUITEM "Close", ID_FILE_CLOSE40218
|
||||
END
|
||||
MENUITEM "Play Best", 0
|
||||
MENUITEM "Reset", 0
|
||||
END
|
||||
|
||||
#endif // Dutch (Netherlands) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -461,7 +461,30 @@
|
|||
#define IDC_BUTTON8 1146
|
||||
#define IDC_EDIT1 1147
|
||||
#define IDC_BUTTON9 1148
|
||||
#define IDC_EDIT2 1148
|
||||
#define IDC_LIST2 1149
|
||||
#define IDC_EDIT3 1149
|
||||
#define IDC_EDIT4 1150
|
||||
#define IDC_EDIT5 1152
|
||||
#define IDC_EDIT6 1153
|
||||
#define IDC_EDIT7 1154
|
||||
#define IDC_EDIT8 1156
|
||||
#define IDC_EDIT9 1157
|
||||
#define IDC_EDIT10 1158
|
||||
#define IDC_EDIT11 1160
|
||||
#define IDC_EDIT12 1161
|
||||
#define IDC_EDIT13 1162
|
||||
#define IDC_EDIT14 1163
|
||||
#define IDC_EDIT15 1164
|
||||
#define IDC_EDIT16 1165
|
||||
#define IDC_EDIT17 1166
|
||||
#define IDC_EDIT18 1167
|
||||
#define IDC_EDIT20 1169
|
||||
#define IDC_EDIT19 1176
|
||||
#define IDC_EDIT21 1181
|
||||
#define IDC_EDIT22 1182
|
||||
#define IDC_EDIT23 1183
|
||||
#define IDC_EDIT24 1184
|
||||
#define MENU_NETWORK 40040
|
||||
#define MENU_PALETTE 40041
|
||||
#define MENU_SOUND 40042
|
||||
|
@ -609,6 +632,12 @@
|
|||
#define ID_EDIT_REMOVEMARKER 40215
|
||||
#define ID_FILE_CLOSECTRL40216 40216
|
||||
#define ID_MEMWVIEW_FILE_CLOSE 40217
|
||||
#define ID_FILE_CLOSE40218 40218
|
||||
#define ID_TOOLS_NEWBASICBOT 40219
|
||||
#define MENU_BASIC_BOT2 40220
|
||||
#define ID_FILE_CLEAR 40221
|
||||
#define ID_FILE_LOAD 40222
|
||||
#define ID_FILE_SAVE40223 40223
|
||||
#define MW_ValueLabel2 65423
|
||||
#define MW_ValueLabel1 65426
|
||||
#define GUI_BOT_DEBUG 65436
|
||||
|
@ -618,9 +647,9 @@
|
|||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 121
|
||||
#define _APS_NEXT_COMMAND_VALUE 40218
|
||||
#define _APS_NEXT_CONTROL_VALUE 1150
|
||||
#define _APS_NEXT_RESOURCE_VALUE 123
|
||||
#define _APS_NEXT_COMMAND_VALUE 40224
|
||||
#define _APS_NEXT_CONTROL_VALUE 1156
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "tracer.h"
|
||||
#include "cdlogger.h"
|
||||
#include "basicbot.h"
|
||||
#include "basicbot2.h" // qfox: new bot
|
||||
#include "throttle.h"
|
||||
#include "monitor.h"
|
||||
#include "tasedit.h"
|
||||
|
@ -1012,6 +1013,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
CreateBasicBot();
|
||||
break;
|
||||
|
||||
case MENU_BASIC_BOT2:
|
||||
BotCreateBasicBot();
|
||||
break;
|
||||
|
||||
case MENU_DIRECTORIES:
|
||||
// Directories menu was selected
|
||||
ConfigDirectories();
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#ifdef WIN32
|
||||
#include "drivers/win/main.h"
|
||||
#include "drivers/win/basicbot.h"
|
||||
#include "drivers/win/basicbot2.h" // qfox: new bot
|
||||
#include "drivers/win/memwatch.h"
|
||||
#include "drivers/win/cheat.h"
|
||||
#include "drivers/win/debugger.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="fceux"
|
||||
ProjectGUID="{6893EF44-FEA3-46DF-B236-C4C200F54294}"
|
||||
RootNamespace="fceux"
|
||||
|
@ -750,6 +750,32 @@
|
|||
RelativePath="..\src\drivers\win\basicbot.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\drivers\win\basicbot2.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\drivers\win\basicbot2.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\drivers\win\cdlogger.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue