Commit Graph

25728 Commits

Author SHA1 Message Date
Strangerke
928fd72a35 TSAGE: R2R - scene 1337: Implement some missing functions 2012-02-11 11:10:21 +01:00
Willem Jan Palenstijn
784472a669 Revert "SCUMM: revert savegame version to 89"
This reverts commit 65fc7225bb.

Increasing the savegame version on a branch and then decreasing it again
leads to problems with loading current savegames in old commits during
a bisect.
2012-02-11 10:55:55 +01:00
Tobias Gunkel
65fc7225bb SCUMM: revert savegame version to 89
Previous versions 89-92 are merged into version 89.
2012-02-11 08:36:38 +01:00
Tobias Gunkel
0d5b03d8da SCUMM: remove unnecessary cast to Actor_v0 2012-02-11 08:36:37 +01:00
Tobias Gunkel
67d67ec4f6 SCUMM: replaced A with a0 to avoid upper-case local vars 2012-02-11 08:36:35 +01:00
Tobias Gunkel
4922055063 SCUMM: cleanup and separation of objIsActor()/objToActor()/actorToObj() for v0 and other engines 2012-02-11 08:36:27 +01:00
Tobias Gunkel
0aabf95cb8 SCUMM: match style-guide, add missing spaces between some "if ()", "for ()" 2012-02-11 08:30:15 +01:00
Tobias Gunkel
ef56bd6de2 SCUMM: add support for diagonal walking between boxes (e.g. used for meteor opening scene) 2012-02-11 08:30:14 +01:00
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