summaryrefslogtreecommitdiff
path: root/src/randtiles.h
diff options
context:
space:
mode:
authorColin Noga <Tempus@Spectrum-Song.local>2011-08-14 13:38:04 -0500
committerColin Noga <Tempus@Spectrum-Song.local>2011-08-14 13:38:04 -0500
commit74a7d023469eb0a5a2dc713c74709b11e1815b8a (patch)
tree017199545fe6110e2e700907ea393a6654865cb8 /src/randtiles.h
parentead037af2d2665e94ed8d804a1e220c47ba54db9 (diff)
parent4d482b80241de4512b68bc160dfc29b7e521134d (diff)
downloadkamek-74a7d023469eb0a5a2dc713c74709b11e1815b8a.tar.gz
kamek-74a7d023469eb0a5a2dc713c74709b11e1815b8a.zip
Merge branch 'level-select' of treeki:newergit/Kamek into level-select
Diffstat (limited to '')
-rw-r--r--src/randtiles.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/randtiles.h b/src/randtiles.h
deleted file mode 100644
index 14355da..0000000
--- a/src/randtiles.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef __NEWER_RANDTILES_H
-#define __NEWER_RANDTILES_H
-
-#include <common.h>
-#include "fileload.h"
-
-#define RAND_CHECK_HORZ
-#define RAND_CHECK_VERT
-#define RAND_CHECK_BOTH
-
-struct RandTiles_Header {
- u32 magic;
- u32 sectionCount;
-};
-
-struct RandTiles_Section {
- u32 nameHash;
- u32 entryCount;
-};
-
-struct RandTiles_Entry {
- u16 startTile;
- u16 endTile;
- u8 count;
- u8 type;
- u16 reserved;
- u32 dataOffset;
-};
-
-inline u32 RandTiles_GetSectionCount(void *file) {
- return ((RandTiles_Header*)file)->sectionCount;
-}
-
-inline u32 *RandTiles_GetOffsets(void *file) {
- return (u32*)(((RandTiles_Header*)file)+1);
-}
-
-inline RandTiles_Section *RandTiles_GetSection(void *file, int id) {
- u32 offs = RandTiles_GetOffsets(file)[id];
- return (RandTiles_Section*)(((char*)file)+offs);
-};
-
-inline RandTiles_Entry *RandTiles_GetTiles(void *file, RandTiles_Section *section) {
- return (RandTiles_Entry*)(section+1);
-}
-
-inline RandTiles_Entry *RandTiles_GetTiles(void *file, int sectionID) {
- return (RandTiles_Entry*)(RandTiles_GetSection(file, sectionID)+1);
-}
-
-inline char *RandTiles_GetName(void *file, RandTiles_Section *section) {
- return ((char*)file)+section->nameOffset;
-}
-
-inline u16 *RandTiles_GetData(void *file, RandTiles_Entry *entry) {
- return (u16*)(((char*)file)+entry->dataOffset);
-}
-
-u32 djb2(u8 *str);
-RandTiles_Section *RandTiles_Search(void *file, u32 nameHash);
-
-
-#endif