[Scummvm-cvs-logs] SF.net SVN: scummvm:[45957] scummvm/trunk/engines/teenagent

megath at users.sourceforge.net megath at users.sourceforge.net
Tue Nov 17 21:47:03 CET 2009


Revision: 45957
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45957&view=rev
Author:   megath
Date:     2009-11-17 20:47:03 +0000 (Tue, 17 Nov 2009)

Log Message:
-----------
found strange hack about room 7 and overlay.

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/scene.cpp
    scummvm/trunk/engines/teenagent/surface.cpp
    scummvm/trunk/engines/teenagent/surface.h
    scummvm/trunk/engines/teenagent/teenagent.cpp

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2009-11-17 16:26:40 UTC (rev 45956)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2009-11-17 20:47:03 UTC (rev 45957)
@@ -430,7 +430,19 @@
 	setPalette(_system, palette, 4);
 
 	Common::SeekableReadStream *stream = res->on.getStream(id);
-	on.load(stream, Surface::kTypeOn);
+	int sub_hack = 0;
+	if (id == 7) { //something patched in the captains room
+		switch(res->dseg.get_byte(0xdbe6)) {
+			case 2: 
+				break;
+			case 1:
+				sub_hack = 1;
+				break;
+			default:
+				sub_hack = 2;
+		}
+	}
+	on.load(stream, Surface::kTypeOn, sub_hack);
 	delete stream;
 
 	loadOns();

Modified: scummvm/trunk/engines/teenagent/surface.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/surface.cpp	2009-11-17 16:26:40 UTC (rev 45956)
+++ scummvm/trunk/engines/teenagent/surface.cpp	2009-11-17 20:47:03 UTC (rev 45957)
@@ -33,7 +33,7 @@
 	memset(flags, 0, sizeof(flags));
 }
 
-void Surface::load(Common::SeekableReadStream *stream, Type type) {
+void Surface::load(Common::SeekableReadStream *stream, Type type, int sub_hack) {
 	//debug(0, "load()");
 	free();
 
@@ -47,6 +47,8 @@
 
 		for (byte i = 0; i < fn; ++i) {
 			flags[i] = stream->readUint16LE();
+			if (i == 0)
+				flags[i] -= sub_hack;
 			debug(0, "flags[%u] = %u (0x%04x)", i, flags[i], flags[i]);
 		}
 	}

Modified: scummvm/trunk/engines/teenagent/surface.h
===================================================================
--- scummvm/trunk/engines/teenagent/surface.h	2009-11-17 16:26:40 UTC (rev 45956)
+++ scummvm/trunk/engines/teenagent/surface.h	2009-11-17 20:47:03 UTC (rev 45957)
@@ -39,7 +39,7 @@
 	uint16 x, y;
 
 	Surface();
-	void load(Common::SeekableReadStream *stream, Type type);
+	void load(Common::SeekableReadStream *stream, Type type, int sub_hack = 0);
 	Common::Rect render(Graphics::Surface *surface, int dx = 0, int dy = 0, bool mirror = false, Common::Rect src_rect = Common::Rect());
 
 	bool empty() const { return pixels == NULL; }

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2009-11-17 16:26:40 UTC (rev 45956)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2009-11-17 20:47:03 UTC (rev 45957)
@@ -323,7 +323,7 @@
 		}
 
 		_system->showMouse(scene->getMessage().empty());
-		uint32 f0 = frame * 10 / 25, f1 = (frame + 1) * 10 / 25;
+		uint32 f0 = frame * 12 / 25, f1 = (frame + 1) * 12 / 25;
 		if (f0 != f1) {
 			bool b = scene->render(_system);
 			scene_busy = b;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list