5
LUACALL_BEFOREEMULATION,
6
LUACALL_AFTEREMULATION,
13
extern void CallRegisteredLuaFunctions(LuaCallID calltype);
26
void CallRegisteredLuaMemHook(unsigned int address, int size, unsigned int value, LuaMemHookType hookType);
30
LuaSaveData() { recordList = 0; }
31
~LuaSaveData() { ClearRecords(); }
35
unsigned int key; // crc32
36
unsigned int size; // size of data
43
void SaveRecord(struct lua_State* L, unsigned int key); // saves Lua stack into a record and pops it
44
void LoadRecord(struct lua_State* L, unsigned int key, unsigned int itemsToLoad) const; // pushes a record's data onto the Lua stack
45
void SaveRecordPartial(struct lua_State* L, unsigned int key, int idx); // saves part of the Lua stack (at the given index) into a record and does NOT pop anything
47
void ExportRecords(void* file) const; // writes all records to an already-open file
48
void ImportRecords(void* file); // reads records from an already-open file
49
void ClearRecords(); // deletes all record data
52
// disallowed, it's dangerous to call this
53
// (because the memory the destructor deletes isn't refcounted and shouldn't need to be copied)
54
// so pass LuaSaveDatas by reference and this should never get called
55
LuaSaveData(const LuaSaveData& copy) {}
58
#define LUA_DATARECORDKEY 42
60
void CallRegisteredLuaSaveFunctions(int savestateNumber, LuaSaveData& saveData);
61
void CallRegisteredLuaLoadFunctions(int savestateNumber, const LuaSaveData& saveData);
63
// Just forward function declarations
65
void FCEU_LuaFrameBoundary();
66
int FCEU_LoadLuaCode(const char *filename);
67
void FCEU_ReloadLuaCode();
69
int FCEU_LuaRunning();
71
uint8 FCEU_LuaReadJoypad(int,uint8); // HACK - Function needs controller input
73
int FCEU_LuaFrameskip();
74
int FCEU_LuaRerecordCountSkip();
76
void FCEU_LuaGui(uint8 *XBuf);
77
void FCEU_LuaUpdatePalette();
79
struct lua_State* FCEU_GetLuaState();
80
char* FCEU_GetLuaScriptName();
82
// And some interesting REVERSE declarations!
83
char *FCEU_GetFreezeFilename(int slot);