aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorEugene Sandulenko2006-05-25 19:46:28 +0000
committerEugene Sandulenko2006-05-25 19:46:28 +0000
commit4859de9ae763defc237434650ff6ab7a08319f9b (patch)
tree597531a21a003fb8febcfed2f9e859997df77801 /engines/agi
parent14774d17604be444471dbb1a92e1ee3b7340f858 (diff)
downloadscummvm-rg350-4859de9ae763defc237434650ff6ab7a08319f9b.tar.gz
scummvm-rg350-4859de9ae763defc237434650ff6ab7a08319f9b.tar.bz2
scummvm-rg350-4859de9ae763defc237434650ff6ab7a08319f9b.zip
Made CGA rendering, EGA/VGA palette selectable via render_mode
svn-id: r22632
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.cpp3
-rw-r--r--engines/agi/agi.h3
-rw-r--r--engines/agi/cycle.cpp2
-rw-r--r--engines/agi/graphics.cpp5
4 files changed, 8 insertions, 5 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 5342b6b098..1ce4dd03a0 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -479,6 +479,9 @@ void AgiEngine::initialize() {
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();
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 3d61c0e990..f3e213532f 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -202,8 +202,7 @@ struct agi_options {
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 */
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp
index 7b741a7f03..019f952ea7 100644
--- a/engines/agi/cycle.cpp
+++ b/engines/agi/cycle.cpp
@@ -361,7 +361,7 @@ static int play_game() {
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++)
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index e6cb046f88..c9fca743fd 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -382,6 +382,7 @@ void gfx_putblock(int x1, int y1, int x2, int y2) {
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 @@ static const byte mouseCursorArrow[] = {
* @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 @@ int deinit_machine() {
* @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)