summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-08-14 00:46:06 +0200
committerTreeki <treeki@gmail.com>2011-08-14 00:46:06 +0200
commitca56395185126734ee07ec85c2d4ba0d153910f1 (patch)
treedcdf04929435ecf6d45779c435b03ba16eb0e135 /include
parent1cc1afe0f971121f7aed34460305e835de90e984 (diff)
downloadkamek-ca56395185126734ee07ec85c2d4ba0d153910f1.tar.gz
kamek-ca56395185126734ee07ec85c2d4ba0d153910f1.zip
it compiles now
Diffstat (limited to 'include')
-rw-r--r--include/game.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
index 8bc0dc2..7412762 100644
--- a/include/game.h
+++ b/include/game.h
@@ -40,6 +40,9 @@ inline void *GetDVDClass2() {
void *DVD_GetFile(void *dvdclass2, const char *arc, const char *file);
void *DVD_GetFile(void *dvdclass2, const char *arc, const char *file, u32 *length);
+int MakeRandomNumber(int count);
+int MakeRandomNumberForTiles(int count);
+
extern int Player_Active[4];
extern int Player_ID[4];
@@ -2034,5 +2037,60 @@ namespace m2d {
}
+
+/* Tilemap related stuff */
+class TilemapClass {
+ public:
+ virtual ~TilemapClass();
+
+ u16 *allocatedBlocks[256];
+ u32 _404;
+
+ u8 blockLookup[2048];
+
+ u16 blockCount;
+
+ u32 _C0C;
+ u32 ts1ID, ts2ID, ts3ID, layerID, areaID, frmHeap, is2Castle;
+
+ // Only the public API is listed
+ u16 *getPointerToTile(int x, int y, u32 *blockNum = 0, bool unkBool = 0);
+ // TODO: more?
+};
+
+class BGDatClass {
+ public:
+ BGDatClass();
+ virtual ~BGDatClass();
+
+ u8 *bgData[4][3];
+ TilemapClass *tilemaps[4][3];
+ u8 *tsObjIndexData[4][4];
+ u8 *tsObjData[4][4];
+ char tsNames[4][4][0x20];
+ // this is fucked up!
+ // the parent heap is frmHeaps[0][0]
+ // each tileset's heap is frmHeaps[AREA][LAYER+1]
+ void *frmHeaps[4][4];
+
+ static BGDatClass *instance; // 8042A0D0
+
+ // I've only listed the public API because other stuff isn't really needed atm.
+ const char *getTilesetName(int area, int number);
+ // TODO: more?
+};
+
+struct BGRender {
+ u8 unk[0xC00];
+ u8 *objectData;
+ u8 _C04, _C05;
+ u16 _C06, _C08;
+ u16 blockNumber;
+ u16 curX, curY;
+ u16 tileToPlace;
+ u16 objDataOffset, objType, objX, objY, objWidth, objHeight;
+ u16 tileNumberWithinBlock, areaID;
+};
+
#endif