aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/script.cpp
AgeCommit message (Collapse)Author
2012-02-11SCUMM: replace "c64" with "v0" when it applies to both C64 and AppleII v0 ↵Tobias Gunkel
versions In addition some routines (e.g. the gfx ones) that are even used in v1.
2012-02-11SCUMM: adjust to coding style-guideTobias Gunkel
2012-02-11SCUMM: fix gcc compiler warningsTobias Gunkel
2012-02-11SCUMM: handle v0 distance check in checkPendingWalkAction() correctlyTobias Gunkel
2012-02-11SCUMM: Fix for V0 objectsRobert Crossfield
2012-02-11SCUMM: keep track of the number of nested script calls for a sentenceTobias Gunkel
command in v0 If for instance an object necessary for the sentence command is not reachable or pickupable (try to use faucet (object 55) with jar with water in microwave (object 50), the pick-up script of the jar will tell the actor to pickup object 99 (jar not in microwave)) the actor will try to pick-up the jar infinitely. This is fixed by counting the amount of nested scripts the sentence command has called (directly or indirectly) so far and aborts it if there have been too many.
2012-02-11SCUMM: complete handling of pending walkTo actions for sentence commandsTobias Gunkel
in v0
2012-02-11SCUMM: handle actor freeze in walkToActorOrObject()Tobias Gunkel
2012-02-11SCUMM: fix blank sentence line in v0 after cutscenes and remove unused ↵Tobias Gunkel
parameter of resetSentence()
2012-02-11SCUMM: merge object v0 id and type into one object varTobias Gunkel
2012-02-11SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectTypeTobias Gunkel
2012-02-11SCUMM: fix debugger for v0Tobias Gunkel
2012-02-11SCUMM: pop stack in v0 if command's object1 and 2 are the sameTobias Gunkel
Otherwise the command will never be removed and the stack overflows
2012-02-11SCUMM: reset sentence line in v0 if sentence executedTobias Gunkel
2012-02-11SCUMM: fix verb and script handlingTobias Gunkel
- getVerbEntrypoint() should not handle walk-to differently (revert 0x0D handling back to original behavior) - VAR_ACTIVE_ACTOR actually is VAR_ACTIVE_OBJECT2 - runSentenceScript(): "if (_cmdVerb == kVerbWalkTo)" must be "if (_cmdVerb != kVerbWalkTo)"
2012-02-11SCUMM: use command stack and SentenceTab in mm c64Tobias Gunkel
- MM C64 uses command stack (SentenceTab, doSentence()) now - _cmdObject... added for current SentenceTab. The _active... variables are only used to build a sentence in the inventory but never by a script. -> many routines are not needed anymore and are removed
2012-02-11SCUMM: start handling object type and id correctly in mm c64Tobias Gunkel
- removed complicated and unnecessary _v0ObjectIndex, _v0ObjectInInventory, _v0ObjectFlag vars - started to merge object id and type into one object value (type<<8|id) - verb preposition ids do not dependent on language -> remove from VerbSettings Note: - objects with type=0 are foreground objects. They have a state, an owner and a bg overlay image. - objects with type=1 are bg objects. They do not have a state or owner and are already contained in the bg image. The do not have an entry in objectState/OwnerTable
2012-01-14SCUMM: Fix workaround for Dig spider lair sound glitchTorbjörn Andersson
The soundKludge() function assumes there are always 8 parameters for Digital iMUSE script commands.
2012-01-08SCUMM: Work around script bug in The DigTorbjörn Andersson
The sound of trickling water in the spider lair is started, but never explicitly stopped, so it keeps going. (Possibly not forever. When I tried it in DOSBox, it finally stopped when I got back to the Nexus.) The same sound effect is used the underwater cavern, and in that case the exit script does fade out the sound so this workaround emulates that behaviour.
2011-05-17SCUMM: Make REDUCE_MEMORY_USAGE slightly more effecive (saving ~1kb ram)Max Horn
2011-05-14SCUMM: Remove some unused var warnings (see bug #3293800)Max Horn
2011-05-13SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its ↵Max Horn
_resource member
2011-05-13SCUMM: Remove ResTypeData::_numMax Horn
2011-05-13SCUMM: Add a Resource class, refactor res code around itMax Horn
2011-05-13SCUMM: Rename ResTypeData::num to _numMax Horn
2011-05-13SCUMM: Get rid of the MemBlkHeader hackMax Horn
This uncovered at least one potentially serious bug in the inventory code, which still needs to be investigated and fixed.
2011-05-13SCUMM: Refactor how resource (types) are srepresentedMax Horn
Previously, we had a couple of arrays of size N (where N = number of resource types), one for each attribute of a resource type (such as as the number of resources of that type. Now, we have one array of size N, whose elements are a record aggregating all the attributes of each resource type.
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-12COMMON: Replace MKID_BE by MKTAGMax Horn
MKID_BE relied on unspecified behavior of the C++ compiler, and as such was always a bit unsafe. The new MKTAG macro is slightly less elegant, but does no longer depend on the behavior of the compiler. Inspired by FFmpeg, which has an almost identical macro.
2011-04-05SCUMM: CleanupMax Horn
2011-04-05SCUMM: Fix off-by-one mistakes in out-of-bounds checks; name some constantsMax Horn
2011-04-04SCUMM: Check for cutSceneStackPointer underflowsMax Horn
2010-11-01ENGINES: Replace many printfs by warning/debug/debugNMax Horn
svn-id: r54031
2010-10-18SCUMM: Fix potential bug in ScummEngine::resStrLen.Max Horn
In particular, it might happen that ScummEngine::resStrLen is called while the _scriptPointer is stale. In that case, it would be working with the stale pointer. If the code calling it then uses fetchScript*() methods to read the string whose length was just computed, then it would read potentially *different* data (e.g. copyScriptString or loadPtrToResource could have been affected). I am not sure if this actually could have caused bugs somewhere; it might even be provable that a script relocation cannot happen in all places that invoke resStrLen. But for now it's much easier to make the code safe than to verify that theory ;). Also simplified some related code. svn-id: r53572
2010-10-18SCUMM: Move common code from ScummEngine::fetchScript* to new method.Max Horn
The new method is called refreshScriptPointer(). Also renamed getScriptEntryPoint() to resetScriptPointer() in an attempt to highlight both the similarity and difference between the two. svn-id: r53571
2010-08-16SCUMM: Move setResult/getResultPos to script_v5.cppMax Horn
svn-id: r52129
2010-08-11SCUMM: _resultVarNumber and related methods are specific to v0-v5Max Horn
svn-id: r51974
2010-01-28Fix regressions in Let's Explore the Jungle with Buzzy.Travis Howell
svn-id: r47622
2009-10-22Fix objects structure and object scripts in PCE version of Loom.Travis Howell
svn-id: r45335
2009-07-29SCUMM: Fix verb/sentence handling in Indy3 mac (there, a double click must ↵Max Horn
be used to trigger a verb/sentence) svn-id: r42907
2009-07-29SCUMM: Enable looping in Indy3Mac sound effectsMax Horn
svn-id: r42898
2009-07-29SCUMM: Rewrote ScummEngine::inventoryScriptIndy3Mac for clarityMax Horn
svn-id: r42889
2009-07-25Add patch #2821100 - MM C64 Objects / Verb fixes, with minor clean up applied.Travis Howell
svn-id: r42737
2009-07-15Hack is no longer required, due to revision 42498.Travis Howell
svn-id: r42499
2009-07-04Fix mismatching format arguments.Johannes Schickel
svn-id: r42105
2009-04-16SCUMM: Got rid of o6_invalidMax Horn
svn-id: r39957
2009-04-16SCUMM: Switched opcode tables to use Common::Functor0 (a bit like Kyra does it)Max Horn
svn-id: r39956
2009-03-20SCUMM: Split intern.h into multiple headersMax Horn
svn-id: r39567
2009-02-17Clear cutsceneOverride for all scripts (except current), when restarting any ↵Travis Howell
game, fixes bugs: #1923193 - MONKEY: cannot restart during the intro #2518226 - FT demo: debugger at end of demo svn-id: r38398
2009-02-13Revert talkspeed changes, while still only using the game specific talkspeed ↵Travis Howell
setting (if it exists). And clarify the talkspeed differences between games in the README. svn-id: r36299