diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-08-14 13:38:04 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-08-14 13:38:04 -0500 |
commit | 74a7d023469eb0a5a2dc713c74709b11e1815b8a (patch) | |
tree | 017199545fe6110e2e700907ea393a6654865cb8 /include | |
parent | ead037af2d2665e94ed8d804a1e220c47ba54db9 (diff) | |
parent | 4d482b80241de4512b68bc160dfc29b7e521134d (diff) | |
download | kamek-74a7d023469eb0a5a2dc713c74709b11e1815b8a.tar.gz kamek-74a7d023469eb0a5a2dc713c74709b11e1815b8a.zip |
Merge branch 'level-select' of treeki:newergit/Kamek into level-select
Diffstat (limited to 'include')
-rw-r--r-- | include/game.h | 58 |
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 |