mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 21:01:48 +01:00
Add Text rendering and Hull / Fuel Meters
This commit is contained in:
140
.idea/.idea.Motherload/.idea/workspace.xml
generated
140
.idea/.idea.Motherload/.idea/workspace.xml
generated
@@ -11,22 +11,21 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="26a0623a-44d5-441c-8048-32ff1dab3479" name="Changes" comment="">
|
<list default="true" id="26a0623a-44d5-441c-8048-32ff1dab3479" name="Changes" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/Game/Gui/Screens/MainScreen.cpp" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/Game/Gui/GuiText.cpp" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/Game/Gui/Screens/MainScreen.h" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/Game/Gui/GuiText.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.Motherload/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Motherload/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/.idea.Motherload/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Motherload/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Engine/Text.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Engine/Text.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Engine/Text.h" beforeDir="false" afterPath="$PROJECT_DIR$/Engine/Text.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Game.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Game.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Game.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Game.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Game.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Game.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Game.vcxproj" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Game.vcxproj" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Game.vcxproj" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Game.vcxproj" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Gui/GuiMeter.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Gui/GuiMeter.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/GroundTileTypeManager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/GridSystem/GroundTileTypeManager.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Gui/GuiMeter.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Gui/GuiMeter.h" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/GroundTileTypeManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/GridSystem/GroundTileTypeManager.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Gui/Screen.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Gui/Screen.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Gui/Screens/MainScreen.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Gui/Screens/MainScreen.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Gui/Screens/FuelScreen.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Gui/Screens/FuelScreen.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Gui/Screens/MainScreen.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Gui/Screens/MainScreen.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Levels/World/Building.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Levels/World/Building.h" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Levels/World/Building.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Levels/World/Building.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.cpp" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.h" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Levels/World/WorldLevel.h" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Player.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Player.cpp" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Resources/gui/main/fuel/fuel.png" beforeDir="false" afterPath="$PROJECT_DIR$/Resources/gui/main/fuel/fuel.png" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Game/Player.h" beforeDir="false" afterPath="$PROJECT_DIR$/Game/Player.h" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/Game/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Game/main.cpp" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -41,82 +40,6 @@
|
|||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="HighlightingSettingsPerFile">
|
<component name="HighlightingSettingsPerFile">
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/include/algorithm" root0="SKIP_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/include/algorithm" root0="SKIP_HIGHLIGHTING" />
|
||||||
@@ -155,28 +78,28 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"C++ Project.Game.executor": "Debug",
|
"C++ Project.Game.executor": "Debug",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
},
|
},
|
||||||
"keyToStringList": {
|
"keyToStringList": {
|
||||||
"rider.external.source.directories": [
|
"rider.external.source.directories": [
|
||||||
"C:\\Users\\Bram\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\DecompilerCache",
|
"C:\\Users\\Bram\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\DecompilerCache",
|
||||||
"C:\\Users\\Bram\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\SourcesCache",
|
"C:\\Users\\Bram\\AppData\\Roaming\\JetBrains\\Rider2024.1\\resharper-host\\SourcesCache",
|
||||||
"C:\\Users\\Bram\\AppData\\Local\\Symbols\\src"
|
"C:\\Users\\Bram\\AppData\\Local\\Symbols\\src"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
<component name="RunManager">
|
<component name="RunManager">
|
||||||
<configuration name="Game" type="CppProject" factoryName="C++ Project">
|
<configuration name="Game" type="CppProject" factoryName="C++ Project">
|
||||||
<configuration_1>
|
<configuration_1>
|
||||||
@@ -324,7 +247,10 @@
|
|||||||
<workItem from="1715334251448" duration="4485000" />
|
<workItem from="1715334251448" duration="4485000" />
|
||||||
<workItem from="1715360147026" duration="5634000" />
|
<workItem from="1715360147026" duration="5634000" />
|
||||||
<workItem from="1715583954732" duration="5283000" />
|
<workItem from="1715583954732" duration="5283000" />
|
||||||
<workItem from="1715669033601" duration="10940000" />
|
<workItem from="1715669033601" duration="11720000" />
|
||||||
|
<workItem from="1715762731245" duration="3986000" />
|
||||||
|
<workItem from="1715773968873" duration="3580000" />
|
||||||
|
<workItem from="1715814533138" duration="3223000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Rework Tile detection system">
|
<task id="LOCAL-00001" summary="Rework Tile detection system">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
Text::Text(const std::string& text, const std::string& fontPath, int size, const Color4f& color): m_Text(text), m_FontPath(fontPath), m_Color(color) {
|
Text::Text(const std::string& text, const std::string& fontPath, int size, const Color4f& color): m_Text(text), m_FontPath(fontPath), m_Size(size), m_Color(color) {
|
||||||
m_Texture = new Texture(text, fontPath, size, color);
|
m_Texture = new Texture(text, fontPath, size, color);
|
||||||
m_IsCreatedOk = m_Texture->IsCreationOk();
|
m_IsCreatedOk = m_Texture->IsCreationOk();
|
||||||
if(!m_IsCreatedOk) {
|
if(!m_IsCreatedOk) {
|
||||||
@@ -14,5 +14,17 @@ Text::~Text() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Text::Draw(const Vector2f& pos) const {
|
void Text::Draw(const Vector2f& pos) const {
|
||||||
|
if(m_IsCreatedOk) {
|
||||||
m_Texture->Draw(pos);
|
m_Texture->Draw(pos);
|
||||||
|
} else {
|
||||||
|
std::cout << "Trying to render a Text that is not correctly made,\nText: " << m_Text << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Text::ChangeText(const std::string& text) {
|
||||||
|
if(m_IsCreatedOk && m_Texture->IsCreationOk()) {
|
||||||
|
delete m_Texture;
|
||||||
|
m_Texture = new Texture(text, m_FontPath, m_Size, m_Color);
|
||||||
|
} else {
|
||||||
|
std::cout << "This is wierd??: " << m_Text << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,14 @@ public:
|
|||||||
|
|
||||||
void Draw(const Vector2f& pos) const;
|
void Draw(const Vector2f& pos) const;
|
||||||
|
|
||||||
|
void ChangeText(const std::string& text);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_Text;
|
std::string m_Text;
|
||||||
std::string m_FontPath;
|
std::string m_FontPath;
|
||||||
|
int m_Size;
|
||||||
Color4f m_Color;
|
Color4f m_Color;
|
||||||
Texture* m_Texture;
|
Texture* m_Texture;
|
||||||
bool m_IsCreatedOk{ false };
|
bool m_IsCreatedOk{ false };
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
#include "GroundTileTypeManager.h"
|
#include "GridSystem/GroundTileTypeManager.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "GridSystem/WorldTile.h"
|
#include "GridSystem/WorldTile.h"
|
||||||
#include "Levels/World/WorldLevel.h"
|
#include "Levels/World/WorldLevel.h"
|
||||||
|
|||||||
@@ -157,6 +157,80 @@
|
|||||||
<ClCompile Include="Camera.cpp" />
|
<ClCompile Include="Camera.cpp" />
|
||||||
<ClCompile Include="Game.cpp" />
|
<ClCompile Include="Game.cpp" />
|
||||||
<ClCompile Include="GameManager.cpp" />
|
<ClCompile Include="GameManager.cpp" />
|
||||||
|
<ClCompile Include="GridSystem\GroundTileTypeManager.cpp">
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SupportJustMyCode>true</SupportJustMyCode>
|
||||||
|
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||||
|
<AssemblerListingLocation>x64\Debug\</AssemblerListingLocation>
|
||||||
|
<UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<BrowseInformationFile>x64\Debug\</BrowseInformationFile>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<DiagnosticsFormat>Column</DiagnosticsFormat>
|
||||||
|
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||||
|
<ErrorReporting>Prompt</ErrorReporting>
|
||||||
|
<ExpandAttributedSource>false</ExpandAttributedSource>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<EnableASAN>false</EnableASAN>
|
||||||
|
<EnableFuzzer>false</EnableFuzzer>
|
||||||
|
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||||
|
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||||
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<GenerateModuleDependencies>false</GenerateModuleDependencies>
|
||||||
|
<GenerateSourceDependencies>false</GenerateSourceDependencies>
|
||||||
|
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
|
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||||
|
<LanguageStandard>Default</LanguageStandard>
|
||||||
|
<LanguageStandard_C>Default</LanguageStandard_C>
|
||||||
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<ModuleDependenciesFile>x64\Debug\</ModuleDependenciesFile>
|
||||||
|
<ModuleOutputFile>x64\Debug\</ModuleOutputFile>
|
||||||
|
<OmitDefaultLibName>false</OmitDefaultLibName>
|
||||||
|
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<ObjectFileName>x64\Debug\</ObjectFileName>
|
||||||
|
<CallingConvention>Cdecl</CallingConvention>
|
||||||
|
<ProgramDataBaseFileName>x64\Debug\vc143.pdb</ProgramDataBaseFileName>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
|
<PrecompiledHeaderOutputFile>x64\Debug\Game.pch</PrecompiledHeaderOutputFile>
|
||||||
|
<PreprocessToFile>false</PreprocessToFile>
|
||||||
|
<PreprocessKeepComments>false</PreprocessKeepComments>
|
||||||
|
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
|
||||||
|
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
|
||||||
|
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||||
|
<ShowIncludes>false</ShowIncludes>
|
||||||
|
<SourceDependenciesFile>x64\Debug\</SourceDependenciesFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||||
|
<SpectreMitigation>false</SpectreMitigation>
|
||||||
|
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||||
|
<TrackerLogDirectory>x64\Debug\Game.tlog\</TrackerLogDirectory>
|
||||||
|
<TranslateIncludes>false</TranslateIncludes>
|
||||||
|
<MinimalRebuildFromTracking>true</MinimalRebuildFromTracking>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<UseFullPaths>true</UseFullPaths>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<XMLDocumentationFileName>x64\Debug\</XMLDocumentationFileName>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<IntelJCCErratum>false</IntelJCCErratum>
|
||||||
|
<BuildStlModules>false</BuildStlModules>
|
||||||
|
<TreatAngleIncludeAsExternal>false</TreatAngleIncludeAsExternal>
|
||||||
|
<ExternalWarningLevel>InheritWarningLevel</ExternalWarningLevel>
|
||||||
|
<TreatExternalTemplatesAsInternal>true</TreatExternalTemplatesAsInternal>
|
||||||
|
<DisableAnalyzeExternal>false</DisableAnalyzeExternal>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_UNICODE;UNICODE;</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<LinkCompiled>true</LinkCompiled>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="GridSystem\WorldGridManager.cpp">
|
<ClCompile Include="GridSystem\WorldGridManager.cpp">
|
||||||
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
@@ -307,10 +381,83 @@
|
|||||||
<LinkCompiled>true</LinkCompiled>
|
<LinkCompiled>true</LinkCompiled>
|
||||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</BrowseInformation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="GroundTileTypeManager.cpp" />
|
|
||||||
<ClCompile Include="Gui\GuiButton.cpp" />
|
<ClCompile Include="Gui\GuiButton.cpp" />
|
||||||
<ClCompile Include="Gui\GuiElement.cpp" />
|
<ClCompile Include="Gui\GuiElement.cpp" />
|
||||||
<ClCompile Include="Gui\GuiMeter.cpp" />
|
<ClCompile Include="Gui\GuiMeter.cpp" />
|
||||||
|
<ClCompile Include="Gui\GuiText.cpp">
|
||||||
|
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<SupportJustMyCode>true</SupportJustMyCode>
|
||||||
|
<AssemblerOutput>NoListing</AssemblerOutput>
|
||||||
|
<AssemblerListingLocation>x64\Debug\</AssemblerListingLocation>
|
||||||
|
<UndefineAllPreprocessorDefinitions>false</UndefineAllPreprocessorDefinitions>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<BrowseInformationFile>x64\Debug\</BrowseInformationFile>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<DiagnosticsFormat>Column</DiagnosticsFormat>
|
||||||
|
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||||
|
<ErrorReporting>Prompt</ErrorReporting>
|
||||||
|
<ExpandAttributedSource>false</ExpandAttributedSource>
|
||||||
|
<ExceptionHandling>Sync</ExceptionHandling>
|
||||||
|
<EnableASAN>false</EnableASAN>
|
||||||
|
<EnableFuzzer>false</EnableFuzzer>
|
||||||
|
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
|
||||||
|
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
|
||||||
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
|
<GenerateModuleDependencies>false</GenerateModuleDependencies>
|
||||||
|
<GenerateSourceDependencies>false</GenerateSourceDependencies>
|
||||||
|
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||||
|
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
|
||||||
|
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||||
|
<IgnoreStandardIncludePath>false</IgnoreStandardIncludePath>
|
||||||
|
<LanguageStandard>Default</LanguageStandard>
|
||||||
|
<LanguageStandard_C>Default</LanguageStandard_C>
|
||||||
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<ModuleDependenciesFile>x64\Debug\</ModuleDependenciesFile>
|
||||||
|
<ModuleOutputFile>x64\Debug\</ModuleOutputFile>
|
||||||
|
<OmitDefaultLibName>false</OmitDefaultLibName>
|
||||||
|
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<ObjectFileName>x64\Debug\</ObjectFileName>
|
||||||
|
<CallingConvention>Cdecl</CallingConvention>
|
||||||
|
<ProgramDataBaseFileName>x64\Debug\vc143.pdb</ProgramDataBaseFileName>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
|
<PrecompiledHeaderOutputFile>x64\Debug\Game.pch</PrecompiledHeaderOutputFile>
|
||||||
|
<PreprocessToFile>false</PreprocessToFile>
|
||||||
|
<PreprocessKeepComments>false</PreprocessKeepComments>
|
||||||
|
<PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
|
||||||
|
<RemoveUnreferencedCodeData>true</RemoveUnreferencedCodeData>
|
||||||
|
<ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
|
||||||
|
<ShowIncludes>false</ShowIncludes>
|
||||||
|
<SourceDependenciesFile>x64\Debug\</SourceDependenciesFile>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||||
|
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||||
|
<SpectreMitigation>false</SpectreMitigation>
|
||||||
|
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||||
|
<TrackerLogDirectory>x64\Debug\Game.tlog\</TrackerLogDirectory>
|
||||||
|
<TranslateIncludes>false</TranslateIncludes>
|
||||||
|
<MinimalRebuildFromTracking>true</MinimalRebuildFromTracking>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
|
<UseFullPaths>true</UseFullPaths>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<XMLDocumentationFileName>x64\Debug\</XMLDocumentationFileName>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<IntelJCCErratum>false</IntelJCCErratum>
|
||||||
|
<BuildStlModules>false</BuildStlModules>
|
||||||
|
<TreatAngleIncludeAsExternal>false</TreatAngleIncludeAsExternal>
|
||||||
|
<ExternalWarningLevel>InheritWarningLevel</ExternalWarningLevel>
|
||||||
|
<TreatExternalTemplatesAsInternal>true</TreatExternalTemplatesAsInternal>
|
||||||
|
<DisableAnalyzeExternal>false</DisableAnalyzeExternal>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_UNICODE;UNICODE;</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<LinkCompiled>true</LinkCompiled>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="Gui\Screen.cpp" />
|
<ClCompile Include="Gui\Screen.cpp" />
|
||||||
<ClCompile Include="Gui\Screens\FuelScreen.cpp" />
|
<ClCompile Include="Gui\Screens\FuelScreen.cpp" />
|
||||||
<ClCompile Include="Gui\Screens\MainScreen.cpp" />
|
<ClCompile Include="Gui\Screens\MainScreen.cpp" />
|
||||||
@@ -478,12 +625,13 @@
|
|||||||
<ClInclude Include="Camera.h" />
|
<ClInclude Include="Camera.h" />
|
||||||
<ClInclude Include="Game.h" />
|
<ClInclude Include="Game.h" />
|
||||||
<ClInclude Include="GameManager.h" />
|
<ClInclude Include="GameManager.h" />
|
||||||
|
<ClInclude Include="GridSystem\GroundTileTypeManager.h" />
|
||||||
<ClInclude Include="GridSystem\WorldGridManager.h" />
|
<ClInclude Include="GridSystem\WorldGridManager.h" />
|
||||||
<ClInclude Include="GridSystem\WorldTile.h" />
|
<ClInclude Include="GridSystem\WorldTile.h" />
|
||||||
<ClInclude Include="GroundTileTypeManager.h" />
|
|
||||||
<ClInclude Include="Gui\GuiButton.h" />
|
<ClInclude Include="Gui\GuiButton.h" />
|
||||||
<ClInclude Include="Gui\GuiElement.h" />
|
<ClInclude Include="Gui\GuiElement.h" />
|
||||||
<ClInclude Include="Gui\GuiMeter.h" />
|
<ClInclude Include="Gui\GuiMeter.h" />
|
||||||
|
<ClInclude Include="Gui\GuiText.h" />
|
||||||
<ClInclude Include="Gui\Screen.h" />
|
<ClInclude Include="Gui\Screen.h" />
|
||||||
<ClInclude Include="Gui\Screens\FuelScreen.h" />
|
<ClInclude Include="Gui\Screens\FuelScreen.h" />
|
||||||
<ClInclude Include="Gui\Screens\MainScreen.h" />
|
<ClInclude Include="Gui\Screens\MainScreen.h" />
|
||||||
|
|||||||
26
Game/Gui/GuiText.cpp
Normal file
26
Game/Gui/GuiText.cpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#include "pch.h"
|
||||||
|
#include "GuiText.h"
|
||||||
|
|
||||||
|
#include "colors.h"
|
||||||
|
GuiText::GuiText(const Vector2f& position, const std::string& text, const std::string& fontPath, int size, const Color4f& color): m_Position(position), m_Text(new Text(text, fontPath, size, color)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GuiText::GuiText(): m_Position(100,100), m_Text(new Text("Undefined", "fonts/verdana.ttf", 10, Colors::WHITE)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiText::Draw() const {
|
||||||
|
m_Text->Draw(m_Position);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiText::Update(float elapsedSec) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuiText::ChangeText(const std::string& text) const {
|
||||||
|
m_Text->ChangeText(text);
|
||||||
|
|
||||||
|
}
|
||||||
|
GuiText::~GuiText() {
|
||||||
|
delete m_Text;
|
||||||
|
}
|
||||||
20
Game/Gui/GuiText.h
Normal file
20
Game/Gui/GuiText.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "GuiElement.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Texture.h"
|
||||||
|
|
||||||
|
class GuiText : public GuiElement {
|
||||||
|
public:
|
||||||
|
GuiText(const Vector2f& position, const std::string& text, const std::string& fontPath, int size, const Color4f& color);
|
||||||
|
GuiText();
|
||||||
|
|
||||||
|
void Draw() const override;
|
||||||
|
void Update(float elapsedSec) override;
|
||||||
|
|
||||||
|
void ChangeText(const std::string& text) const;
|
||||||
|
|
||||||
|
~GuiText() override;
|
||||||
|
private:
|
||||||
|
Vector2f m_Position;
|
||||||
|
Text* m_Text;
|
||||||
|
};
|
||||||
@@ -1,8 +1,23 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "MainScreen.h"
|
#include "MainScreen.h"
|
||||||
|
|
||||||
|
#include "colors.h"
|
||||||
|
#include "utils.h"
|
||||||
|
#include "Gui/GuiText.h"
|
||||||
MainScreen::MainScreen(TextureManager* manager) : Screen("", Vector2f{0, 0}, Vector2f{900.f, 500.f}, manager) {
|
MainScreen::MainScreen(TextureManager* manager) : Screen("", Vector2f{0, 0}, Vector2f{900.f, 500.f}, manager) {
|
||||||
m_FuelMeter = new GuiMeter("gui/main/fuel/fuel.png", Vector2f{20, 500.f - 146 / 1.5 - 20}, Vector2f{336, 146},Vector2f{336 / 2, 146 / 1.5}, 21, manager);
|
Vector2f ScreenSize = utils::GetViewport();
|
||||||
|
Vector2f FuelFrameSize{ 336, 77 };
|
||||||
|
Vector2f HullFrameSize{ 61, 76 };
|
||||||
|
|
||||||
|
m_FuelMeter = new GuiMeter("gui/main/fuel/fuel.png", Vector2f{HullFrameSize.x + 10, ScreenSize.y - FuelFrameSize.y }, FuelFrameSize,FuelFrameSize / 1.3, 21, manager);
|
||||||
this->AddElement(m_FuelMeter);
|
this->AddElement(m_FuelMeter);
|
||||||
|
|
||||||
|
m_HullMeter = new GuiMeter("gui/main/hull/hull.png", Vector2f{5, ScreenSize.y - HullFrameSize.y - 10 }, HullFrameSize, HullFrameSize, 50, manager);
|
||||||
|
this->AddElement(m_HullMeter);
|
||||||
|
|
||||||
|
Vector2f DepthMeterPosition{10, ScreenSize.y - 120};
|
||||||
|
m_DepthText = new GuiText(DepthMeterPosition, "Depth: 20", "fonts/Arial.ttf", 20, Colors::YELLOW);
|
||||||
|
this->AddElement(m_DepthText);
|
||||||
}
|
}
|
||||||
MainScreen::~MainScreen() = default;
|
MainScreen::~MainScreen() = default;
|
||||||
void MainScreen::Draw() const {
|
void MainScreen::Draw() const {
|
||||||
@@ -14,3 +29,10 @@ void MainScreen::Update(float elapsedSecs) {
|
|||||||
void MainScreen::SetFuelMeterValue(float value) const {
|
void MainScreen::SetFuelMeterValue(float value) const {
|
||||||
m_FuelMeter->SetValue(value);
|
m_FuelMeter->SetValue(value);
|
||||||
}
|
}
|
||||||
|
void MainScreen::SetHullMeterValue(float value) const {
|
||||||
|
m_HullMeter->SetValue(value);
|
||||||
|
}
|
||||||
|
void MainScreen::SetDepth(const std::string& text) const {
|
||||||
|
m_DepthText->ChangeText(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Gui/GuiMeter.h"
|
#include "Gui/GuiMeter.h"
|
||||||
|
#include "Gui/GuiText.h"
|
||||||
#include "Gui/Screen.h"
|
#include "Gui/Screen.h"
|
||||||
|
|
||||||
class MainScreen: public Screen {
|
class MainScreen: public Screen {
|
||||||
@@ -11,8 +12,14 @@ public:
|
|||||||
virtual void Update(float elapsedSecs) override;
|
virtual void Update(float elapsedSecs) override;
|
||||||
|
|
||||||
void SetFuelMeterValue(float value) const;
|
void SetFuelMeterValue(float value) const;
|
||||||
|
void SetHullMeterValue(float value) const;
|
||||||
|
|
||||||
|
void SetDepth(const std::string& text) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GuiMeter* m_FuelMeter;
|
GuiMeter* m_FuelMeter;
|
||||||
|
GuiMeter* m_HullMeter;
|
||||||
|
|
||||||
|
GuiText* m_DepthText;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ Building::Building(const std::string& filePath, const Vector2f& position, Textur
|
|||||||
m_Texture = pTextureManager->GetTexture(filePath);
|
m_Texture = pTextureManager->GetTexture(filePath);
|
||||||
m_Size = Vector2f(m_Texture->GetWidth(), m_Texture->GetHeight());
|
m_Size = Vector2f(m_Texture->GetWidth(), m_Texture->GetHeight());
|
||||||
}
|
}
|
||||||
Building::~Building() {
|
Building::~Building() = default;
|
||||||
}
|
|
||||||
void Building::Draw() const {
|
void Building::Draw() const {
|
||||||
m_Texture->Draw(m_Position);
|
m_Texture->Draw(m_Position);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "Collision.h"
|
#include "Collision.h"
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
#include "GroundTileTypeManager.h"
|
#include "../../GridSystem/GroundTileTypeManager.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "GridSystem/WorldTile.h"
|
#include "GridSystem/WorldTile.h"
|
||||||
#include "Gui/Screens/ScreenManager.h"
|
#include "Gui/Screens/ScreenManager.h"
|
||||||
@@ -67,6 +67,7 @@ WorldLevel::WorldLevel(Camera* camera, Rectf viewport): Level(camera),
|
|||||||
|
|
||||||
m_MainScreen = new MainScreen(TextureManager::GetInstance());
|
m_MainScreen = new MainScreen(TextureManager::GetInstance());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
WorldLevel::~WorldLevel() {
|
WorldLevel::~WorldLevel() {
|
||||||
delete m_MainScreen;
|
delete m_MainScreen;
|
||||||
@@ -79,6 +80,7 @@ void WorldLevel::Update(float elapsedSec) {
|
|||||||
m_MousePos = Vector2f { float(mouseX), float(mouseY) };
|
m_MousePos = Vector2f { float(mouseX), float(mouseY) };
|
||||||
m_MousePos = m_pCamera->TransformMouse(m_MousePos);
|
m_MousePos = m_pCamera->TransformMouse(m_MousePos);
|
||||||
|
|
||||||
|
|
||||||
// for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
|
// for (size_t x { 0 }; x < WORLD_WIDTH; ++x) {
|
||||||
// for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
|
// for (size_t y { 0 }; y < WORLD_HEIGHT; ++y) {
|
||||||
// m_gridManager.GetTileAtIndex(x, y)->m_Hightlight = false;
|
// m_gridManager.GetTileAtIndex(x, y)->m_Hightlight = false;
|
||||||
@@ -133,6 +135,7 @@ void WorldLevel::Update(float elapsedSec) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_MainScreen->Update(elapsedSec);
|
m_MainScreen->Update(elapsedSec);
|
||||||
|
m_MainScreen->SetDepth(std::to_string((int)-m_Player.GetPosition().y - 50) + " ft.");
|
||||||
|
|
||||||
//Vector2f playerPos = m_player.GetPosition();
|
//Vector2f playerPos = m_player.GetPosition();
|
||||||
//Vector2f newCameraPos = playerPos;
|
//Vector2f newCameraPos = playerPos;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "GridSystem/WorldGridManager.h"
|
#include "GridSystem/WorldGridManager.h"
|
||||||
#include "Gui/Screens/ScreenManager.h"
|
#include "Gui/Screens/ScreenManager.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
|
#include "Text.h"
|
||||||
#include "Gui/GuiMeter.h"
|
#include "Gui/GuiMeter.h"
|
||||||
#include "Gui/Screens/MainScreen.h"
|
#include "Gui/Screens/MainScreen.h"
|
||||||
#include "Particle/Particle.h"
|
#include "Particle/Particle.h"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
#include "GroundTileTypeManager.h"
|
#include "GridSystem/GroundTileTypeManager.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "Levels/World/WorldLevel.h"
|
#include "Levels/World/WorldLevel.h"
|
||||||
#include "Animations/Animation.h"
|
#include "Animations/Animation.h"
|
||||||
|
|||||||
BIN
Resources/fonts/Arial.ttf
Normal file
BIN
Resources/fonts/Arial.ttf
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 33 KiB |
BIN
Resources/gui/main/hull/hull.png
Normal file
BIN
Resources/gui/main/hull/hull.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Reference in New Issue
Block a user