- put the entire filesystem code into a namespace and created some subdirectories.
This commit is contained in:
parent
94c9ee4593
commit
ebb71cebf1
108 changed files with 308 additions and 225 deletions
6
src/common/engine/files.h
Normal file
6
src/common/engine/files.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#pragma once
|
||||
#include "fs_files.h"
|
||||
|
||||
using FileSys::FileReader;
|
||||
using FileSys::FileWriter;
|
||||
using FileSys::BufferWriter;
|
||||
7
src/common/engine/filesystem.h
Normal file
7
src/common/engine/filesystem.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
#include "fs_filesystem.h"
|
||||
|
||||
using FileSys::FileSystem;
|
||||
using FileSys::FResourceFile;
|
||||
|
||||
inline FileSys::FileSystem fileSystem;
|
||||
|
|
@ -3,8 +3,7 @@
|
|||
#include <stdint.h>
|
||||
#include "memarena.h"
|
||||
#include "palentry.h"
|
||||
|
||||
class FileReader;
|
||||
#include "files.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@
|
|||
#include "base64.h"
|
||||
#include "vm.h"
|
||||
|
||||
using namespace FileSys;
|
||||
|
||||
extern DObject *WP_NOCHANGE;
|
||||
bool save_full = false; // for testing. Should be removed afterward.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <stdint.h>
|
||||
#include <type_traits>
|
||||
#include "tarray.h"
|
||||
#include "file_zip.h"
|
||||
#include "tflags.h"
|
||||
#include "vectors.h"
|
||||
#include "palentry.h"
|
||||
|
|
@ -80,7 +79,7 @@ public:
|
|||
void SetUniqueSoundNames() { soundNamesAreUnique = true; }
|
||||
bool OpenWriter(bool pretty = true);
|
||||
bool OpenReader(const char *buffer, size_t length);
|
||||
bool OpenReader(FCompressedBuffer *input);
|
||||
bool OpenReader(FileSys::FCompressedBuffer *input);
|
||||
void Close();
|
||||
void ReadObjects(bool hubtravel);
|
||||
bool BeginObject(const char *name);
|
||||
|
|
@ -91,7 +90,7 @@ public:
|
|||
unsigned GetSize(const char *group);
|
||||
const char *GetKey();
|
||||
const char *GetOutput(unsigned *len = nullptr);
|
||||
FCompressedBuffer GetCompressedOutput();
|
||||
FileSys::FCompressedBuffer GetCompressedOutput();
|
||||
// The sprite serializer is a special case because it is needed by the VM to handle its 'spriteid' type.
|
||||
virtual FSerializer &Sprite(const char *key, int32_t &spritenum, int32_t *def);
|
||||
// This is only needed by the type system.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue