===================================================================
|
|
|
26 | 26 | #ifndef __SAVEFILEMGR_H__ |
27 | 27 | #define __SAVEFILEMGR_H__ |
28 | 28 | |
29 | | // #include "common/savefile.h" |
| 29 | //#include "common/savefile.h" |
30 | 30 | #include "backends/saves/default/default-saves.h" |
| 31 | #include "common/zlib.h" |
31 | 32 | |
32 | 33 | class Gs2dScreen; |
33 | 34 | class OSystem_PS2; |
===================================================================
|
|
|
24 | 24 | */ |
25 | 25 | |
26 | 26 | #include "common/config-manager.h" |
27 | | #include "backends/saves/compressed/compressed-saves.h" |
| 27 | |
28 | 28 | |
29 | 29 | #ifdef __USE_LIBMC__ |
30 | 30 | #include <libmc.h> |
… |
… |
|
124 | 124 | if(!file.exists()) |
125 | 125 | return NULL; |
126 | 126 | |
127 | | sf = file.openForReading(); |
| 127 | sf = file.createReadStream (); |
128 | 128 | |
129 | 129 | } else { |
130 | 130 | Common::FSNode file = savePath.getChild(filename); |
… |
… |
|
132 | 132 | if(!file.exists()) |
133 | 133 | return NULL; |
134 | 134 | |
135 | | sf = file.openForReading(); |
| 135 | sf = file.createReadStream (); |
136 | 136 | } |
137 | 137 | |
138 | 138 | // _screen->wantAnim(false); |
139 | 139 | |
140 | | return wrapInSaveFile(sf); |
| 140 | return Common::wrapCompressedReadStream(sf); |
141 | 141 | } |
142 | 142 | |
143 | 143 | Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const char *filename) { |
… |
… |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | Common::FSNode file(path); |
180 | | sf = file.openForWriting(); |
| 180 | sf = file.createWriteStream(); |
181 | 181 | free(game); |
182 | 182 | free(ext); |
183 | 183 | } else { |
184 | 184 | Common::FSNode file = savePath.getChild(filename); |
185 | | sf = file.openForWriting(); |
| 185 | sf = file.createWriteStream(); |
186 | 186 | } |
187 | 187 | |
188 | 188 | _screen->wantAnim(false); |
189 | | return wrapOutSaveFile(sf); |
| 189 | return Common::wrapCompressedWriteStream(sf); |
190 | 190 | } |
191 | 191 | |
192 | 192 | bool Ps2SaveFileManager::removeSavefile(const char *filename) { |
===================================================================
|
|
|
26 | 26 | #ifndef SYSTEMPS2_H |
27 | 27 | #define SYSTEMPS2_H |
28 | 28 | |
29 | | #include "common/system.h" |
| 29 | #include "backends/base-backend.h" |
| 30 | #include "graphics/colormasks.h" |
| 31 | #include "backends/events/default/default-events.h" |
30 | 32 | |
31 | 33 | class DefaultTimerManager; |
32 | 34 | class DefaultSaveFileManager; |
… |
… |
|
53 | 55 | class MixerImpl; |
54 | 56 | }; |
55 | 57 | |
56 | | class OSystem_PS2 : public OSystem { |
| 58 | class OSystem_PS2 : public BaseBackend { |
57 | 59 | public: |
58 | 60 | OSystem_PS2(const char *elfPath); |
59 | 61 | virtual ~OSystem_PS2(void); |
… |
… |
|
108 | 110 | |
109 | 111 | virtual void quit(); |
110 | 112 | |
111 | | virtual Common::SeekableReadStream *openConfigFileForReading(); |
112 | | virtual Common::WriteStream *openConfigFileForWriting(); |
| 113 | virtual Common::SeekableReadStream *createConfigReadStream (); |
| 114 | virtual Common::WriteStream *createConfigWriteStream (); |
113 | 115 | |
114 | 116 | virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<1555>(); } |
115 | 117 | |
… |
… |
|
134 | 136 | bool runningFromHost(void); |
135 | 137 | int getBootDevice() { return _bootDevice; } |
136 | 138 | |
| 139 | virtual int16 getOverlayHeight() { return getHeight(); } |
| 140 | virtual int16 getOverlayWidth() { return getWidth(); } |
| 141 | |
| 142 | |
137 | 143 | private: |
138 | 144 | void startIrxModules(int numModules, IrxReference *modules); |
139 | 145 | |
===================================================================
|
|
|
945 | 945 | _configFile = strdup(path); |
946 | 946 | } |
947 | 947 | |
948 | | Common::SeekableReadStream *OSystem_PS2::openConfigFileForReading() { |
| 948 | Common::SeekableReadStream *OSystem_PS2::createConfigReadStream () { |
949 | 949 | Common::FSNode file(_configFile); |
950 | | return file.openForReading(); |
| 950 | return file.createReadStream(); |
951 | 951 | } |
952 | 952 | |
953 | | Common::WriteStream *OSystem_PS2::openConfigFileForWriting() { |
| 953 | Common::WriteStream *OSystem_PS2::createConfigWriteStream () { |
954 | 954 | Common::FSNode file(_configFile); |
955 | | return file.openForWriting(); |
| 955 | return file.createWriteStream(); |
956 | 956 | } |
| 957 | |
| 958 | |
| 959 | |
===================================================================
|
|
|
111 | 111 | virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const; |
112 | 112 | virtual AbstractFSNode *getParent() const; |
113 | 113 | |
114 | | virtual Common::SeekableReadStream *openForReading(); |
115 | | virtual Common::WriteStream *openForWriting(); |
| 114 | virtual Common::SeekableReadStream *createReadStream(); |
| 115 | virtual Common::WriteStream *createWriteStream(); |
116 | 116 | |
117 | 117 | int getDev() { return 0; }; |
118 | 118 | }; |
… |
… |
|
503 | 503 | return "WTF ???"; |
504 | 504 | } |
505 | 505 | |
506 | | Common::SeekableReadStream *Ps2FilesystemNode::openForReading() { |
| 506 | Common::SeekableReadStream *Ps2FilesystemNode::createReadStream() { |
507 | 507 | Common::SeekableReadStream *ss = StdioStream::makeFromPath(getPath().c_str(), false); |
508 | 508 | return ss; |
509 | 509 | } |
510 | 510 | |
511 | | Common::WriteStream *Ps2FilesystemNode::openForWriting() { |
| 511 | Common::WriteStream *Ps2FilesystemNode::createWriteStream() { |
512 | 512 | return StdioStream::makeFromPath(getPath().c_str(), true); |
513 | 513 | } |