Since lost/smaller use default windows cursor we setup our own
svn-id: r17705
This commit is contained in:
parent
f960d3006e
commit
89ca4bf716
4 changed files with 62 additions and 11 deletions
|
@ -65,6 +65,17 @@ static const byte default_cursor_hotspots[10] = {
|
||||||
8, 7, //zak256
|
8, 7, //zak256
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const uint16 default_he_cursor[] = {
|
||||||
|
0x0000, 0x0000, 0x3800, 0x0000, 0x7e00, 0x0000, 0x5f80, 0x0000,
|
||||||
|
0x5fe0, 0x0000, 0x2ff8, 0x0000, 0x27fe, 0x0000, 0x17ff, 0x8000,
|
||||||
|
0x13ff, 0xe000, 0x09ff, 0xf000, 0x09ff, 0xf800, 0x04ff, 0xf800,
|
||||||
|
0x047f, 0xf000, 0x027f, 0xe000, 0x023f, 0xf000, 0x011f, 0xf800,
|
||||||
|
0x0111, 0xfc00, 0x0080, 0xfc00, 0x0084, 0x0c00, 0x004a, 0x0800,
|
||||||
|
0x0031, 0x1000, 0x0000, 0xe000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
||||||
|
};
|
||||||
|
|
||||||
ScummEngine_v5::ScummEngine_v5(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])
|
ScummEngine_v5::ScummEngine_v5(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])
|
||||||
: ScummEngine(detector, syst, gs, md5sum) {
|
: ScummEngine(detector, syst, gs, md5sum) {
|
||||||
|
|
||||||
|
@ -152,6 +163,38 @@ void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) {
|
||||||
_win32ResExtractor->setCursor(img);
|
_win32ResExtractor->setCursor(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScummEngine_v90he::setDefaultCursor() {
|
||||||
|
const uint16 *src;
|
||||||
|
int i, j;
|
||||||
|
static byte palette[] = { 0xff, 0xff, 0xff, 0,
|
||||||
|
0, 0, 0, 0};
|
||||||
|
|
||||||
|
memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor));
|
||||||
|
|
||||||
|
_cursor.hotspotX = _cursor.hotspotY = 2;
|
||||||
|
src = default_he_cursor;
|
||||||
|
|
||||||
|
_cursor.width = 32;
|
||||||
|
_cursor.height = 32;
|
||||||
|
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
for (j = 0; j < 32; j++) {
|
||||||
|
if (*src & (1 << (15 - (j % 16))))
|
||||||
|
_grabbedCursor[32 * i + j] = 0xfe;
|
||||||
|
if (j == 15)
|
||||||
|
src++;
|
||||||
|
}
|
||||||
|
src++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Since white color position is not guaranteed
|
||||||
|
// we setup our own palette if supported by backend
|
||||||
|
if (_system->hasFeature(OSystem::kFeatureCursorHasPalette))
|
||||||
|
_system->setCursorPalette(palette, 0xfe, 2);
|
||||||
|
|
||||||
|
updateCursor();
|
||||||
|
}
|
||||||
|
|
||||||
void ScummEngine_v6::setCursorFromImg(uint img, uint room, uint imgindex) {
|
void ScummEngine_v6::setCursorFromImg(uint img, uint room, uint imgindex) {
|
||||||
int w, h;
|
int w, h;
|
||||||
const byte *dataptr, *bomp;
|
const byte *dataptr, *bomp;
|
||||||
|
|
|
@ -1068,6 +1068,8 @@ protected:
|
||||||
void spritesResetTables(bool refreshScreen);
|
void spritesResetTables(bool refreshScreen);
|
||||||
void spriteAddImageToList(int spriteId, int imageNum, int *spriteIdptr);
|
void spriteAddImageToList(int spriteId, int imageNum, int *spriteIdptr);
|
||||||
|
|
||||||
|
void setDefaultCursor();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void saveOrLoadSpriteData(Serializer *s, uint32 savegameVersion);
|
void saveOrLoadSpriteData(Serializer *s, uint32 savegameVersion);
|
||||||
void spritesBlitToScreen();
|
void spritesBlitToScreen();
|
||||||
|
|
|
@ -314,7 +314,7 @@ static const ScummGameSettings scumm_settings[] = {
|
||||||
// these and later games can easily be identified by the .(a) file instead of a .he1
|
// these and later games can easily be identified by the .(a) file instead of a .he1
|
||||||
// and INIB chunk in the .he0
|
// and INIB chunk in the .he0
|
||||||
{"lost", "Pajama Sam's Lost & Found", GID_HEGAME, 6, 98, 61, MDT_NONE,
|
{"lost", "Pajama Sam's Lost & Found", GID_HEGAME, 6, 98, 61, MDT_NONE,
|
||||||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, 0, 0},
|
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS | GF_MULTIPLE_VERSIONS, 0, 0},
|
||||||
{"racedemo", "Putt-Putt Enters the Race (Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE,
|
{"racedemo", "Putt-Putt Enters the Race (Demo)", GID_HEGAME, 6, 98, 61, MDT_NONE,
|
||||||
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, 0, 0},
|
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, 0, 0},
|
||||||
{"puttrace", "Putt-Putt Enters the Race", GID_HEGAME, 6, 98, 61, MDT_NONE,
|
{"puttrace", "Putt-Putt Enters the Race", GID_HEGAME, 6, 98, 61, MDT_NONE,
|
||||||
|
@ -333,7 +333,7 @@ static const ScummGameSettings scumm_settings[] = {
|
||||||
// Engine moved to c++
|
// Engine moved to c++
|
||||||
// Humongous Entertainment Scumm Version 9.9 ? Scummsys.99
|
// Humongous Entertainment Scumm Version 9.9 ? Scummsys.99
|
||||||
{"smaller", "Pajama Sam's Lost & Found (Test)", GID_HEGAME, 6, 99, 61, MDT_NONE,
|
{"smaller", "Pajama Sam's Lost & Found (Test)", GID_HEGAME, 6, 99, 61, MDT_NONE,
|
||||||
GF_USE_KEY | GF_NEW_COSTUMES, 0, 0},
|
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_CURSORLESS, 0, 0},
|
||||||
{"puttcircus", "Putt-Putt Joins the Circus", GID_HEGAME, 6, 99, 61, MDT_NONE,
|
{"puttcircus", "Putt-Putt Joins the Circus", GID_HEGAME, 6, 99, 61, MDT_NONE,
|
||||||
GF_USE_KEY | GF_NEW_COSTUMES, 0, 0},
|
GF_USE_KEY | GF_NEW_COSTUMES, 0, 0},
|
||||||
{"circdemo", "Putt-Putt Joins the Circus (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE,
|
{"circdemo", "Putt-Putt Joins the Circus (Demo)", GID_HEGAME, 6, 99, 61, MDT_NONE,
|
||||||
|
@ -1670,6 +1670,9 @@ void ScummEngine_v90he::scummInit() {
|
||||||
|
|
||||||
spritesResetTables(0);
|
spritesResetTables(0);
|
||||||
memset(&_wizParams, 0, sizeof(_wizParams));
|
memset(&_wizParams, 0, sizeof(_wizParams));
|
||||||
|
|
||||||
|
if (_features & GF_HE_CURSORLESS)
|
||||||
|
setDefaultCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine_v99he::scummInit() {
|
void ScummEngine_v99he::scummInit() {
|
||||||
|
|
|
@ -114,18 +114,21 @@ enum GameFeatures {
|
||||||
*/
|
*/
|
||||||
GF_FEW_LOCALS = 1 << 11,
|
GF_FEW_LOCALS = 1 << 11,
|
||||||
|
|
||||||
|
/** HE games without cursor resources */
|
||||||
|
GF_HE_CURSORLESS = 1 << 12,
|
||||||
|
|
||||||
/** Games with multiple versions */
|
/** Games with multiple versions */
|
||||||
GF_MULTIPLE_VERSIONS = 1 << 12,
|
GF_MULTIPLE_VERSIONS = 1 << 13,
|
||||||
|
|
||||||
GF_FMTOWNS = 1 << 13,
|
GF_FMTOWNS = 1 << 14,
|
||||||
GF_AMIGA = 1 << 14,
|
GF_AMIGA = 1 << 15,
|
||||||
GF_NES = 1 << 15,
|
GF_NES = 1 << 16,
|
||||||
GF_ATARI_ST = 1 << 16,
|
GF_ATARI_ST = 1 << 17,
|
||||||
GF_MACINTOSH = 1 << 17,
|
GF_MACINTOSH = 1 << 18,
|
||||||
GF_PC = 1 << 18,
|
GF_PC = 1 << 19,
|
||||||
GF_WINDOWS = 1 << 19,
|
GF_WINDOWS = 1 << 20,
|
||||||
|
|
||||||
GF_DEMO = 1 << 20
|
GF_DEMO = 1 << 21
|
||||||
};
|
};
|
||||||
|
|
||||||
/* SCUMM Debug Channels */
|
/* SCUMM Debug Channels */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue