Skip to content

Commit eb59c9d

Browse files
committed
Added support for the Meta project introduced in the latest Engine version
Added Shaders project as a dependency to Game-Lib to force shader recompilation when Game-Lib is built Temporarily disable Shadows by forcing ShadowCascadeNum CVAR's default value to 0 Set Physics CVAR default to enabled Updated Editor Visibility handling Added Imgui Theme Selector Added CVAR_StartWindowMaximized Turned FastUpToDate off on windows for Shaders and Generate Project Updated Submodule Engine
1 parent 164124e commit eb59c9d

File tree

86 files changed

+2497
-1729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2497
-1729
lines changed

Source/Game-Lib/Game-Lib.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
-- Dependencies are order sensitive on Linux, keep that in mind when adding new dependencies.
2-
local mod = Solution.Util.CreateModuleTable("Game-Lib", { "renderer", "fileformat", "gameplay", "input", "luau-compiler", "luau-vm", "enkits", "utfcpp", "base64", "jolt" })
2+
local mod = Solution.Util.CreateModuleTable("Game-Lib", { "renderer", "fileformat", "gameplay", "input", "meta", "luau-compiler", "luau-vm", "enkits", "utfcpp", "base64", "jolt" })
33

44
Solution.Util.CreateStaticLib(mod.Name, Solution.Projects.Current.BinDir, mod.Dependencies, function()
55
local defines = { "_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS", "_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS"}
6-
6+
dependson("Shaders")
7+
78
Solution.Util.SetLanguage("C++")
89
Solution.Util.SetCppDialect(20)
910

Source/Game-Lib/Game-Lib/Application/Application.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "Game-Lib/ECS/Util/Database/TextureUtil.h"
2020
#include "Game-Lib/ECS/Util/Database/UnitCustomizationUtil.h"
2121
#include "Game-Lib/Editor/EditorHandler.h"
22-
#include "Game-Lib/Gameplay/Database/Shared.h"
2322
#include "Game-Lib/Gameplay/GameConsole/GameConsole.h"
2423
#include "Game-Lib/Rendering/GameRenderer.h"
2524
#include "Game-Lib/Scripting/LuaManager.h"
@@ -57,6 +56,7 @@ AutoCVar_Int CVAR_CpuReportDetailLevel(CVarCategory::Client, "cpuReportDetailLev
5756
AutoCVar_Int CVAR_ApplicationNumThreads(CVarCategory::Client, "numThreads", "number of threads used for multi threading, 0 = number of hardware threads", 0);
5857
AutoCVar_Int CVAR_ClientDBSaveMethod(CVarCategory::Client, "clientDBSaveMethod", "specifies when clientDBs are saved. (0 = Immediately, 1 = Every x Seconds, 2 = On Shutdown, 3+ = Disabled, default is 1)", 1);
5958
AutoCVar_Float CVAR_ClientDBSaveTimer(CVarCategory::Client, "clientDBSaveTimer", "specifies how often clientDBs are saved when using save method 1 (Specified in seconds, default is 5 seconds)", 5.0f);
59+
AutoCVar_String CVAR_ImguiTheme(CVarCategory::Client, "imguiTheme", "specifies the current imgui theme", "Blue Teal", CVarFlags::Hidden);
6060

6161
Application::Application() : _messagesInbound(256), _messagesOutbound(256) { }
6262
Application::~Application()

Source/Game-Lib/Game-Lib/ECS/Singletons/Database/CameraSaveSingleton.h

-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#pragma once
2-
#include "ClientDBSingleton.h"
3-
#include "Game-Lib/Gameplay/Database/Shared.h"
4-
#include "Game-Lib/Util/ServiceLocator.h"
5-
62
#include <Base/Types.h>
73

8-
#include <FileFormat/Novus/ClientDB/ClientDB.h>
9-
#include <FileFormat/Novus/ClientDB/Definitions.h>
10-
11-
#include <entt/entt.hpp>
124
#include <robinhood/robinhood.h>
135

146
namespace ECS

Source/Game-Lib/Game-Lib/ECS/Singletons/Database/ClientDBSingleton.h

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <Base/Util/StringUtils.h>
44

55
#include <FileFormat/Novus/ClientDB/ClientDB.h>
6-
#include <FileFormat/Novus/ClientDB/Definitions.h>
76

87
#include <robinhood/robinhood.h>
98

Source/Game-Lib/Game-Lib/ECS/Singletons/Database/ItemSingleton.h

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <Gameplay/GameDefine.h>
55

66
#include <robinhood/robinhood.h>
7-
#include <entt/entt.hpp>
87

98
#include <array>
109

Source/Game-Lib/Game-Lib/ECS/Singletons/Database/MapSingleton.h

-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#pragma once
2-
#include "ClientDBSingleton.h"
3-
#include "Game-Lib/Util/ServiceLocator.h"
4-
52
#include <Base/Types.h>
6-
#include <Base/Container/StringTable.h>
7-
8-
#include <FileFormat/Novus/ClientDB/ClientDB.h>
9-
#include <FileFormat/Novus/ClientDB/Definitions.h>
103

11-
#include <entt/entt.hpp>
124
#include <robinhood/robinhood.h>
135

146
namespace ECS

Source/Game-Lib/Game-Lib/ECS/Singletons/Database/UnitCustomizationSingleton.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace ECS
1919
robin_hood::unordered_map<u32, Database::Unit::UnitModelInfo> modelIDToUnitModelInfo;
2020
robin_hood::unordered_map<u32, GameDefine::UnitRace> displayIDToUnitRace;
2121

22-
robin_hood::unordered_map<::Database::Unit::UnitTextureSection::Type, u32> unitTextureSectionTypeToID;
22+
robin_hood::unordered_map<::Database::Unit::TextureSectionType, u32> unitTextureSectionTypeToID;
2323
robin_hood::unordered_map<u32, std::vector<u32>> unitBaseCustomizationKeyToChoiceIDList;
2424

2525
robin_hood::unordered_map<u32, u32> unitCustomizationKeyToTextureHash;

Source/Game-Lib/Game-Lib/ECS/Systems/Animation.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,13 @@ namespace ECS::Systems
753753
initView.each([&](entt::entity entity, Components::Model& model, Components::AnimationInitData& animationInitData)
754754
{
755755
const auto* modelInfo = modelLoader->GetModelInfo(model.modelHash);
756-
if (!modelInfo)
757-
return;
756+
if (!modelInfo || (modelInfo->modelHeader.numSequences == 0 && modelInfo->modelHeader.numBones == 0 && modelInfo->modelHeader.numTextureTransforms == 0 && modelInfo->modelHeader.numAttachments == 0))
757+
{
758+
if (registry.all_of<Components::AnimationData>(entity))
759+
registry.remove<Components::AnimationData>(entity);
758760

759-
if (modelInfo->modelHeader.numSequences == 0 && modelInfo->modelHeader.numBones == 0 && modelInfo->modelHeader.numTextureTransforms == 0 && modelInfo->modelHeader.numAttachments == 0)
760761
return;
762+
}
761763

762764
bool isDynamic = animationInitData.flags.isDynamic;
763765
bool wasStatic = !animationInitData.flags.isDynamic;

Source/Game-Lib/Game-Lib/ECS/Systems/CalculateShadowCameraMatrices.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
AutoCVar_Int CVAR_ShadowsStable(CVarCategory::Client | CVarCategory::Rendering, "shadowStable", "stable shadows", 1, CVarFlags::EditCheckbox);
2121

22-
AutoCVar_Int CVAR_ShadowCascadeNum(CVarCategory::Client | CVarCategory::Rendering, "shadowCascadeNum", "number of shadow cascades", 4);
22+
AutoCVar_Int CVAR_ShadowCascadeNum(CVarCategory::Client | CVarCategory::Rendering, "shadowCascadeNum", "number of shadow cascades", 0);
2323
AutoCVar_Float CVAR_ShadowCascadeSplitLambda(CVarCategory::Client | CVarCategory::Rendering, "shadowCascadeSplitLambda", "split lambda for cascades, between 0.0f and 1.0f", 0.8f);
2424

2525
AutoCVar_Int CVAR_ShadowCascadeTextureSize(CVarCategory::Client | CVarCategory::Rendering, "shadowCascadeSize", "size of biggest cascade (per side)", 4096);

Source/Game-Lib/Game-Lib/ECS/Systems/CharacterController.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ namespace ECS::Systems
429429
{
430430
ModelLoader* modelLoader = ServiceLocator::GetGameRenderer()->GetModelLoader();
431431
auto& moverModel = registry.get<Components::Model>(characterSingleton.moverEntity);
432-
modelLoader->LoadDisplayIDForEntity(characterSingleton.moverEntity, moverModel, ClientDB::Definitions::DisplayInfoType::Creature, 50);
432+
modelLoader->LoadDisplayIDForEntity(characterSingleton.moverEntity, moverModel, Database::Unit::DisplayInfoType::Creature, 50);
433433
}
434434
});
435435

@@ -718,7 +718,7 @@ namespace ECS::Systems
718718
transformSystem.SetWorldPosition(characterSingleton.moverEntity, vec3(0.0f, 0.0f, 0.0f));
719719

720720
ModelLoader* modelLoader = ServiceLocator::GetGameRenderer()->GetModelLoader();
721-
modelLoader->LoadDisplayIDForEntity(characterSingleton.moverEntity, moverModel, ClientDB::Definitions::DisplayInfoType::Creature, 50);
721+
modelLoader->LoadDisplayIDForEntity(characterSingleton.moverEntity, moverModel, Database::Unit::DisplayInfoType::Creature, 50);
722722
}
723723

724724
f32 width = 0.4166f;

Source/Game-Lib/Game-Lib/ECS/Systems/NetworkConnection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ namespace ECS::Systems
278278
ModelLoader* modelLoader = ServiceLocator::GetGameRenderer()->GetModelLoader();
279279
auto& model = registry->get<ECS::Components::Model>(entity);
280280

281-
if (!modelLoader->LoadDisplayIDForEntity(entity, model, ClientDB::Definitions::DisplayInfoType::Creature, displayID))
281+
if (!modelLoader->LoadDisplayIDForEntity(entity, model, Database::Unit::DisplayInfoType::Creature, displayID))
282282
{
283283
NC_LOG_WARNING("Network : Failed to load DisplayID for entity ({0})", networkID.ToString());
284284
return true;
@@ -672,7 +672,7 @@ namespace ECS::Systems
672672
if (!itemStorage->Has(item.itemID))
673673
continue;
674674

675-
const auto& itemInfo = itemStorage->Get<::Database::Item::Item>(item.itemID);
675+
const auto& itemInfo = itemStorage->Get<Generated::ItemRecord>(item.itemID);
676676

677677
auto& eventItemData = eventData.items.emplace_back();
678678
eventItemData.slot = i + 1;

Source/Game-Lib/Game-Lib/ECS/Systems/UpdateAreaLights.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include <Base/CVarSystem/CVarSystem.h>
1616

17-
#include <FileFormat/Novus/ClientDB/Definitions.h>
17+
#include <Meta/Generated/ClientDB.h>
1818

1919
#include <entt/entt.hpp>
2020

@@ -43,18 +43,18 @@ namespace ECS::Systems
4343
return glm::mix(color1Vec, color2Vec, blend);
4444
}
4545

46-
AreaLightColorData GetLightColorData(const Singletons::AreaLightInfo& areaLightInfo, const Singletons::DayNightCycle& dayNightCycle, ClientDB::Data* lightParamsStorage, ClientDB::Data* lightDataStorage, const ClientDB::Definitions::Light* light)
46+
AreaLightColorData GetLightColorData(const Singletons::AreaLightInfo& areaLightInfo, const Singletons::DayNightCycle& dayNightCycle, ClientDB::Data* lightParamsStorage, ClientDB::Data* lightDataStorage, const Generated::LightRecord* light)
4747
{
4848
AreaLightColorData lightColor;
4949
if (!light)
5050
return lightColor;
5151

52-
u32 lightParamID = light->lightParamsID[0];
52+
u32 lightParamID = light->paramIDs[0];
5353

5454
if (!lightParamsStorage->Has(lightParamID))
5555
return lightColor;
5656

57-
auto& lightParams = lightParamsStorage->Get<ClientDB::Definitions::LightParam>(lightParamID);
57+
auto& lightParams = lightParamsStorage->Get<Generated::LightParamRecord>(lightParamID);
5858

5959
if (!areaLightInfo.lightParamIDToLightData.contains(lightParamID))
6060
return lightColor;
@@ -73,7 +73,7 @@ namespace ECS::Systems
7373
if (!lightDataStorage->Has(lightDataID))
7474
return lightColor;
7575

76-
auto& lightData = lightDataStorage->Get<ClientDB::Definitions::LightData>(lightDataID);
76+
auto& lightData = lightDataStorage->Get<Generated::LightDataRecord>(lightDataID);
7777

7878
lightColor.ambientColor = UnpackU32BGRToColor(lightData.ambientColor);
7979
lightColor.diffuseColor = UnpackU32BGRToColor(lightData.diffuseColor);
@@ -99,7 +99,7 @@ namespace ECS::Systems
9999
if (!lightDataStorage->Has(lightDataID))
100100
continue;
101101

102-
auto& lightData = lightDataStorage->Get<ClientDB::Definitions::LightData>(lightDataID);
102+
auto& lightData = lightDataStorage->Get<Generated::LightDataRecord>(lightDataID);
103103

104104
if (lightData.timestamp <= timeInSecondsAsU32)
105105
{
@@ -114,8 +114,8 @@ namespace ECS::Systems
114114
u32 currentLightDataID = lightDataIDs[currentLightDataIndex];
115115
u32 nextLightDataID = lightDataIDs[nextLightDataIndex];
116116

117-
auto& currentLightData = lightDataStorage->Get<ClientDB::Definitions::LightData>(currentLightDataID);
118-
auto& nextLightData = lightDataStorage->Get<ClientDB::Definitions::LightData>(nextLightDataID);
117+
auto& currentLightData = lightDataStorage->Get<Generated::LightDataRecord>(currentLightDataID);
118+
auto& nextLightData = lightDataStorage->Get<Generated::LightDataRecord>(nextLightDataID);
119119

120120
u32 currentTimestamp = currentLightData.timestamp;
121121
u32 nextTimestamp = nextLightData.timestamp;
@@ -167,7 +167,7 @@ namespace ECS::Systems
167167
areaLightInfo.mapIDToLightIDs.clear();
168168
areaLightInfo.mapIDToLightIDs.reserve(numMaps);
169169

170-
lightStorage->Each([&](u32 id, const ClientDB::Definitions::Light& light) -> bool
170+
lightStorage->Each([&](u32 id, const Generated::LightRecord& light) -> bool
171171
{
172172
u16 mapID = light.mapID;
173173

@@ -188,7 +188,7 @@ namespace ECS::Systems
188188
areaLightInfo.lightParamIDToLightData.clear();
189189
areaLightInfo.lightParamIDToLightData.reserve(numLightParams);
190190

191-
lightDataStorage->Each([&](u32 id, const ClientDB::Definitions::LightData& lightData) -> bool
191+
lightDataStorage->Each([&](u32 id, const Generated::LightDataRecord& lightData) -> bool
192192
{
193193
u16 lightParamID = lightData.lightParamID;
194194

@@ -224,7 +224,7 @@ namespace ECS::Systems
224224

225225
u32 currentMapID = mapLoader->GetCurrentMapID();
226226
bool forceDefaultLight = currentMapID == std::numeric_limits<u32>().max();
227-
const auto* defaultLight = &lightStorage->Get<ClientDB::Definitions::Light>(1);
227+
const auto* defaultLight = &lightStorage->Get<Generated::LightRecord>(1);
228228

229229
if (!forceDefaultLight)
230230
{
@@ -249,7 +249,7 @@ namespace ECS::Systems
249249

250250
for (u16 lightID : lightIDs)
251251
{
252-
const auto& light = lightStorage->Get<ClientDB::Definitions::Light>(lightID);
252+
const auto& light = lightStorage->Get<Generated::LightRecord>(lightID);
253253

254254
const vec3& lightPosition = light.position;
255255
if (lightPosition.x == 0 && lightPosition.y == 0 && lightPosition.z == 0)

Source/Game-Lib/Game-Lib/ECS/Systems/UpdatePhysics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
using namespace JPH::literals;
3131

32-
AutoCVar_Int CVAR_PhysicsEnabled(CVarCategory::Client | CVarCategory::Physics, "enabled", "enables the physics engine", 0, CVarFlags::EditCheckbox);
32+
AutoCVar_Int CVAR_PhysicsEnabled(CVarCategory::Client | CVarCategory::Physics, "enabled", "enables the physics engine", 1, CVarFlags::EditCheckbox);
3333
AutoCVar_Int CVAR_PhysicsOptimizeBP(CVarCategory::Client | CVarCategory::Physics, "optimizeBP", "enables automatically optimizing the broadphase during load", 1, CVarFlags::EditCheckbox);
3434

3535
namespace ECS::Systems

0 commit comments

Comments
 (0)