Skip to content
Permalink
Browse files

Update references to EnigmaStruct in emake.

  • Loading branch information...
JoshDreamland committed Mar 15, 2019
1 parent 506b1f3 commit d37731cd023c94a8d6106776c7b6b51500fa0330
@@ -63,7 +63,7 @@ int EnigmaPlugin::Load()
#endif

plugin_Init = reinterpret_cast<const char*(*)(EnigmaCallbacks*)>(BindFunc(_handle, "libInit"));
plugin_CompileEGM = reinterpret_cast<int (*)(EnigmaStruct *es, const char* exe_filename, int mode)>(BindFunc(_handle, "compileEGMf"));
plugin_CompileEGM = reinterpret_cast<int (*)(deprecated::JavaStruct::EnigmaStruct *es, const char* exe_filename, int mode)>(BindFunc(_handle, "compileEGMf"));
plugin_CompileProto = reinterpret_cast<int (*)(const buffers::Project *proj, const char* exe_filename, int mode)>(BindFunc(_handle, "compileProto"));
plugin_NextResource = reinterpret_cast<const char* (*)()>(BindFunc(_handle, "next_available_resource"));
plugin_FirstResource = reinterpret_cast<const char* (*)()>(BindFunc(_handle, "first_available_resource"));
@@ -114,8 +114,8 @@ void EnigmaPlugin::LogMakeToConsole()
plugin_LogMakeToConsole();
}

int EnigmaPlugin::BuildGame(EnigmaStruct* data, GameMode mode, const char* fpath)
{
int EnigmaPlugin::BuildGame(deprecated::JavaStruct::EnigmaStruct* data,
GameMode mode, const char* fpath) {
return plugin_CompileEGM(data, fpath, mode);
}

@@ -37,7 +37,7 @@ class EnigmaPlugin
syntax_error* SyntaxCheck(int count, const char** names, const char* code);
void HandleGameLaunch();
void LogMakeToConsole();
int BuildGame(EnigmaStruct* data, GameMode mode, const char* fpath);
int BuildGame(deprecated::JavaStruct::EnigmaStruct* data, GameMode mode, const char* fpath);
int BuildGame(buffers::Game* data, GameMode mode, const char* fpath);
const char* NextResource();
const char* FirstResource();
@@ -53,7 +53,7 @@ class EnigmaPlugin

private:
std::function<const char*(EnigmaCallbacks*)> plugin_Init = nullptr;
std::function<int(EnigmaStruct*, const char*, int)> plugin_CompileEGM = nullptr;
std::function<int(deprecated::JavaStruct::EnigmaStruct*, const char*, int)> plugin_CompileEGM = nullptr;
std::function<int(const buffers::Project *proj, const char*, int)> plugin_CompileProto = nullptr;
std::function<const char*()> plugin_NextResource = nullptr;
std::function<const char*()> plugin_FirstResource = nullptr;
@@ -6,6 +6,7 @@ using std::string;

namespace {

using namespace deprecated::JavaStruct;
constexpr int NO_SPRITE = -1;
constexpr int NO_OBJECT = -1;
constexpr int INSTANCE_ID_MIN = 100001;
@@ -12,30 +12,30 @@ class Game
public:
void AddSimpleObject(const std::map<std::pair<int,int>, std::string> &events);
void AddDefaultRoom();
EnigmaStruct* ConstructGame();
deprecated::JavaStruct::EnigmaStruct* ConstructGame();
void SetOutputFile(std::string fName);

protected:
EnigmaStruct _game;
deprecated::JavaStruct::EnigmaStruct _game;
std::string _output_filename;
std::vector<Script> _scripts;
std::vector<Sprite> _sprites;
std::vector<Shader> _shaders;
std::vector<Sound> _sounds;
std::vector<Font> _fonts;
std::vector<Background> _backgrounds;
std::vector<Path> _paths;
std::vector<Timeline> _timelines;
std::vector<GmObject> _objects;
std::vector<Room> _rooms;
std::vector<deprecated::JavaStruct::Script> _scripts;
std::vector<deprecated::JavaStruct::Sprite> _sprites;
std::vector<deprecated::JavaStruct::Shader> _shaders;
std::vector<deprecated::JavaStruct::Sound> _sounds;
std::vector<deprecated::JavaStruct::Font> _fonts;
std::vector<deprecated::JavaStruct::Background> _backgrounds;
std::vector<deprecated::JavaStruct::Path> _paths;
std::vector<deprecated::JavaStruct::Timeline> _timelines;
std::vector<deprecated::JavaStruct::GmObject> _objects;
std::vector<deprecated::JavaStruct::Room> _rooms;

std::vector<std::vector<MainEvent>> _main_events;
std::vector<std::vector<Event>> _events;
std::vector<std::vector<Instance>> _instances;
std::vector<std::vector<deprecated::JavaStruct::MainEvent>> _main_events;
std::vector<std::vector<deprecated::JavaStruct::Event>> _events;
std::vector<std::vector<deprecated::JavaStruct::Instance>> _instances;
std::vector<std::string> _strings;

const char* SS(std::string str);
void AddSimpleEvent(std::vector<MainEvent>* main_events,
void AddSimpleEvent(std::vector<deprecated::JavaStruct::MainEvent>* main_events,
int main_id, int id, std::string code);
};

0 comments on commit d37731c

Please sign in to comment.
You can’t perform that action at this time.