Skip to content

Commit 27035d5

Browse files
committed
style: Clean up whitespace and formatting across \Core\GameEngine files
1 parent 471dc26 commit 27035d5

103 files changed

Lines changed: 19352 additions & 16743 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Core/GameEngine/Include/Common/ArchiveFile.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535
class File;
3636

3737
/**
38-
* An archive file is itself a collection of sub files. Each file inside the archive file
39-
* has a unique name by which it can be accessed. The ArchiveFile object class is the
40-
* runtime interface to the mix file and the sub files. Each file inside the mix
41-
* file can be accessed by the openFile().
42-
*
43-
* ArchiveFile interfaces can be created by the TheArchiveFileSystem object.
44-
*/
38+
* An archive file is itself a collection of sub files. Each file inside the archive file
39+
* has a unique name by which it can be accessed. The ArchiveFile object class is the
40+
* runtime interface to the mix file and the sub files. Each file inside the mix
41+
* file can be accessed by the openFile().
42+
*
43+
* ArchiveFile interfaces can be created by the TheArchiveFileSystem object.
44+
*/
4545
//===============================
4646

4747
class ArchiveFile
@@ -50,23 +50,23 @@ class ArchiveFile
5050
ArchiveFile();
5151
virtual ~ArchiveFile();
5252

53-
virtual Bool getFileInfo( const AsciiString& filename, FileInfo *fileInfo) const = 0; ///< fill in the fileInfo struct with info about the file requested.
54-
virtual File* openFile( const Char *filename, Int access = 0) = 0; ///< Open the specified file within the archive file
55-
virtual void closeAllFiles() = 0; ///< Close all file opened in this archive file
56-
virtual AsciiString getName() = 0; ///< Returns the name of the archive file
57-
virtual AsciiString getPath() = 0; ///< Returns full path and name of archive file
58-
virtual void setSearchPriority( Int new_priority ) = 0; ///< Set this archive file's search priority
59-
virtual void close() = 0; ///< Close this archive file
60-
void attachFile(File *file);
53+
virtual Bool getFileInfo(const AsciiString& filename, FileInfo* fileInfo) const = 0; ///< fill in the fileInfo struct with info about the file requested.
54+
virtual File* openFile(const Char* filename, Int access = 0) = 0; ///< Open the specified file within the archive file
55+
virtual void closeAllFiles() = 0; ///< Close all file opened in this archive file
56+
virtual AsciiString getName() = 0; ///< Returns the name of the archive file
57+
virtual AsciiString getPath() = 0; ///< Returns full path and name of archive file
58+
virtual void setSearchPriority(Int new_priority) = 0; ///< Set this archive file's search priority
59+
virtual void close() = 0; ///< Close this archive file
60+
void attachFile(File* file);
6161

62-
void getFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList &filenameList, Bool searchSubdirectories) const;
63-
void getFileListInDirectory(const DetailedArchivedDirectoryInfo *dirInfo, const AsciiString& currentDirectory, const AsciiString& searchName, FilenameList &filenameList, Bool searchSubdirectories) const;
62+
void getFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList& filenameList, Bool searchSubdirectories) const;
63+
void getFileListInDirectory(const DetailedArchivedDirectoryInfo* dirInfo, const AsciiString& currentDirectory, const AsciiString& searchName, FilenameList& filenameList, Bool searchSubdirectories) const;
6464

65-
void addFile(const AsciiString& path, const ArchivedFileInfo *fileInfo); ///< add this file to our directory tree.
65+
void addFile(const AsciiString& path, const ArchivedFileInfo* fileInfo); ///< add this file to our directory tree.
6666

6767
protected:
68-
const ArchivedFileInfo * getArchivedFileInfo(const AsciiString& filename) const; ///< return the ArchivedFileInfo from the directory tree.
68+
const ArchivedFileInfo* getArchivedFileInfo(const AsciiString& filename) const; ///< return the ArchivedFileInfo from the directory tree.
6969

70-
File *m_file; ///< file pointer to the archive file on disk. Kept open so we don't have to continuously open and close the file all the time.
70+
File* m_file; ///< file pointer to the archive file on disk. Kept open so we don't have to continuously open and close the file all the time.
7171
DetailedArchivedDirectoryInfo m_rootDirectory;
7272
};

Core/GameEngine/Include/Common/ArchiveFileSystem.h

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -65,43 +65,42 @@ class ArchiveFile;
6565
// Type Defines
6666
//----------------------------------------------------------------------------
6767

68-
6968
//===============================
7069
// ArchiveFileSystem
7170
//===============================
7271
/**
73-
* Creates and manages ArchiveFile interfaces. ArchiveFiles can be accessed
74-
* by calling the openArchiveFile() member. ArchiveFiles can be accessed by
75-
* name or by File interface.
76-
*
77-
* openFile() member searches all Archive files for the specified sub file.
78-
*/
72+
* Creates and manages ArchiveFile interfaces. ArchiveFiles can be accessed
73+
* by calling the openArchiveFile() member. ArchiveFiles can be accessed by
74+
* name or by File interface.
75+
*
76+
* openFile() member searches all Archive files for the specified sub file.
77+
*/
7978
//===============================
8079
class ArchivedDirectoryInfo;
8180
class DetailedArchivedDirectoryInfo;
8281
class ArchivedFileInfo;
8382

8483
typedef std::map<AsciiString, DetailedArchivedDirectoryInfo> DetailedArchivedDirectoryInfoMap; // Archived directory name to detailed archived directory info
85-
typedef std::map<AsciiString, ArchivedDirectoryInfo> ArchivedDirectoryInfoMap; // Archived directory name to archived directory info
86-
typedef std::map<AsciiString, ArchivedFileInfo> ArchivedFileInfoMap; // Archived file name to archived file info
87-
typedef std::map<AsciiString, ArchiveFile *> ArchiveFileMap; // Archive file name to archive data
88-
typedef std::multimap<AsciiString, ArchiveFile *> ArchivedFileLocationMap; // Archived file name to archive data
84+
typedef std::map<AsciiString, ArchivedDirectoryInfo> ArchivedDirectoryInfoMap; // Archived directory name to archived directory info
85+
typedef std::map<AsciiString, ArchivedFileInfo> ArchivedFileInfoMap; // Archived file name to archived file info
86+
typedef std::map<AsciiString, ArchiveFile*> ArchiveFileMap; // Archive file name to archive data
87+
typedef std::multimap<AsciiString, ArchiveFile*> ArchivedFileLocationMap; // Archived file name to archive data
8988

9089
class ArchivedDirectoryInfo
9190
{
9291
public:
93-
AsciiString m_path; // The full path to this directory
94-
AsciiString m_directoryName; // The current directory
95-
ArchivedDirectoryInfoMap m_directories; // Contained leaf directories
96-
ArchivedFileLocationMap m_files; // Contained files
92+
AsciiString m_path; // The full path to this directory
93+
AsciiString m_directoryName; // The current directory
94+
ArchivedDirectoryInfoMap m_directories; // Contained leaf directories
95+
ArchivedFileLocationMap m_files; // Contained files
9796
};
9897

9998
class DetailedArchivedDirectoryInfo
10099
{
101100
public:
102-
AsciiString m_directoryName;
103-
DetailedArchivedDirectoryInfoMap m_directories;
104-
ArchivedFileInfoMap m_files;
101+
AsciiString m_directoryName;
102+
DetailedArchivedDirectoryInfoMap m_directories;
103+
ArchivedFileInfoMap m_files;
105104
};
106105

107106
class ArchivedFileInfo
@@ -113,13 +112,11 @@ class ArchivedFileInfo
113112
UnsignedInt m_size;
114113

115114
ArchivedFileInfo()
116-
: m_offset(0)
117-
, m_size(0)
115+
: m_offset(0), m_size(0)
118116
{
119117
}
120118
};
121119

122-
123120
class ArchiveFileSystem : public SubsystemInterface
124121
{
125122
public:
@@ -132,19 +129,19 @@ class ArchiveFileSystem : public SubsystemInterface
132129
virtual void postProcessLoad() = 0;
133130

134131
// ArchiveFile operations
135-
virtual ArchiveFile* openArchiveFile( const Char *filename ) = 0; ///< Create new or return existing Archive file from file name
136-
virtual void closeArchiveFile( const Char *filename ) = 0; ///< Close the one specified big file.
137-
virtual void closeAllArchiveFiles() = 0; ///< Close all Archive files currently open
132+
virtual ArchiveFile* openArchiveFile(const Char* filename) = 0; ///< Create new or return existing Archive file from file name
133+
virtual void closeArchiveFile(const Char* filename) = 0; ///< Close the one specified big file.
134+
virtual void closeAllArchiveFiles() = 0; ///< Close all Archive files currently open
138135

139136
// File operations
140-
virtual File* openFile( const Char *filename, Int access = 0, FileInstance instance = 0); ///< Search Archive files for specified file name and open it if found
141-
virtual void closeAllFiles() = 0; ///< Close all files associated with Archive files
142-
virtual Bool doesFileExist(const Char *filename, FileInstance instance = 0) const; ///< return true if that file exists in an archive file somewhere.
137+
virtual File* openFile(const Char* filename, Int access = 0, FileInstance instance = 0); ///< Search Archive files for specified file name and open it if found
138+
virtual void closeAllFiles() = 0; ///< Close all files associated with Archive files
139+
virtual Bool doesFileExist(const Char* filename, FileInstance instance = 0) const; ///< return true if that file exists in an archive file somewhere.
143140

144-
void getFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList &filenameList, Bool searchSubdirectories) const; ///< search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories. Scans each Archive file.
145-
Bool getFileInfo(const AsciiString& filename, FileInfo *fileInfo, FileInstance instance = 0) const; ///< see FileSystem.h
141+
void getFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList& filenameList, Bool searchSubdirectories) const; ///< search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories. Scans each Archive file.
142+
Bool getFileInfo(const AsciiString& filename, FileInfo* fileInfo, FileInstance instance = 0) const; ///< see FileSystem.h
146143

147-
virtual Bool loadBigFilesFromDirectory(AsciiString dir, AsciiString fileMask, Bool overwrite = FALSE) = 0;
144+
virtual Bool loadBigFilesFromDirectory(AsciiString dir, AsciiString fileMask, Bool overwrite = FALSE) = 0;
148145

149146
// Unprotected this for copy-protection routines
150147
ArchiveFile* getArchiveFile(const AsciiString& filename, FileInstance instance = 0) const;
@@ -165,14 +162,13 @@ class ArchiveFileSystem : public SubsystemInterface
165162

166163
ArchivedDirectoryInfoResult getArchivedDirectoryInfo(const Char* directory);
167164

168-
virtual void loadIntoDirectoryTree(ArchiveFile *archiveFile, Bool overwrite = FALSE); ///< load the archive file's header information and apply it to the global archive directory tree.
165+
virtual void loadIntoDirectoryTree(ArchiveFile* archiveFile, Bool overwrite = FALSE); ///< load the archive file's header information and apply it to the global archive directory tree.
169166

170167
ArchiveFileMap m_archiveFileMap;
171168
ArchivedDirectoryInfo m_rootDirectory;
172169
};
173170

174-
175-
extern ArchiveFileSystem *TheArchiveFileSystem;
171+
extern ArchiveFileSystem* TheArchiveFileSystem;
176172

177173
//----------------------------------------------------------------------------
178174
// Inlining

0 commit comments

Comments
 (0)