aboutsummaryrefslogtreecommitdiff
path: root/sword2/sword2.cpp
AgeCommit message (Collapse)Author
2003-10-22Moved a few remaining pieces of the script interpreter into the Logic classTorbjörn Andersson
svn-id: r10939
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-17moved game detection code out to the pluginsMax Horn
svn-id: r10882
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-12some renaming for more consistent terminology (although we might want to ↵Max Horn
reevaluate this): 'target' is what is in your config file; 'game' is what a frontend provide. E.g. the scumm frontend provides the game 'monkeyvga', and my config file has target 'monkeyvga-ger' configured to use that game svn-id: r10766
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
2003-10-10cleanupTorbjörn Andersson
svn-id: r10728
2003-10-10some cleanupMax Horn
svn-id: r10720
2003-10-08new config manager. not everything is completed, and some things will still ↵Max Horn
be changed, but it seems to work well enough to put it into CVS svn-id: r10687
2003-10-05Made a separate class for the cutscene functions, removed some unused codeTorbjörn Andersson
and made some other minor cleanups. svn-id: r10614
2003-10-05factor out common gfx_mode/fullscreen setup code from the game engines into ↵Max Horn
the main code (maybe putting this into the Engine constructor would be better, though?) svn-id: r10611
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-04removed Sword2 prefixes of most classes (made obsolete by our namespace ↵Max Horn
usage); renamed Sword2State to Sword2Engine svn-id: r10583
2003-10-04added namespace Sword2Max Horn
svn-id: r10581
2003-10-03Some renaming (ironic in the light of Fingolfin's recent namespaceTorbjörn Andersson
suggestion, but I prepared the patch long before reading the mail :-). Also, the remaining parts of the control panel etc. have been moved into a class of their own. This is still work in progress. I'm well aware that some of the classes aren't as well separated as they ought to be, and that using global variables to keep track of the different classes probably isn't pretty. svn-id: r10561
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
2003-09-30Changed the "logic" object to use ScummVM naming conventions.Torbjörn Andersson
svn-id: r10496
2003-09-28More cleanup, plus support for cutscene leadout music. For now, we onlyTorbjörn Andersson
play that music for cutscenes that have subtitles. svn-id: r10460
2003-09-27add alternate sword2 target for people who want to use the gui for game ↵Jonathan Gray
detection when the game is either a) on CD b) in a bunch of seperate directories in a structure like that of the CD. Of course pointing ScummVM at such things with the normal target via command line or config file work fine. As everyone awake at the moment only has the sold out version, this is specific to that. I don't know what files are at the root of the original CD we can use for detection purposes svn-id: r10423
2003-09-27More cleanup, and I've replaced most - not quite all - of BS2's debugTorbjörn Andersson
message functions with our own. We still need to go through them and assign sensible debug levels to them. svn-id: r10422
2003-09-26Some more reformatting / cleanup, and removal of comments that did nothingTorbjörn Andersson
but say who added what when. (No disrespect intended, but this information means very little to us.) svn-id: r10413
2003-09-24Replaced abs() with ABS and BOOL with bool, plus some minor cleanups.Torbjörn Andersson
svn-id: r10391
2003-09-23Must ... make ... space ... for ... FotAQ ...Torbjörn Andersson
svn-id: r10383
2003-09-23Removed the screenshot code. (The SDL backend already has the ability toTorbjörn Andersson
make screenshots.) svn-id: r10382
2003-09-23Changed the keyboard handling to store "keyboard events", rather than justTorbjörn Andersson
characters. Hopefully this will make things work smoother on the Mac, but I have no way of testing that. svn-id: r10376
2003-09-23Since we probably won't have anything like the original BS2 launcher menu,Torbjörn Andersson
make the 'C' key run the credits. I haven't yet implemented the credits function, but it does play the music at least. svn-id: r10366
2003-09-22Set the mixer to use the maximum volume. BS2 has its own volume settings,Torbjörn Andersson
and we want them to go all the way up to eleven. svn-id: r10362
2003-09-20The usual cleanup. Removed the "run from CD" check.Torbjörn Andersson
This pretty much concludes the first stage of the engine cleanup. All of the files, except for console/debugging stuff and possibly some header files, have been changed to use the ScummVM brace style. As for the console, that one could probably do with some rewriting, in which case cleaning it up first would just be unnecessary work. The next stages of the cleanup should include renaming of variables and functions to follow the ScummVM coding standards, and turning everything into C++ classes. And so on. Of course, the driver directory should go through a similar cleanup as well. This has all been enormously tedious, so don't count on me doing any of these things at the moment. Particularly not turning everything into C++ classes. I'm really not that familiar with C++. :-) svn-id: r10340
2003-09-18added initial support for building our 4 adventure engines as loadable ↵Max Horn
modules; right now only work on OS X; once we add more build rules, other systems with dlopen() should work, too (e.g. Linux); Windows support may come later. This is still very much WIP svn-id: r10304
2003-09-17new module 'base'; moved gameDetector.*, main.cpp and base/plugins.* there ↵Max Horn
(this removes the need for an ugly hack in the build system, and is also conceptionally cleaner) svn-id: r10282
2003-09-17added a static method setDefaultDirectory to class File; used this to ↵Max Horn
simplify some code; added a global g_sound pointer in bs2, this cuts down on uses of g_sword2 (of course both should be removed on the long run); some other minor tweaks/fixes svn-id: r10278
2003-09-14if saveslot specified with -x doesn't exist, show restore menuOliver Kiehl
svn-id: r10256
2003-09-14enable ``proper'' -x loadingOliver Kiehl
svn-id: r10255
2003-09-09Our ServiceWindows() never returns RDERR_APPCLOSED, and we always behave asTorbjörn Andersson
if we have the focus, so there's no need to check. svn-id: r10130
2003-09-08renamed VersionSettings -> TargetSettings and also renamed some of its ↵Max Horn
members; added GameDetector::findTarget; made launcher use that new method; some initial preparations for Plugin code svn-id: r10092
2003-09-02Moved the sound initialisation to the Sword2Sound constructor to avoidTorbjörn Andersson
warning messages about uninitialised sound handles. svn-id: r9972
2003-08-30Set a default music volume so that we can actually hear it. :-)Torbjörn Andersson
svn-id: r9932
2003-08-30added sfx support, increased speech support, and music code(streaming works ↵Paweł Kołodziejski
fine but you don't hear anything) newStream, and appendStream doesn't work but playRaw works for music svn-id: r9923
2003-08-29Cleanup.Torbjörn Andersson
svn-id: r9903
2003-08-27Add code to check for game-specific scaler and fullscreen settings, like weTorbjörn Andersson
do for the other game engines. svn-id: r9880
2003-08-26The graphics detail settings partially work now. They only affect howTorbjörn Andersson
sprites are drawn, but I think that's how it should be. 1: No bells or whistles. 2: This setting adds sprite blending, e.g. the smoke at the docks or the display cases at the Glease Gallery. 3: This setting adds light map support, e.g. when walking under the shack at the docks. 4: This setting adds better scaling algorithms. The first three settings should work fine now. In fact, the third setting is what we used to implement. The fourth setting still needs work and testing. I've added code for downscaling case, but frankly I'm not convinced the result is any better than with the simpler scaler. I usually can't even tell the difference. Of course, my translation of the original code could very well be buggy. svn-id: r9867
2003-08-25FadeServer() is now called from ServiceWindows(), thus eliminating the needTorbjörn Andersson
for the making it a timer handler. This should eliminate the occasional glitches I've been seeing with fades not being completed. I'm also hoping that it will fix the problem where the game would sometimes hang when moving between rooms. I know that at least once when I had that happen to me the game was busy-waiting for the palette to fade. At the very least, it's one place less to worry about thread-safety in. svn-id: r9854
2003-08-24bring up the restore game menu when any -x param is specified, this is nicer ↵Jonathan Gray
than telling it to load a slot as it validates the saves and doesn't try to load a non existent save etc, its also similiar to what the original did (any command line params at all would load the restore menu) svn-id: r9843
2003-08-23fix a resman method and make saving work using SaveFileManagerJonathan Gray
svn-id: r9828
2003-08-22enable boot param like option for bs2, valid numbers can be found in startup.infJonathan Gray
svn-id: r9822
2003-08-19Remove a bunch of unneeded cruft - but barely the surface of it. This code ↵James Brown
is depressing and duplicated all over the place... I don't think I can bear to touch this code until it's undergone some MAJOR cleanup :) svn-id: r9782