aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/ds/ds-fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/fs/ds/ds-fs.h')
-rw-r--r--backends/fs/ds/ds-fs.h57
1 files changed, 30 insertions, 27 deletions
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index c8bf7d6cf2..6961022848 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -8,27 +8,30 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
*
*/
#ifndef _DS_FS_H
#define _DS_FS_H
-//#include <NDS/ARM9/console.h>
#include "common/fs.h"
+#include "common/stream.h"
+#include "backends/fs/abstract-fs.h"
+
#include "zipreader.h"
-#include "ramsave.h"
#include "fat/gba_nds_fat.h"
-#include "backends/fs/abstract-fs.h"
namespace DS {
@@ -40,7 +43,7 @@ namespace DS {
*/
class DSFileSystemNode : public AbstractFSNode {
protected:
- static ZipFile* _zipFile;
+ static ZipFile *_zipFile;
Common::String _displayName;
Common::String _path;
@@ -96,7 +99,7 @@ public:
* Returns the zip file this node points to.
* TODO: check this documentation.
*/
- static ZipFile* getZip() { return _zipFile; }
+ static ZipFile *getZip() { return _zipFile; }
};
/**
@@ -161,16 +164,16 @@ public:
struct fileHandle {
int pos;
bool used;
- char* data;
+ char *data;
int size;
-
- DSSaveFile* sramFile;
};
class DSFileStream : public Common::SeekableReadStream, public Common::WriteStream, public Common::NonCopyable {
protected:
- static const int WRITE_BUFFER_SIZE = 512;
+ enum {
+ WRITE_BUFFER_SIZE = 512
+ };
/** File handle to the actual file. */
void *_handle;
@@ -206,24 +209,24 @@ public:
#undef stdout
#undef stdin
-#define stdout ((DS::fileHandle*) -1)
-#define stderr ((DS::fileHandle*) -2)
-#define stdin ((DS::fileHandle*) -3)
+#define stdout ((DS::fileHandle *) -1)
+#define stderr ((DS::fileHandle *) -2)
+#define stdin ((DS::fileHandle *) -3)
#define FILE DS::fileHandle
// Please do not remove any of these prototypes that appear not to be required.
-FILE* std_fopen(const char* name, const char* mode);
-void std_fclose(FILE* handle);
-size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle);
-size_t std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle);
-bool std_feof(FILE* handle);
-long int std_ftell(FILE* handle);
-int std_fseek(FILE* handle, long int offset, int whence);
-void std_clearerr(FILE* handle);
-int std_fflush(FILE* handle);
-int std_ferror(FILE* handle);
-
-} //namespace DS
+FILE* std_fopen(const char *name, const char *mode);
+void std_fclose(FILE *handle);
+size_t std_fread(void *ptr, size_t size, size_t numItems, FILE *handle);
+size_t std_fwrite(const void *ptr, size_t size, size_t numItems, FILE *handle);
+bool std_feof(FILE *handle);
+long int std_ftell(FILE *handle);
+int std_fseek(FILE *handle, long int offset, int whence);
+void std_clearerr(FILE *handle);
+int std_fflush(FILE *handle);
+int std_ferror(FILE *handle);
+
+} // End of namespace DS
#endif //_DS_FS_H