[Fix] Fixed memory leak in Player.
[Fix] Added Actor.h and Actor.cpp to VC++ project.
This commit is contained in:
parent
61895f84af
commit
a9677e47a9
@ -83,6 +83,7 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\src\Actor\Actor.h" />
|
||||||
<ClInclude Include="..\..\src\Actor\NPC.h" />
|
<ClInclude Include="..\..\src\Actor\NPC.h" />
|
||||||
<ClInclude Include="..\..\src\Actor\Player.h" />
|
<ClInclude Include="..\..\src\Actor\Player.h" />
|
||||||
<ClInclude Include="..\..\src\Collision\AABB.h" />
|
<ClInclude Include="..\..\src\Collision\AABB.h" />
|
||||||
@ -124,6 +125,7 @@
|
|||||||
<ClInclude Include="..\..\src\TMXParser\TmxUtil.h" />
|
<ClInclude Include="..\..\src\TMXParser\TmxUtil.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\src\Actor\Actor.cpp" />
|
||||||
<ClCompile Include="..\..\src\Actor\NPC.cpp" />
|
<ClCompile Include="..\..\src\Actor\NPC.cpp" />
|
||||||
<ClCompile Include="..\..\src\Actor\Player.cpp" />
|
<ClCompile Include="..\..\src\Actor\Player.cpp" />
|
||||||
<ClCompile Include="..\..\src\Collision\AABB.cpp" />
|
<ClCompile Include="..\..\src\Collision\AABB.cpp" />
|
||||||
|
@ -159,6 +159,9 @@
|
|||||||
<ClInclude Include="..\..\src\Actor\NPC.h">
|
<ClInclude Include="..\..\src\Actor\NPC.h">
|
||||||
<Filter>Actor</Filter>
|
<Filter>Actor</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\Actor\Actor.h">
|
||||||
|
<Filter>Actor</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\src\Main\main.cpp">
|
<ClCompile Include="..\..\src\Main\main.cpp">
|
||||||
@ -254,5 +257,8 @@
|
|||||||
<ClCompile Include="..\..\src\Actor\NPC.cpp">
|
<ClCompile Include="..\..\src\Actor\NPC.cpp">
|
||||||
<Filter>Actor</Filter>
|
<Filter>Actor</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\Actor\Actor.cpp">
|
||||||
|
<Filter>Actor</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -17,6 +17,12 @@ Player::Player(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player::~Player(void) {
|
Player::~Player(void) {
|
||||||
|
for(int i = 0; i < 4; i++) {
|
||||||
|
if(_stepSFX[i]) {
|
||||||
|
sfxManager.Destroy(_stepSFX[i]);
|
||||||
|
_stepSFX[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
delete _player;
|
delete _player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ void Game::OnResize(int width, int height) {
|
|||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glOrtho(0.0, 800.0, 0.0, 600.0, 0.0, 1.0);
|
glOrtho(0.0, 800.0, 600.0, 0.0, 0.0, 1.0);
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
Loading…
Reference in New Issue
Block a user