mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
Add initial support for oracle icons in FF
svn-id: r21579
This commit is contained in:
parent
41f71238f2
commit
3627056116
@ -52,6 +52,19 @@ void SimonEngine::loadIconFile() {
|
||||
in.close();
|
||||
}
|
||||
|
||||
void SimonEngine::loadIconData() {
|
||||
loadZone(8);
|
||||
VgaPointersEntry *vpe = &_vgaBufferPointers[8];
|
||||
byte *src = vpe->vgaFile2;
|
||||
|
||||
_iconFilePtr = (byte *)malloc(43 * 336);
|
||||
if (_iconFilePtr == NULL)
|
||||
error("Out of icon memory");
|
||||
|
||||
memcpy(_iconFilePtr, src, 43 * 336);
|
||||
o_unfreezeBottom();
|
||||
}
|
||||
|
||||
// Thanks to Stuart Caie for providing the original
|
||||
// C conversion upon which this function is based.
|
||||
void decompress_icon_amiga (byte *dst, byte *src, byte base, uint pitch) {
|
||||
|
@ -52,4 +52,72 @@ void SimonEngine::hyperLinkOff()
|
||||
_hyperLink = 0;
|
||||
}
|
||||
|
||||
void SimonEngine::oracleLogo() {
|
||||
Common::Rect srcRect, dstRect;
|
||||
byte *src, *dst;
|
||||
uint16 w, h;
|
||||
|
||||
dstRect.left = 16;
|
||||
dstRect.top = 16;
|
||||
dstRect.right = 58;
|
||||
dstRect.bottom = 59;
|
||||
|
||||
srcRect.left = 0;
|
||||
srcRect.top = 0;
|
||||
srcRect.right = 42;
|
||||
srcRect.bottom = 43;
|
||||
|
||||
src = _iconFilePtr;
|
||||
dst = getBackBuf() + _screenWidth * dstRect.top + dstRect.left;
|
||||
|
||||
for (h = 0; h < dstRect.height(); h++) {
|
||||
for (w = 0; w < dstRect.width(); w++) {
|
||||
if (src[w])
|
||||
dst[w] = src[w];
|
||||
}
|
||||
src += 336;
|
||||
dst += _screenWidth;
|
||||
}
|
||||
}
|
||||
|
||||
void SimonEngine::swapCharacterLogo() {
|
||||
Common::Rect srcRect, dstRect;
|
||||
byte *src, *dst;
|
||||
uint16 w, h;
|
||||
int x;
|
||||
|
||||
dstRect.left = 64;
|
||||
dstRect.top = 16;
|
||||
dstRect.right = 106;
|
||||
dstRect.bottom = 59;
|
||||
|
||||
srcRect.top = 0;
|
||||
srcRect.bottom = 43;
|
||||
|
||||
x = _variableArray[91];
|
||||
if (x > _variableArray[90])
|
||||
x--;
|
||||
if( x < _variableArray[90])
|
||||
x++;
|
||||
_variableArray[91] = x;
|
||||
|
||||
x++;
|
||||
x *= 42;
|
||||
|
||||
srcRect.left = x;
|
||||
srcRect.right = srcRect.left + 42;
|
||||
|
||||
src = _iconFilePtr + srcRect.top * 336 + srcRect.left;
|
||||
dst = getBackBuf() + _screenWidth * dstRect.top + dstRect.left;
|
||||
|
||||
for (h = 0; h < dstRect.height(); h++) {
|
||||
for (w = 0; w < dstRect.width(); w++) {
|
||||
if (src[w])
|
||||
dst[w] = src[w];
|
||||
}
|
||||
src += 336;
|
||||
dst += _screenWidth;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace Simon
|
||||
|
@ -2857,6 +2857,13 @@ void SimonEngine::timer_proc1() {
|
||||
}
|
||||
|
||||
if (_updateScreen) {
|
||||
if (getGameType() == GType_FF) {
|
||||
if (vcGetBit(78) == false) {
|
||||
oracleLogo();
|
||||
} else if (vcGetBit(76) == true) {
|
||||
swapCharacterLogo();
|
||||
}
|
||||
}
|
||||
handle_mouse_moved();
|
||||
dx_update_screen_and_palette();
|
||||
_updateScreen = false;
|
||||
@ -3817,7 +3824,9 @@ void SimonEngine::openGameFile() {
|
||||
#endif
|
||||
}
|
||||
|
||||
if (getGameType() != GType_FF)
|
||||
if (getGameType() == GType_FF)
|
||||
loadIconData();
|
||||
else
|
||||
loadIconFile();
|
||||
|
||||
vc34_setMouseOff();
|
||||
|
@ -589,7 +589,9 @@ protected:
|
||||
|
||||
void hyperLinkOn(uint16 x);
|
||||
void hyperLinkOff();
|
||||
|
||||
void oracleLogo();
|
||||
void swapCharacterLogo();
|
||||
|
||||
void mouseOff();
|
||||
void mouseOn();
|
||||
|
||||
@ -647,6 +649,7 @@ protected:
|
||||
uint setup_icon_hit_area(FillOrCopyStruct *fcs, uint x, uint y, uint icon_number, Item *item_ptr);
|
||||
void addArrows(FillOrCopyStruct *fcs, uint fcs_index);
|
||||
|
||||
void loadIconData();
|
||||
void loadIconFile();
|
||||
void processSpecialKeys();
|
||||
void hitarea_stuff_helper();
|
||||
|
Loading…
x
Reference in New Issue
Block a user