Commit Graph

51389 Commits

Author SHA1 Message Date
Robert Crossfield
6c40b3f36f SCUMM: Remove old code 2012-02-11 08:30:12 +01:00
Robert Crossfield
163f698cf0 SCUMM: Few changes for animations, dont move while turning & not necessary to call animateactor during startanimactor 2012-02-11 08:30:10 +01:00
Tobias Gunkel
9dd6105ce6 SCUMM: replace "c64" with "v0" when it applies to both C64 and AppleII v0 versions
In addition some routines (e.g. the gfx ones) that are even used in v1.
2012-02-11 08:30:08 +01:00
Tobias Gunkel
8d3b272939 SCUMM: save complete v0 state and initialize actors correctly 2012-02-11 08:30:07 +01:00
Tobias Gunkel
5d3e1dd0dc SCUMM: remove the temporary variable _limb_current 2012-02-11 08:30:05 +01:00
Tobias Gunkel
daff6f36ae SCUMM: _currentLights is v0 only 2012-02-11 08:30:03 +01:00
Tobias Gunkel
e14e4ab3b0 SCUMM: adjust to coding style-guide 2012-02-11 08:30:02 +01:00
Tobias Gunkel
434aaaf0c0 SCUMM: fix gcc compiler warnings 2012-02-11 08:30:00 +01:00
Robert Crossfield
a8008e0a71 SCUMM: Fix if there is no costume set 2012-02-11 08:29:59 +01:00
Robert Crossfield
92908bfc4b SCUMM: Fix ActorStop, V0 needs to set the stop direction 2012-02-11 08:29:57 +01:00
Tobias Gunkel
2b657283d7 SCUMM: forward savegame version is needed due to previous savegame changes) 2012-02-11 08:29:55 +01:00
Tobias Gunkel
91bdf9a3f5 SCUMM: fix cutscenes by reintroduction of freeze modes 2012-02-11 08:29:54 +01:00
Tobias Gunkel
984c2a05e4 SCUMM: replace o_beginOverride() with o2_beginOverride()
In contrast to the comment in o_beginOverride() VAR(VAR_OVERRIDE) is not set in the disassembly. In addition the cutscene stack-pointer is always 0 as this feature is not used in v0. This makes o_beginOverride() work the same way o2_beginOverride() and so it is not needed anymore.

Note that fetchScriptWord() was changed to ScummEngine::fetchScriptWord() in o2_beginOverride() as ScummEngine_v0::fetchScriptWord() only fetches a byte.
As we need two bytes here we have to use ScummEngine::fetchScriptWord().
2012-02-11 08:29:52 +01:00
Tobias Gunkel
d4ddd2ca84 SCUMM: introduce constants for _userState for cleaner and easier to understand code 2012-02-11 08:29:51 +01:00
Tobias Gunkel
f5faa4554d SCUMM: isPlayer() is not supported by engine v0 2012-02-11 08:29:49 +01:00
Tobias Gunkel
e33d41035c SCUMM: scumm_vars 14 to 16 are not handled specially in v0
Reading the manuscript will be fixed by this.
2012-02-11 08:29:47 +01:00
Tobias Gunkel
cc68a59856 SCUMM: fix diagonal walking in at least MM v0
The comparison "ABS((int)(deltaXFactor >> 16)) > _speedx)" does not work as "deltaXFactor >> 16" will clear the fractional part of deltaXFactor. As a result the deltaXFactor might be bigger than (_speedx<<16) and the actor moves faster than he should.
2012-02-11 08:29:46 +01:00
Tobias Gunkel
7d409dd15f SCUMM: in v0 do not allow an inventory item as 2nd object of a give-to command 2012-02-11 08:29:44 +01:00
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