mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
+4116
-1547
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
Reference in New Issue
Block a user