ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

ltm.h

Go to the documentation of this file.
00001 /*
00002 ** Tag methods
00003 ** See Copyright Notice in lua.h
00004 */
00005 
00006 #ifndef GRIM_LTM_H
00007 #define GRIM_LTM_H
00008 
00009 
00010 #include "engines/grim/lua/lobject.h"
00011 #include "engines/grim/lua/lstate.h"
00012 
00013 namespace Grim {
00014 
00015 /*
00016 * WARNING: if you change the order of this enumeration,
00017 * grep "ORDER IM"
00018 */
00019 typedef enum {
00020     IM_GETTABLE = 0,
00021     IM_SETTABLE,
00022     IM_INDEX,
00023     IM_GETGLOBAL,
00024     IM_SETGLOBAL,
00025     IM_ADD,
00026     IM_SUB,
00027     IM_MUL,
00028     IM_DIV,
00029     IM_POW,
00030     IM_UNM,
00031     IM_LT,
00032     IM_LE,
00033     IM_GT,
00034     IM_GE,
00035     IM_CONCAT,
00036     IM_GC,
00037     IM_FUNCTION
00038 } eIMS;
00039 typedef int32 IMS;
00040 
00041 #define IM_N 18
00042 
00043 struct IM {
00044     TObject int_method[IM_N];
00045 };
00046 
00047 
00048 #define luaT_getim(tag, event)  (&IMtable[-(tag)].int_method[event])
00049 #define luaT_getimbyObj(o, e)   (luaT_getim(luaT_efectivetag(o), (e)))
00050 
00051 extern const char *luaT_eventname[];
00052 
00053 void luaT_init();
00054 void luaT_realtag(int32 tag);
00055 int32 luaT_efectivetag(TObject *o);
00056 void luaT_settagmethod(int32 t, const char *event, TObject *func);
00057 TObject *luaT_gettagmethod(int32 t, const char *event);
00058 const char *luaT_travtagmethods(int32 (*fn)(TObject *));
00059 
00060 void luaT_setfallback();  // only if LUA_COMPAT2_5
00061 
00062 } // end of namespace Grim
00063 
00064 #endif


Generated on Sat May 18 2019 05:01:07 for ResidualVM by doxygen 1.7.1
curved edge   curved edge