diff options
author | Fabio Battaglia | 2009-12-30 21:11:38 +0000 |
---|---|---|
committer | Fabio Battaglia | 2009-12-30 21:11:38 +0000 |
commit | a108df30a753bc062d2e2c041c70a4477f08b671 (patch) | |
tree | 13e38c42b014fa280f3a1be3aa950754dca3837e /backends/fs/stdiostream.cpp | |
parent | 0de5bac3498e9e9d158e4055c08475e04a00e7b3 (diff) | |
download | scummvm-rg350-a108df30a753bc062d2e2c041c70a4477f08b671.tar.gz scummvm-rg350-a108df30a753bc062d2e2c041c70a4477f08b671.tar.bz2 scummvm-rg350-a108df30a753bc062d2e2c041c70a4477f08b671.zip |
Add Nintendo 64 port to trunk.
svn-id: r46773
Diffstat (limited to 'backends/fs/stdiostream.cpp')
-rw-r--r-- | backends/fs/stdiostream.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/backends/fs/stdiostream.cpp b/backends/fs/stdiostream.cpp index 8845d796c6..73796a31ea 100644 --- a/backends/fs/stdiostream.cpp +++ b/backends/fs/stdiostream.cpp @@ -25,6 +25,28 @@ #include "backends/fs/stdiostream.h" +#ifdef __N64__ + #include <romfs.h> + + #undef feof + #undef clearerr + #undef ferror + + #undef FILE + #define FILE ROMFILE + + #define fopen(name, mode) romfs_open(name, mode) + #define fclose(handle) romfs_close(handle) + #define fread(ptr, size, items, file) romfs_read(ptr, size, items, file) + #define fwrite(ptr, size, items, file) romfs_write(ptr, size, items, file) + #define feof(handle) romfs_eof(handle) + #define ftell(handle) romfs_tell(handle) + #define fseek(handle, offset, whence) romfs_seek(handle, offset, whence) + #define clearerr(handle) romfs_clearerr(handle) + #define fflush(file) romfs_flush(file) + #define ferror(handle) romfs_error(handle) +#endif + StdioStream::StdioStream(void *handle) : _handle(handle) { assert(handle); } |