[Scummvm-cvs-logs] SF.net SVN: scummvm:[40564] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu May 14 19:50:09 CEST 2009
Revision: 40564
http://scummvm.svn.sourceforge.net/scummvm/?rev=40564&view=rev
Author: thebluegr
Date: 2009-05-14 17:50:09 +0000 (Thu, 14 May 2009)
Log Message:
-----------
- Added a new game flag to distinguish SCI1 EGA versions
- Fixed the wrong detected versions of Laura Bow 2
- Changed some code regarding the resource loader of Jones in the Fast Lane (which is still non-functional)
Modified Paths:
--------------
scummvm/trunk/engines/sci/detection.cpp
scummvm/trunk/engines/sci/engine/game.cpp
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/sci.h
scummvm/trunk/engines/sci/scicore/resource.cpp
Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp 2009-05-14 17:06:47 UTC (rev 40563)
+++ scummvm/trunk/engines/sci/detection.cpp 2009-05-14 17:50:09 UTC (rev 40564)
@@ -812,7 +812,7 @@
{"resource.002", 0, "b86daa3ba2784d1502da881eedb80d9b", 719747},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
0,
- SCI_VERSION_AUTODETECT,
+ SCI_VERSION_01_VGA_ODD,
SCI_VERSION(1, 000, 172)
},
#endif
@@ -1239,13 +1239,14 @@
},
// Laura Bow 2 - English DOS Floppy
+ // Executable scanning reports "2.000.274"
{{"laurabow2", "", {
{"resource.map", 0, "610bfd9a852004222f0faaf5fc9e630a", 6489},
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5035964},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
0,
SCI_VERSION_AUTODETECT,
- SCI_VERSION(2, 000, 274)
+ SCI_VERSION(1, 001, 69) // this is just a guess
},
// Laura Bow 2 - English DOS CD (from "The Roberta Williams Antology"/1996)
@@ -1268,7 +1269,7 @@
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0},
0,
SCI_VERSION_AUTODETECT,
- SCI_VERSION(2, 000, 274)
+ SCI_VERSION(1, 001, 69) // this is just a guess
},
#endif
@@ -1293,7 +1294,7 @@
{"resource.002", 0, "24c958bc922b07f91e25e8c93aa01fcf", 491230},
{"resource.003", 0, "685cd6c1e05a695ab1e0db826337ee2a", 553279},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
- GF_FOR_SCI0_BEFORE_629,
+ GF_FOR_SCI0_BEFORE_629 | GF_SCI1_EGA,
SCI_VERSION_AUTODETECT,
SCI_VERSION(0, 000, 510) // FIXME: some versions are v. 0.000.577
},
Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp 2009-05-14 17:06:47 UTC (rev 40563)
+++ scummvm/trunk/engines/sci/engine/game.cpp 2009-05-14 17:50:09 UTC (rev 40564)
@@ -43,7 +43,7 @@
sciprintf("Initializing vocabulary\n");
- if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && vocab_get_words(s->resmgr, s->_parserWords)) {
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) && 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
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-14 17:06:47 UTC (rev 40563)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2009-05-14 17:50:09 UTC (rev 40564)
@@ -261,7 +261,7 @@
}
PaletteEntry get_pic_color(EngineState *s, int color) {
- if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA)
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 @@
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) {
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) {
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 @@
case K_GRAPH_GET_COLORS_NR:
- return make_reg(0, (s->resmgr->_sciVersion < SCI_VERSION_01_VGA) ? 0x10 : 0x100);
+ return make_reg(0, (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) ? 0x10 : 0x100);
break;
case K_GRAPH_DRAW_LINE: {
@@ -2484,7 +2484,7 @@
bgcolor.mask = 0;
if (SKPV_OR_ALT(8 + argextra, 255) >= 0) {
- if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA)
+ if (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA)
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 @@
black.alpha = 0;
black.control = -1;
black.priority = -1;
- lWhite.visual = get_pic_color(s, s->resmgr->_sciVersion < SCI_VERSION_01_VGA ? 15 : 255);
+ lWhite.visual = get_pic_color(s, (s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) ? 15 : 255);
lWhite.mask = GFX_MASK_VISUAL;
lWhite.alpha = 0;
lWhite.priority = -1;
@@ -3178,7 +3178,7 @@
temp = KP_SINT(argv[argpt++]);
SCIkdebug(SCIkGRAPHICS, "Display: set_color(%d)\n", temp);
- if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) && temp >= 0 && temp <= 15)
color0 = (s->ega_colors[temp]);
else
if ((s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) && temp >= 0 && temp < 256) {
@@ -3195,7 +3195,7 @@
temp = KP_SINT(argv[argpt++]);
SCIkdebug(SCIkGRAPHICS, "Display: set_bg_color(%d)\n", temp);
- if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA) && temp >= 0 && temp <= 15)
+ if ((s->resmgr->_sciVersion < SCI_VERSION_01_VGA || s->flags & GF_SCI1_EGA) && temp >= 0 && temp <= 15)
bg_color = s->ega_colors[temp];
else
if ((s->resmgr->_sciVersion >= SCI_VERSION_01_VGA) && temp >= 0 && temp <= 256) {
Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h 2009-05-14 17:06:47 UTC (rev 40563)
+++ scummvm/trunk/engines/sci/sci.h 2009-05-14 17:50:09 UTC (rev 40564)
@@ -118,22 +118,27 @@
** SCI1 flags
*/
+ /*
+ ** Used to distinguish SCI1 EGA games
+ */
+ GF_SCI1_EGA = (1 << 3),
+
/* Applies to all SCI1 versions after 1.000.200
** In late SCI1 versions, the argument of lofs[as] instructions
** is absolute rather than relative.
*/
- GF_SCI1_LOFSABSOLUTE = (1 << 3),
+ GF_SCI1_LOFSABSOLUTE = (1 << 4),
/* Applies to all versions from 1.000.510 onwards
** kDoSound() is different than in earlier SCI1 versions.
*/
- GF_SCI1_NEWDOSOUND = (1 << 4),
+ GF_SCI1_NEWDOSOUND = (1 << 5),
/*
** Newer SCI1 games (like KQ5 CD and EcoQuest 1) use
** different semantics in kSetCursor(), like SCI1.1 games
*/
- GF_SCI1_NEWSETCURSOR = (1 << 5)
+ GF_SCI1_NEWSETCURSOR = (1 << 6)
};
class SciEngine : public Engine {
Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp 2009-05-14 17:06:47 UTC (rev 40563)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp 2009-05-14 17:50:09 UTC (rev 40564)
@@ -936,7 +936,9 @@
file.seek(0, SEEK_SET);
- byte bMask = _mapVersion == SCI_VERSION_01_VGA_ODD ? 0xF0 : 0xFC;
+ byte bMask = 0xFC;
+ // FIXME: The code above seems to give correct results for Jones
+ //byte bMask = _mapVersion == SCI_VERSION_01_VGA_ODD ? 0xF0 : 0xFC;
byte bShift = _mapVersion == SCI_VERSION_01_VGA_ODD ? 28 : 26;
do {
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