aboutsummaryrefslogtreecommitdiff
path: root/sword2
AgeCommit message (Collapse)Author
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-10cut down on unnecessary GameDetector referencesMax Horn
svn-id: r11239
2003-11-08cleanup whitespacesPaweł Kołodziejski
svn-id: r11212
2003-11-08This one can go as wellTorbjörn Andersson
svn-id: r11210
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-07missed oneJonathan Gray
svn-id: r11177
2003-11-07spelling fixesJonathan Gray
svn-id: r11175
2003-11-05setup opcode table *before* using it to avoid crashes :-)Max Horn
svn-id: r11156
2003-11-04Create g_logic dynamically. More moving of stuff into classes.Torbjörn Andersson
svn-id: r11129
2003-11-04More moving of stuff into classes.Torbjörn Andersson
svn-id: r11128
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-02fixed warningPaweł Kołodziejski
svn-id: r11069
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-02fixed warningsPaweł Kołodziejski
svn-id: r11046
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-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-11-01cleanup of game detector functionsMax Horn
svn-id: r11024
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-28cleanup: removed version/id from GameSettingsMax Horn
svn-id: r10995
2003-10-28If we fail to read the game settings, use sensible defaults.Torbjörn Andersson
svn-id: r10990
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-23Corrected/clarified some debug messages/commentsTorbjörn Andersson
svn-id: r10945
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-19Small cleanup, and added FIXME comment.Torbjörn Andersson
svn-id: r10907
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-12Alignment fix in debug messageNicolas Bacca
svn-id: r10742
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-09Some cleanups and clarifications. Mainly, we no longer refer to theTorbjörn Andersson
inventory/conversation menu (which is drawn at the bottom of the screen) as the "top menu". svn-id: r10693
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-08Use RandomSource instead of rand().Torbjörn Andersson
svn-id: r10682
2003-10-08cleanupTorbjörn Andersson
svn-id: r10681
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