Added a detection entry for Pepper's Adventures in Time, and fixed an issue with _gfxop_set_pic(), which was causing crashes in that game
svn-id: r42523
This commit is contained in:
parent
b04e3e7940
commit
00dbbedbad
5 changed files with 22 additions and 6 deletions
|
@ -2203,6 +2203,15 @@ static const struct SciGameDescription SciGameDescriptions[] = {
|
||||||
},
|
},
|
||||||
#endif // ENABLE_SCI32
|
#endif // ENABLE_SCI32
|
||||||
|
|
||||||
|
{{"pepper", "", {
|
||||||
|
{"resource.map", 0, "72726dc81c1b4c1110c486be77369bc8", 5179},
|
||||||
|
{"resource.000", 0, "670d0c53622429f4b11275caf7f8d292", 5459574},
|
||||||
|
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
|
||||||
|
0,
|
||||||
|
SCI_VERSION_AUTODETECT,
|
||||||
|
SCI_VERSION_1_1
|
||||||
|
},
|
||||||
|
|
||||||
// Pepper - English DOS Non-Interactive Demo
|
// Pepper - English DOS Non-Interactive Demo
|
||||||
// Executable scanning reports "1.001.060", VERSION file reports "1.000"
|
// Executable scanning reports "1.001.060", VERSION file reports "1.000"
|
||||||
{{"pepper", "Demo", {
|
{{"pepper", "Demo", {
|
||||||
|
|
|
@ -340,7 +340,7 @@ gfxr_pic_t *GfxResManager::getPic(int num, int maps, int flags, int default_pale
|
||||||
res = resMap.contains(num) ? resMap[num] : NULL;
|
res = resMap.contains(num) ? resMap[num] : NULL;
|
||||||
|
|
||||||
if (!res || res->mode != hash) {
|
if (!res || res->mode != hash) {
|
||||||
gfxr_pic_t *pic;
|
gfxr_pic_t *pic = NULL;
|
||||||
gfxr_pic_t *unscaled_pic = NULL;
|
gfxr_pic_t *unscaled_pic = NULL;
|
||||||
|
|
||||||
#ifdef CUSTOM_GRAPHICS_OPTIONS
|
#ifdef CUSTOM_GRAPHICS_OPTIONS
|
||||||
|
|
|
@ -270,8 +270,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Retrieves a color from the static palette
|
* Retrieves a color from the static palette
|
||||||
*/
|
*/
|
||||||
const PaletteEntry &getColor(int color)
|
const PaletteEntry &getColor(int color) {
|
||||||
{
|
|
||||||
return _staticPalette->getColor(color);
|
return _staticPalette->getColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,6 +312,11 @@ public:
|
||||||
return _staticPalette ? _staticPalette->size() : 0;
|
return _staticPalette ? _staticPalette->size() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the resource version that the resource manager is using
|
||||||
|
*/
|
||||||
|
int getVersion() { return _version; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _version;
|
int _version;
|
||||||
gfx_options_t *_options;
|
gfx_options_t *_options;
|
||||||
|
|
|
@ -189,7 +189,7 @@ struct gfx_pixmap_t {
|
||||||
* As a special exception, 256 colors are allowed for background pictures
|
* As a special exception, 256 colors are allowed for background pictures
|
||||||
* (which do not use transparency)
|
* (which do not use transparency)
|
||||||
*/
|
*/
|
||||||
int colors_nr() const { return palette ? palette->size() : 0; }
|
int colors_nr() const { return palette ? MIN<int>(palette->size(), 256) : 0; }
|
||||||
|
|
||||||
uint32 flags;
|
uint32 flags;
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
|
@ -1712,8 +1712,11 @@ static int _gfxop_set_pic(GfxState *state) {
|
||||||
// FIXME: The _gfxop_install_pixmap call below updates the OSystem palette.
|
// FIXME: The _gfxop_install_pixmap call below updates the OSystem palette.
|
||||||
// This is too soon, since it causes brief palette corruption until the
|
// This is too soon, since it causes brief palette corruption until the
|
||||||
// screen is updated too. (Possibly related: EngineState::pic_not_valid .)
|
// screen is updated too. (Possibly related: EngineState::pic_not_valid .)
|
||||||
state->pic->visual_map->palette->forceInto(state->driver->getMode()->palette);
|
// SCI1.1 games don't use per-picture palettes
|
||||||
_gfxop_install_pixmap(state->driver, state->pic->visual_map);
|
if (state->gfxResMan->getVersion() < SCI_VERSION_1_1) {
|
||||||
|
state->pic->visual_map->palette->forceInto(state->driver->getMode()->palette);
|
||||||
|
_gfxop_install_pixmap(state->driver, state->pic->visual_map);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CUSTOM_GRAPHICS_OPTIONS
|
#ifdef CUSTOM_GRAPHICS_OPTIONS
|
||||||
if (state->options->pic0_unscaled)
|
if (state->options->pic0_unscaled)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue