Commit Graph

51371 Commits

Author SHA1 Message Date
Tobias Gunkel
08e1e127e9 SCUMM: handle v0 distance check in checkPendingWalkAction() correctly 2012-02-11 08:29:43 +01:00
Robert Crossfield
c6688cf0d5 SCUMM: Remove unused variable, remove old comment 2012-02-11 08:29:41 +01:00
Robert Crossfield
9ba01d020b SCUMM: Fix V0 Sound, and a direction issue (affected walking down the ladder) 2012-02-11 08:29:40 +01:00
Robert Crossfield
1ca0b84b01 SCUMM: Improve comments 2012-02-11 08:29:38 +01:00
Robert Crossfield
fb3e431ec6 SCUMM: V0 always turns actor towards camera when entering room, remove unnecessary loadcostume 2012-02-11 08:29:37 +01:00
Robert Crossfield
5accf01881 SCUMM: Remove unnecessary calls to animateActor 2012-02-11 08:29:35 +01:00
Robert Crossfield
f299fc295e SCUMM: Fix for V0 objects 2012-02-11 08:29:34 +01:00
Robert Crossfield
1e8d0664ac SCUMM: Fix Tentacle issue, and possibly some other animation issues 2012-02-11 08:29:32 +01:00
Tobias Gunkel
ddd65dfc22 SCUMM: fix actor climbing on plant or swimming pool ladder
Before, the actor will descend the ladder of the pool and maybe even into the the pool. Another issue fixed by this is the actor climbing onto the plant pot if you give something to it.
2012-02-11 08:29:30 +01:00
Tobias Gunkel
f99dab78e4 SCUMM: fix for old savegames 2012-02-11 08:29:29 +01:00
Robert Crossfield
cf292001d3 SCUMM: Animations fix again, no need for the hack now 2012-02-11 08:29:27 +01:00
Robert Crossfield
5b4b606a58 SCUMM: Remove the setCmdFromDirection function 2012-02-11 08:29:26 +01:00
Robert Crossfield
08e3866395 SCUMM: Animation Fixes 2012-02-11 08:29:24 +01:00
Robert Crossfield
65fb1f9a09 SCUMM: Fix the animation system, rename the Limb Frame Repeat variable 2012-02-11 08:29:22 +01:00
Tobias Gunkel
e3f9a09d49 SCUMM: keep track of the number of nested script calls for a sentence
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-11 08:29:21 +01:00
Tobias Gunkel
fb68456541 SCUMM: complete handling of pending walkTo actions for sentence commands
in v0
2012-02-11 08:29:19 +01:00
Tobias Gunkel
1da715719c SCUMM: handle actor freeze in walkToActorOrObject() 2012-02-11 08:29:18 +01:00
Tobias Gunkel
b0201a8df2 SCUMM: fix o_setObjectName()
The parameter can either be a FG or BG object depending on the opcode.
2012-02-11 08:29:16 +01:00
Tobias Gunkel
b31157cee3 SCUMM: delete some obsolete v0 TODOs 2012-02-11 08:29:14 +01:00
Tobias Gunkel
96f8fc6ca9 SCUMM: Fix actor ID handling in v0
Some object functions allow actor IDs and object IDs as parameters. They are easily distinguishable in engines > 0 as actor IDs are < _numActors and object IDs are bigger. In v0 this is not the case as there are objects with IDs like 3 and 5 (e.g. the hamster). So object ID handling was unified for v0 and the other engines by introducing objIsActor(), objToActor() and ActorToObj().
2012-02-11 08:29:13 +01:00
Tobias Gunkel
fd4a3501ed SCUMM: fix saving of array _byte_FCE2 2012-02-11 08:29:11 +01:00
Tobias Gunkel
7d4ffb1ec0 SCUMM: fix resetAllSounds() in player_sid
It actually was stopMusic() before and so stopped only the music and not all sounds.
The former implementation is for the o_stopMusic opcode which is not supported directly by ScummVM (it always stops all sounds). It is kept as stopMusic_intern() but is not used anymore.
2012-02-11 08:29:10 +01:00
Tobias Gunkel
00dcc63e8f SCUMM: remove unimplemented und unused method startMusic() in pce and apple2 players 2012-02-11 08:29:08 +01:00
Tobias Gunkel
124e8926ba SCUMM: do not convert a savegame twice 2012-02-11 08:29:07 +01:00
Tobias Gunkel
f22bbc47b4 SCUMM: fix v0 mode handling and actor switching
- 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-11 08:29:05 +01:00
Tobias Gunkel
2f1336cdf0 SCUMM: fix blank sentence line in v0 after cutscenes and remove unused parameter of resetSentence() 2012-02-11 08:29:03 +01:00
segrax
a999aa39ba SCUMM: Re-arrange some things to make it closer to the original 2012-02-11 08:29:02 +01:00
segrax
e331421eae SCUMM: Save the new variables, move the setting of the unknown variable to after the setDirection call 2012-02-11 08:29:00 +01:00
segrax
e2d45467bb SCUMM: improve unknown variable support, add case 0xff to the animateactor opcode 2012-02-11 08:28:59 +01:00
Tobias Gunkel
f2c3675ed1 SCUMM: v0 opcode review
- o_setObjectName has a default value
- o_putActorAtObject can either operate on a fg or bg object

Note: neither the default value nor the bg object opcode (4E) seem to be ever used by any script. So this commit is rather for completeness than for bug-fixing.
2012-02-11 08:28:57 +01:00
Tobias Gunkel
6d4b710c54 SCUMM: fix opcode walkToObject in v0
Before Michael did not develop the film correctly
2012-02-11 08:28:56 +01:00
Tobias Gunkel
0bae642453 SCUMM: 2nd try to fix dungeon door timing
Shorten the timer delay does not work as escaping with a second kid is not possible too. Instead decrease engine speed during script execution.
2012-02-11 08:28:54 +01:00
Tobias Gunkel
4519e56e5c SCUMM: shorten delay for dungeon door closing action
Escaping with only one kid should not be possible anymore.
2012-02-11 08:28:52 +01:00
segrax
cbae5c79b7 SCUMM: Change vars to ints, remove unused variable for now 2012-02-11 08:28:51 +01:00
Tobias Gunkel
347035385e SCUMM: merge object v0 id and type into one object var 2012-02-11 08:28:49 +01:00
Tobias Gunkel
8141511e2f SCUMM: fix ScummEngine_v0::ifEqualActiveObject2Common() parameter name 2012-02-11 08:28:48 +01:00
Tobias Gunkel
c138ef6709 SCUMM: merge _activeObjectNr/_activeObjectType and _cmdObjectNr/_cmdObjectType 2012-02-11 08:28:46 +01:00
Tobias Gunkel
f2309998ff SCUMM: fix debugger for v0 2012-02-11 08:28:44 +01:00
Tobias Gunkel
6ca91a2be5 SCUMM: Fix actor behind man-eating plant issue in v0.
Thanks segra for finding how it works in the original interpreter. The plant is handled specially and 0 is used instead of its y-position.
2012-02-11 08:28:43 +01:00
segrax
b999fe9e26 SCUMM: Add in support in v0 for the unknown variable to o_animateActor 2012-02-11 08:28:41 +01:00
Tobias Gunkel
621017ce65 SCUMM: remove some NOTEs/TODOs
- o5_breakHere() seems to be still needed. For example edna does not manage to walk up the ladder if this is not enabled.
- numLocalObjects seems to be big enough so that < instead of <= can be used. The original interpreter only uses the local ids 0 .. 44 whereas scummvm has _numLocalObjects set to 200.
2012-02-11 08:28:40 +01:00
Tobias Gunkel
ffcd600461 SCUMM: make what-is verb work in v0 again 2012-02-11 08:28:38 +01:00
Tobias Gunkel
4bc726b995 SCUMM: reset object2 in v0 correctly
This fixes the issue that a kid will not enter the front door after opening it with the key.
2012-02-11 08:28:36 +01:00
Tobias Gunkel
e89dd623ef SCUMM: pop stack in v0 if command's object1 and 2 are the same
Otherwise the command will never be removed and the stack overflows
2012-02-11 08:28:35 +01:00
Tobias Gunkel
e14bc5fd6d SCUMM: improve verb and sentence handling
- 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-11 08:28:33 +01:00
Tobias Gunkel
8392d23e6b SCUMM: reset sentence line in v0 if sentence executed 2012-02-11 08:28:32 +01:00
Tobias Gunkel
df07d2db29 SCUMM: fix a regression in v0
Found by segra.
2012-02-11 08:28:30 +01:00
Tobias Gunkel
c010da00a4 SCUMM: click into sentence line in v0 now performs the action 2012-02-11 08:28:29 +01:00
Tobias Gunkel
32945904d5 SCUMM: fix kid selection in v0
The kid names are now displayed in the sentence line (instead of the verb area) as it is done in the original.
2012-02-11 08:28:27 +01:00
Tobias Gunkel
b337823bab SCUMM: fix verb and script handling
- 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-11 08:28:26 +01:00