summaryrefslogtreecommitdiff
path: root/src/levelinfo.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@Spectrum-Song.local>2011-07-23 11:47:43 -0500
committerColin Noga <Tempus@Spectrum-Song.local>2011-07-23 11:47:43 -0500
commit09d075c5469f64f500de70123bbb1042315d7ac0 (patch)
treeee92906230c7fa01e89afb84beeb65b8855393ad /src/levelinfo.cpp
parentffa9dabc6b535da90b3cd8a7849079c546cacfbd (diff)
downloadkamek-09d075c5469f64f500de70123bbb1042315d7ac0.tar.gz
kamek-09d075c5469f64f500de70123bbb1042315d7ac0.zip
Added Crowd clapper. Changed everything to LF only. If anyone on Windows tries to read the code now, they will be faced with a single impenetrable line!
Diffstat (limited to 'src/levelinfo.cpp')
-rw-r--r--src/levelinfo.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/levelinfo.cpp b/src/levelinfo.cpp
index 9807fc4..ec65350 100644
--- a/src/levelinfo.cpp
+++ b/src/levelinfo.cpp
@@ -1,36 +1,36 @@
-#include "levelinfo.h"
-
-void LevelInfo_Prepare(FileHandle *fh) {
- void *file = fh->filePtr;
-
- // decrypt all the level names
- for (int sect = 0; sect < LevelInfo_GetSectionCount(file); sect++) {
- // parse this section
- LevelInfo_Section *thisSect = LevelInfo_GetSection(file, sect);
- LevelInfo_Entry *levels = LevelInfo_GetLevels(file, thisSect);
-
- for (int lev = 0; lev < thisSect->levelCount; lev++) {
- LevelInfo_Entry *level = &levels[lev];
-
- char *name = LevelInfo_GetName(file, level);
-
- for (int i = 0; i < level->nameLength+1; i++) {
- name[i] -= 0xD0;
- }
- }
- }
-}
-
-LevelInfo_Entry *LevelInfo_Search(void *file, int world, int level) {
- for (int i = 0; i < LevelInfo_GetSectionCount(file); i++) {
- LevelInfo_Section *sect = LevelInfo_GetSection(file, i);
-
- for (int j = 0; j < sect->levelCount; j++) {
- LevelInfo_Entry *entry = &LevelInfo_GetLevels(file, sect)[j];
- if (entry->world == world && entry->level == level)
- return entry;
- }
- }
-
- return 0;
-}
+#include "levelinfo.h"
+
+void LevelInfo_Prepare(FileHandle *fh) {
+ void *file = fh->filePtr;
+
+ // decrypt all the level names
+ for (int sect = 0; sect < LevelInfo_GetSectionCount(file); sect++) {
+ // parse this section
+ LevelInfo_Section *thisSect = LevelInfo_GetSection(file, sect);
+ LevelInfo_Entry *levels = LevelInfo_GetLevels(file, thisSect);
+
+ for (int lev = 0; lev < thisSect->levelCount; lev++) {
+ LevelInfo_Entry *level = &levels[lev];
+
+ char *name = LevelInfo_GetName(file, level);
+
+ for (int i = 0; i < level->nameLength+1; i++) {
+ name[i] -= 0xD0;
+ }
+ }
+ }
+}
+
+LevelInfo_Entry *LevelInfo_Search(void *file, int world, int level) {
+ for (int i = 0; i < LevelInfo_GetSectionCount(file); i++) {
+ LevelInfo_Section *sect = LevelInfo_GetSection(file, i);
+
+ for (int j = 0; j < sect->levelCount; j++) {
+ LevelInfo_Entry *entry = &LevelInfo_GetLevels(file, sect)[j];
+ if (entry->world == world && entry->level == level)
+ return entry;
+ }
+ }
+
+ return 0;
+}