-
Notifications
You must be signed in to change notification settings - Fork 121
/
EnigmaPlugin.hpp
54 lines (48 loc) · 1.27 KB
/
EnigmaPlugin.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef EMAKE_ENIGMAPLUGIN_HPP
#define EMAKE_ENIGMAPLUGIN_HPP
#include "EnigmaCallbacks.hpp"
#include "backend/EnigmaStruct.h"
#include "frontend.h"
#include "project.pb.h"
#include "game.pb.h"
#include <string>
typedef enum
{
PLUGIN_ERROR = 1,
PLUGIN_SUCCESS = 0
} PluginResult;
typedef enum
{
emode_run,
emode_debug,
emode_design,
emode_compile,
emode_rebuild,
emode_invalid
} GameMode;
class EnigmaPlugin
{
public:
EnigmaPlugin();
int Load();
const char* Init(CallBack *cb, const char* enigmaRoot);
syntax_error* SetDefinitions(const char* def, const char* yaml);
syntax_error* SetDefinitions(const char* yaml);
syntax_error* SyntaxCheck(int count, const char** names, const char* code);
void HandleGameLaunch();
void LogMakeToConsole();
int BuildGame(deprecated::JavaStruct::EnigmaStruct* data, GameMode mode, const char* fpath);
int BuildGame(const buffers::Game& data, GameMode mode, const char* fpath);
const char* NextResource();
const char* FirstResource();
bool ResourceIsFunction();
int ResourceArgCountMin();
int ResourceArgCountMax();
int ResourceOverloadCount();
const char* ResourceParameters(int i);
int ResourceIsTypeName();
int ResourceIsGlobal();
bool ResourcesAtEnd();
void PrintBuiltins(std::string& fName);
};
#endif