aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/verbs.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: introduce constants for _userState for cleaner and easier to ↵Tobias Gunkel
understand code
2012-02-11SCUMM: in v0 do not allow an inventory item as 2nd object of a give-to commandTobias Gunkel
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: delete some obsolete v0 TODOsTobias Gunkel
2012-02-11SCUMM: fix v0 mode handling and actor switchingTobias Gunkel
- handle mode switching correctly - do not freeze scripts in cutscene mode (mode 0), as some scripts are freezed in mode 0 that should not be freezed - kModeNoNewKid (mode 2) needs the same userState as mode 3 - rename o_cursorCommand to o_setMode as it is not really cursor specific - handle actorHiding correctly (do not set costume to 0 as the previous costume cannot be reverted after hiding) - add drawSentence - document meanings for actor misc flags - fix actor names for "new kid" if the radiation suit is used (all kids are set to 0 then with actor 0 name " ") - cleanup actor switching routine - _userPut is not used anymore in v0
2012-02-11SCUMM: fix blank sentence line in v0 after cutscenes and remove unused ↵Tobias Gunkel
parameter of resetSentence()
2012-02-11SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectTypeTobias Gunkel
2012-02-11SCUMM: fix debugger for v0Tobias Gunkel
2012-02-11SCUMM: make what-is verb work in v0 againTobias Gunkel
2012-02-11SCUMM: reset object2 in v0 correctlyTobias Gunkel
This fixes the issue that a kid will not enter the front door after opening it with the key.
2012-02-11SCUMM: improve verb and sentence handlingTobias Gunkel
- execute sentence if verb was clicked twice - reuse the first object if a new verb is selected (but no preposition is used yet)
2012-02-11SCUMM: click into sentence line in v0 now performs the actionTobias Gunkel
2012-02-11SCUMM: fix kid selection in v0Tobias Gunkel
The kid names are now displayed in the sentence line (instead of the verb area) as it is done in the original.
2012-02-11SCUMM: make START-button in mm c64 kid selection screen work againTobias Gunkel
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: mm c64 cleanupTobias Gunkel
2012-02-11SCUMM: replace verb, prep and currentMode values with symbolic constantsTobias Gunkel
2012-02-11SCUMM: use constants for c64 actor miscflagsTobias Gunkel
2012-02-11SCUMM: selecting inventory objects and inventory scrolling works againTobias Gunkel
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-02-11SCUMM: remove unneeded verbPrep() callsTobias Gunkel
2012-02-11SCUMM: changed handling of _activeInventory/_activeActor to ↵Tobias Gunkel
_activeObject(2)/_activeObject(2)Type Note: the transition is not completed yet. The code compiles but is probably not runnable as not every occurrence of _activeInventory has been properly replaced. The usage of _v0ObjectIndex and _v0ObjectInInventory should be revised too and both variables should be replaced by another mechanism (maybe by using a single variable "obj = (type << 8) | id"). - moved v0 only vars _activeInventory, _activeObject, _activeVerb from ScummEngine_v2 to ScummEngine_v0 - removed _activeActor, _activeInvExecute, _activeObject2Inv and _activeInventory. They are handled by _activeObject/_activeObjectType and _activeObject2/_activeObject2Type now. - removed _activeObject(2)Index as they only bloat the code without any benefit (?) - merge prep-name tables from ScummEngine_v2::drawPreposition() and ScummEngine_v0::drawSentenceWord() by introducing ScummEngine_v2::drawPreposition() - rename ObjectData.flags -> obj_type (quick-fix only, needs review! Maybe obj_nr and obj_type can be merged into one var: obj_nr = (obj_type << 8) | obj_nr) - o_unknown2 is negation of o_ifActiveObject (o_ifNotEqualActiveObject2) - renamed o_ifActiveObject -> o_ifEqualActiveObject2 as it acts only on _activeObject2 - renamed ScummEngine_v0::drawSentenceWord() -> ScummEngine_v0::getObjectName()
2012-02-11SCUMM: make verbs working betterTobias Gunkel
2011-09-17SCUMM FM-TOWNS: fix DS buildathrxx
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
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-02-07SCUMM: Avoid hiding overloaded virtual methodMax Horn
svn-id: r55809
2010-10-25SCUMM: Add patch #3089936 - MMC64: Parcel/Tombstone/Verb Fix.Travis Howell
svn-id: r53807
2010-10-25SCUMM: Add patch #3093061 - MMC64: sentence highlighting.Travis Howell
svn-id: r53805
2010-10-05SCUMM/FM-TOWNS: disable new graphics code in DS portFlorian Kagerer
svn-id: r53033
2010-10-01SCUMM/FM-TOWNS: fix palette and other graphics issuesFlorian Kagerer
This commit should fix at least the following bugs/feature requests: #1032859, #1252088, #1055391, #1315968, #1315938, #1742106, #812891. The FM-Towns version of Scumm games use a mixed graphics mode with 2 layers (one with 32767 colors and one with 16 colors). Among other things I have added a screen output class which emulates this dual layer approach which allows specific hardware effects like enabling and disabling layers (e.g. in the voodoo priestess scene in MI1). Old savegames (saved before this update) will load, but you’ll encounter palette glitches in the verb/inventory screen, since the 16 color palette for layer 2 is not contained in your savegame. This will be true at least for version 5 games. Certain scene change actions (which require the verb/inventory part to be redrawn) might correct this (e.g. try looking at the treasure map in MI1 and closing it). Version 3 games should be okay, since they use a static text palette which is never changed and which will be reset after loading a savegame. This update requires a USE_RGB_COLORS setting for proper operation. 8 bit users will get a warning that they’ll have to expect palette glitches . Apart from that the engine in 8 bit mode should not only still work okay, but also benefit from some of the other (non palette related) improvements (e.g. bug #1032859 should be fixed even in 8 bit mode). Japanese font drawing hasn’t been improved much yet. This will be a separate task. svn-id: r52966
2010-09-18SCUMM: Remove unused code, which was replaced by ScummEngine_v0::runObject ↵Travis Howell
in revision 42737. svn-id: r52798
2010-09-18SCUMM: Fix bug #3070077 - MMC64: No music when Syd plays the piano.Travis Howell
svn-id: r52796
2010-08-25SCUMM: Implement keyboard-driven inventory scrolling in v2Eugene Sandulenko
Bug #2828383: "ZAK V2: no inventory keyboard shortcuts". svn-id: r52366
2010-03-16Some style fixes.Johannes Schickel
svn-id: r48272
2010-03-16Add patch #2970176 - V0: MM Verb + Anim Fix.Travis Howell
svn-id: r48269
2010-03-05Patch #2963270: MM: V0 Verb Give FixMax Horn
svn-id: r48163
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2009-10-27Reset _distaff after drawing distaff image in PCE version of Loom.Travis Howell
svn-id: r45434
2009-10-27Add support for distaff images in PCE version of Loom.Travis Howell
svn-id: r45433
2009-10-22Fix verb display in PCE version of Loom.Travis Howell
svn-id: r45333
2009-08-29Add patch #2846476 - MM C64: german verbs fix.Travis Howell
svn-id: r43797
2009-07-29SCUMM: cleanupMax Horn
svn-id: r42880
2009-07-25Whitespace changes.Travis Howell
svn-id: r42740
2009-07-25Add patch #2821100 - MM C64 Objects / Verb fixes, with minor clean up applied.Travis Howell
svn-id: r42737
2009-07-07Change all uses of FM-Towns/fm-towns to FM-TOWNS.Johannes Schickel
svn-id: r42235