mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
Remove vga opcodes which are never used by games
svn-id: r24557
This commit is contained in:
parent
30e6ce658b
commit
bd0a327a39
@ -107,7 +107,6 @@ struct VgaTimerEntry {
|
||||
const byte *script_pointer;
|
||||
uint16 sprite_id;
|
||||
uint16 cur_vga_file;
|
||||
int32 param;
|
||||
VgaTimerEntry() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
@ -907,7 +906,6 @@ public:
|
||||
void vc42_delayIfNotEQ();
|
||||
|
||||
// Video Script Opcodes, Elvira 1
|
||||
void vc11_onStop();
|
||||
void vc17_waitEnd();
|
||||
void vc22_setPaletteOld();
|
||||
void vc32_saveScreen();
|
||||
@ -968,7 +966,6 @@ public:
|
||||
void vc74_clearMark();
|
||||
|
||||
// Video Script Opcodes, Feeble Files
|
||||
void vc53_panSFX();
|
||||
void vc75_setScale();
|
||||
void vc76_setScaleXOffs();
|
||||
void vc77_setScaleYOffs();
|
||||
@ -1309,11 +1306,10 @@ protected:
|
||||
bool isVgaQueueEmpty();
|
||||
void haltAnimation();
|
||||
void restartAnimation();
|
||||
void addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param = 0);
|
||||
void addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum);
|
||||
void deleteVgaEvent(VgaTimerEntry * vte);
|
||||
void processVgaEvents();
|
||||
void animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 cur_sprite);
|
||||
void panEvent(uint16 curZoneNum, uint16 cur_sprite, int32 param);
|
||||
void scrollEvent();
|
||||
|
||||
VgaSprite *findCurSprite();
|
||||
|
@ -174,7 +174,7 @@ void AGOSEngine::restartAnimation() {
|
||||
_lockWord &= ~0x10;
|
||||
}
|
||||
|
||||
void AGOSEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param) {
|
||||
void AGOSEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum) {
|
||||
VgaTimerEntry *vte;
|
||||
|
||||
// When Simon talks to the Golum about stew in French version of
|
||||
@ -196,7 +196,6 @@ void AGOSEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite
|
||||
vte->script_pointer = code_ptr;
|
||||
vte->sprite_id = cur_sprite;
|
||||
vte->cur_vga_file = curZoneNum;
|
||||
vte->param = param;
|
||||
|
||||
_lockWord &= ~1;
|
||||
}
|
||||
@ -227,15 +226,11 @@ void AGOSEngine::processVgaEvents() {
|
||||
uint16 curZoneNum = vte->cur_vga_file;
|
||||
uint16 cur_sprite = vte->sprite_id;
|
||||
const byte *script_ptr = vte->script_pointer;
|
||||
int32 param = vte->param;
|
||||
|
||||
_nextVgaTimerToProcess = vte + 1;
|
||||
deleteVgaEvent(vte);
|
||||
|
||||
if ((getGameType() == GType_FF || getGameType() == GType_PP) &&
|
||||
script_ptr == NULL) {
|
||||
panEvent(curZoneNum, cur_sprite, param);
|
||||
} else if (getGameType() == GType_SIMON2 && script_ptr == NULL) {
|
||||
if (getGameType() == GType_SIMON2 && script_ptr == NULL) {
|
||||
scrollEvent();
|
||||
} else {
|
||||
animateEvent(script_ptr, curZoneNum, cur_sprite);
|
||||
@ -265,27 +260,6 @@ void AGOSEngine::animateEvent(const byte *code_ptr, uint16 curZoneNum, uint16 cu
|
||||
runVgaScript();
|
||||
}
|
||||
|
||||
void AGOSEngine::panEvent(uint16 curZoneNum, uint16 cur_sprite, int32 param) {
|
||||
_vgaCurSpriteId = cur_sprite;
|
||||
_vgaCurZoneNum = curZoneNum;
|
||||
|
||||
VgaSprite *vsp = findCurSprite();
|
||||
|
||||
param &= 0x10;
|
||||
|
||||
int32 pan = (vsp->x - _scrollX + param) * 8 - 2560;
|
||||
if (pan < -10000)
|
||||
pan = -10000;
|
||||
if (pan > 10000)
|
||||
pan = 10000;
|
||||
|
||||
//setSfxPan(param, pan);
|
||||
|
||||
if (pan != 0)
|
||||
addVgaEvent(10, NULL, _vgaCurSpriteId, _vgaCurZoneNum); /* pan event */
|
||||
debug(0, "panEvent: param %d pan %d", param, pan);
|
||||
}
|
||||
|
||||
void AGOSEngine::scrollEvent() {
|
||||
if (_scrollCount == 0)
|
||||
return;
|
||||
|
@ -92,8 +92,6 @@ void AGOSEngine::setupElvira1VideoOpcodes(VgaOpcodeProc *op) {
|
||||
op[8] = &AGOSEngine::vc8_ifObjectIsAt;
|
||||
op[9] = &AGOSEngine::vc9_ifObjectStateIs;
|
||||
op[10] = &AGOSEngine::vc10_draw;
|
||||
op[11] = &AGOSEngine::vc11_onStop;
|
||||
|
||||
op[13] = &AGOSEngine::vc12_delay;
|
||||
op[14] = &AGOSEngine::vc13_addToSpriteX;
|
||||
op[15] = &AGOSEngine::vc14_addToSpriteY;
|
||||
@ -117,17 +115,13 @@ void AGOSEngine::setupElvira1VideoOpcodes(VgaOpcodeProc *op) {
|
||||
op[33] = &AGOSEngine::vc32_saveScreen;
|
||||
op[34] = &AGOSEngine::vc33_setMouseOn;
|
||||
op[35] = &AGOSEngine::vc34_setMouseOff;
|
||||
|
||||
op[38] = &AGOSEngine::vc35_clearWindow;
|
||||
|
||||
op[40] = &AGOSEngine::vc36_setWindowImage;
|
||||
op[41] = &AGOSEngine::vc37_pokePalette;
|
||||
|
||||
op[51] = &AGOSEngine::vc38_ifVarNotZero;
|
||||
op[52] = &AGOSEngine::vc39_setVar;
|
||||
op[53] = &AGOSEngine::vc40;
|
||||
op[54] = &AGOSEngine::vc41;
|
||||
|
||||
op[56] = &AGOSEngine::vc42_delayIfNotEQ;
|
||||
}
|
||||
|
||||
@ -682,11 +676,6 @@ void AGOSEngine::vc10_draw() {
|
||||
}
|
||||
}
|
||||
|
||||
void AGOSEngine::vc11_onStop() {
|
||||
uint a = vcReadNextWord();
|
||||
debug(0, "vc11_onStop: stub (%d)", a);
|
||||
}
|
||||
|
||||
void AGOSEngine::vc12_delay() {
|
||||
VgaSprite *vsp = findCurSprite();
|
||||
uint16 num;
|
||||
|
@ -34,7 +34,6 @@ namespace AGOS {
|
||||
void AGOSEngine::setupElvira2VideoOpcodes(VgaOpcodeProc *op) {
|
||||
setupCommonVideoOpcodes(op);
|
||||
|
||||
op[11] = &AGOSEngine::vc11_onStop;
|
||||
op[17] = &AGOSEngine::vc17_waitEnd;
|
||||
op[19] = &AGOSEngine::vc19_loop;
|
||||
op[22] = &AGOSEngine::vc22_setPaletteOld;
|
||||
|
@ -31,7 +31,6 @@ namespace AGOS {
|
||||
void AGOSEngine::setupFeebleVideoOpcodes(VgaOpcodeProc *op) {
|
||||
setupSimon2VideoOpcodes(op);
|
||||
|
||||
op[53] = &AGOSEngine::vc53_panSFX;
|
||||
op[75] = &AGOSEngine::vc75_setScale;
|
||||
op[76] = &AGOSEngine::vc76_setScaleXOffs;
|
||||
op[77] = &AGOSEngine::vc77_setScaleYOffs;
|
||||
@ -44,29 +43,6 @@ void AGOSEngine::setupFeebleVideoOpcodes(VgaOpcodeProc *op) {
|
||||
op[84] = &AGOSEngine::vc84_stopSoundLoop;
|
||||
}
|
||||
|
||||
void AGOSEngine::vc53_panSFX() {
|
||||
VgaSprite *vsp = findCurSprite();
|
||||
int pan;
|
||||
|
||||
uint16 sound = vcReadNextWord();
|
||||
int16 xoffs = vcReadNextWord();
|
||||
int16 vol = vcReadNextWord();
|
||||
|
||||
pan = (vsp->x - _scrollX + xoffs) * 8 - 2560;
|
||||
if (pan < -10000)
|
||||
pan = -10000;
|
||||
if (pan > 10000)
|
||||
pan = 10000;
|
||||
|
||||
loadSound(sound, 0, vol, 1);
|
||||
|
||||
if (xoffs != 2)
|
||||
xoffs |= 0x10;
|
||||
|
||||
addVgaEvent(10, NULL, _vgaCurSpriteId, _vgaCurZoneNum, xoffs); /* pan event */
|
||||
debug(0, "vc53_panSFX: snd %d xoffs %d vol %d", sound, xoffs, vol);
|
||||
}
|
||||
|
||||
int AGOSEngine::getScale(int16 y, int16 x) {
|
||||
int16 z;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user