aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-14 18:55:30 +0000
committerFilippos Karapetis2009-05-14 18:55:30 +0000
commit97bdf32a5974ba1a0504156ad2c4eb7403187a15 (patch)
tree54c1e891cb9dcf6ca81b3203eb07e227d9b3168f /engines/sci/engine
parentd5e1ca4630d0f8694f059a06ab06155108a7e435 (diff)
downloadscummvm-rg350-97bdf32a5974ba1a0504156ad2c4eb7403187a15.tar.gz
scummvm-rg350-97bdf32a5974ba1a0504156ad2c4eb7403187a15.tar.bz2
scummvm-rg350-97bdf32a5974ba1a0504156ad2c4eb7403187a15.zip
Added the EGA version of Longbow, and partially reverted my previous commit. SCI1 EGA games should *really* be working now
svn-id: r40565
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/game.cpp4
-rw-r--r--engines/sci/engine/kgraphics.cpp16
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index cb70395ac7..998c06b9c2 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -43,7 +43,7 @@ static int _init_vocabulary(EngineState *s) { // initialize vocabulary and relat
sciprintf("Initializing vocabulary\n");
- if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) && vocab_get_words(s->resmgr, s->_parserWords)) {
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA && vocab_get_words(s->resmgr, s->_parserWords)) {
vocab_get_suffixes(s->resmgr, s->_parserSuffixes);
if (vocab_get_branches(s->resmgr, s->_parserBranches))
// Now build a GNF grammar out of this
@@ -550,7 +550,7 @@ int game_init(EngineState *s) {
s->successor = NULL; // No successor
s->_statusBarText.clear(); // Status bar is blank
s->status_bar_foreground = 0;
- s->status_bar_background = s->resmgr->_sciVersion >= SCI_VERSION_01_VGA ? 255 : 15;
+ s->status_bar_background = (s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) ? 255 : 15;
SystemString *str = &s->sys_strings->strings[SYS_STRING_PARSER_BASE];
str->name = strdup("parser-base");
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 1da0c48f7f..660cc310ba 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -261,7 +261,7 @@ void graph_restore_box(EngineState *s, reg_t handle) {
}
PaletteEntry get_pic_color(EngineState *s, int color) {
- if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA)
return s->ega_colors[color].visual;
if (color == -1 || color == 255) // -1 occurs in Eco Quest 1. Not sure if this is the best approach, but it seems to work
@@ -278,7 +278,7 @@ PaletteEntry get_pic_color(EngineState *s, int color) {
static gfx_color_t graph_map_color(EngineState *s, int color, int priority, int control) {
gfx_color_t retval;
- if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) {
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA) {
retval = s->ega_colors[(color >=0 && color < 16)? color : 0];
gfxop_set_color(s->gfx_state, &retval, (color < 0) ? -1 : retval.visual.r, retval.visual.g, retval.visual.b,
(color == -1) ? 255 : 0, priority, control);
@@ -482,7 +482,7 @@ reg_t kGraph(EngineState *s, int funct_nr, int argc, reg_t *argv) {
case K_GRAPH_GET_COLORS_NR:
- return make_reg(0, (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) ? 0x10 : 0x100);
+ return make_reg(0, s->resmgr->_sciVersion < SCI_VERSION_01_VGA ? 0x10 : 0x100);
break;
case K_GRAPH_DRAW_LINE: {
@@ -2484,7 +2484,7 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
bgcolor.mask = 0;
if (SKPV_OR_ALT(8 + argextra, 255) >= 0) {
- if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA)
bgcolor.visual = get_pic_color(s, SKPV_OR_ALT(8 + argextra, 15));
else
bgcolor.visual = get_pic_color(s, SKPV_OR_ALT(8 + argextra, 255));
@@ -2509,7 +2509,7 @@ reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
black.alpha = 0;
black.control = -1;
black.priority = -1;
- lWhite.visual = get_pic_color(s, (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) ? 15 : 255);
+ lWhite.visual = get_pic_color(s, s->resmgr->_sciVersion < SCI_VERSION_01_VGA ? 15 : 255);
lWhite.mask = GFX_MASK_VISUAL;
lWhite.alpha = 0;
lWhite.priority = -1;
@@ -3178,10 +3178,10 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
temp = KP_SINT(argv[argpt++]);
SCIkdebug(SCIkGRAPHICS, "Display: set_color(%d)\n", temp);
- if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) && temp >= 0 && temp <= 15)
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
color0 = (s->ega_colors[temp]);
else
- if ((s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) && temp >= 0 && temp < 256) {
+ if (s->resmgr->_sciVersion >= SCI_VERSION_01_VGA && temp >= 0 && temp < 256) {
color0.visual = get_pic_color(s, temp);
color0.mask = GFX_MASK_VISUAL;
} else
@@ -3195,7 +3195,7 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
temp = KP_SINT(argv[argpt++]);
SCIkdebug(SCIkGRAPHICS, "Display: set_bg_color(%d)\n", temp);
- if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) && temp >= 0 && temp <= 15)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA && temp >= 0 && temp <= 15)
bg_color = s->ega_colors[temp];
else
if ((s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) && temp >= 0 && temp <= 256) {