diff options
author | James Brown | 2002-03-07 04:29:24 +0000 |
---|---|---|
committer | James Brown | 2002-03-07 04:29:24 +0000 |
commit | aea131d95b18df2556d5d5f2c8971ab5650c093e (patch) | |
tree | 9615ee9d123eaa540ea5c1851f6a0ee981fdaff8 | |
parent | 49b7294423b56ed125a7b947cc432ddc48e8635c (diff) | |
download | scummvm-rg350-aea131d95b18df2556d5d5f2c8971ab5650c093e.tar.gz scummvm-rg350-aea131d95b18df2556d5d5f2c8971ab5650c093e.tar.bz2 scummvm-rg350-aea131d95b18df2556d5d5f2c8971ab5650c093e.zip |
Fixes to Sam and Max subgames.
Add 'insane.cpp' to VC++ project.
svn-id: r3675
-rw-r--r-- | script_v2.cpp | 30 | ||||
-rw-r--r-- | scumm.h | 3 | ||||
-rw-r--r-- | scummvm.dsp | 6 | ||||
-rw-r--r-- | string.cpp | 5 |
4 files changed, 33 insertions, 11 deletions
diff --git a/script_v2.cpp b/script_v2.cpp index 11591fee53..710811164c 100644 --- a/script_v2.cpp +++ b/script_v2.cpp @@ -151,7 +151,7 @@ void Scumm::setupOpcodes2() { &Scumm::o6_setObjectXY, &Scumm::o6_drawBlastObject, /* 64 */ - &Scumm::o6_invalid, + &Scumm::o6_samGame, &Scumm::o6_stopObjectCode, &Scumm::o6_stopObjectCode, &Scumm::o6_endCutscene, @@ -673,7 +673,17 @@ void Scumm::setupOpcodes2() { _opcodes = opcode_list; _opcodes_lookup = opcode_lookup; } +void Scumm::o6_samGame() { + int a, b, c, d; + // Sam and Max game opcode + d = pop(); + c = pop(); + b = pop(); + a = pop(); + + // sub_274EF(a, b, c, d); +} int Scumm::popRoomAndObj(int *room) { int obj; @@ -2569,10 +2579,6 @@ void Scumm::o6_miscOps() { unkMiscOp9(); break; - case 124: /* samnmax */ - warning("o6_miscOps: _saveSound=%d", args[1]); - break; - case 104: /* samnmax */ nukeFlObjects(args[2], args[3]); break; @@ -2643,7 +2649,12 @@ void Scumm::o6_miscOps() { break; case 123: - error("stub o6_miscOps_123(%d,%d)", args[1], args[2]); + swapPalColors(args[1],args[2]); + break; + + case 124: /* samnmax */ + warning("o6_miscOps: _saveSound=%d", args[1]); + _saveSound = args[1]; break; default: @@ -2658,8 +2669,13 @@ void Scumm::o6_kernelFunction() { Actor *a; getStackList(args,sizeof(args)/sizeof(args[0])); - + switch(args[0]) { + case 113: + // Do something to [1] x [2] (x/y) + warning("o6_kernelFunction: stub113(%d,%d)", args[1], args[2]); + push(0); + break; case 115: warning("o6_kernelFunction: stub115(%d,%d)", args[1], args[2]); push(0); @@ -857,7 +857,7 @@ struct Scumm { byte OF_OWNER_ROOM; - int _gameTempo; + int _gameTempo, _saveSound; int _lastLoadedRoom; int _roomResource; byte _encbyte; @@ -1414,6 +1414,7 @@ struct Scumm { void o5_oldRoomEffect(); void o5_pickupObjectOld(); + void o6_samGame(); void o6_pushByte(); void o6_pushWord(); void o6_pushByteVar(); diff --git a/scummvm.dsp b/scummvm.dsp index d17d16be2e..8e42a52840 100644 --- a/scummvm.dsp +++ b/scummvm.dsp @@ -42,7 +42,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /G6 /Zp8 /MD /W3 /GX- /O2 /Ob2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# ADD CPP /nologo /G6 /MD /W3 /O2 /Ob2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x41d /d "NDEBUG"
# ADD RSC /l 0x41d /d "NDEBUG"
@@ -173,6 +173,10 @@ SOURCE=.\gui.cpp # End Source File
# Begin Source File
+SOURCE=.\insane.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\object.cpp
!IF "$(CFG)" == "scummvm - Win32 Release"
diff --git a/string.cpp b/string.cpp index 8bdeb308cf..e30a5b3f77 100644 --- a/string.cpp +++ b/string.cpp @@ -165,10 +165,11 @@ void Scumm::unkMessage1() { a = buffer[2] | (buffer[3]<<8) | (buffer[6]<<16) | (buffer[7]<<24); b = buffer[10] | (buffer[11]<<8) | (buffer[14]<<16) | (buffer[15]<<24); - talkSound(a,b,1); + if (_saveSound != 1) + talkSound(a,b,1); } -// warning("unkMessage1(\"%s\")", buf); + warning("unkMessage1(\"%s\")", buffer); } void Scumm::unkMessage2() { |