summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-07-25 03:16:21 +0200
committerTreeki <treeki@gmail.com>2011-07-25 03:16:21 +0200
commit4f6633db18e2213a151782d995486491c8db3ff7 (patch)
tree5b56f33b7214916b6988fb93dfa6cd000c7bf786 /include
parent92a54fbb0c075d36da846b5d1b99b67cafc533eb (diff)
downloadkamek-4f6633db18e2213a151782d995486491c8db3ff7.tar.gz
kamek-4f6633db18e2213a151782d995486491c8db3ff7.zip
Random tiles added. Untested.
Diffstat (limited to 'include')
-rwxr-xr-xinclude/game.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
index 7f8dba6..3c631c6 100755
--- a/include/game.h
+++ b/include/game.h
@@ -40,6 +40,8 @@ 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);
+
extern int Player_Active[4];
extern int Player_ID[4];
@@ -2012,5 +2014,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