[Scummvm-cvs-logs] SF.net SVN: scummvm: [25006] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Fri Jan 5 19:16:06 CET 2007


Revision: 25006
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25006&view=rev
Author:   drmccoy
Date:     2007-01-05 10:16:05 -0800 (Fri, 05 Jan 2007)

Log Message:
-----------
Fixed the loading delay bug I introduced with the playing from CD fix (#1626308)

Modified Paths:
--------------
    scummvm/trunk/engines/gob/scenery.cpp
    scummvm/trunk/engines/gob/scenery.h
    scummvm/trunk/engines/gob/scenery_v1.cpp
    scummvm/trunk/engines/gob/scenery_v2.cpp

Modified: scummvm/trunk/engines/gob/scenery.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery.cpp	2007-01-05 12:11:57 UTC (rev 25005)
+++ scummvm/trunk/engines/gob/scenery.cpp	2007-01-05 18:16:05 UTC (rev 25006)
@@ -32,9 +32,7 @@
 #include "gob/draw.h"
 #include "gob/game.h"
 #include "gob/global.h"
-#include "gob/util.h"
 #include "gob/parse.h"
-#include "gob/cdrom.h"
 
 namespace Gob {
 
@@ -393,13 +391,6 @@
 	uint32 layerPos;
 
 	extData = 0;
-	if (_vm->_cdrom->_cdPlaying) {
-		while (_vm->_cdrom->getTrackPos() != -1)
-		    _vm->_util->longDelay(50);
-
-		_vm->_cdrom->_cdPlaying = false;
-	}
-
 	_vm->_inter->evalExpr(&sceneryIndex);
 	picsCount = _vm->_inter->load16();
 	resId = _vm->_inter->load16();

Modified: scummvm/trunk/engines/gob/scenery.h
===================================================================
--- scummvm/trunk/engines/gob/scenery.h	2007-01-05 12:11:57 UTC (rev 25005)
+++ scummvm/trunk/engines/gob/scenery.h	2007-01-05 18:16:05 UTC (rev 25006)
@@ -129,10 +129,10 @@
 	void freeStatic(int16 index);
 	void renderStatic(int16 scenery, int16 layer);
 	void updateStatic(int16 orderFrom);
-	int16 loadAnim(char search);
 	void freeAnim(int16 animation);
 	void interStoreParams(void);
 
+	virtual int16 loadAnim(char search);
 	virtual void updateAnim(int16 layer, int16 frame, int16 animation,
 			int16 flags, int16 drawDeltaX, int16 drawDeltaY, char doDraw) = 0;
 
@@ -145,6 +145,7 @@
 
 class Scenery_v1 : public Scenery {
 public:
+	virtual int16 loadAnim(char search);
 	virtual void updateAnim(int16 layer, int16 frame, int16 animation,
 			int16 flags, int16 drawDeltaX, int16 drawDeltaY, char doDraw);
 
@@ -154,6 +155,7 @@
 
 class Scenery_v2 : public Scenery_v1 {
 public:
+	virtual int16 loadAnim(char search);
 	virtual void updateAnim(int16 layer, int16 frame, int16 animation,
 			int16 flags, int16 drawDeltaX, int16 drawDeltaY, char doDraw);
 

Modified: scummvm/trunk/engines/gob/scenery_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery_v1.cpp	2007-01-05 12:11:57 UTC (rev 25005)
+++ scummvm/trunk/engines/gob/scenery_v1.cpp	2007-01-05 18:16:05 UTC (rev 25006)
@@ -29,12 +29,25 @@
 #include "gob/anim.h"
 #include "gob/draw.h"
 #include "gob/game.h"
+#include "gob/util.h"
+#include "gob/cdrom.h"
 
 namespace Gob {
 
 Scenery_v1::Scenery_v1(GobEngine *vm) : Scenery(vm) {
 }
 
+int16 Scenery_v1::loadAnim(char search) {
+	if (_vm->_cdrom->_cdPlaying) {
+		while (_vm->_cdrom->getTrackPos() != -1)
+		    _vm->_util->longDelay(50);
+
+		_vm->_cdrom->_cdPlaying = false;
+	}
+
+	return Scenery::loadAnim(search);
+}
+
 // flags & 1 - do capture all area animation is occupying
 // flags & 4 == 0 - calculate animation final size
 // flags & 2 != 0 - don't check with "toRedraw"'s

Modified: scummvm/trunk/engines/gob/scenery_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery_v2.cpp	2007-01-05 12:11:57 UTC (rev 25005)
+++ scummvm/trunk/engines/gob/scenery_v2.cpp	2007-01-05 18:16:05 UTC (rev 25006)
@@ -35,6 +35,10 @@
 Scenery_v2::Scenery_v2(GobEngine *vm) : Scenery_v1(vm) {
 }
 
+int16 Scenery_v2::loadAnim(char search) {
+	return Scenery::loadAnim(search);
+}
+
 // flags & 1 - do capture all area animation is occupying
 // flags & 4 == 0 - calculate animation final size
 // flags & 2 != 0 - don't check with "toRedraw"'s


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