diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-09-30 19:20:48 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-09-30 19:20:48 -0500 |
commit | c1365802c73376609e53b97440ae037b14f6324f (patch) | |
tree | 8633e5de1122d50d100805df2edb5cdb34d83c52 /src/levelinfo.h | |
parent | 64f38f642113ac4bd5b1d96e76c9ae97965bc416 (diff) | |
parent | 1db72b5e45cc25eb183817f05a2ee631d8fff837 (diff) | |
download | kamek-c1365802c73376609e53b97440ae037b14f6324f.tar.gz kamek-c1365802c73376609e53b97440ae037b14f6324f.zip |
Merge branch 'level-select' of ssh://treeki.rustedlogic.net:30000/Kamek into level-select
Diffstat (limited to 'src/levelinfo.h')
-rw-r--r-- | src/levelinfo.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/levelinfo.h b/src/levelinfo.h index 20628d9..8c8fe58 100644 --- a/src/levelinfo.h +++ b/src/levelinfo.h @@ -11,10 +11,6 @@ public: u32 sectionOffsets[1];
};
- struct section_s {
- u32 levelCount;
- };
-
struct entry_s {
u8 worldSlot;
u8 levelSlot;
@@ -26,6 +22,11 @@ public: u32 nameOffset;
};
+ struct section_s {
+ u32 levelCount;
+ entry_s levels[1];
+ };
+
private:
header_s *data;
@@ -33,6 +34,7 @@ public: void load(void *buffer);
entry_s *searchBySlot(int world, int level);
+ entry_s *searchByDisplayNum(int world, int level);
u32 sectionCount() {
return data->sectionCount;
@@ -42,10 +44,6 @@ public: return (section_s*)(((char*)data) + data->sectionOffsets[index]);
}
- entry_s *getLevelsForSection(section_s *section) {
- return (entry_s*)(section + 1);
- }
-
const char *getNameForLevel(entry_s *entry) {
return (const char*)data + entry->nameOffset;
}
|