2560 Commits

Author SHA1 Message Date
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
Tobias Gunkel
c16ef940a1 SCUMM: make START-button in mm c64 kid selection screen work again 2012-02-11 08:28:24 +01:00
Tobias Gunkel
de0b5f7674 SCUMM: use command stack and SentenceTab in mm c64
- 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-11 08:28:22 +01:00
Tobias Gunkel
d8b435917d SCUMM: mm c64 cleanup 2012-02-11 08:28:21 +01:00
Tobias Gunkel
706b8cf1c5 SCUMM: replace verb, prep and currentMode values with symbolic constants 2012-02-11 08:28:19 +01:00
Tobias Gunkel
b01f601d7e SCUMM: use constants for c64 actor miscflags 2012-02-11 08:28:18 +01:00
Tobias Gunkel
6b5abf6919 SCUMM: selecting inventory objects and inventory scrolling works again 2012-02-11 08:28:16 +01:00
Tobias Gunkel
1c32000a00 SCUMM: start handling object type and id correctly in mm c64
- 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-11 08:28:14 +01:00
Tobias Gunkel
c69a52853c SCUMM: remove unneeded verbPrep() calls 2012-02-11 08:28:13 +01:00
Tobias Gunkel
a709a42319 SCUMM: fix ScummEngine_v0::o_stopCurrentScript() 2012-02-11 08:02:34 +01:00
Tobias Gunkel
a79f224c23 SCUMM: changed handling of _activeInventory/_activeActor to _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-11 08:02:32 +01:00
Tobias Gunkel
c9ae5f3838 SCUMM: Fix pickupObject() 2012-02-11 08:02:30 +01:00
Tobias Gunkel
3e2012483d SCUMM: make verbs working better 2012-02-11 08:02:29 +01:00
Tobias Gunkel
1e7ea7f95e SCUMM: Fix bug with tracker ID 3072094
MANIAC C64: Bug while getting the stamps from the parcel - ID: 3072094
MMC64: use stamps with envelope - ID: 3095595
2012-02-11 08:02:27 +01:00
Tobias Gunkel
05f853edd7 SCUMM: Fix meteor actor index
- Now the correct actor name is shown with "give ... to meteor". Formerly the name was "".
- Add actor names that do not have a string assigned
2012-02-11 08:02:25 +01:00
Tobias Gunkel
2acd5a8239 SCUMM: Fix sound playback if fast-mode is on
Sounds are played that fast in fast-mode that the queue gets stuck.
This is just a workaround and only fixes the symptoms. Check the queue handling for a correct fix.
2012-02-11 08:02:23 +01:00
Tarek Soliman
edc5249772 JANITORIAL: Fix template definition whitespace 2012-02-10 21:17:27 -06:00
Eugene Sandulenko
0deea6fbf8 Merge pull request #177 from BenCastricum/5db023646a8c685469bfe9dc551a282f8240ae04
SCUMM: Use regular detection algorithms for FMTOWNS demos.
2012-02-10 03:46:50 -08:00
Travis Howell
0ceeee8148 SCUMM: Add script number differences in SCUMM V0, for two work arounds in Maniac Mansion. 2012-01-29 17:07:38 +11:00
Ben Castricum
5db023646a SCUMM: Use regular detection algorithms for FMTOWNS demos. 2012-01-26 18:06:10 +01:00
athrxx
ea275d2cda SCUMM: add missing free() 2012-01-15 13:36:58 +01:00
Eugene Sandulenko
e739846310 Merge pull request #166 from BenCastricum/master
SCUMM: Added detection for more Dutch HE demos
2012-01-15 02:54:44 -08:00
Torbjörn Andersson
28d5922cca SCUMM: Fix workaround for Dig spider lair sound glitch
The soundKludge() function assumes there are always 8 parameters
for Digital iMUSE script commands.
2012-01-14 09:25:52 +01:00
Ben Castricum
1a16c5ceb4 SCUMM: Recognize platform on win version of dutch puttrace demo 2012-01-08 20:30:39 +01:00
Torbjörn Andersson
209012a88e SCUMM: Work around script bug in The Dig
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.
2012-01-08 20:11:22 +01:00
Ben Castricum
7a82f513a3 SCUMM: Recognize Mac version of dutch putttime demo 2012-01-08 20:05:49 +01:00
Ben Castricum
e750c9a0b9 SCUMM: Recognize Windows as platform for pajama2 demo 2012-01-08 18:02:00 +01:00
Ben Castricum
b6bc747672 SCUMM: Add support for 2 freddi3 Mac/Dutch demos 2012-01-08 17:52:21 +01:00
Ben Castricum
e3b93672d5 SCUMM: Correctly recognize platform on freddi2 dutch demo 2012-01-08 15:05:50 +01:00
Matan Bareket
655d719bde SCUMM: Add three Hebrew HE games
Freddi Fish 3: The Case of the Stolen Conch Shell,
Putt-Putt Joins the Circus,
Pajama Sam 2: Thunder and Lightning Aren't so Frightening
2012-01-07 14:55:34 -05:00
Ben Castricum
5af464243a SCUMM: Add support for 2 Dutch/Mac spyfox demos (1 MD5, 1 filename pattern) 2012-01-01 21:21:56 +01:00
Ben Castricum
23a5bc61af SCUMM: Don't hide scumm detector debug message for certain cases 2012-01-01 17:14:29 +01:00
Max Horn
a589f3d12f SCUMM: Fix warning due to implicit conversion to int 2011-12-28 23:13:21 +01:00
Johannes Schickel
0117fc415e SCUMM: Make SampleBuffer::write non-virtual to silence a g++ warning.
No class inherits from SampleBuffer, thus it should be safe to do so.
2011-12-26 21:03:51 +01:00
Johannes Schickel
95cabb0ffd SCUMM: Add a difficulty selection dialog for Loom FM-Towns.
It is in spirit of the DOS version's selection dialog, but it has the
description above the buttons instead of below it.
2011-12-26 15:25:41 +01:00
Eugene Sandulenko
70b9886340 Merge pull request #150 from tobigun/player_appleII
SCUMM: Add Apple-II sound player support
2011-12-26 00:52:52 -08:00
Tobias Gunkel
5d6710ebfd SCUMM: add player_apple2.cpp to project files
Seems as if the iphone project files have to be updated separately.
2011-12-24 14:30:57 +01:00
Tobias Gunkel
854928f09a SCUMM: Rename player_appleII.* -> player_apple2.* to have the filenames lower case 2011-12-24 14:29:06 +01:00
Tobias Gunkel
c91d67a663 SCUMM: Remove assert.h include from player_appleII 2011-12-24 01:27:10 +01:00
Travis Howell
3241d34a32 Add patch #3463338 - Detect Macintosh demo of Pajama Sam 1. 2011-12-23 10:39:42 +11:00
Tobias Gunkel
8b77f18c9e SCUMM: Revert now obsolete separation of state variables in player_appleII 2011-12-22 12:08:30 +01:00
Tobias Gunkel
12103981b7 SCUMM: Remove player_appleII logging 2011-12-22 12:08:29 +01:00
Tobias Gunkel
f7a869ccc5 SCUMM: Optimize player_appleII sample buffer
The AppleII sound player works in two phases: writing samples to the
sample buffer (sample
generation) or reading samples from the buffer and passing it to ScummVM's
output callback.
The sample buffer is read completely in the reading phase so the entries
of the already read samples of the buffer can be reused again during the
next write phase.
2011-12-22 12:08:28 +01:00
Tobias Gunkel
3a9f2c5f5b SCUMM: Use finer grained sound updates for player_appleII
This reduces the needed buffer size for the biggest type4 sound from 170kB to only 2 bytes
2011-12-22 12:08:28 +01:00