Fusion Complete

This commit is contained in:
CatChow0 2024-03-29 17:01:58 +01:00
parent 513c12bee0
commit 2c493bc979
4 changed files with 138 additions and 14 deletions

View File

@ -689,10 +689,11 @@ void ApplicationClass::GenerateTerrain()
// Set the name of the texture file that we will be loading. // Set the name of the texture file that we will be loading.
char textureFilename[128]; char textureFilename[128];
char textureFilename2[128];
strcpy_s(textureFilename, "stone01.tga"); strcpy_s(textureFilename, "stone01.tga");
strcpy_s(textureFilename2, "moss01.tga");
Object* newTerrain = new Object(); Object* newTerrain = new Object();
newTerrain->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, textureFilename); newTerrain->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, textureFilename, textureFilename2);
newTerrain->SetTranslateMatrix(XMMatrixTranslation(0.0f, -1.0f, 0.0f)); newTerrain->SetTranslateMatrix(XMMatrixTranslation(0.0f, -1.0f, 0.0f));
newTerrain->SetRotateMatrix(XMMatrixRotationY(180.0f)); newTerrain->SetRotateMatrix(XMMatrixRotationY(180.0f));
@ -705,16 +706,18 @@ void ApplicationClass::AddCube()
{ {
char modelFilename[128]; char modelFilename[128];
char textureFilename[128]; char textureFilename[128];
char textureFilename2[128];
// Set the file name of the model. // Set the file name of the model.
strcpy_s(modelFilename, "cube.txt"); strcpy_s(modelFilename, "cube.txt");
// Set the name of the texture file that we will be loading. // Set the name of the texture file that we will be loading.
strcpy_s(textureFilename, "stone01.tga"); strcpy_s(textureFilename, "stone01.tga");
strcpy_s(textureFilename2, "moss01.tga");
static int cubeCount = 0; static int cubeCount = 0;
float position = cubeCount * 2.0f; float position = cubeCount * 2.0f;
Object* newCube = new Object(); Object* newCube = new Object();
newCube->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, textureFilename); newCube->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, textureFilename, textureFilename2);
newCube->SetTranslateMatrix(XMMatrixTranslation(position, 0.0f, 0.0f)); newCube->SetTranslateMatrix(XMMatrixTranslation(position, 0.0f, 0.0f));
@ -739,6 +742,9 @@ void ApplicationClass::DeleteTerrain()
delete cube; delete cube;
} }
m_terrainChunk.clear(); m_terrainChunk.clear();
}
bool ApplicationClass::UpdateFps() bool ApplicationClass::UpdateFps()
{ {
int fps; int fps;

View File

@ -22,6 +22,15 @@
<Filter Include="Fichiers sources\ImGui"> <Filter Include="Fichiers sources\ImGui">
<UniqueIdentifier>{2f09e599-272c-4cd3-b095-62c0b10b439b}</UniqueIdentifier> <UniqueIdentifier>{2f09e599-272c-4cd3-b095-62c0b10b439b}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Texture">
<UniqueIdentifier>{e7aac2a1-4fc0-42c7-b92f-15d3aec3736b}</UniqueIdentifier>
</Filter>
<Filter Include="Fonts">
<UniqueIdentifier>{39c57c7f-e726-4443-8fbc-734e2d0c97d8}</UniqueIdentifier>
</Filter>
<Filter Include="Assets">
<UniqueIdentifier>{2978535b-193d-4876-83be-1c3c4470db62}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Main.cpp"> <ClCompile Include="Main.cpp">
@ -84,6 +93,33 @@
<ClCompile Include="textureclass.cpp"> <ClCompile Include="textureclass.cpp">
<Filter>Fichiers sources</Filter> <Filter>Fichiers sources</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="bitmapclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="fontclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="fontshaderclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="fpsclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Spriteclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Multitextureshaderclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="textclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="textureshaderclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
<ClCompile Include="Timerclass.cpp">
<Filter>Fichiers sources</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="systemclass.h"> <ClInclude Include="systemclass.h">
@ -131,9 +167,6 @@
<ClInclude Include="include\backends\imgui_impl_win32.h"> <ClInclude Include="include\backends\imgui_impl_win32.h">
<Filter>Fichiers d%27en-tête\ImGui</Filter> <Filter>Fichiers d%27en-tête\ImGui</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\dx11win10tut06_src\source\lightclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="imguiManager.h"> <ClInclude Include="imguiManager.h">
<Filter>Fichiers d%27en-tête</Filter> <Filter>Fichiers d%27en-tête</Filter>
</ClInclude> </ClInclude>
@ -146,6 +179,36 @@
<ClInclude Include="textureclass.h"> <ClInclude Include="textureclass.h">
<Filter>Fichiers d%27en-tête</Filter> <Filter>Fichiers d%27en-tête</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="bitmapclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="fontclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="fontshaderclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="fpsclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="lightclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="Multitextureshaderclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="Spriteclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="textclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="textureshaderclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
<ClInclude Include="Timerclass.h">
<Filter>Fichiers d%27en-tête</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
@ -155,13 +218,66 @@
<None Include="Color.vs"> <None Include="Color.vs">
<Filter>shader</Filter> <Filter>shader</Filter>
</None> </None>
<None Include="light.ps" /> <None Include="font.ps">
<None Include="light.vs" /> <Filter>Fonts</Filter>
</None>
<None Include="font.vs">
<Filter>Fonts</Filter>
</None>
<None Include="light.ps">
<Filter>shader</Filter>
</None>
<None Include="light.vs">
<Filter>shader</Filter>
</None>
<None Include="Multitexture.ps">
<Filter>Texture</Filter>
</None>
<None Include="Multitexture.vs">
<Filter>Texture</Filter>
</None>
<None Include="texture.ps">
<Filter>Texture</Filter>
</None>
<None Include="texture.vs">
<Filter>Texture</Filter>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="stone01.tga" /> <Image Include="font01.tga">
<Filter>Fonts</Filter>
</Image>
<Image Include="..\..\..\..\Downloads\grass.tga">
<Filter>Assets</Filter>
</Image>
<Image Include="moss01.tga">
<Filter>Assets</Filter>
</Image>
<Image Include="papier.tga">
<Filter>Assets</Filter>
</Image>
<Image Include="stone01.tga">
<Filter>Assets</Filter>
</Image>
<Image Include="wall.tga">
<Filter>Assets</Filter>
</Image>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Text Include="cube.txt" /> <Text Include="font01.txt">
<Filter>Fonts</Filter>
</Text>
<Text Include="..\..\..\..\Downloads\chunk.txt">
<Filter>Assets</Filter>
</Text>
<Text Include="cube.txt">
<Filter>Assets</Filter>
</Text>
<Text Include="plane.txt">
<Filter>Assets</Filter>
</Text>
<Text Include="sphere.txt">
<Filter>Assets</Filter>
</Text>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -3,14 +3,17 @@ Pos=60,60
Size=400,400 Size=400,400
[Window][Khaotic Engine] [Window][Khaotic Engine]
Pos=129,554 Pos=2,63
Size=694,183 Size=694,183
Collapsed=1
[Window][Objects] [Window][Objects]
Pos=5,7 Pos=10,29
Size=492,353 Size=492,353
Collapsed=1
[Window][Terrain] [Window][Terrain]
Pos=1223,101 Pos=913,27
Size=418,94 Size=418,94
Collapsed=1

View File

@ -86,7 +86,6 @@ private:
int m_vertexCount, m_indexCount; int m_vertexCount, m_indexCount;
TextureClass* m_Textures; TextureClass* m_Textures;
ModelType* m_model; ModelType* m_model;
int m_vertexCount, m_indexCount;
}; };
#endif #endif