Skip to content

Commit

Permalink
Fixed: Map
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun-hyang committed Dec 11, 2022
1 parent bfd3f35 commit 0b4c6ad
Show file tree
Hide file tree
Showing 39 changed files with 379 additions and 295 deletions.
Binary file modified Debug/CBottomWall.obj
Binary file not shown.
Binary file modified Debug/CFloor.obj
Binary file not shown.
Binary file modified Debug/CHandSphere.obj
Binary file not shown.
Binary file modified Debug/CHole.obj
Binary file not shown.
Binary file modified Debug/CLeftWall.obj
Binary file not shown.
Binary file modified Debug/CLight.obj
Binary file not shown.
Binary file modified Debug/CRightWall.obj
Binary file not shown.
Binary file modified Debug/CTopWall.obj
Binary file not shown.
Binary file modified Debug/CWall.obj
Binary file not shown.
Binary file modified Debug/Csphere.obj
Binary file not shown.
Binary file modified Debug/DisplayGameStatus.obj
Binary file not shown.
Binary file modified Debug/Player.obj
Binary file not shown.
Binary file modified Debug/VirtualLego.bsc
Binary file not shown.
Binary file modified Debug/VirtualLego.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Debug/VirtualLego.exe.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\김도엽\source\repos\OOP-Proj4\Debug\VirtualLego.exe</FullPath>
<FullPath>C:\Users\jimin\Desktop\repos\hyun-hang\OOP-Proj4\Debug\VirtualLego.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
Expand Down
Binary file modified Debug/VirtualLego.ilk
Binary file not shown.
152 changes: 122 additions & 30 deletions Debug/VirtualLego.log

Large diffs are not rendered by default.

Binary file modified Debug/VirtualLego.pdb
Binary file not shown.
Binary file modified Debug/VirtualLego.tlog/BscMake.command.1.tlog
Binary file not shown.
Binary file modified Debug/VirtualLego.tlog/CL.write.1.tlog
Binary file not shown.
4 changes: 2 additions & 2 deletions Debug/VirtualLego.tlog/VirtualLego.lastbuildstate
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.34.31933:TargetPlatformVersion=10.0.22000.0:VcpkgTriplet=x86-windows:
Debug|Win32|C:\Users\김도엽\Source\Repos\OOP-Proj4\|
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.22000.0:
Debug|Win32|C:\Users\jimin\Desktop\repos\hyun-hang\OOP-Proj4\|
Binary file modified Debug/VirtualLego.tlog/bscmake.read.1.tlog
Binary file not shown.
Binary file modified Debug/VirtualLego.tlog/bscmake.write.1.tlog
Binary file not shown.
Binary file modified Debug/VirtualLego.tlog/link.command.1.tlog
Binary file not shown.
Binary file modified Debug/VirtualLego.tlog/link.read.1.tlog
Binary file not shown.
Binary file modified Debug/VirtualLego.tlog/link.write.1.tlog
Binary file not shown.
Binary file modified Debug/d3dUtility.obj
Binary file not shown.
Binary file modified Debug/d3dfont.obj
Binary file not shown.
Binary file modified Debug/d3dutil.obj
Binary file not shown.
Binary file modified Debug/dxutil.obj
Binary file not shown.
Binary file modified Debug/status.obj
Binary file not shown.
Binary file modified Debug/vc143.idb
Binary file not shown.
Binary file modified Debug/vc143.pdb
Binary file not shown.
Binary file modified Debug/virtualLego.obj
Binary file not shown.
42 changes: 10 additions & 32 deletions Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,24 @@ using namespace std;


Map::Map(int num_platform) {
this->num_platform = num_platform;
this->num_platform = num_platform;
this->g_platforms.resize(16);
}

Map::~Map(void) {

}


bool Map::drawMap1(IDirect3DDevice9* Device) {

vector<array<float, 3>> g_platform_cord(num_platform);
// create platform
this->g_platforms[0].setPosition(0, 0, 0);
this->g_platforms[1].setPosition(-0.5, 0, 0.3);
this->g_platforms[2].setPosition(+0.5, 0, 0.3);
this->g_platforms[3].setPosition(-1.0, 0, 0.6);
this->g_platforms[4].setPosition(+1.0, 0, 0.6);
this->g_platforms[5].setPosition(-1.5, 0, 0.9);
this->g_platforms[6].setPosition(+1.5, 0, 0.9);
this->g_platforms[7].setPosition(-2.0, 0, 1.2);
this->g_platforms[8].setPosition(+2.0, 0, 1.2);

this->g_platforms[9].setPosition(+1.5, 0, 1.5);
this->g_platforms[10].setPosition(-1.5, 0, 1.5);
this->g_platforms[11].setPosition(+1.0, 0, 1.8);
this->g_platforms[12].setPosition(-1.0, 0, 1.8);
this->g_platforms[13].setPosition(+0.5, 0, 2.1);
this->g_platforms[14].setPosition(-0.5, 0, 2.1);
this->g_platforms[15].setPosition(+0.0, 0, 2.4);

for (int i = 0; i < num_platform; i++) {
if (!g_platforms[i].create(Device, d3d::GREEN)) return false;
D3DXVECTOR3 m = g_platforms[i].getPosition();
g_platforms[i].setPosition(m.x, m.y, m.z);
}
void Map::setPosition(int i, float x, float y, float z) {

// create platform
this->g_platforms[i].setPosition(x, y, z);
}


void Map::destroy(void) {
for (int i = 0; i < num_platform; i++) {
g_platforms[i].destroy();
}
}
for (int i = 0; i < num_platform; i++) {
g_platforms[i].destroy();
}
}
18 changes: 9 additions & 9 deletions Map.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#ifndef _MAP_
#include "Platform.h"
#include "vector"

using namespace std;

class Map {
private :
private:
int num_platform;

public:
vector<Platform> g_platforms;

public :

Map(int num_platform);
~Map(void);

bool drawMap1(IDirect3DDevice9* Device);
void destroy(void);
};

#endif
void setPosition(int i, float x, float y, float z);
void destroy(void);
};
2 changes: 2 additions & 0 deletions VirtualLego.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<ClCompile Include="DisplayGameStatus.cpp" />
<ClCompile Include="dxutil.cpp" />
<ClCompile Include="Jumper.cpp" />
<ClCompile Include="Map.cpp" />
<ClCompile Include="Platform.cpp" />
<ClCompile Include="Player.cpp" />
<ClCompile Include="status.cpp" />
Expand All @@ -175,6 +176,7 @@
<ClInclude Include="DisplayGameStatus.h" />
<ClInclude Include="dxutil.h" />
<ClInclude Include="Jumper.h" />
<ClInclude Include="Map.h" />
<ClInclude Include="Platform.h" />
<ClInclude Include="Player.h" />
<ClInclude Include="status.h" />
Expand Down
6 changes: 6 additions & 0 deletions VirtualLego.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
<ClCompile Include="DisplayText.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Map.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="d3dUtility.h">
Expand Down Expand Up @@ -140,5 +143,8 @@
<ClInclude Include="DisplayText.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Map.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
Loading

0 comments on commit 0b4c6ad

Please sign in to comment.