Add launcher enums

This commit is contained in:
Amos 2022-02-22 02:45:40 +01:00
parent 9b8dfee460
commit 667b51097f
8 changed files with 110 additions and 2 deletions

View File

@ -0,0 +1,34 @@
//
// Purpose: engine/launcher interface
//
// $NoKeywords: $
//=============================================================================//
#include "appframework/iappsystem.h"
//-----------------------------------------------------------------------------
// Return values from the initialization stage of the application framework
//-----------------------------------------------------------------------------
enum
{
INIT_RESTART = INIT_LAST_VAL,
RUN_FIRST_VAL,
};
//-----------------------------------------------------------------------------
// Return values from IEngineAPI::Run.
//-----------------------------------------------------------------------------
enum
{
RUN_OK = RUN_FIRST_VAL,
RUN_RESTART,
};
//-----------------------------------------------------------------------------
// Main engine interface to launcher + tools
//-----------------------------------------------------------------------------
#define VENGINE_LAUNCHER_API_VERSION "VENGINE_LAUNCHER_API_VERSION004"
// NOTE: _purecall IEngineAPI vtable

View File

@ -0,0 +1,33 @@
//-----------------------------------------------------------------------------
// Specifies a module + interface name for initialization
//-----------------------------------------------------------------------------
struct AppSystemInfo_t
{
const char* m_pModuleName;
const char* m_pInterfaceName;
};
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
enum InitReturnVal_t
{
INIT_FAILED = 0,
INIT_OK,
INIT_LAST_VAL,
};
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
enum AppSystemTier_t
{
APP_SYSTEM_TIER0 = 0,
APP_SYSTEM_TIER1,
APP_SYSTEM_TIER2,
APP_SYSTEM_TIER3,
APP_SYSTEM_TIER_OTHER,
};
// NOTE: _purecall IAppSystem vtable

View File

@ -181,6 +181,8 @@
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="appframework\engine_launcher_api.h" />
<ClInclude Include="appframework\iappsystem.h" />
<ClInclude Include="bsplib\bsplib.h" />
<ClInclude Include="client\cdll_engine_int.h" />
<ClInclude Include="client\client.h" />

View File

@ -127,6 +127,9 @@
<Filter Include="sdk\game\server">
<UniqueIdentifier>{3097f306-20ab-4601-a184-ce56c5265746}</UniqueIdentifier>
</Filter>
<Filter Include="sdk\appframework">
<UniqueIdentifier>{888e265d-d431-4c9c-8d1a-e8a3639c9fbd}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="client\client.h">
@ -756,6 +759,12 @@
<ClInclude Include="common\netmessages.h">
<Filter>sdk\common</Filter>
</ClInclude>
<ClInclude Include="appframework\iappsystem.h">
<Filter>sdk\appframework</Filter>
</ClInclude>
<ClInclude Include="appframework\engine_launcher_api.h">
<Filter>sdk\appframework</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="client\IVEngineClient.cpp">

View File

@ -232,6 +232,8 @@
<ClCompile Include="windows\system.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="appframework\engine_launcher_api.h" />
<ClInclude Include="appframework\iappsystem.h" />
<ClInclude Include="bsplib\bsplib.h" />
<ClInclude Include="client\cdll_engine_int.h" />
<ClInclude Include="client\client.h" />

View File

@ -157,6 +157,9 @@
<Filter Include="sdk\game\server">
<UniqueIdentifier>{9b8dfdef-ff4d-49c4-89ac-d6ad59a1f58a}</UniqueIdentifier>
</Filter>
<Filter Include="sdk\appframework">
<UniqueIdentifier>{cd141b6d-58a2-4b7d-afc9-32195cd9aa3c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="client\client.cpp">
@ -1178,6 +1181,12 @@
<ClInclude Include="common\netmessages.h">
<Filter>sdk\common</Filter>
</ClInclude>
<ClInclude Include="appframework\iappsystem.h">
<Filter>sdk\appframework</Filter>
</ClInclude>
<ClInclude Include="appframework\engine_launcher_api.h">
<Filter>sdk\appframework</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="r5dev.def" />

View File

@ -19,7 +19,7 @@
//-----------------------------------------------------------------------------
int HModAppSystemGroup_Main(CModAppSystemGroup* modAppSystemGroup)
{
int nRunResult = 3; // RUN_OK
int nRunResult = RUN_OK;
HEbisuSDK_Init(); // Not here in retail. We init EbisuSDK here though.
if (modAppSystemGroup->m_bIsServerOnly()) // This will never be true anyway but we implement it for the sake of it.
@ -38,7 +38,7 @@ int HModAppSystemGroup_Main(CModAppSystemGroup* modAppSystemGroup)
{
if (CEngineAPI_MainLoop())
{
nRunResult = 4; // RUN_RESTART
nRunResult = RUN_RESTART;
}
g_pEngine->Unload();
SV_ShutdownGameDLL();

View File

@ -1,4 +1,23 @@
#pragma once
#include "appframework/iappsystem.h"
//-----------------------------------------------------------------------------
// Return values from the initialization stage of the application framework
//-----------------------------------------------------------------------------
enum
{
INIT_RESTART = INIT_LAST_VAL,
RUN_FIRST_VAL,
};
//-----------------------------------------------------------------------------
// Return values from IEngineAPI::Run.
//-----------------------------------------------------------------------------
enum
{
RUN_OK = RUN_FIRST_VAL,
RUN_RESTART,
};
class CModAppSystemGroup
{