Merge pull request #11 from nev6502/nev6502_branch

Nev6502 branch
This commit is contained in:
jmarshall23
2020-06-21 14:57:19 -07:00
committed by GitHub
3 changed files with 4344 additions and 1548 deletions
+4116 -1547
View File
File diff suppressed because it is too large Load Diff
+32 -1
View File
@@ -11,15 +11,46 @@ extern "C" {
# include "lualib.h"
}
// Object Cache Item
// Stores an id lookup table
struct MapScriptObject {
int ID=-1; // The object's "Global ID"
int classIndex=-1; // The object's "Global ID"
RTTIType RTTI; // The type of object
};
//
// MapScript
// MapScript Class
//
class MapScript {
public:
~MapScript() { Deinit(); };
bool Init(const char* mapName);
void Deinit();
void CallFunction(const char* functionName);
void SetLuaPath(const char* input_path);
std::vector<MapScriptObject*> ObjectCache;
private:
lua_State* L;
};
// Non-Class-Functions
bool Script_SetObjectTrigger(int input_object_id, TriggerClass* input_trigger);
ObjectClass* Script_GetCacheObject(int input_object_id);
int Script_BuildingIndexFromID(int input_object_id);
int Script_UnitIndexFromID(int input_object_id);
int Script_AircraftIndexFromID(int input_object_id);
int Script_InfantryIndexFromID(int input_object_id);
int Script_VesselIndexFromID(int input_object_id);
#endif