Line 1: |
Line 1: |
| This page details the technical '''inner workings of ManiaPlanet''' (and the original TrackMania). It describes the game's classes, data structures and functions, and is as such geared towards reverse engineers and programmers. | | This page details the technical '''inner workings of ManiaPlanet''' (and the original TrackMania). It describes the game's classes, data structures and functions, and is as such geared towards reverse engineers and programmers. |
| + | |
| + | == Basic data types == |
| + | Nadeo uses its own primitive data types in its game engine. Since they can't be reversed, they are not used on this page and are listed here only for the sake of completeness. |
| + | |
| + | typedef int Integer; |
| + | typedef unsigned int Bool; |
| + | typedef unsigned char Nat8; |
| + | typedef unsigned short Nat16; |
| + | typedef unsigned int Natural, Nat32; |
| + | typedef unsigned __int64 Nat64; |
| + | typedef float Real, Real32; |
| | | |
| == Basic data structures == | | == Basic data structures == |
Line 679: |
Line 690: |
| class CSystemFid : public CMwNod // Base class for files | | class CSystemFid : public CMwNod // Base class for files |
| { | | { |
| + | public: |
| + | int ArchiveHeaderUserData(CClassicArchive *); // Reads or writes header user data |
| + | void BuildHeaderUserData(CSystemArchiveNod const &); // Prepares the header chunk data for writing |
| + | |
| + | private: |
| + | int HeaderUserDataCreateFromArchive(CClassicArchive *, unsigned long size); // Reads the header chunk data |
| + | |
| private: | | private: |
| int unknown0; | | int unknown0; |
Line 1,005: |
Line 1,023: |
| int LoadCurrentHeader(enum EVersion); // Reads the file header of a .gbx file | | int LoadCurrentHeader(enum EVersion); // Reads the file header of a .gbx file |
| int DoLoadHeader(void); // Reads the magic 'GBX' and version of a .gbx file, and then calls LoadCurrentHeader() | | int DoLoadHeader(void); // Reads the magic 'GBX' and version of a .gbx file, and then calls LoadCurrentHeader() |
− | int DoSaveHeader(void); | + | int DoSaveHeader(void); // Writes the header of a .gbx file |
| int DoLoadRef(void); // Reads the reference table of a .gbx file | | int DoLoadRef(void); // Reads the reference table of a .gbx file |
− | int DoSaveRef(void); | + | int DoSaveRef(void); // Writes the reference table of a .gbx file |
| int DoLoadAllRef(void); // Reads the header and the reference table of a .gbx file | | int DoLoadAllRef(void); // Reads the header and the reference table of a .gbx file |
| int DoLoadBody(CMwNod * &); // Reads the body of a .gbx file | | int DoLoadBody(CMwNod * &); // Reads the body of a .gbx file |
− | int DoSaveBody(void); | + | int DoSaveBody(void); // Writes the body of a .gbx file |
| + | int DoLoadAll(CMwNod * &); // Reads the header, the reference table and the body of a .gbx file |
| + | int DoSaveAll(void); // Writes the header, the reference table and the body of a .gbx file |
| int DoSaveBodyMemory(CMwNod *); | | int DoSaveBodyMemory(CMwNod *); |
− | int DoLoadAll(CMwNod * &); // Reads the header, the reference table and the body of a .gbx file
| |
− | int DoSaveAll(void);
| |
| int DoSave(CMwNod *, unsigned long, enum EArchive, int); | | int DoSave(CMwNod *, unsigned long, enum EArchive, int); |
| int DoLoadResource(unsigned long, CMwNod * &); | | int DoLoadResource(unsigned long, CMwNod * &); |
Line 1,049: |
Line 1,067: |
| private: | | private: |
| void ParametrizedFinalization(CMwNod *); | | void ParametrizedFinalization(CMwNod *); |
− | void ParametrizedFindOrAddFid(CSystemFid *, CMwNod *); | + | void ParametrizedFindOrAddFid(CSystemFid *, CMwNod *); |
| | | |
| private: | | private: |