Basicbot update to 0.2.1: redesigned GUI, fixed a few bugs, added more control.
This commit is contained in:
parent
b15942881d
commit
a843631e9f
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,16 @@
|
||||||
#include "stdbool.h"
|
#ifndef _BASICBOT_H_
|
||||||
void UpdateBasicBot();
|
#define _BASICBOT_H_
|
||||||
void CreateBasicBot();
|
#include "stdbool.h"
|
||||||
extern char *BasicBotDir;
|
#define BOT_MAXFRAMES 2048 // qfox: max number of frames to be computed per attempt...
|
||||||
static int EvaluateFormula(char * formula, char **nextposition, bool ret);
|
void UpdateBasicBot();
|
||||||
static int ParseFormula(bool ret);
|
void CreateBasicBot();
|
||||||
static void StopBasicBot();
|
extern char *BasicBotDir;
|
||||||
static void StartBasicBot();
|
static int EvaluateFormula(char * formula, char **nextposition, bool ret);
|
||||||
void debug(int n);
|
static int ParseFormula(bool ret);
|
||||||
|
static void StopBasicBot();
|
||||||
|
static void StartBasicBot();
|
||||||
|
static void debug(int n);
|
||||||
|
static void error(int n);
|
||||||
|
static void FromGUI();\
|
||||||
|
void UpdateExternalButton();
|
||||||
|
#endif // _BASICBOT_H_
|
|
@ -377,7 +377,9 @@ void win_AllocBuffers(uint8 **GameMemBlock, uint8 **RAM) {
|
||||||
SFCPU[6].v = *RAM;
|
SFCPU[6].v = *RAM;
|
||||||
|
|
||||||
//Bot input
|
//Bot input
|
||||||
mapBotInput = CreateFileMapping((HANDLE)0xFFFFFFFF,NULL,PAGE_READWRITE,0, 4096, "fceu.BotInput");
|
// qfox: replaced 4096 by BOT_MAXFRAMES to make it possible to increase the number of frames
|
||||||
|
// the bot can compute in one single attempt.
|
||||||
|
mapBotInput = CreateFileMapping((HANDLE)0xFFFFFFFF,NULL,PAGE_READWRITE,0, BOT_MAXFRAMES, "fceu.BotInput");
|
||||||
BotInput = (uint32 *) MapViewOfFile(mapBotInput, FILE_MAP_WRITE, 0, 0, 0);
|
BotInput = (uint32 *) MapViewOfFile(mapBotInput, FILE_MAP_WRITE, 0, 0, 0);
|
||||||
BotInput[0] = 0;
|
BotInput[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -2,8 +2,29 @@
|
||||||
// Microsoft Visual C++ generated include file.
|
// Microsoft Visual C++ generated include file.
|
||||||
// Used by res.rc
|
// Used by res.rc
|
||||||
//
|
//
|
||||||
|
#define GUI_BOT_CLOSE 1
|
||||||
#define IDI_ICON1 101
|
#define IDI_ICON1 101
|
||||||
#define IDI_ICON2 102
|
#define IDI_ICON2 102
|
||||||
|
#define GUI_BOT_SAVE 1014
|
||||||
|
#define GUI_BOT_LOAD 1015
|
||||||
|
#define GUI_BOT_RUN 1016
|
||||||
|
#define GUI_BOT_KEYS 1019
|
||||||
|
#define GUI_BOT_EXTRA 1020
|
||||||
|
#define GUI_BOT_BEST 1021
|
||||||
|
#define GUI_BOT_CHECK 1023
|
||||||
|
#define GUI_BOT_UPDATE 1024
|
||||||
|
#define GUI_BOT_BOTMODE 1025
|
||||||
|
#define GUI_BOT_P1 1035
|
||||||
|
#define GUI_BOT_CLEAR 1036
|
||||||
|
#define GUI_BOT_ATTEMPTS 1037
|
||||||
|
#define GUI_BOT_P2 1040
|
||||||
|
#define GUI_BOT_FRAMES 1049
|
||||||
|
#define GUI_BOT_BESTRESULT 1050
|
||||||
|
#define GUI_BOT_LAST 1051
|
||||||
|
#define GUI_BOT_AVGMAX 1053
|
||||||
|
#define GUI_BOT_AVGTIE1 1054
|
||||||
|
#define GUI_BOT_AVGTIE2 1056
|
||||||
|
#define GUI_BOT_AVGTIE3 1057
|
||||||
#define ID_DEBUG_DEBUGGER 40053
|
#define ID_DEBUG_DEBUGGER 40053
|
||||||
#define ID_DEBUG_PPUVIEWER 40054
|
#define ID_DEBUG_PPUVIEWER 40054
|
||||||
#define ID_DEBUG_NAMETABLEVIEWER 40055
|
#define ID_DEBUG_NAMETABLEVIEWER 40055
|
||||||
|
@ -11,6 +32,8 @@
|
||||||
#define ID_DEBUG_TRACELOGGER 40057
|
#define ID_DEBUG_TRACELOGGER 40057
|
||||||
#define ID_DEBUG_GAMEGENIEDECODER 40059
|
#define ID_DEBUG_GAMEGENIEDECODER 40059
|
||||||
#define ID_DEBUG_CDLOGGER 40060
|
#define ID_DEBUG_CDLOGGER 40060
|
||||||
|
#define GUI_BOT_DEBUG 65436
|
||||||
|
#define GUI_BOT_ERROR 65438
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
|
@ -18,7 +41,7 @@
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40013
|
#define _APS_NEXT_COMMAND_VALUE 40013
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
#define _APS_NEXT_CONTROL_VALUE 1050
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue