diff src/common/vbalua.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/common/vbalua.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,52 @@
     1.4 +#ifndef VBA_LUA_H
     1.5 +#define VBA_LUA_H
     1.6 +
     1.7 +#if _MSC_VER > 1000
     1.8 +#pragma once
     1.9 +#endif // _MSC_VER > 1000
    1.10 +
    1.11 +enum LuaCallID
    1.12 +{
    1.13 +	LUACALL_BEFOREEMULATION,
    1.14 +	LUACALL_AFTEREMULATION,
    1.15 +	LUACALL_BEFOREEXIT,
    1.16 +
    1.17 +	LUACALL_COUNT
    1.18 +};
    1.19 +void CallRegisteredLuaFunctions(LuaCallID calltype);
    1.20 +
    1.21 +enum LuaMemHookType
    1.22 +{
    1.23 +	LUAMEMHOOK_WRITE,
    1.24 +	LUAMEMHOOK_READ,
    1.25 +	LUAMEMHOOK_EXEC,
    1.26 +	LUAMEMHOOK_WRITE_SUB,
    1.27 +	LUAMEMHOOK_READ_SUB,
    1.28 +	LUAMEMHOOK_EXEC_SUB,
    1.29 +
    1.30 +	LUAMEMHOOK_COUNT
    1.31 +};
    1.32 +void CallRegisteredLuaMemHook(unsigned int address, int size, unsigned int value, LuaMemHookType hookType);
    1.33 +
    1.34 +// Just forward function declarations
    1.35 +
    1.36 +void VBALuaFrameBoundary();
    1.37 +int VBALoadLuaCode(const char *filename);
    1.38 +int VBAReloadLuaCode();
    1.39 +void VBALuaStop();
    1.40 +int VBALuaRunning();
    1.41 +
    1.42 +int VBALuaUsingJoypad(int);
    1.43 +int VBALuaReadJoypad(int);
    1.44 +int VBALuaSpeed();
    1.45 +bool8 VBALuaRerecordCountSkip();
    1.46 +
    1.47 +void VBALuaGui(uint8 *screen, int ppl, int width, int height);
    1.48 +void VBALuaClearGui();
    1.49 +
    1.50 +char* VBAGetLuaScriptName();
    1.51 +
    1.52 +// And some interesting REVERSE declarations!
    1.53 +char *VBAGetFreezeFilename(int slot);
    1.54 +
    1.55 +#endif // VBA_LUA_H