X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;ds=sidebyside;f=ABM2%2FPlayground.h;h=99896744af2675deb649af4f06644b6cdc340999;hb=refs%2Fheads%2Flinux;hp=541bf2af566c1ca3bf512a060c65bb6f9d82ebd4;hpb=716fe3814b66a0c98805c2f5af656fc1d1d1ef2e;p=matthijs%2FABM2.git diff --git a/ABM2/Playground.h b/ABM2/Playground.h index 541bf2a..9989674 100755 --- a/ABM2/Playground.h +++ b/ABM2/Playground.h @@ -16,7 +16,7 @@ enum TMoveDirection { N,NNE,NE,NEE,E,SEE,SE,SSE,S,SSW,SW,SWW,W,NWW,NW,NNW }; //( class Bomberman { public: - Bomberman(int xloc, int yloc); + Bomberman(const CMMPointer &sprite, int xloc, int yloc); ~Bomberman(); void Update(); void move(int xloc, int yloc); @@ -34,41 +34,32 @@ public: int getFieldCenterY(); private: int x,y; -#ifdef WIN32 - LPDIRECT3DTEXTURE9 texture; -#endif // WIN32 + CMMPointer sprite; }; -class Item +class Tile { public: -#ifdef WIN32 - Item(LPDIRECT3DTEXTURE9 t, int texnr, int subwidth, int subheight, int colnr, int rownr); -#endif // WIN32 - ~Item(); + Tile(const CMMPointer &sprite, int subsprite, int col, int row); + ~Tile(); void Draw(); - int col, row, tex_num, subitem_height, subitem_width; private: -#ifdef WIN32 - LPDIRECT3DTEXTURE9 texture; -#endif // WIN32 + CMMPointer sprite; + int col, row, subsprite; }; class Playground : public ITask { public: + Playground(CKernel *kernel); bool Start(); void Update(); void Stop(); AUTO_SIZE; private: -#ifdef WIN32 - LPDIRECT3DTEXTURE9 background; - LPDIRECT3DTEXTURE9 foreground; -#endif // WIN32 Bomberman *bomberman; - Item *field[PLAYGROUND_COLS][PLAYGROUND_ROWS]; + Tile *field[PLAYGROUND_COLS][PLAYGROUND_ROWS]; void move_up(); void move_down();