Template asset build system; More version stuff

This commit is contained in:
grayson committed 2021-12-14 13:26:11 -06:00
1 parent d1f17e136c
commit 2bc28afedd
9 files changed
+22 -19

No files matched your search

+2 -2
View File
@@ -81,7 +81,7 @@
<PostBuildEvent />
<PostBuildEvent>
<Command>cd assets
"$(SolutionDir)NFAssetBuilder\bin\x64$(Configuration)\NFAssetBuilder.exe"</Command>
"$(SolutionDir)NFAssetBuilder\bin\x64Release\NFAssetBuilder.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -116,7 +116,7 @@
<PostBuildEvent />
<PostBuildEvent>
<Command>cd assets
"$(SolutionDir)NFAssetBuilder\bin\x64$(Configuration)\NFAssetBuilder.exe"</Command>
"$(SolutionDir)NFAssetBuilder\bin\x64Release\NFAssetBuilder.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
+1
View File
@@ -83,6 +83,7 @@ namespace nf {
#ifdef _DEBUG
Debug::startTimer();
SetThreadDescription(GetCurrentThread(), L"Input Thread");
SetConsoleTitle(toWide("Nothin' Fancy v" + (std::string)NFVERSION).data());
#endif
if (m_defaultState.empty())
NFError("No default gamestate has been set!");
+5 -4
View File
@@ -45,9 +45,11 @@ namespace nf {
}
AssetPack::AssetPack() :
m_member(false),
m_loaded(false)
{
if (!Application::getApp() || !Application::getApp()->getCurrentState())
m_member = true;
}
void AssetPack::load(const char* packName) {
@@ -255,10 +257,9 @@ namespace nf {
}
m_loaded = true;
if (packName != "base.nfpack") {
if (!Application::getApp()->getCurrentState()->isRunning())
if (packName != "base.nfpack")
if (Application::getApp()->getCurrentState()->isLoading() && m_member)
Application::getApp()->getCurrentState()->m_nfObjects.push_back(this);
}
}
bool AssetPack::isLoaded() {
+3 -2
View File
@@ -9,8 +9,8 @@ namespace nf {
m_scale = 2.0;
m_logoTex.create(BaseAssets::logo, Vec2(0.0, 0.0));
m_logoTex.centered(true, true);
m_text.create("(c) Grayson Riffe 2021 | graysonriffe.com", Vec2(0.01f, 0.025f), Vec3(0.8f));
m_text.setScale(0.6f);
m_verText.create("v" + (std::string)NFVERSION, Vec2(0.01f, 0.075f), Vec3(0.8f), 0.6f);
m_text.create("(c) Grayson Riffe 2021 | graysonriffe.com", Vec2(0.01f, 0.025f), Vec3(0.8f), 0.6f);
m_start = std::chrono::steady_clock::now();
}
@@ -32,6 +32,7 @@ namespace nf {
void IntroGamestate::render(Renderer& renderer) {
renderer.render(m_logoTex);
renderer.render(m_verText);
renderer.render(m_text);
}
+1
View File
@@ -149,6 +149,7 @@ namespace nf {
void destroy() override;
~AssetPack();
private:
bool m_member;
bool m_loaded;
std::unordered_map<std::string, Asset*> m_assets;
};
@@ -17,6 +17,7 @@ namespace nf {
std::chrono::steady_clock::time_point m_start;
float m_scale;
UITexture m_logoTex;
Text m_verText;
Text m_text;
};
}