[Fix] Fixed memory leak in Player.

[Fix] Added Actor.h and Actor.cpp to VC++ project.
This commit is contained in:
Tamir Atias 2012-04-12 22:24:38 +03:00
parent 61895f84af
commit a9677e47a9
4 changed files with 15 additions and 1 deletions

View File

@ -83,6 +83,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Actor\Actor.h" />
<ClInclude Include="..\..\src\Actor\NPC.h" />
<ClInclude Include="..\..\src\Actor\Player.h" />
<ClInclude Include="..\..\src\Collision\AABB.h" />
@ -124,6 +125,7 @@
<ClInclude Include="..\..\src\TMXParser\TmxUtil.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Actor\Actor.cpp" />
<ClCompile Include="..\..\src\Actor\NPC.cpp" />
<ClCompile Include="..\..\src\Actor\Player.cpp" />
<ClCompile Include="..\..\src\Collision\AABB.cpp" />

View File

@ -159,6 +159,9 @@
<ClInclude Include="..\..\src\Actor\NPC.h">
<Filter>Actor</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Actor\Actor.h">
<Filter>Actor</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Main\main.cpp">
@ -254,5 +257,8 @@
<ClCompile Include="..\..\src\Actor\NPC.cpp">
<Filter>Actor</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Actor\Actor.cpp">
<Filter>Actor</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -17,6 +17,12 @@ 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;
}

View File

@ -93,7 +93,7 @@ void Game::OnResize(int width, int height) {
glMatrixMode(GL_PROJECTION);
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);
glLoadIdentity();