00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _PICKUP_H
00021 #define _PICKUP_H
00022
00023 #include <PA9.h>
00024 #include <dswifi9.h>
00025 #include <vector>
00026 using std::vector;
00027 #include "macros.h"
00028 #include "spriteObject.h"
00029 #include "gameManager.h"
00030
00031
00032 class Player;
00033
00042 class Pickup : public spriteObject
00043 {
00044 public:
00045 Pickup(spriteManager *newgm, pickupSpawner *mySpawner, u8 lifeSeconds, s16 nx, s16 ny, u8 type, gameManager::pickupGraphics* graphicSet);
00046 virtual ~Pickup();
00047
00048 virtual void updateSprite();
00049 virtual void collidingWith(spriteObject *other);
00050 virtual bool isColliding(spriteObject *other, bool checkReverse = true) const;
00051
00058 enum pickupType {
00059 PT_SKULL, PT_1000V, PT_INVIS, PT_MINE, PT_GUN, PT_TNT,
00060 PT_BOOT, PT_GRENADE, PT_PUCK, PT_CHUT, PT_HOOK, PT_WARP,
00061 PT_MAGNET, PT_NET, PT_SHIELD, PT_DUNCE, PT_WEASEL, PT_BOOMERANG
00062 };
00063 void setType(u8 newType);
00065 pickupType getType() const {return myType;}
00067 void setSpawner(pickupSpawner *p) { spawner = p; }
00069 bool shouldExplode() { return exploding; }
00070
00072 static const u8 NUMPICKUPVARIATIONS = 18;
00073
00074 void playerTouchAction(Player* other);
00075 protected:
00077 gameManager* gm;
00078 private:
00080 pickupSpawner* spawner;
00082 bool exploding;
00084 pickupType myType;
00086 gameManager::pickupGraphics* myGFXset;
00087
00088 void makeIcon(u8 frame);
00090 spriteObject* myIcon;
00091
00093 static const u16 MINX = 8;
00095 static const u16 MINY = 8;
00097 static const u16 MAXX = 248;
00099 static const u16 MAXY = 176;
00100 };
00101
00102 #endif