[Scummvm-cvs-logs] SF.net SVN: scummvm: [22632] scummvm/trunk/engines/agi

sev at users.sourceforge.net sev at users.sourceforge.net
Thu May 25 12:47:15 CEST 2006


Revision: 22632
Author:   sev
Date:     2006-05-25 12:46:28 -0700 (Thu, 25 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22632&view=rev

Log Message:
-----------
Made CGA rendering, EGA/VGA palette selectable via render_mode

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/cycle.cpp
    scummvm/trunk/engines/agi/graphics.cpp
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2006-05-25 19:43:33 UTC (rev 22631)
+++ scummvm/trunk/engines/agi/agi.cpp	2006-05-25 19:46:28 UTC (rev 22632)
@@ -479,6 +479,9 @@
 	opt.hires = true;
 	opt.soundemu = SOUND_EMU_NONE;
 
+	if (ConfMan.hasKey("render_mode"))
+		opt.renderMode = Common::parseRenderMode(ConfMan.get("render_mode").c_str());
+
 	_console = new Console(this);
 
 	init_machine();

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2006-05-25 19:43:33 UTC (rev 22631)
+++ scummvm/trunk/engines/agi/agi.h	2006-05-25 19:46:28 UTC (rev 22632)
@@ -202,8 +202,7 @@
 	int amiga;		/**< enable Amiga mode */
 	int fullscreen;		/**< use full screen mode if available */
 	int nosound;		/**< disable sound */
-	int egapal;		/**< use PC EGA palette */
-	int cgaemu;		/**< use PC CGA emulation */
+	Common::RenderMode renderMode;
 	int hires;		/**< use hi-res pictures */
 	int soundemu;		/**< sound emulation mode */
 	int agimouse;		/**< AGI Mouse 1.0 emulation */

Modified: scummvm/trunk/engines/agi/cycle.cpp
===================================================================
--- scummvm/trunk/engines/agi/cycle.cpp	2006-05-25 19:43:33 UTC (rev 22631)
+++ scummvm/trunk/engines/agi/cycle.cpp	2006-05-25 19:46:28 UTC (rev 22632)
@@ -361,7 +361,7 @@
 int run_game() {
 	int i, ec = err_OK;
 
-	if (opt.cgaemu)
+	if (opt.renderMode == Common::kRenderCGA)
 		opt.hires = 0;
 
 	for (i = 0; i < MAX_DIRS; i++)

Modified: scummvm/trunk/engines/agi/graphics.cpp
===================================================================
--- scummvm/trunk/engines/agi/graphics.cpp	2006-05-25 19:43:33 UTC (rev 22631)
+++ scummvm/trunk/engines/agi/graphics.cpp	2006-05-25 19:46:28 UTC (rev 22632)
@@ -382,6 +382,7 @@
 		y2 = GFX_HEIGHT - 1;
 
 	g_system->copyRectToScreen(screen + y1 * 320 + x1, 320, x1, y1, x2 - x1 + 1, y2 - y1 + 1);
+	//g_system->copyRectToScreen(screen, 320, 0, 0, 320, 200);
 }
 
 static const byte mouseCursorArrow[] = {
@@ -401,7 +402,7 @@
  * @see deinit_video()
  */
 int init_video() {
-	if (opt.egapal)
+	if (opt.renderMode == Common::kRenderEGA)
 		init_palette(ega_palette);
 	else
 		init_palette(new_palette);
@@ -468,7 +469,7 @@
  * @param p pointer to the row start in the AGI screen
  */
 void put_pixels_a(int x, int y, int n, uint8 *p) {
-	if (opt.cgaemu) {
+	if (opt.renderMode == Common::kRenderCGA) {
 		for (x *= 2; n--; p++, x += 2) {
 			register uint16 q = (cga_map[(*p & 0xf0) >> 4] << 4) | cga_map[*p & 0x0f];
 			if (debug_.priority)


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