projects
/
matthijs
/
ABM2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Make every ITask know about the Kernel in which the run.
[matthijs/ABM2.git]
/
ABM2
/
Playground.cpp
diff --git
a/ABM2/Playground.cpp
b/ABM2/Playground.cpp
index edf532567810cc65b9604ebbf8327df29019df07..41c8b4b55fd81e407adec9a2e3202dc2f2fbdb0d 100755
(executable)
--- a/
ABM2/Playground.cpp
+++ b/
ABM2/Playground.cpp
@@
-1,5
+1,6
@@
#include "Playground.h"
\r
\r
#include "Playground.h"
\r
\r
+#include "Engine/engine.h"
\r
#include "Engine/VideoUpdate.h"
\r
#include "SchemeReader.h"
\r
\r
#include "Engine/VideoUpdate.h"
\r
#include "SchemeReader.h"
\r
\r
@@
-8,6
+9,9
@@
LPD3DXSPRITE d3dspt;
LPD3DXFONT font;
\r
\r
#endif
\r
LPD3DXFONT font;
\r
\r
#endif
\r
+
\r
+Playground::Playground(CKernel* kernel) : ITask(kernel) { }
\r
+
\r
bool Playground::Start()
\r
{
\r
#if WIN32
\r
bool Playground::Start()
\r
{
\r
#if WIN32
\r
@@
-66,7
+70,7
@@
bool Playground::Start()
\r
#endif
\r
// init playing field
\r
\r
#endif
\r
// init playing field
\r
- SchemeReader *scheme = new SchemeReader("
d
ata/schemes/BASIC.SCH");
\r
+ SchemeReader *scheme = new SchemeReader("
D
ata/schemes/BASIC.SCH");
\r
for (int i=0; i<PLAYGROUND_COLS; ++i)
\r
{
\r
for (int j=0; j<PLAYGROUND_ROWS; ++j)
\r
for (int i=0; i<PLAYGROUND_COLS; ++i)
\r
{
\r
for (int j=0; j<PLAYGROUND_ROWS; ++j)
\r
@@
-115,13
+119,15
@@
bool Playground::Start()
field[0][1] = NULL;
\r
}
\r
\r
field[0][1] = NULL;
\r
}
\r
\r
-
\r
old_counter = GetTickCount();
\r
return true;
\r
}
\r
\r
void Playground::Update()
\r
{
\r
old_counter = GetTickCount();
\r
return true;
\r
}
\r
\r
void Playground::Update()
\r
{
\r
+ CMMPointer<Sprite> s = this->getKernel()->getSpriteManager()->getSprite(SPR_FIELD);
\r
+
\r
+ s->blit(0, 0, 1.0, 1.0, 0, 0, COLOUR_RGBA(0, 0, 255, 255));
\r
#ifdef WIN32
\r
if(CInputTask::keyDown(DIK_ESCAPE))CKernel::GetSingleton().KillAllTasks();
\r
\r
#ifdef WIN32
\r
if(CInputTask::keyDown(DIK_ESCAPE))CKernel::GetSingleton().KillAllTasks();
\r
\r
@@
-501,11
+507,13
@@
Item:: Item(LPDIRECT3DTEXTURE9 t, int texnr, int subwidth, int subheight, int co
subitem_height = subheight;
\r
subitem_width = subwidth;
\r
}
\r
subitem_height = subheight;
\r
subitem_width = subwidth;
\r
}
\r
+#endif // WIN32
\r
\r
Item::~Item()
\r
{
\r
}
\r
\r
\r
Item::~Item()
\r
{
\r
}
\r
\r
+#ifdef WIN32
\r
void Item::Draw()
\r
{
\r
D3DXVECTOR3 center(0.0f, 0.0f, 0.0f); // center at the upper-left corner
\r
void Item::Draw()
\r
{
\r
D3DXVECTOR3 center(0.0f, 0.0f, 0.0f); // center at the upper-left corner
\r