[Scummvm-cvs-logs] SF.net SVN: scummvm:[40551] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu May 14 09:28:06 CEST 2009


Revision: 40551
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40551&view=rev
Author:   thebluegr
Date:     2009-05-14 07:28:06 +0000 (Thu, 14 May 2009)

Log Message:
-----------
- Enabled the code which puts the text inside the screen if it doesn't fit for all SCI versions
- Removed the check for the mechanism to resume suspended songs (it's no longer used)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/sci.h
    scummvm/trunk/engines/sci/scicore/versions.h

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-14 07:20:26 UTC (rev 40550)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-14 07:28:06 UTC (rev 40551)
@@ -3260,18 +3260,16 @@
 		}
 	}
 
-	if (s->version >= SCI_VERSION_FTU_DISPLAY_COORDS_FUZZY) {
-		if (halign == ALIGN_LEFT)
-			GFX_ASSERT(gfxop_get_text_params(s->gfx_state, font_nr, text, area.width, &area.width, &area.height, 0, NULL, NULL, NULL));
+	// If the text does not fit on the screen, move it to the left and upwards until it does
+	if (halign == ALIGN_LEFT)
+		GFX_ASSERT(gfxop_get_text_params(s->gfx_state, font_nr, text, area.width, &area.width, &area.height, 0, NULL, NULL, NULL));
 
-		// Make the text fit on the screen
-		if (area.x + area.width > 320)
-			area.x += 320 - area.x - area.width; // Plus negative number = subtraction
+	// Make the text fit on the screen
+	if (area.x + area.width > 320)
+		area.x += 320 - area.x - area.width; // Plus negative number = subtraction
 
-		if (area.y + area.height > 200) {
-			area.y += 200 - area.y - area.height; // Plus negative number = subtraction
-		}
-	}
+	if (area.y + area.height > 200)
+		area.y += 200 - area.y - area.height; // Plus negative number = subtraction
 
 	if (gray)
 		color1 = &bg_color;

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2009-05-14 07:20:26 UTC (rev 40550)
+++ scummvm/trunk/engines/sci/sci.h	2009-05-14 07:28:06 UTC (rev 40551)
@@ -94,25 +94,18 @@
 	*/
 	GF_OLDANGLES		= (1 << 1),
 
-	/* Applies to all versions before 0.000.490 (PQ2-new)
-	** When a new song is initialized, we store its state and
-    ** resume it when the new one finishes.  Older versions completely
-    ** clobbered the old songs.
-	*/
-	GF_OLDRESUMESONG	= (1 << 2),
-
 	/* Applies to all versions before 0.000.502
 	** Old SCI versions used to interpret the third DrawPic() parameter inversely,
 	** with the opposite default value (obviously).
 	** Also, they used 15 priority zones from 42 to 200 instead of 14 priority
 	** zones from 42 to 190.
 	*/
-	GF_OLDGFXFUNCTIONS	= (1 << 3),
+	GF_OLDGFXFUNCTIONS	= (1 << 2),
 
 	/* Applies to all versions before 0.000.629
 	** Older SCI versions had simpler code for GetTime()
 	*/
-	GF_OLDGETTIME		= (1 << 4),
+	GF_OLDGETTIME		= (1 << 3),
 
 	// ----------------------------------------------------------------------------
 
@@ -124,14 +117,12 @@
     ** In later SCI1 versions, the argument of lofs[as]
 	** instructions is absolute rather than relative.
 	*/
-	GF_LOFSABSOLUTE		= (1 << 5),
+	GF_LOFSABSOLUTE		= (1 << 4),
 
 	/* Applies to all versions from 1.000.510 onwards
-	** Also in kDisplay(), if the text would not fit on the screen, it
-    ** is moved to the left and upwards until it fits.
-	** Finally, kDoSound() is different than in earlier SCI1 versions.
+	** kDoSound() is different than in earlier SCI1 versions.
 	*/
-	GF_LATESCI1			= (1 << 6)
+	GF_NEWDOSOUND		= (1 << 5)
 };
 
 class SciEngine : public Engine {

Modified: scummvm/trunk/engines/sci/scicore/versions.h
===================================================================
--- scummvm/trunk/engines/sci/scicore/versions.h	2009-05-14 07:20:26 UTC (rev 40550)
+++ scummvm/trunk/engines/sci/scicore/versions.h	2009-05-14 07:28:06 UTC (rev 40551)
@@ -59,13 +59,6 @@
 ** Later versions use an even 90 degree distribution.
 */
 
-#define SCI_VERSION_RESUME_SUSPENDED_SONG SCI_VERSION(0,000,490)
-/* First version (PQ2-new) known to use the different song resumption
-   mechanism -- When a new song is initialized, we store its state and
-   resume it when the new one finishes.  Older versions completely
-   clobbered the old songs.
-*/
-
 #define SCI_VERSION_FTU_NEWER_DRAWPIC_PARAMETERS SCI_VERSION(0,000,502)
 /* Last version known not to do this: 0.000.435
 ** Old SCI versions used to interpret the third DrawPic() parameter inversely,
@@ -88,13 +81,6 @@
    instructions is absolute rather than relative.
 */
 
-#define SCI_VERSION_FTU_DISPLAY_COORDS_FUZZY SCI_VERSION(1,000,510)
-/* First version known to do this: ?
-   In later versions of SCI1 kDisplay(), if the text would not fit on
-   the screen, the text is moved to the left and upwards until it
-   fits.
-*/
-
 #define SCI_VERSION_FTU_DOSOUND_VARIANT_2 SCI_VERSION(1,000,510)
 
 


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