diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-07-23 11:47:43 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-07-23 11:47:43 -0500 |
commit | 09d075c5469f64f500de70123bbb1042315d7ac0 (patch) | |
tree | ee92906230c7fa01e89afb84beeb65b8855393ad /src/levelinfo.h | |
parent | ffa9dabc6b535da90b3cd8a7849079c546cacfbd (diff) | |
download | kamek-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.h')
-rw-r--r-- | src/levelinfo.h | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/src/levelinfo.h b/src/levelinfo.h index 1b75275..8e1e916 100644 --- a/src/levelinfo.h +++ b/src/levelinfo.h @@ -1,56 +1,56 @@ -#ifndef __NEWER_LEVELINFO_H
-#define __NEWER_LEVELINFO_H
-
-#include <common.h>
-#include "fileload.h"
-
-struct LevelInfo_Header {
- u32 magic;
- u32 sectionCount;
-};
-
-struct LevelInfo_Section {
- u32 levelCount;
-};
-
-struct LevelInfo_Entry {
- u8 world;
- u8 level;
- u8 reserved1;
- u8 reserved2;
- u8 nameLength;
- u8 reserved3;
- u16 flags;
- u32 nameOffset;
-};
-
-inline u32 LevelInfo_GetSectionCount(void *file) {
- return ((LevelInfo_Header*)file)->sectionCount;
-}
-
-inline u32 *LevelInfo_GetOffsets(void *file) {
- return (u32*)(((LevelInfo_Header*)file)+1);
-}
-
-inline LevelInfo_Section *LevelInfo_GetSection(void *file, int id) {
- u32 offs = LevelInfo_GetOffsets(file)[id];
- return (LevelInfo_Section*)(((char*)file)+offs);
-};
-
-inline LevelInfo_Entry *LevelInfo_GetLevels(void *file, LevelInfo_Section *section) {
- return (LevelInfo_Entry*)(section+1);
-}
-
-inline LevelInfo_Entry *LevelInfo_GetLevels(void *file, int sectionID) {
- return (LevelInfo_Entry*)(LevelInfo_GetSection(file, sectionID)+1);
-}
-
-inline char *LevelInfo_GetName(void *file, LevelInfo_Entry *entry) {
- return ((char*)file)+entry->nameOffset;
-}
-
-void LevelInfo_Prepare(FileHandle *fh);
-LevelInfo_Entry *LevelInfo_Search(void *file, int world, int level);
-
-
-#endif
+#ifndef __NEWER_LEVELINFO_H +#define __NEWER_LEVELINFO_H + +#include <common.h> +#include "fileload.h" + +struct LevelInfo_Header { + u32 magic; + u32 sectionCount; +}; + +struct LevelInfo_Section { + u32 levelCount; +}; + +struct LevelInfo_Entry { + u8 world; + u8 level; + u8 reserved1; + u8 reserved2; + u8 nameLength; + u8 reserved3; + u16 flags; + u32 nameOffset; +}; + +inline u32 LevelInfo_GetSectionCount(void *file) { + return ((LevelInfo_Header*)file)->sectionCount; +} + +inline u32 *LevelInfo_GetOffsets(void *file) { + return (u32*)(((LevelInfo_Header*)file)+1); +} + +inline LevelInfo_Section *LevelInfo_GetSection(void *file, int id) { + u32 offs = LevelInfo_GetOffsets(file)[id]; + return (LevelInfo_Section*)(((char*)file)+offs); +}; + +inline LevelInfo_Entry *LevelInfo_GetLevels(void *file, LevelInfo_Section *section) { + return (LevelInfo_Entry*)(section+1); +} + +inline LevelInfo_Entry *LevelInfo_GetLevels(void *file, int sectionID) { + return (LevelInfo_Entry*)(LevelInfo_GetSection(file, sectionID)+1); +} + +inline char *LevelInfo_GetName(void *file, LevelInfo_Entry *entry) { + return ((char*)file)+entry->nameOffset; +} + +void LevelInfo_Prepare(FileHandle *fh); +LevelInfo_Entry *LevelInfo_Search(void *file, int world, int level); + + +#endif |