summaryrefslogtreecommitdiffstats
path: root/matchblox/C_Block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'matchblox/C_Block.cpp')
-rw-r--r--matchblox/C_Block.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/matchblox/C_Block.cpp b/matchblox/C_Block.cpp
deleted file mode 100644
index 4c092a2..0000000
--- a/matchblox/C_Block.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <GL/glut.h>
-
-#include <iostream>
-
-#include "C_Block.h"
-
-#define FADE_DURATION 500
-
-/*Durations of animations*/
-unsigned int g_BlockAnimDurations[4] = {0, 500, 500, 500};
-
-C_Block::C_Block(const char* f_strFileName,
- GLuint f_uiColorTex ,
- MatProps_t f_Mat)
-: C_3DObject(f_strFileName, f_uiColorTex, f_Mat),
- m_CurrState(BS_IDLE), m_uiAnimStart(0)
-{
-
-}
-
-C_Block::~C_Block()
-{
-
-}
-
-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])
- {
- 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;
-
- case BS_FADE_OUT:
- 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;
-
- case BS_COLLIDE:
- break;
-
- case BS_IDLE:
- default:
- TransRotateScale();
- C_3DObject::Render();
- break;
- }
-
- glPopMatrix();
-
-}