aboutsummaryrefslogtreecommitdiff
path: root/sword2/sword2.h
AgeCommit message (Collapse)Author
2004-11-24Fix a`ll engines. They work, though current fix is just temporary.Eugene Sandulenko
There are plans to add some brains to GameDetector class, which will let us avoid passing detector to init() method. svn-id: r15873
2004-11-23Added Engine::init() method; added return value to Engine::go()Max Horn
svn-id: r15865
2004-11-16CleanupTorbjörn Andersson
svn-id: r15826
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-09-08Fixed evil regression #2. Restarting the game, or using the "start" debugTorbjörn Andersson
command, would close the global script variables and player object resources, without reopening them again. This made them fair game for the resource expiration mechanism. The player object is probably referenced often enough to stay alive, but the variables died on me pretty quickly, causing ScummVM to crash. I've also added a "reslist" debug command to make this sort of things easier to spot. By default it only lists resources with refCount > 0. Use "reslist 0" to see all the cached resources as well. svn-id: r14958
2004-06-10If the 'time' parameter to displayMsg() is 0, wait until the user clicksTorbjörn Andersson
or presses a button. This is how displayMsg() was always used, so the only difference is that the code to check for events is no longer outside the function. In the process, it turned out that removeMsg() was probably unnecessary so I have removed it. May cause regressions, but we can deal with them later. svn-id: r13953
2004-06-10Some more work on the - still disabled - "right click to clear luggage"Torbjörn Andersson
code I added some time ago. svn-id: r13952
2004-05-09Removed the buffering of mouse and keyboard events. I don't think any ofTorbjörn Andersson
our other engines do this, so there is little reason for BS2 to. I did add a filtering mechanism so that mouse button releases and scroll wheeling is ignored during normal gameplay, but I don't know if that was necessary either. Since this left little more than an empty husk where the Input class used to be, I've eliminated that class and buried its remains in Sword2Engine. svn-id: r13812
2004-05-01Simplified the handling of sound effects. It's not necessary for the driverTorbjörn Andersson
to keep its own copy of the sound data. It could be even further simplified (I don't really see any reason for having two different sound queues), but I seem to have reached a point of stability here and I don't want to jinx it by making further changes yet. svn-id: r13705
2004-04-28Cleanup. I plan to take a closer look at the sound effects handling later.Torbjörn Andersson
svn-id: r13661
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-24fetchObjectName() no longer assumes that the resource will still be in theTorbjörn Andersson
cache after it's been closed. (Currently it always is, but ideally I'd like for BS to work even if resource caching is disabled.) svn-id: r13610
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-04-16CleanupTorbjörn Andersson
svn-id: r13582
2004-04-07Cleanup.Torbjörn Andersson
svn-id: r13494
2004-04-04Cleanup.Torbjörn Andersson
svn-id: r13457
2004-03-29Cleanup.Torbjörn Andersson
This removes a bunch of debugging code/commands that either didn't do anything useful under ScummVM (e.g. "soft" and "hard"), or which did things that was already easily avaiable elsewhere (e.g. "save" and "restore"). I didn't have the heart to remove the "tony" command, though. :-) svn-id: r13422
2004-03-28Cleanup.Torbjörn Andersson
One of the changes, I'm not quite sure about: buildDisplay() used to open and close the _thisScreen.background_layer_id resource for each layer it processed. In particular, it used to "release the screen resource before cacheing the sprites". I have no idea why, because I can't see any trace of a sprite cache, and I can't think of any harm in keeping the resource open during the whole render cycle. The resource is probably loaded into memory already anyway, though its reference counter may be 0. svn-id: r13401
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-08Allow quitting during cutscenes and credits again. This is getting a bitTorbjörn Andersson
hackish... svn-id: r12247
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2003-12-28Hopefully the last big renaming. Now the datatypes have names likeTorbjörn Andersson
"StandardHeader" instead of "_standardHeader". svn-id: r11997
2003-12-11cleanupTorbjörn Andersson
svn-id: r11581
2003-11-25cleanupTorbjörn Andersson
svn-id: r11364
2003-11-23Added experimental (i.e. not tested) resource dumping code.Torbjörn Andersson
Added tentative workaround for the bug (a script bug, I think) that causes the game to hang when examining the lift at the top of the pyramid. And, of course, some misc. cleanup. svn-id: r11359
2003-11-18The readFile() function was only used once, for creating the debugger startTorbjörn Andersson
menu, and wasn't even necessary there so I've removed it. That means the tony_gsdk.cpp file is no longer necessary. Sorry Tony, but at least you still have your own debugger command! ;-) svn-id: r11342
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-14cleanupTorbjörn Andersson
svn-id: r11290
2003-11-12cleanupTorbjörn Andersson
svn-id: r11266
2003-11-11Removed SVM_timeGetTime(). We may as well call get_msecs() directly.Torbjörn Andersson
svn-id: r11260
2003-11-11Moved low-level keyboard and mouse handling to a new Input class, andTorbjörn Andersson
renamed the Display class Graphics for no better reason than me liking the phrase "sound and graphics" better than "sound and display". svn-id: r11258
2003-11-10cut down on unnecessary GameDetector referencesMax Horn
svn-id: r11239
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-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-02Even more stuff moving into Sword2Engine. I'm tempted to make a new classTorbjörn Andersson
for the mouse stuff, but I need to think about that a bit more. I have a feeling the code could be cleaned up a bit anyway... svn-id: r11060
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-11-02More moving of stuff into classes. I had to make a few changes/cleanups toTorbjörn Andersson
events.cpp, so there could be regressions. svn-id: r11053
2003-11-02turned NewGui into a singleton, and made OSystem a pseudo-singleton; added ↵Max Horn
Widget::findWidget (preparing to add support for nested widgets, for the tab widget) svn-id: r11045
2003-11-01More moving of stuff into classesTorbjörn Andersson
svn-id: r11025
2003-10-28bs2 -> sword2Max Horn
svn-id: r10997
2003-10-28cleanup: removed version/id from GameSettingsMax Horn
svn-id: r10995
2003-10-26factor out common debugger codeMax Horn
svn-id: r10984
2003-10-26cleanupMax Horn
svn-id: r10982
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-15Dumped most of the remaining "driver" code into a new "Display" class. ThisTorbjörn Andersson
touches a lot of the code, of course, and adds yet another global variable (temporarily, I hope), but everything still seems to work. Knock on wood. svn-id: r10806
2003-10-12some more target<->game cleanupMax Horn
svn-id: r10769