diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-09-27 22:59:41 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-09-27 22:59:41 -0500 |
commit | 64f38f642113ac4bd5b1d96e76c9ae97965bc416 (patch) | |
tree | 99d9bbf4d577ae2d8a79fcb5f7101df1b57398fe /src/levelinfo.cpp | |
parent | f9afbf1109b30bbc6011e81109b7e11961a4361a (diff) | |
parent | b3c37e5a9ef81250d6554fcbb8089154b4940c9f (diff) | |
download | kamek-64f38f642113ac4bd5b1d96e76c9ae97965bc416.tar.gz kamek-64f38f642113ac4bd5b1d96e76c9ae97965bc416.zip |
Merge branch 'level-select' of ssh://treeki.rustedlogic.net:30000/Kamek into level-select
Diffstat (limited to '')
-rw-r--r-- | src/levelinfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/levelinfo.cpp b/src/levelinfo.cpp index 3a0ef6f..8ce2845 100644 --- a/src/levelinfo.cpp +++ b/src/levelinfo.cpp @@ -12,6 +12,8 @@ void dLevelInfo_c::load(void *buffer) { for (int lev = 0; lev < thisSect->levelCount; lev++) {
entry_s *level = &levels[lev];
+ SetSomeConditionShit(level->worldSlot, level->levelSlot, level->flags);
+
char *name = (char*)getNameForLevel(level);
for (int i = 0; i < level->nameLength+1; i++) {
@@ -21,13 +23,13 @@ void dLevelInfo_c::load(void *buffer) { }
}
-dLevelInfo_c::entry_s *dLevelInfo_c::search(int world, int level) {
+dLevelInfo_c::entry_s *dLevelInfo_c::searchBySlot(int world, int level) {
for (int i = 0; i < sectionCount(); i++) {
section_s *sect = getSectionByIndex(i);
for (int j = 0; j < sect->levelCount; j++) {
entry_s *entry = &getLevelsForSection(sect)[j];
- if (entry->world == world && entry->level == level)
+ if (entry->worldSlot == world && entry->levelSlot == level)
return entry;
}
}
|