Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ IncludeDir.theoraplay = "%{wks.location}/Toshi/Vendor/theoraplay/include"
IncludeDir.stb = "%{wks.location}/Toshi/Vendor/stb"
IncludeDir.dx8 = "%{wks.location}/Toshi/vendor/DX81/include"
IncludeDir.catch2 = "%{wks.location}/Tools/Vendor/Catch2/include"
IncludeDir.detours = "%{wks.location}/SDK/Vendor/Detours/include"

LibDir = {}
LibDir.fmod = "%{wks.location}/Toshi/vendor/fmod/lib"
LibDir.bink = "%{wks.location}/Toshi/vendor/bink/lib"
LibDir.dx8 = "%{wks.location}/Toshi/vendor/DX81/lib"
LibDir.catch2 = "%{wks.location}/Tools/Vendor/Catch2/lib"
LibDir.detours = "%{wks.location}/SDK/Vendor/Detours/lib/x86"

-- content of these folders should be copied to any client application
ClientContentCommon = "%{wks.location}Content/Common/"
Expand Down
2 changes: 2 additions & 0 deletions OpenJPOG/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ project ("OpenJPOG")
kind "ConsoleApp"
language "C++"
staticruntime "on"

debugdir ("%{wks.location}/../Game")

links
{
Expand Down
7 changes: 7 additions & 0 deletions SDK/JPOGModCore/Include/AHooks.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

class MODCORE_API AHooks
{
public:
static void Initialise();
};
26 changes: 26 additions & 0 deletions SDK/JPOGModCore/Include/AModInstance.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once
#include <TKernel/TCString.h>
#include <TKernel/TDList.h>

#include <TRenderD3D/TRenderD3DInterface.h>

class AModInstance : public Toshi::TDList<AModInstance>::TNode
{
public:
AModInstance() = default;
virtual ~AModInstance() { OnUnload(); }

virtual TBOOL OnLoad() = 0;
virtual void OnUnload() {}
virtual TBOOL OnUpdate( TFLOAT a_fDeltaTime ) { return TTRUE; }
virtual void OnRenderInterfaceReady( Toshi::TRenderD3DInterface* a_pRenderInterface ) {}
virtual void OnAppRendererReady() {}
virtual void OnAllModsLoaded() {}

const TCHAR* GetName() const { return m_strName.GetString(); }

public:
HMODULE m_hModule;
Toshi::TCString m_strName;
TUINT32 m_uiVersion;
};
27 changes: 27 additions & 0 deletions SDK/JPOGModCore/Include/AModLoader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once
#include "AModInstance.h"

#include <TKernel/TDList.h>

class AModLoader
{
public:
MODCORE_API AModLoader();
MODCORE_API ~AModLoader();

TBOOL OnCreate();
TBOOL OnUpdate( TFLOAT a_fDeltaTime );
void OnRenderInterfaceReady();
void OnAppRendererReady();

void LoadMods();
void UnloadMods();

Toshi::TDList<AModInstance>& GetMods();

private:
TFLOAT m_fTotalTime;
Toshi::TDList<AModInstance> m_LoadedMods;
TUINT m_uiNumMods;
TBOOL m_bLoaded;
};
Loading