mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
- cleanup
- some diffs for Amiga version svn-id: r26010
This commit is contained in:
parent
71cc080fc5
commit
305a1525ed
@ -499,7 +499,7 @@ void KyraEngine::startup() {
|
||||
initMainButtonList();
|
||||
loadMainScreen();
|
||||
setupTimers();
|
||||
loadPalette("PALETTE.COL", _screen->_currentPalette);
|
||||
_screen->loadPalette("PALETTE.COL", _screen->_currentPalette);
|
||||
|
||||
// XXX
|
||||
_animator->initAnimStateList();
|
||||
|
@ -603,7 +603,6 @@ protected:
|
||||
int _opcodeTableSize;
|
||||
|
||||
void waitForEvent();
|
||||
void loadPalette(const char *filename, uint8 *palData);
|
||||
void loadMouseShapes();
|
||||
void loadCharacterShapes();
|
||||
void loadSpecialEffectShapes();
|
||||
|
@ -59,6 +59,8 @@ const KYRAGameDescription adGameDescs[] = {
|
||||
{ { "kyra1", 0, AD_ENTRY1("GEMCUT.EMC", "747861d2a9c643c59fdab570df5b9093"), Common::ES_ESP, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA1_FLOPPY_FLAGS }, // floppy 1.8 from clemmy
|
||||
{ { "kyra1", 0, AD_ENTRY1("GEMCUT.EMC", "ef08c8c237ee1473fd52578303fc36df"), Common::IT_ITA, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, KYRA1_FLOPPY_FLAGS }, // from gourry
|
||||
|
||||
//{ { "kyra1", 0, AD_ENTRY1("GEMCUT.PAK", "2bd1da653eaefd691e050e4a9eb68a64"), Common::EN_ANY, Common::kPlatformAmiga, Common::ADGF_NO_FLAGS }, KYRA1_FLOPPY_FLAGS },
|
||||
|
||||
{ { "kyra1", 0, AD_ENTRY1("TWMUSIC.PAK", "e53bca3a3e3fb49107d59463ec387a59"), Common::EN_ANY, Common::kPlatformFMTowns, Common::ADGF_NO_FLAGS }, KYRA1_TOWNS_FLAGS },
|
||||
{ { "kyra1", 0, AD_ENTRY1("TWMUSIC.PAK", "e53bca3a3e3fb49107d59463ec387a59"), Common::JA_JPN, Common::kPlatformFMTowns, Common::ADGF_NO_FLAGS }, KYRA1_TOWNS_SJIS_FLAGS },
|
||||
|
||||
|
@ -523,17 +523,4 @@ uint32 INSFile::getFileSize(uint hash) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////
|
||||
void KyraEngine::loadPalette(const char *filename, uint8 *palData) {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::loadPalette('%s' %p)", filename, (void *)palData);
|
||||
uint32 fileSize = 0;
|
||||
uint8 *srcData = _res->fileData(filename, &fileSize);
|
||||
|
||||
if (palData && fileSize) {
|
||||
debugC(9, kDebugLevelMain,"Loading a palette of size %i from '%s'", fileSize, filename);
|
||||
memcpy(palData, srcData, fileSize);
|
||||
}
|
||||
delete [] srcData;
|
||||
}
|
||||
|
||||
} // end of namespace Kyra
|
||||
|
@ -2450,7 +2450,7 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *
|
||||
|
||||
if (palData && palSize) {
|
||||
debugC(9, kDebugLevelMain,"Loading a palette of size %i from %s", palSize, filename);
|
||||
memcpy(palData, srcData + 10, palSize);
|
||||
loadPalette(srcData + 10, palData, palSize);
|
||||
}
|
||||
|
||||
uint8 *srcPtr = srcData + 10 + palSize;
|
||||
@ -2476,6 +2476,23 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *
|
||||
delete [] srcData;
|
||||
}
|
||||
|
||||
void Screen::loadPalette(const char *filename, uint8 *palData) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::loadPalette('%s' %p)", filename, (void *)palData);
|
||||
uint32 fileSize = 0;
|
||||
uint8 *srcData = _vm->resource()->fileData(filename, &fileSize);
|
||||
|
||||
if (palData && fileSize) {
|
||||
debugC(9, kDebugLevelScreen,"Loading a palette of size %i from '%s'", fileSize, filename);
|
||||
memcpy(palData, srcData, fileSize);
|
||||
}
|
||||
delete [] srcData;
|
||||
}
|
||||
|
||||
void Screen::loadPalette(const byte *data, uint8 *palData, int bytes) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::loadPalette(%p, %p %d)", (void *)data, (void *)palData, bytes);
|
||||
memcpy(palData, data, bytes);
|
||||
}
|
||||
|
||||
// kyra3 specific
|
||||
|
||||
const uint8 *Screen::getPtrToShape(const uint8 *shpFile, int shape) {
|
||||
|
@ -186,6 +186,9 @@ public:
|
||||
// misc
|
||||
void loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData);
|
||||
|
||||
void loadPalette(const char *filename, uint8 *palData);
|
||||
void loadPalette(const byte *data, uint8 *palData, int bytes);
|
||||
|
||||
void setAnimBlockPtr(int size);
|
||||
|
||||
void setShapePages(int page1, int page2);
|
||||
|
@ -93,7 +93,7 @@ uint8 *SeqPlayer::setPanPages(int pageNum, int shape) {
|
||||
void SeqPlayer::makeHandShapes() {
|
||||
debugC(9, kDebugLevelSequence, "SeqPlayer::makeHandShapes()");
|
||||
_screen->loadBitmap("WRITING.CPS", 3, 3, 0);
|
||||
if (_vm->gameFlags().platform == Common::kPlatformMacintosh) {
|
||||
if (_vm->gameFlags().platform == Common::kPlatformMacintosh || _vm->gameFlags().platform == Common::kPlatformAmiga) {
|
||||
freeHandShapes();
|
||||
|
||||
int pageBackUp = _screen->_curPage;
|
||||
|
@ -1641,7 +1641,7 @@ int KyraEngine::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) {
|
||||
void KyraEngine::setupPanPages() {
|
||||
debugC(9, kDebugLevelMain, "KyraEngine::setupPanPages()");
|
||||
_screen->loadBitmap("BEAD.CPS", 3, 3, 0);
|
||||
if (_flags.platform == Common::kPlatformMacintosh) {
|
||||
if (_flags.platform == Common::kPlatformMacintosh || _flags.platform == Common::kPlatformAmiga) {
|
||||
int pageBackUp = _screen->_curPage;
|
||||
_screen->_curPage = 2;
|
||||
|
||||
|
@ -422,7 +422,7 @@ void Sprites::loadDAT(const char *filename, SceneExits &exits) {
|
||||
}
|
||||
// XXX
|
||||
_engine->_paletteChanged = 1;
|
||||
memcpy(_screen->getPalette(1) + 684, _dat + 0x17, 60);
|
||||
_screen->loadPalette(_dat + 0x17, _screen->getPalette(1) + 684, 60);
|
||||
uint8 *data = _dat + 0x6B;
|
||||
|
||||
uint16 length = READ_LE_UINT16(data);
|
||||
@ -478,7 +478,7 @@ void Sprites::loadDAT(const char *filename, SceneExits &exits) {
|
||||
data += 2;
|
||||
break;
|
||||
default:
|
||||
warning("Unknown code in DAT file '%s' offset %d: %x", filename, data - _dat, READ_LE_UINT16(data));
|
||||
warning("Unknown code in DAT file '%s' offset %d: %x", filename, int(data - _dat), READ_LE_UINT16(data));
|
||||
data += 2;
|
||||
break;
|
||||
}
|
||||
|
@ -838,7 +838,7 @@ void KyraEngine::loadButtonShapes() {
|
||||
void KyraEngine::loadMainScreen(int page) {
|
||||
_screen->clearPage(page);
|
||||
|
||||
if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && _flags.platform == Common::kPlatformPC)
|
||||
if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga))
|
||||
_screen->loadBitmap("MAIN15.CPS", page, page, 0);
|
||||
else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN)
|
||||
_screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user