MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / AttachEngine

Function AttachEngine

Source/Scripting/angelscript/asfuncs.cpp:5735–5781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5733}
5734
5735void AttachEngine(ASContext* context) {
5736 context->RegisterEnum("EngineState");
5737 context->RegisterEnumValue("EngineState", "kEngineNoState", kEngineNoState);
5738 context->RegisterEnumValue("EngineState", "kEngineLevelState", kEngineLevelState);
5739 context->RegisterEnumValue("EngineState", "kEngineEditorLevelState", kEngineEditorLevelState);
5740 context->RegisterEnumValue("EngineState", "kEngineEngineScriptableUIState", kEngineScriptableUIState);
5741 context->RegisterEnumValue("EngineState", "kEngineCampaignState", kEngineCampaignState);
5742
5743 context->RegisterEnum("SplitScreenMode");
5744 context->RegisterEnumValue("SplitScreenMode", "kModeNone", kForcedModeNone);
5745 context->RegisterEnumValue("SplitScreenMode", "kModeFull", kForcedModeFull);
5746 context->RegisterEnumValue("SplitScreenMode", "kModeSplit", kForcedModeSplit);
5747
5748 context->RegisterGlobalFunction("void LoadLevel(string level_path)",
5749 asFUNCTION(ASLoadLevel), asCALL_CDECL);
5750 context->RegisterGlobalFunction("void LoadLevelID(string id)",
5751 asFUNCTION(ASLoadLevelID), asCALL_CDECL);
5752 context->RegisterGlobalFunction("void SetCampaignID(string id)",
5753 asFUNCTION(ASSetCampaignID), asCALL_CDECL);
5754
5755 context->RegisterGlobalFunction("string GetCurrLevelAbsPath()",
5756 asFUNCTION(ASGetCurrLevelAbsPath), asCALL_CDECL);
5757 context->RegisterGlobalFunction("string GetCurrLevel()",
5758 asFUNCTION(ASGetCurrLevel), asCALL_CDECL);
5759 context->RegisterGlobalFunction("string GetCurrLevelRelPath()",
5760 asFUNCTION(ASGetCurrLevelRelPath), asCALL_CDECL);
5761 context->RegisterGlobalFunction("string GetLevelName(const string& path)",
5762 asFUNCTION(ASGetLevelName), asCALL_CDECL);
5763 context->RegisterGlobalFunction("string GetCurrLevelName()",
5764 asFUNCTION(ASGetCurrLevelName), asCALL_CDECL);
5765 context->RegisterGlobalFunction("string GetCurrLevelID()",
5766 asFUNCTION(ASGetCurrLevelID), asCALL_CDECL);
5767
5768 context->RegisterGlobalFunction("string GetCurrCampaignID()",
5769 asFUNCTION(ASGetCurrCampaignID), asCALL_CDECL);
5770
5771 context->RegisterGlobalFunction("string GetCurrentMenuModsourceID()",
5772 asFUNCTION(ASGetCurrentMenuModsourceID), asCALL_CDECL);
5773 context->RegisterGlobalFunction("string GetCurrentLevelModsourceID()",
5774 asFUNCTION(ASGetCurrentLevelModsourceID), asCALL_CDECL);
5775
5776 context->RegisterGlobalFunction("bool EditorModeActive()", asFUNCTION(ASEditorModeActive), asCALL_CDECL);
5777
5778 context->RegisterGlobalFunction("void assert(bool val)", asFUNCTION(ASAssert), asCALL_GENERIC);
5779
5780 context->RegisterGlobalFunction("void SetSplitScreenMode(SplitScreenMode mode)", asFUNCTION(ASSetSplitScreenMode), asCALL_CDECL);
5781}
5782
5783bool AS_Online_IsActive() {
5784 return Online::Instance()->IsActive();

Callers 6

InitializeMethod · 0.85
InitializeMethod · 0.85
InitializeMethod · 0.85
InitializeMethod · 0.85
InitializeMethod · 0.85
InitializeMethod · 0.85

Calls 3

RegisterEnumMethod · 0.45
RegisterEnumValueMethod · 0.45

Tested by

no test coverage detected