aboutsummaryrefslogtreecommitdiff
path: root/sword2/controls.cpp
AgeCommit message (Collapse)Author
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-12-27Use the mixer to handle sound volumesMax Horn
svn-id: r16349
2004-12-27Use the same volume ranges as most of the rest of ScummVM (i.e. 0-255)Max Horn
svn-id: r16333
2004-11-14CleanupTorbjörn Andersson
svn-id: r15810
2004-09-28Rename remaining OSystem methods to match our coding guidelinesMax Horn
svn-id: r15332
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-08-01Correct default settings used by COMITravis Howell
Allow object_labels config option in COMI svn-id: r14408
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-05-10Close menus before restarting. (This is a purely cosmetical fix.)Torbjörn Andersson
svn-id: r13831
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-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-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-03-01Display keyboard when savingNicolas Bacca
svn-id: r13118
2004-02-21Use unsigned characters when drawing the text in the control panel etc.Torbjörn Andersson
This is consistent with how the in-game text is drawn, and might possibly fix the control panel text in the Spanish version (though I have no way of actually testing this). svn-id: r12957
2004-02-05Removed some of the #includes from sword2.hTorbjörn Andersson
svn-id: r12739
2004-01-09Make it possible to quit while showing in-game dialogs. (Regression fix.)Torbjörn Andersson
svn-id: r12273
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2004-01-06Made sure the screen is really cleared when drawing a dialog window, plusTorbjörn Andersson
some other cleanups. (This was a regression caused by the less stupid screen updates implemented recently.) svn-id: r12180
2004-01-04Adapted LavosSpawn's idea for more efficient screen updating. It stillTorbjörn Andersson
renders the entire screen every frame, but it tries to update (i.e. copy to the backend) only the parts of the screen that actually changed. At least approximately so. svn-id: r12142
2003-12-28Hopefully the last big renaming. Now the datatypes have names likeTorbjörn Andersson
"StandardHeader" instead of "_standardHeader". svn-id: r11997
2003-12-20Make VC6/EVC happierNicolas Bacca
svn-id: r11764
2003-12-19Implemented scroll wheel handling for save/load dialogs. (This turned up aTorbjörn Andersson
few other hitherto harmless bugs, which I've hopefully managed to fix.) svn-id: r11762
2003-12-03Change Broken Sword 2 default to no subtitlesTravis Howell
To match original version and other games. svn-id: r11479
2003-12-02Since all other engines have been changed to use "subtitles" instead ofTorbjörn Andersson
"nosubtitles", let's change this one as well. Of course, it does break compatibility with old config files, but I guess the worst that can happen is that we have an unused "nosubtitles" line in addition to the used "subtitles" line... svn-id: r11464
2003-11-25Removed some spurious semi-colons pointed out in patch #847464Torbjörn Andersson
svn-id: r11366
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-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-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-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-02fixed warningsPaweł Kołodziejski
svn-id: r11046
2003-11-01Instead of having a function that reverses the panning table, we now have aTorbjörn Andersson
function that creates the panning table. The difference is that you now have to tell whether you want one for normal or reverse stereo, so you are not dependent on the previous state of the table. (I still think it may be possible to get rid of the panning table completely, but that's for later cleanups.) svn-id: r11027
2003-11-01Create the gui object dynamicallyTorbjörn Andersson
svn-id: r11026
2003-11-01More moving of stuff into classesTorbjörn Andersson
svn-id: r11025
2003-10-31Save the config file when options are changed.Torbjörn Andersson
svn-id: r11014
2003-10-29Use the ScummVM config manager instead of a separate BS2-specific configTorbjörn Andersson
file, plus some other cleanup. I don't know how the config manager decides if/when to save the settings to file, but we can worry about that later. svn-id: r11001
2003-10-28bs2 -> sword2Max Horn
svn-id: r10997
2003-10-28If we fail to read the game settings, use sensible defaults.Torbjörn Andersson
svn-id: r10990
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-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
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-11Moved the text drawing stuff into a class of its own. (Adding anotherTorbjörn Andersson
global variable which will hopefully be dealt with later.) svn-id: r10734