mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 10:58:01 +00:00
Merge fadeToBlack() into o1_specialFade() and cleanup
svn-id: r22214
This commit is contained in:
parent
7e02709e7d
commit
d9ed515f90
@ -1618,7 +1618,24 @@ void SimonEngine::o1_loadStrings() {
|
|||||||
|
|
||||||
void SimonEngine::o1_specialFade() {
|
void SimonEngine::o1_specialFade() {
|
||||||
// 187: fade to black
|
// 187: fade to black
|
||||||
fadeToBlack();
|
uint i;
|
||||||
|
|
||||||
|
memcpy(_videoBuf1, _paletteBackup, 1024);
|
||||||
|
|
||||||
|
i = NUM_PALETTE_FADEOUT;
|
||||||
|
do {
|
||||||
|
palette_fadeout((uint32 *)_videoBuf1, 32);
|
||||||
|
palette_fadeout((uint32 *)_videoBuf1 + 32 + 16, 144);
|
||||||
|
palette_fadeout((uint32 *)_videoBuf1 + 32 + 16 + 144 + 16, 48);
|
||||||
|
|
||||||
|
_system->setPalette(_videoBuf1, 0, 256);
|
||||||
|
if (_fade)
|
||||||
|
_system->updateScreen();
|
||||||
|
delay(5);
|
||||||
|
} while (--i);
|
||||||
|
|
||||||
|
memcpy(_paletteBackup, _videoBuf1, 1024);
|
||||||
|
memcpy(_palette, _videoBuf1, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
@ -2337,27 +2337,6 @@ void SimonEngine::set_video_mode_internal(uint16 mode, uint16 vga_res_id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::fadeToBlack() {
|
|
||||||
uint i;
|
|
||||||
|
|
||||||
memcpy(_videoBuf1, _paletteBackup, 1024);
|
|
||||||
|
|
||||||
i = NUM_PALETTE_FADEOUT;
|
|
||||||
do {
|
|
||||||
palette_fadeout((uint32 *)_videoBuf1, 32);
|
|
||||||
palette_fadeout((uint32 *)_videoBuf1 + 32 + 16, 144);
|
|
||||||
palette_fadeout((uint32 *)_videoBuf1 + 32 + 16 + 144 + 16, 48);
|
|
||||||
|
|
||||||
_system->setPalette(_videoBuf1, 0, 256);
|
|
||||||
if (_fade)
|
|
||||||
_system->updateScreen();
|
|
||||||
delay(5);
|
|
||||||
} while (--i);
|
|
||||||
|
|
||||||
memcpy(_paletteBackup, _videoBuf1, 1024);
|
|
||||||
memcpy(_palette, _videoBuf1, 1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimonEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param) {
|
void SimonEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param) {
|
||||||
VgaTimerEntry *vte;
|
VgaTimerEntry *vte;
|
||||||
|
|
||||||
@ -2863,44 +2842,6 @@ void SimonEngine::timer_callback() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SimonEngine::itemIsSiblingOf(uint16 a) {
|
|
||||||
Item *item;
|
|
||||||
|
|
||||||
CHECK_BOUNDS(a, _objectArray);
|
|
||||||
|
|
||||||
item = _objectArray[a];
|
|
||||||
if (item == NULL)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return me()->parent == item->parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
|
|
||||||
Item *item_a, *item_b;
|
|
||||||
|
|
||||||
CHECK_BOUNDS(a, _objectArray);
|
|
||||||
CHECK_BOUNDS(b, _objectArray);
|
|
||||||
|
|
||||||
item_a = _objectArray[a];
|
|
||||||
item_b = _objectArray[b];
|
|
||||||
|
|
||||||
if (item_a == NULL || item_b == NULL)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return derefItem(item_a->parent) == item_b;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
|
|
||||||
Item *item;
|
|
||||||
|
|
||||||
CHECK_BOUNDS(a, _objectArray);
|
|
||||||
|
|
||||||
item = _objectArray[a];
|
|
||||||
if (item == NULL)
|
|
||||||
return true;
|
|
||||||
return item->state == b;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimonEngine::closeWindow(uint a) {
|
void SimonEngine::closeWindow(uint a) {
|
||||||
if (_windowArray[a] == NULL)
|
if (_windowArray[a] == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -602,7 +602,6 @@ protected:
|
|||||||
void scriptMouseOn();
|
void scriptMouseOn();
|
||||||
void scriptMouseOff();
|
void scriptMouseOff();
|
||||||
void unfreezeBottom();
|
void unfreezeBottom();
|
||||||
void fadeToBlack();
|
|
||||||
|
|
||||||
TextLocation *getTextLocation(uint a);
|
TextLocation *getTextLocation(uint a);
|
||||||
void setup_cond_c_helper();
|
void setup_cond_c_helper();
|
||||||
|
@ -152,6 +152,44 @@ void SimonEngine::runVgaScript() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SimonEngine::itemIsSiblingOf(uint16 a) {
|
||||||
|
Item *item;
|
||||||
|
|
||||||
|
CHECK_BOUNDS(a, _objectArray);
|
||||||
|
|
||||||
|
item = _objectArray[a];
|
||||||
|
if (item == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return me()->parent == item->parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
|
||||||
|
Item *item_a, *item_b;
|
||||||
|
|
||||||
|
CHECK_BOUNDS(a, _objectArray);
|
||||||
|
CHECK_BOUNDS(b, _objectArray);
|
||||||
|
|
||||||
|
item_a = _objectArray[a];
|
||||||
|
item_b = _objectArray[b];
|
||||||
|
|
||||||
|
if (item_a == NULL || item_b == NULL)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return derefItem(item_a->parent) == item_b;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
|
||||||
|
Item *item;
|
||||||
|
|
||||||
|
CHECK_BOUNDS(a, _objectArray);
|
||||||
|
|
||||||
|
item = _objectArray[a];
|
||||||
|
if (item == NULL)
|
||||||
|
return true;
|
||||||
|
return item->state == b;
|
||||||
|
}
|
||||||
|
|
||||||
int SimonEngine::vcReadVarOrWord() {
|
int SimonEngine::vcReadVarOrWord() {
|
||||||
int16 var = vcReadNextWord();
|
int16 var = vcReadNextWord();
|
||||||
if (var < 0)
|
if (var < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user