X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=ABM2%2FPlayground.h;h=879b4b005b7241050d3973950882bbf2d6168f84;hb=75d4212e8548f64904bad6d7f8978c077e6687d0;hp=1c99ab4030b095164f1e8a079a20255c783e1ca2;hpb=0835c5605c80efd286ccb7eff92fffc07689f359;p=matthijs%2FABM2.git diff --git a/ABM2/Playground.h b/ABM2/Playground.h index 1c99ab4..879b4b0 100755 --- a/ABM2/Playground.h +++ b/ABM2/Playground.h @@ -21,7 +21,7 @@ public: void Update(); void move(int xloc, int yloc); void move_to(int xloc, int yloc); - void move_to_direction(TMoveDirection dir, int speed); + void move_to_direction(TMoveDirection dir); int getY(); int getX(); int getHeight(); @@ -34,33 +34,34 @@ public: int getFieldCenterY(); private: int x,y; +#ifdef WIN32 LPDIRECT3DTEXTURE9 texture; +#endif // WIN32 }; -class Item +class Tile { public: - Item(LPDIRECT3DTEXTURE9 t, int texnr, int subwidth, int subheight, int colnr, int rownr); - ~Item(); + Tile(const CMMPointer &sprite, int subsprite, int col, int row); + ~Tile(); void Draw(); - int col, row, tex_num, subitem_height, subitem_width; private: - LPDIRECT3DTEXTURE9 texture; + CMMPointer sprite; + int col, row, subsprite; }; class Playground : public ITask { public: + Playground(CKernel *kernel); bool Start(); void Update(); void Stop(); AUTO_SIZE; private: - LPDIRECT3DTEXTURE9 background; - LPDIRECT3DTEXTURE9 foreground; Bomberman *bomberman; - Item *field[PLAYGROUND_COLS][PLAYGROUND_ROWS]; + Tile *field[PLAYGROUND_COLS][PLAYGROUND_ROWS]; void move_up(); void move_down();