Commit Graph

76 Commits

Author SHA1 Message Date
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
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
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
347035385e SCUMM: merge object v0 id and type into one object var 2012-02-11 08:28:49 +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
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
df07d2db29 SCUMM: fix a regression in v0
Found by segra.
2012-02-11 08:28:30 +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
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
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
Eugene Sandulenko
0f711c4a2e SCUMM: Fix warnings 2011-11-03 01:34:53 +00:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Max Horn
9ec64a66fe SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its _resource member 2011-05-13 14:48:01 +02:00
Max Horn
c02420df43 SCUMM: Add a Resource class, refactor res code around it 2011-05-13 11:47:13 +02:00
Max Horn
75b9deb185 SCUMM: Get rid of the MemBlkHeader hack
This uncovered at least one potentially serious bug in the inventory
code, which still needs to be investigated and fixed.
2011-05-13 11:47:10 +02:00
Max Horn
45e65d7ea0 SCUMM: Refactor how resource (types) are srepresented
Previously, we had a couple of arrays of size N (where N = number of
resource types), one for each attribute of a resource type (such as as
the number of resources of that type.

Now, we have one array of size N, whose elements are a record
aggregating all the attributes of each resource type.
2011-05-13 11:47:08 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
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-04-12 16:53:15 +02:00
Travis Howell
4f0cc6a435 SCUMM: Add patch #3093541 - MMC64: Actor Walk / Object Fix.
svn-id: r53806
2010-10-25 08:03:55 +00:00
Max Horn
3b21db1618 SCUMM: Fix parts of bug #3087898 (SCUMM: Code analysis warnings)
svn-id: r53567
2010-10-18 16:00:07 +00:00
Torbjörn Andersson
c91a07229a JANITORIAL: Removed most punctuation at end of warning() and error()
Our warning() and error() functions always add an exclamation mark
to the end of the message anyway.

svn-id: r52791
2010-09-18 10:55:16 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Travis Howell
8bb99f4571 Fix object names in PCE version of Loom.
svn-id: r45346
2009-10-23 12:50:51 +00:00
Travis Howell
4350f7b8c0 Fix objects structure and object scripts in PCE version of Loom.
svn-id: r45335
2009-10-22 11:33:05 +00:00
Torbjörn Andersson
b92477f6ab Fixed GCC warnings.
svn-id: r42739
2009-07-25 06:55:28 +00:00
Travis Howell
c02ad3b7bf Add patch #2821100 - MM C64 Objects / Verb fixes, with minor clean up applied.
svn-id: r42737
2009-07-25 06:27:41 +00:00
Max Horn
c4f6295330 Fixed some more warnings observed on buildbot
svn-id: r42010
2009-07-01 20:51:34 +00:00
Torbjörn Andersson
0999534749 The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
2009-05-31 10:02:16 +00:00
Max Horn
6f4b567124 SCUMM: Split intern.h into multiple headers
svn-id: r39567
2009-03-20 16:33:58 +00:00
Travis Howell
9ffd6a8768 Fix regression in AppleII/C64 versions of Maniac Mansion.
svn-id: r38999
2009-03-01 03:45:42 +00:00
Max Horn
c96b4f692a SCUMM: Turned two former warnings into errors -- I never got reports on this warnings, with some luck we'll never get reports on the errors, too. If we get them, I'll deal with them :)
svn-id: r35292
2008-12-09 19:53:01 +00:00
Max Horn
618e7f3e31 Fix for bug #1917981: Game crash when finishing Indy3 demo. At the same time, added a new paranoia check
svn-id: r34635
2008-09-23 11:43:57 +00:00
Jordi Vilalta Prat
38a8aa516e Allow static and dynamic plugins to be used at the same time
svn-id: r31888
2008-05-06 03:00:26 +00:00
Max Horn
98a851d25e cleanup
svn-id: r31192
2008-03-19 10:17:29 +00:00
Torbjörn Andersson
aa38a8eb96 Fixed regression that would cause ScummEngine_v80he to leak polygon slots at an
alarming rate.

svn-id: r30249
2008-01-05 17:43:33 +00:00
Travis Howell
410a4a974e Enable Windows version of early HE games by default, to match already enabled 3DO/DOS/Macintosh versions of early HE games. Adding only the minimum code required for HE70 games.
svn-id: r30011
2007-12-27 11:40:29 +00:00
Nicola Mettifogo
258901bab9 Merged common/stdafx.h into common/scummsys.h. All referencing files have been updated.
svn-id: r28966
2007-09-19 08:40:12 +00:00
Max Horn
4cc9d17c34 Adding various FIXME comments to bogus (non-self-explanatory) existing FIXME comments; and some other related cleanup
svn-id: r28890
2007-09-11 09:20:39 +00:00
Max Horn
6419311a2e Added some comments
svn-id: r28886
2007-09-10 13:16:06 +00:00
Max Horn
0cccbb29d6 Some cleanup (yay for whomever had the brilliant idea to let SVN work over HTTPS and hence through proxies&firewalls :)
svn-id: r28877
2007-09-08 11:15:27 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Max Horn
aba0cd04d6 SCUMM: got rid of the _bompActorPalettePtr member var (which was only used as a hidden param to drawBomp); turned drawBomp into a regular function (used to be a ScummEngine member method)
svn-id: r26045
2007-03-10 00:34:20 +00:00
Travis Howell
8e70329ce3 Fix level selection in PC Engine version of Loom.
svn-id: r25954
2007-03-03 23:02:54 +00:00
Travis Howell
b0fea397ab Allow PC Engine version of Loom to at least start up.
svn-id: r25951
2007-03-03 12:59:48 +00:00
Travis Howell
28408d8b7b Rename C64 engine class, since it is been used by Apple II and Commodore 64 versions now.
svn-id: r25850
2007-02-25 11:38:19 +00:00
Max Horn
dc5ef8425b Introduced V12_X_SHIFT / V12_Y_SHIFT
svn-id: r25611
2007-02-15 18:12:29 +00:00
Max Horn
be052be462 Rewrote the actor walk code for SCUMM V0-V2 games: Now it uses the C64 character coordinates internally, not pixel coordinates. This should fix some walk bugs, but also might cause some regressions. Watch out
svn-id: r25370
2007-02-04 01:24:43 +00:00
Max Horn
4ce7b74085 Changed ScummEngine::_actors from an Actor array to a an array of Actor points (i.e. indirection)
svn-id: r24922
2006-12-25 15:03:36 +00:00