28 #ifndef GOB_MINIGAMES_GEISHA_PENETRATION_H 29 #define GOB_MINIGAMES_GEISHA_PENETRATION_H 31 #include "common/system.h" 32 #include "common/list.h" 34 #include "gob/sound/sounddesc.h" 36 #include "gob/minigames/geisha/submarine.h" 56 bool play(
bool hasAccessPass,
bool hasMaxEnergy,
bool testMode);
58 bool isPlaying()
const;
62 static const int kModeCount = 2;
63 static const int kFloorCount = 3;
65 static const int kMapWidth = 17;
66 static const int kMapHeight = 13;
68 static const int kPaletteSize = 16;
70 static const byte kPalettes[kFloorCount][3 * kPaletteSize];
71 static const byte kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight];
73 static const int kEnemyCount = 9;
74 static const int kMaxBulletCount = 10;
88 MapObject(uint16 tX, uint16 tY, uint16 mX, uint16 mY, uint16 w, uint16 h);
89 MapObject(uint16 tX, uint16 tY, uint16 w, uint16 h);
91 void setTileFromMapPosition();
92 void setMapFromTilePosition();
94 bool isIn(uint16 mX, uint16 mY)
const;
95 bool isIn(uint16 mX, uint16 mY, uint16 w, uint16 h)
const;
96 bool isIn(
const MapObject &obj)
const;
104 struct ManagedMouth :
public MapObject {
109 ManagedMouth(uint16 tX, uint16 tY, MouthType t);
113 struct ManagedSub :
public MapObject {
116 ManagedSub(uint16 tX, uint16 tY);
120 struct ManagedEnemy :
public MapObject {
131 struct ManagedBullet :
public MapObject {
161 bool _keys[kKeyCount];
184 ManagedEnemy _enemies[kEnemyCount];
185 ManagedBullet _bullets[kMaxBulletCount];
212 void drawFloorText();
215 bool isBlocked(
const MapObject &
self, int16 x, int16 y, MapObject **blockedBy = 0);
216 void findPath(MapObject &obj,
int x,
int y, MapObject **blockedBy = 0);
222 Submarine::Direction getDirection(
int &x,
int &y)
const;
225 void subMove(
int x,
int y, Submarine::Direction direction);
228 int findEmptyBulletSlot()
const;
229 uint16 directionToBullet(Submarine::Direction direction)
const;
230 void setBulletPosition(
const ManagedSub &sub, ManagedBullet &bullet)
const;
233 void bulletMove(ManagedBullet &bullet);
234 void checkShotEnemy(MapObject &shotObject);
240 void healthGain(
int amount);
241 void healthLose(
int amount);
245 void enemiesCreate();
247 void enemyMove(ManagedEnemy &enemy,
int x,
int y);
248 void enemyAttack(ManagedEnemy &enemy);
249 void enemyExplode(ManagedEnemy &enemy);
254 int getLanguage()
const;
261 #endif // GOB_MINIGAMES_GEISHA_PENETRATION_H
Definition: aniobject.h:42
Definition: submarine.h:38
Definition: surface.h:100
Definition: sounddesc.h:43
Definition: penetration.h:51