summaryrefslogtreecommitdiff
path: root/include/game.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-10 01:04:31 +0100
committerTreeki <treeki@gmail.com>2013-02-10 01:04:31 +0100
commit8f4edaa7abf19844bf93a369750486428c370384 (patch)
tree1508def502ebc67b1046af4760b28b94d07ea8d5 /include/game.h
parentafda095c6b63710f5632bdb77894aaa4c5c39ea2 (diff)
downloadkamek-8f4edaa7abf19844bf93a369750486428c370384.tar.gz
kamek-8f4edaa7abf19844bf93a369750486428c370384.zip
podouble splashes
Diffstat (limited to '')
-rwxr-xr-xinclude/game.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
index d706a4c..9e119d5 100755
--- a/include/game.h
+++ b/include/game.h
@@ -2727,6 +2727,38 @@ public:
+struct dWaterInfo_s {
+ float x, y, z, width, height;
+ int isInUse;
+ u8 type, layer;
+};
+
+class dWaterManager_c {
+ private:
+ dWaterInfo_s blocks[80];
+ public:
+ float current;
+
+ static dWaterManager_c *instance;
+
+ dWaterManager_c() { instance = this; }
+ ~dWaterManager_c() { instance = 0; }
+
+ void setup();
+ int addBlock(dWaterInfo_s *block);
+
+ private: // ?
+ int isPointWithinSpecifiedBlock(VEC2 *pos, int blockID);
+ int getAngleOfVector(VEC2 *vec);
+ int isPointWithinBubbleInternal(VEC2 *pos, int blockID, VEC2 *pOutVec, float *pFloat, s16 *pShort);
+
+ public:
+ int queryPosition(VEC2 *pos, VEC2 *pOutBlockPos, float *pOutFloat, s16 *pOutAngle, int layer);
+ int isPositionWithinBubble(VEC2 *pos, VEC2 *pOutBlockPos, int blockID, int layer);
+ void removeBlock(int blockID);
+ void setPosition(VEC3 *pos, int blockID);
+ void setGeometry(VEC3 *pos, float width, float height, int blockID);
+};
class BgGmBase : public dBase_c {
public:
@@ -2736,6 +2768,8 @@ public:
// Note: these tile numbers are kinda weird and involve GetTileFromTileTable
void placeTile(u16 x, u16 y, int layer, int tile);
+
+ void makeSplash(float x, float y, int type); // 80078410
};