Skip to content

Commit d4c4a7f

Browse files
committedJun 28, 2019
Chapter7: TileLayer (Background), Tiled app 1.2.4 with uncompressed map
1 parent 4fd50f3 commit d4c4a7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+8734
-0
lines changed
 

‎Chapter7.1/SDL_game.sln

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.645
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_game", "SDL_game\SDL_game.vcxproj", "{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Debug|x64.ActiveCfg = Debug|x64
17+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Debug|x64.Build.0 = Debug|x64
18+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Debug|x86.ActiveCfg = Debug|Win32
19+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Debug|x86.Build.0 = Debug|Win32
20+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Release|x64.ActiveCfg = Release|x64
21+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Release|x64.Build.0 = Release|x64
22+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Release|x86.ActiveCfg = Release|Win32
23+
{9CF7E47B-7AD3-4297-9BC4-76D4652359C5}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {62EC434C-F3A8-4ECE-8EF9-A9120020982B}
30+
EndGlobalSection
31+
EndGlobal
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include "AnimatedGraphic.h"
2+
#include "SDL.h"
3+
4+
//constructor for AnimatedGraphic class
5+
AnimatedGraphic::AnimatedGraphic() : SDLGameObject()
6+
{
7+
8+
}
9+
10+
void AnimatedGraphic::draw()
11+
{
12+
SDLGameObject::draw();
13+
}
14+
15+
//update function of animated graphic class
16+
void AnimatedGraphic::update()
17+
{
18+
m_currentFrame = int(((SDL_GetTicks() / (1000 / m_animSpeed)) % m_numFrames));
19+
}
20+
21+
void AnimatedGraphic::clean()
22+
{
23+
SDLGameObject::clean();
24+
}
25+
26+
void AnimatedGraphic::load(const LoaderParams* pParams)
27+
{
28+
SDLGameObject::load(pParams);
29+
m_animSpeed = pParams->getAnimSpeed();
30+
}

0 commit comments

Comments
 (0)
Please sign in to comment.