aboutsummaryrefslogtreecommitdiff
path: root/sword2/save_rest.cpp
AgeCommit message (Collapse)Author
2005-04-10split SaveFileManager::openSavefile and class SaveFile into two, each, one ↵Max Horn
for loading and one for saving svn-id: r17517
2005-04-09Removed unnecessary includes.Torbjörn Andersson
svn-id: r17477
2005-02-28Changed a few more hard-coded text-ids to constants.Torbjörn Andersson
svn-id: r16957
2005-02-20More BS2 restructuring.Torbjörn Andersson
The various game settings are no longer stored in the Gui class. They are stored in the class that use them. Code that doesn't belong in the Gui class, e.g. the "restart" code, has been moved out of it. Afterwards, the Gui class had been reduced to nothing more than a handful of trivial methods for invoking the in-game dialogs. So the entire Gui class has been removed. svn-id: r16827
2005-02-19This is the second part of the BS2 restructuring. There are two newTorbjörn Andersson
classes: Screen and Mouse. Screen handles most of the drawing, except the mouse cursor and in-game menus. The old Graphics class is no more. I've also fixed some "reverse stereo" regressions from the first part of the restructuring. I'm not sure what the next step will be, but hopefully it will be smaller than this one was. svn-id: r16812
2005-01-28Began what I hope is the final major restructuring of the BS2 engine.Torbjörn Andersson
In this first step, I have moved all opcode functions into functions.cpp, instead of having them scattered all over the place. To get things to compile again, I had to rewrite the overly complicated sound effects handling. It's much simpler now. The next step will be to move any non-trivial code out of the opcode functions and into the appropriate object. This, I hope, will make it easier to create well-separated objects, instead of the current mess. I also want to tear down the artificial boundary between the main directory and the "driver" directory. We already have a cross-platform layer; there's no need to have yet another one. (Actually, the rewriting of the sound effects code took one first step in this direction.) At the final stage, I'd like to get rid of the "drivers" directory completely, but I'll probably need some help with that if I want to preserve the CVS history of the code. Things will probably be a bit bumpy along the way, but I seem to have reached a point of relative stability again, which is why I'm commiting this now. svn-id: r16668
2005-01-25Corrected the comment: the savegame filename does not include the path atTorbjörn Andersson
this stage. (So 128 characters is probably excessive, even if the SCUMM engine uses 256.) svn-id: r16634
2005-01-17Updated copyright header, as discussed on the mailing list.Torbjörn Andersson
svn-id: r16580
2005-01-10system.h was being included in tons of places, without any good reason; ↵Max Horn
reduced this (total dependencies on system.h went down from 193 to 85 files) svn-id: r16527
2005-01-01Updated copyright year.Torbjörn Andersson
svn-id: r16397
2004-11-27Moved Engine::getSavePath() to class SaveFileManager; removed the ↵Max Horn
'directory' parameter from SaveFileManager::openSavefile and listSavefiles (they always use getSavePath() now, which is what we did anyway) svn-id: r15901
2004-11-15I think this is the kind of constructor/go changes _sev was talking aboutTorbjörn Andersson
in his mail to scummvm-devel. (Though "a discussed a while ago change" sounds like sort of thing Robert Jordan writes whenever there is danger of anything actually happening in any of his more recent books. Tantalizing, yet non-informative. ;-) It's still rather messy. I'll look into cleaning it up later. svn-id: r15818
2004-11-14CleanupTorbjörn Andersson
svn-id: r15810
2004-06-25Added Engine::_saveFileMan; thus was able to get rid of auto_ptr usage againMax Horn
svn-id: r14058
2004-06-25Use auto_ptr to avoid leaksMax Horn
svn-id: r14057
2004-06-10One of my not-so-recent cleanups caused BS2 to produce corrupt savegames.Torbjörn Andersson
And no one even noticed! Should be fixed now. svn-id: r13950
2004-04-26Cleanup. Mostly removal of redundant comments.Torbjörn Andersson
I've also made the SaveGameHeader struct packed, which may break savegame compatibility on some architectures (though not on the Linux and Windows boxes I've tried it on). But I'm hoping it will guarantee, or at least make it more likely, that savegames will be portable across architectures. svn-id: r13634
2004-04-23Major revamping of the BS2 memory manager and, some small changes to theTorbjörn Andersson
resource manager. All new code! All new bugs! svn-id: r13603
2004-03-28Force the engine to pick a cursor after restoring a game. This appears toTorbjörn Andersson
be needed when using the -x command-line option to restore a game, though I'm not quite sure why. svn-id: r13400
2004-03-27Make sure looping music is restarted after loading a savegame, regardlessTorbjörn Andersson
of how the savegame is loaded. (ScummVM adds two alternative methods: the -x command-line parameter, and the restart/restore dialog at the beginning of the game, which is only shown when there are savegames available.) svn-id: r13386
2004-03-17Use the same syntax for accessing script variables as BS1 does, i.e. nowTorbjörn Andersson
it's Logic::_scriptVars[ID] instead of just ID. Apart from looking cool, it makes it much easier to tell the difference between variables and constants when looking at the code. Of course, this sort of sweeping changes is jolly good for introducing truly weird regressions, which is why I waited until after 0.6.0. svn-id: r13331
2004-03-04If the user has previous savegames, display a restart/restore dialog whenTorbjörn Andersson
the game starts. (I know it could look prettier, but I don't have much to work with here...) svn-id: r13178
2004-02-05Removed some of the #includes from sword2.hTorbjörn Andersson
svn-id: r12739
2004-01-18fix warningsPaweł Kołodziejski
svn-id: r12504
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2004-01-04Update a comment to reflect that some functions have different names now.Torbjörn Andersson
svn-id: r12140
2004-01-03Fixed bug that made ScummVM crash when loading a savegame where the mainTorbjörn Andersson
character was walking. (I had missed a case where pointers were cast to integers.) svn-id: r12113
2003-12-28Hopefully the last big renaming. Now the datatypes have names likeTorbjörn Andersson
"StandardHeader" instead of "_standardHeader". svn-id: r11997
2003-11-27Mostly whitespace changes, but also a few modifications to the stillTorbjörn Andersson
experimental resource dumping code. svn-id: r11382
2003-11-16fix compilation on big endian systemsMax Horn
svn-id: r11318
2003-11-16More cleanup. I've eliminated all the temporary global variables I've addedTorbjörn Andersson
over the past few weeks, except for g_sword2. (Of course, this doesn't necessarily make the code any prettier, but we can work on that later.) svn-id: r11309
2003-11-15Mostly cleanup. Also prevented what would probably have been an infiniteTorbjörn Andersson
loop if ScummVM failed to find a file in the demo. (Now it should error out instead, which is marginally preferable.) svn-id: r11298
2003-11-10The script engine frequently needs to pass pointers to various structuresTorbjörn Andersson
etc. to the different opcodes. Until now it has done so by casting the pointer to an int32 (opcode parameters are represented as arrays of int32) and then the opcode function casts it back to whatever pointer it needs. At least in C there is no guarantee that a pointer can be represented as an integer type (though apparently C99 may define such a type), so this has struck me as unsafe ever since I first noticed it. However, since all such pointers appear to point to the memory block owned by the memory manager, we can easily convert them to integers by treating them as offsets into the memory block. So that's what I have done. I hope I caught all the occurences in the opcode functions, or we're going to have some pretty interesting regressions on our hands... svn-id: r11241
2003-11-08Removed some now redundant header files.Torbjörn Andersson
svn-id: r11209
2003-11-08Moved more stuff into classes, changed some static allocation to dynamic,Torbjörn Andersson
and removed some of the references to global variables. At this point I believe everything in the main game engine has been moved into classes - not necessarily the correct ones, but still... However, there is some stuff in the driver directory that need to be taken care of as well. svn-id: r11207
2003-11-04Create g_logic dynamically. More moving of stuff into classes.Torbjörn Andersson
svn-id: r11129
2003-11-03fix compile errorMax Horn
svn-id: r11107
2003-11-03The resource and memory managers are now created dynamically.Torbjörn Andersson
Renamed the resource manager's open/close methods openResource() and closeResource() to avoid confusion. (It was I who originally shortened their names to open() and close(), but I've changed my mind now.) Moved more stuff into Sword2Engine. svn-id: r11088
2003-11-02Moved some more "homeless" functions into Sword2Engine. (Don't worry -- ITorbjörn Andersson
promise I will get rid of g_sword2 later.) svn-id: r11057
2003-10-28bs2 -> sword2Max Horn
svn-id: r10997
2003-10-26Enable the debug console. Actually, what I've done is to adapt the debugTorbjörn Andersson
console from the SCUMM engine. I decided that would be easier than to clean up the original console code. Unfortunately there's a bunch of code that I just copied - a pretty lousy form of code-reusal. It'd be nice if the console could be made part of the Engine class, or something like that. Most of the debug commands seem to be working. Some aren't relevant for ScummVM, and some are a bit obscure so I'm not quite sure what they're supposed to be doing. svn-id: r10978
2003-10-21Moved some more stuff into the Logic class.Torbjörn Andersson
svn-id: r10923
2003-10-18Moved the opcode functions into the Logic class.Torbjörn Andersson
svn-id: r10885
2003-10-12some more target<->game cleanupMax Horn
svn-id: r10769
2003-10-12Moved the "router" code into a new Router class. I'm hoping this isTorbjörn Andersson
analogous to the SkyAutoRoute class. svn-id: r10754
2003-10-08Some more cosmetic changes while I'm considering the next move. (Or maybeTorbjörn Andersson
I'm just hoping that if I stall long enough, someone else will make the move for me. :-) svn-id: r10676
2003-10-04Changed to use #include "bs2/..." and removed the inclusion of standard CTorbjörn Andersson
headers. Most (all?) of the ones we need should probably come from stdafx.h instead. svn-id: r10588
2003-10-04added namespace Sword2Max Horn
svn-id: r10581
2003-09-30Moved the memory manager functions into an object of its own (and enabledTorbjörn Andersson
debugging levels). This needs further cleanups, but I believe I have reached a stable point where I can commit it without too much anxiety. svn-id: r10502
2003-09-30Changed the resource manager object to use more ScummVM-like naming.Torbjörn Andersson
svn-id: r10499