[Scummvm-cvs-logs] SF.net SVN: scummvm: [24557] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sat Oct 28 16:08:43 CEST 2006


Revision: 24557
          http://svn.sourceforge.net/scummvm/?rev=24557&view=rev
Author:   kirben
Date:     2006-10-28 07:08:35 -0700 (Sat, 28 Oct 2006)

Log Message:
-----------
Remove vga opcodes which are never used by games

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/event.cpp
    scummvm/trunk/engines/agos/vga.cpp
    scummvm/trunk/engines/agos/vga_e2.cpp
    scummvm/trunk/engines/agos/vga_ff.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2006-10-28 13:47:16 UTC (rev 24556)
+++ scummvm/trunk/engines/agos/agos.h	2006-10-28 14:08:35 UTC (rev 24557)
@@ -107,7 +107,6 @@
 	const byte *script_pointer;
 	uint16 sprite_id;
 	uint16 cur_vga_file;
-	int32 param;
 	VgaTimerEntry() { memset(this, 0, sizeof(*this)); }
 };
 
@@ -907,7 +906,6 @@
 	void vc42_delayIfNotEQ();
 
 	// Video Script Opcodes, Elvira 1
-	void vc11_onStop();
 	void vc17_waitEnd();
 	void vc22_setPaletteOld();
 	void vc32_saveScreen();
@@ -968,7 +966,6 @@
 	void vc74_clearMark();
 
 	// Video Script Opcodes, Feeble Files
-	void vc53_panSFX();
 	void vc75_setScale();
 	void vc76_setScaleXOffs();
 	void vc77_setScaleYOffs();
@@ -1309,11 +1306,10 @@
 	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();

Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp	2006-10-28 13:47:16 UTC (rev 24556)
+++ scummvm/trunk/engines/agos/event.cpp	2006-10-28 14:08:35 UTC (rev 24557)
@@ -174,7 +174,7 @@
 	_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 @@
 	vte->script_pointer = code_ptr;
 	vte->sprite_id = cur_sprite;
 	vte->cur_vga_file = curZoneNum;
-	vte->param = param;
 
 	_lockWord &= ~1;
 }
@@ -227,15 +226,11 @@
 			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 @@
 	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;

Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp	2006-10-28 13:47:16 UTC (rev 24556)
+++ scummvm/trunk/engines/agos/vga.cpp	2006-10-28 14:08:35 UTC (rev 24557)
@@ -92,8 +92,6 @@
 	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 @@
 	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::vc11_onStop() {
-	uint a = vcReadNextWord();
-	debug(0, "vc11_onStop: stub (%d)", a);
-}
-
 void AGOSEngine::vc12_delay() {
 	VgaSprite *vsp = findCurSprite();
 	uint16 num;

Modified: scummvm/trunk/engines/agos/vga_e2.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_e2.cpp	2006-10-28 13:47:16 UTC (rev 24556)
+++ scummvm/trunk/engines/agos/vga_e2.cpp	2006-10-28 14:08:35 UTC (rev 24557)
@@ -34,7 +34,6 @@
 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;

Modified: scummvm/trunk/engines/agos/vga_ff.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_ff.cpp	2006-10-28 13:47:16 UTC (rev 24556)
+++ scummvm/trunk/engines/agos/vga_ff.cpp	2006-10-28 14:08:35 UTC (rev 24557)
@@ -31,7 +31,6 @@
 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 @@
 	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;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list