aboutsummaryrefslogtreecommitdiff
path: root/sword2/interpreter.cpp
AgeCommit message (Collapse)Author
2004-11-14CleanupTorbjörn Andersson
svn-id: r15810
2004-11-11Fixed comment typo. It's the pyramid bug that's dreaded, not the pyramidTorbjörn Andersson
itself. :-) svn-id: r15789
2004-10-19Use the same REDUCE_MEMORY_USAGE trick here as in scumm/intern.hTorbjörn Andersson
svn-id: r15612
2004-04-26Tweaked a few things to accommodateJamieson Christian
MSVC6's idiosyncracies. svn-id: r13644
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-07Added notice about how I think CP_PUSH_LOCAL_ADDR is used.Torbjörn Andersson
svn-id: r13493
2004-04-07Cleanup. (Mostly to change the wording and priority of the debuggingTorbjörn Andersson
messages to be more like in BS1.) svn-id: r13491
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-28Fixed paramters to match format string.Torbjörn Andersson
svn-id: r13406
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-02-05Removed some of the #includes from sword2.hTorbjörn Andersson
svn-id: r12739
2004-01-10I forgot this in the previous cleanup.Torbjörn Andersson
svn-id: r12311
2004-01-10cleanupTorbjörn Andersson
svn-id: r12309
2004-01-06It's a new year in BS2 land, too!Torbjörn Andersson
svn-id: r12181
2003-12-29tiny cleanupTorbjörn Andersson
svn-id: r12017
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-17cleanupTorbjörn Andersson
svn-id: r11704
2003-12-14Mostly cleanups, but I believe this also fixes an endian problem in theTorbjörn Andersson
"restart script" opcode. To actually verify this, though, I'd need to find a case where any other script than script 0 at offset 0 is restarted... svn-id: r11638
2003-11-29Clarified comment about the elevator script bug and added a workaround forTorbjörn Andersson
the dreaded Pyramid Bug. svn-id: r11427
2003-11-28Some formatting changes, and a few debug message corrections.Torbjörn Andersson
svn-id: r11384
2003-11-27Mostly whitespace changes, but also a few modifications to the stillTorbjörn Andersson
experimental resource dumping code. svn-id: r11382
2003-11-25Removed some spurious semi-colons pointed out in patch #847464Torbjörn Andersson
svn-id: r11366
2003-11-24Removed redundant information from the opcode list. I thought having theTorbjörn Andersson
number of parameters to a function would be useful for debugging, but that information is already available in the script data itself. svn-id: r11360
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-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-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-10-28bs2 -> sword2Max Horn
svn-id: r10997
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-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-04added namespace Sword2Max Horn
svn-id: r10581
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-24Replaced abs() with ABS and BOOL with bool, plus some minor cleanups.Torbjörn Andersson
svn-id: r10391
2003-09-21ScummVM code formatting conventionsTorbjörn Andersson
svn-id: r10350
2003-09-20Clarified commentTorbjörn Andersson
svn-id: r10334
2003-09-20cleanupTorbjörn Andersson
svn-id: r10333
2003-09-13cleanupMax Horn
svn-id: r10218
2003-09-13let the interpreter use native endianess for variables -> this allows us to ↵Max Horn
get rid of various endian conversions, and also fixs lots of other problems on BE systems. Beware, though, this may impair save game exchange between LE/BE: we'll have to adjust save_rest.cpp to convert to/from LE upon save/load svn-id: r10216
2003-09-07more endian fixesMax Horn
svn-id: r10058
2003-09-07some endian fixesMax Horn
svn-id: r10056
2003-07-28fixed const errorsMax Horn
svn-id: r9243
2003-07-28-Werror cleanupJonathan Gray
svn-id: r9230
2003-07-28Compiles on mingw nowTravis Howell
svn-id: r9222
2003-07-28big FIXMEMax Horn
svn-id: r9221
2003-07-28bs2Jonathan Gray
svn-id: r9211