aboutsummaryrefslogtreecommitdiff
path: root/sword2/controls.cpp
AgeCommit message (Collapse)Author
2005-03-09changing AudioDataType -> SoundType, so now the constant names match the ↵Max Horn
name of the data type / the SoundMixer method names svn-id: r17052
2005-02-21Some cleanup and renaming. (It was confusing to see "load" sometimes andTorbjörn Andersson
"restore" other times.) The save/restore dialog now has two separate classes, though they both inherit from the old combined class of course. svn-id: r16848
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-02-08Now there are two file handles for the music: one for each CD. This is notTorbjörn Andersson
the same thing as one for each music stream. If both music streams are playing music from the same CD, they will both take turns at using the same file handle. The only case where both file handles are used is when music from one CD is fading in while music from the other CD is fading out. Which of course can only happen if you play the game from hard disk. If the game has to ask for the other CD, it kills the music immediately. The reason for doing this is that there was some concern about whether having two file handles open to the same file was portable or not. I don't think that question was ever fully answered, so I avoid the situation. svn-id: r16753
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-25Added a "value step" parameter to the Slider widget class so that clickingTorbjörn Andersson
beside the slider handle can move it more than one step. (When the volume range was 0-14 or 0-16 this wasn't needed, but now it's 0-255.) svn-id: r16633
2005-01-17Updated copyright header, as discussed on the mailing list.Torbjörn Andersson
svn-id: r16580
2005-01-11On Fingolfin's suggestion I put back the inclusion of util.h into Rect, forTorbjörn Andersson
MIN() and MAX(). I then removed util.h from a bunch of files which I don't think need it any more. (Please let me know if I got too blood-thirsty!) This reverts some of the changes I made this morning. svn-id: r16541
2005-01-11This is probably not the optimal fix, but at least ScummVM compiles again.Torbjörn Andersson
svn-id: r16538
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