[Scummvm-cvs-logs] scummvm master -> 88e2673272b26c3026ad7ffc3f1977c5eb3ed546

bluegr bluegr at gmail.com
Fri Feb 5 22:53:12 CET 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7ffc4f9816 SCI: Silence false positive warning in MSVC
88e2673272 SCI: Clean up the op_infoToa and op_superToa SCI3 opcodes


Commit: 7ffc4f9816af09346c60363af249df7a769e1ac7
    https://github.com/scummvm/scummvm/commit/7ffc4f9816af09346c60363af249df7a769e1ac7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-02-05T23:50:53+02:00

Commit Message:
SCI: Silence false positive warning in MSVC

Changed paths:
    engines/sci/engine/savegame.cpp



diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 481ae75..165c147 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -784,7 +784,7 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) {
 	// by SCI engine
 
 	for (int i = 0; i < ARRAYSIZE(_cyclers); ++i) {
-		PalCycler *cycler;
+		PalCycler *cycler = nullptr;
 
 		bool hasCycler;
 		if (s.isSaving()) {


Commit: 88e2673272b26c3026ad7ffc3f1977c5eb3ed546
    https://github.com/scummvm/scummvm/commit/88e2673272b26c3026ad7ffc3f1977c5eb3ed546
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-02-05T23:52:18+02:00

Commit Message:
SCI: Clean up the op_infoToa and op_superToa SCI3 opcodes

Changed paths:
    engines/sci/engine/vm.cpp
    engines/sci/engine/vm.h



diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 6f02c96..3729fc5 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -974,21 +974,24 @@ void run_vm(EngineState *s) {
 
 			break;
 
-		case 0x26: // (38)
-		case 0x27: // (39)
-			if (getSciVersion() == SCI_VERSION_3) {
-				if (extOpcode == 0x4c)
-					s->r_acc = obj->getInfoSelector();
-				else if (extOpcode == 0x4d)
-					PUSH32(obj->getInfoSelector());
-				else if (extOpcode == 0x4e)
-					s->r_acc = obj->getSuperClassSelector();	// TODO: is this correct?
-				// TODO: There are also opcodes in
-				// here to get the superclass, and possibly the species too.
-				else
-					error("Dummy opcode 0x%x called", opcode);	// should never happen
-			} else
+		case op_infoToa: // (38)
+			if (getSciVersion() < SCI_VERSION_3)
 				error("Dummy opcode 0x%x called", opcode);	// should never happen
+
+			if (!(extOpcode & 1))
+				s->r_acc = obj->getInfoSelector();
+			else
+				PUSH32(obj->getInfoSelector());
+			break;
+
+		case op_superToa: // (39)
+			if (getSciVersion() < SCI_VERSION_3)
+				error("Dummy opcode 0x%x called", opcode);	// should never happen
+
+			if (!(extOpcode & 1))
+				s->r_acc = obj->getSuperClassSelector();
+			else
+				PUSH32(obj->getSuperClassSelector());
 			break;
 
 		case op_class: // 0x28 (40)
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index cf65803..514bf58 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -176,8 +176,8 @@ enum SciOpcodes {
 	op_calle    = 0x23,	// 035
 	op_ret      = 0x24,	// 036
 	op_send     = 0x25,	// 037
-	// dummy      0x26,	// 038
-	// dummy      0x27,	// 039
+	op_infoToa  = 0x26,	// 038
+	op_superToa = 0x27,	// 039
 	op_class    = 0x28,	// 040
 	// dummy      0x29,	// 041
 	op_self     = 0x2a,	// 042






More information about the Scummvm-git-logs mailing list