summaryrefslogtreecommitdiffstats
path: root/MatchBloxEngine/MatchBloxEngine/C_Block.cpp
diff options
context:
space:
mode:
authorDennis Peeten <dpeeten@onsneteindhoven.nl>2008-05-06 19:38:37 (GMT)
committerDennis Peeten <dpeeten@onsneteindhoven.nl>2008-05-06 19:38:37 (GMT)
commit177fd758a25e954a43c20e59e6e61ba15a661c44 (patch)
treee65059265b6abf4177833f9b7f54d8e04c91953d /MatchBloxEngine/MatchBloxEngine/C_Block.cpp
parentd205c9a71a2d3d415cb470c0c148a7541a18ab41 (diff)
download2iv55-177fd758a25e954a43c20e59e6e61ba15a661c44.zip
2iv55-177fd758a25e954a43c20e59e6e61ba15a661c44.tar.gz
2iv55-177fd758a25e954a43c20e59e6e61ba15a661c44.tar.bz2
Diffstat (limited to 'MatchBloxEngine/MatchBloxEngine/C_Block.cpp')
-rw-r--r--MatchBloxEngine/MatchBloxEngine/C_Block.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/MatchBloxEngine/MatchBloxEngine/C_Block.cpp b/MatchBloxEngine/MatchBloxEngine/C_Block.cpp
index 4b2a9f7..4c092a2 100644
--- a/MatchBloxEngine/MatchBloxEngine/C_Block.cpp
+++ b/MatchBloxEngine/MatchBloxEngine/C_Block.cpp
@@ -28,6 +28,7 @@ void C_Block::Render(unsigned int f_iElapsedTime)
unsigned int l_uiDeltaTime = f_iElapsedTime - m_uiAnimStart;
double l_Scale = 0.0;
+
//check if the previous animation has ended in between
//calls to this Render function.
if (l_uiDeltaTime > g_BlockAnimDurations[(int)m_CurrState])
@@ -35,12 +36,15 @@ void C_Block::Render(unsigned int f_iElapsedTime)
m_CurrState = BS_IDLE;
}
+ glPushMatrix();
+
switch (m_CurrState)
{
case BS_FADE_IN:
l_Scale = (double)l_uiDeltaTime / (double)g_BlockAnimDurations[BS_FADE_IN];
//glScaled(l_Scale, l_Scale, l_Scale);
SetScale(l_Scale, l_Scale, l_Scale);
+ TransRotateScale();
C_3DObject::Render();
break;
@@ -48,6 +52,7 @@ void C_Block::Render(unsigned int f_iElapsedTime)
l_Scale = 1.0 - ((double)l_uiDeltaTime / (double)g_BlockAnimDurations[BS_FADE_OUT]);
// glScaled(l_Scale, l_Scale, l_Scale);
SetScale(l_Scale, l_Scale, l_Scale);
+ TransRotateScale();
C_3DObject::Render();
break;
@@ -56,8 +61,11 @@ void C_Block::Render(unsigned int f_iElapsedTime)
case BS_IDLE:
default:
+ TransRotateScale();
C_3DObject::Render();
break;
}
+ glPopMatrix();
+
}