[Scummvm-cvs-logs] SF.net SVN: scummvm: [29860] scummvm/trunk/engines/cine

cyx at users.sourceforge.net cyx at users.sourceforge.net
Fri Dec 14 20:21:19 CET 2007


Revision: 29860
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29860&view=rev
Author:   cyx
Date:     2007-12-14 11:21:19 -0800 (Fri, 14 Dec 2007)

Log Message:
-----------
renamed several structures, variables and functions

Modified Paths:
--------------
    scummvm/trunk/engines/cine/anim.cpp
    scummvm/trunk/engines/cine/anim.h
    scummvm/trunk/engines/cine/cine.cpp
    scummvm/trunk/engines/cine/gfx.cpp
    scummvm/trunk/engines/cine/gfx.h
    scummvm/trunk/engines/cine/main_loop.cpp
    scummvm/trunk/engines/cine/pal.cpp
    scummvm/trunk/engines/cine/pal.h
    scummvm/trunk/engines/cine/script.cpp
    scummvm/trunk/engines/cine/script.h
    scummvm/trunk/engines/cine/texte.cpp
    scummvm/trunk/engines/cine/texte.h
    scummvm/trunk/engines/cine/various.cpp
    scummvm/trunk/engines/cine/various.h

Modified: scummvm/trunk/engines/cine/anim.cpp
===================================================================
--- scummvm/trunk/engines/cine/anim.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/anim.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -36,7 +36,7 @@
 
 namespace Cine {
 
-struct animHeader2Struct {
+struct AnimHeader2Struct {
 	uint32 field_0;
 	uint16 width;
 	uint16 height;
@@ -48,9 +48,9 @@
 
 static uint16 animDataCount = 0;
 
-animHeaderStruct animHeader;
+AnimHeaderStruct animHeader;
 
-animDataEntry animData[] = {
+static const AnimDataEntry animData[] = {
 	{"ALPHA", 0xF},
 	{"TITRE2", 0xF},
 	{"ET", 0xC},
@@ -519,7 +519,7 @@
 }
 
 void loadSet(const char *resourceName, int16 idx) {
-	animHeader2Struct header2;
+	AnimHeader2Struct header2;
 	uint32 fullSize;
 	uint16 numSpriteInAnim;
 	int16 foundFileIdx = findFileInBundle(resourceName);
@@ -678,7 +678,7 @@
 
 			foundFileIdx = currentPtr->fileIdx;
 
-			strcpy(animName, partBuffer[foundFileIdx].partName);	
+			strcpy(animName, partBuffer[foundFileIdx].partName);
 			ptr = dataPtr = readBundleFile(foundFileIdx);
 
 			isSpl  = (strstr(animName, ".SPL")) ? 1 : 0;

Modified: scummvm/trunk/engines/cine/anim.h
===================================================================
--- scummvm/trunk/engines/cine/anim.h	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/anim.h	2007-12-14 19:21:19 UTC (rev 29860)
@@ -28,7 +28,7 @@
 
 namespace Cine {
 
-struct animHeaderStruct {
+struct AnimHeaderStruct {
 	byte field_0;
 	byte field_1;
 	byte field_2;
@@ -49,13 +49,11 @@
 	uint16 field_14;
 };
 
-struct animDataEntry {
+struct AnimDataEntry {
 	char name[9];
 	byte color;
 };
 
-extern animDataEntry animData[];
-
 void freeAnimDataTable(void);
 void freeAnimDataRange(byte startIdx, byte numIdx);
 void loadResource(const char *animName);

Modified: scummvm/trunk/engines/cine/cine.cpp
===================================================================
--- scummvm/trunk/engines/cine/cine.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/cine.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -97,22 +97,19 @@
 }
 
 int CineEngine::go() {
+	gfxInit();
 	CursorMan.showMouse(true);
-
 	mainLoop(1);
-
+	gfxDestroy();
 	delete g_sound;
 	return 0;
 }
 
 
 void CineEngine::initialize() {
-	uint16 i;
-
 	setupOpcodes();
 
 	initLanguage(g_cine->getLanguage());
-	gfxInit();
 
 	textDataPtr = (byte *)malloc(8000);
 
@@ -131,35 +128,13 @@
 		loadErrmessDat("errmess.dat");
 	}
 
-	for (i = 0; i < NUM_MAX_OBJECT; i++) {
-		objectTable[i].part = 0;
-		objectTable[i].name[0] = 0;
-	}
+	memset(objectTable, 0, sizeof(objectTable));
+	memset(globalVars, 0, sizeof(globalVars));
+	memset(scriptTable, 0, sizeof(scriptTable));
+	memset(messageTable, 0, sizeof(scriptTable));
+	memset(relTable, 0, sizeof(scriptTable));
 
-	for (i = 0; i < NUM_MAX_VAR; i++) {
-		globalVars[i] = 0;
-	}
-
-	for (i = 0; i < NUM_MAX_SCRIPT; i++) {
-		scriptTable[i].ptr = NULL;
-		scriptTable[i].size = 0;
-	}
-
-	for (i = 0; i < NUM_MAX_MESSAGE; i++) {
-		messageTable[i].ptr = NULL;
-		messageTable[i].len = 0;
-	}
-
-	for (i = 0; i < NUM_MAX_REL; i++) {
-		relTable[i].data = NULL;
-		relTable[i].size = 0;
-		relTable[i].obj1Param1 = 0;
-		relTable[i].obj1Param2 = 0;
-		relTable[i].obj2Param = 0;
-		relTable[i].runCount = 0;
-	}
-
-	for (i = 0; i < NUM_MAX_ANIMDATA; i++) {
+	for (int i = 0; i < NUM_MAX_ANIMDATA; i++) {
 		animDataTable[i].ptr1 = animDataTable[i].ptr2 = NULL;
 	}
 

Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/gfx.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -35,6 +35,8 @@
 namespace Cine {
 
 uint16 c_palette[256];
+byte colorMode256 = 0;
+byte palette256[256 * 3];
 
 byte *screenBuffer;
 byte *page1Raw;
@@ -106,6 +108,13 @@
 	additionalBgTable[8] = page3Raw;
 }
 
+void gfxDestroy() {
+	free(screenBuffer);
+	free(page1Raw);
+	free(page2Raw);
+	free(page3Raw);
+}
+
 void setMouseCursor(int cursor) {
 	static int currentMouseCursor = -1;
 	assert(cursor >= 0 && cursor < 3);
@@ -433,15 +442,6 @@
 	}
 }
 
-void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5) {
-}
-
-void ptrGfxFunc13(void) {
-}
-
-void gfxFuncGen2(void) {
-}
-
 void blitRawScreen(byte *frontBuffer) {
 	gfxFlipRawPage(frontBuffer);
 }

Modified: scummvm/trunk/engines/cine/gfx.h
===================================================================
--- scummvm/trunk/engines/cine/gfx.h	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/gfx.h	2007-12-14 19:21:19 UTC (rev 29860)
@@ -35,8 +35,11 @@
 extern byte *page3Raw;
 
 extern uint16 c_palette[256];
+extern byte colorMode256;
+extern byte palette256[256 * 3];
 
 void gfxInit();
+void gfxDestroy();
 void setMouseCursor(int cursor);
 void gfxCopyPage(byte *source, byte *dest);
 
@@ -67,8 +70,8 @@
 void fadeToBlack(void);
 
 void gfxDrawMaskedSprite(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5);
-void ptrGfxFunc13(void);
-void gfxFuncGen2(void);
+void gfxWaitVBL(void);
+void gfxRedrawMouseCursor(void);
 
 void blitScreen(byte *frontBuffer, byte *backbuffer);
 void blitRawScreen(byte *frontBuffer);

Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/main_loop.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -36,12 +36,12 @@
 
 namespace Cine {
 
-struct mouseStatusStruct {
+struct MouseStatusStruct {
 	int left;
 	int right;
 };
 
-mouseStatusStruct mouseData;
+MouseStatusStruct mouseData;
 
 uint16 mouseRight = 0;
 uint16 mouseLeft = 0;
@@ -62,7 +62,7 @@
 	case Common::EVENT_MOUSEMOVE:
 		break;
 	case Common::EVENT_QUIT:
-		g_system->quit();
+		exitEngine = 1;
 		break;
 	case Common::EVENT_KEYDOWN:
 		switch (event.kbd.keycode) {
@@ -180,7 +180,7 @@
 }
 
 void CineEngine::mainLoop(int bootScriptIdx) {
-	uint16 var_6;
+	bool playerAction;
 	uint16 quitFlag;
 	uint16 i;
 	byte di;
@@ -204,12 +204,10 @@
 
 		menuVar = 0;
 
-//		gfxFuncGen1(page0c, page0, page0c, page0, -1);
+//		gfxRedrawPage(page0c, page0, page0c, page0, -1);
+//		gfxWaitVBL();
+//		gfxRedrawMouseCursor();
 
-		ptrGfxFunc13();
-
-		gfxFuncGen2();
-
 		inMenu = false;
 		allowPlayerInput = 0;
 		checkForPendingDataLoadSwitch = 0;
@@ -233,7 +231,7 @@
 			c_palette[i] = 0;
 		}
 
-		var17 = 1;
+		_paletteNeedUpdate = true;
 
 		strcpy(newPrcName, "");
 		strcpy(newRelName, "");
@@ -247,13 +245,9 @@
 	}
 
 	do {
-		mainLoopSub3();
+		stopMusicAfterFadeOut();
 		di = executePlayerInput();
 
-//		if (g_sfxPlayer->_fadeOutCounter != 0 && g_sfxPlayer->_fadeOutCounter < 100) {
-//			g_sfxPlayer->stop();
-//		}
-
 		processSeqList();
 		executeList1();
 		executeList0();
@@ -271,13 +265,12 @@
 		flip();
 
 		if (waitForPlayerClick) {
-			var_6 = 0;
+			playerAction = false;
 
-			var20 <<= 3;
+			_messageLen <<= 3;
+			if (_messageLen < 0x800)
+				_messageLen = 0x800;
 
-			if (var20 < 0x800)
-				var20 = 0x800;
-
 			do {
 				manageEvents();
 				getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16);
@@ -288,17 +281,9 @@
 			do {
 				manageEvents();
 				getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16);
-
-				if (mouseButton == 0) {
-					if (processKeyboard(menuVar)) {
-						var_6 = 1;
-					}
-				} else {
-					var_6 = 1;
-				}
-
+				playerAction = (mouseButton != 0) || processKeyboard(menuVar);
 				mainLoopSub6();
-			} while (!var_6);
+			} while (!playerAction);
 
 			menuVar = 0;
 
@@ -329,7 +314,7 @@
 
 		manageEvents();
 
-	} while (!exitEngine && !quitFlag && var21 != 7);
+	} while (!exitEngine && !quitFlag && _danKeysPressed != 7);
 
 	hideMouse();
 	g_sound->stopMusic();

Modified: scummvm/trunk/engines/cine/pal.cpp
===================================================================
--- scummvm/trunk/engines/cine/pal.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/pal.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -30,15 +30,12 @@
 
 uint16 tempPalette[256];
 
-byte colorMode256 = 0;
-byte palette256[256 * 3];
-
 uint16 palEntriesCount;
 
 PalEntry *palPtr = NULL;
 
-byte paletteBuffer1[16];
-byte paletteBuffer2[16];
+static byte paletteBuffer1[16];
+static byte paletteBuffer2[16];
 
 void loadPal(const char *fileName) {
 	char buffer[20];
@@ -60,7 +57,7 @@
 
 	palEntriesCount = palFileHandle.readUint16LE();
 	palFileHandle.readUint16LE(); // entry size
-	
+
 	palPtr = (PalEntry *)malloc(palEntriesCount * sizeof(PalEntry));
 	assert(palPtr);
 	for (int i = 0; i < palEntriesCount; ++i) {

Modified: scummvm/trunk/engines/cine/pal.h
===================================================================
--- scummvm/trunk/engines/cine/pal.h	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/pal.h	2007-12-14 19:21:19 UTC (rev 29860)
@@ -37,8 +37,6 @@
 void loadPal(const char *fileName);
 
 extern uint16 tempPalette[256];
-extern byte colorMode256;
-extern byte palette256[256 * 3];
 
 void loadRelatedPalette(const char *fileName);
 

Modified: scummvm/trunk/engines/cine/script.cpp
===================================================================
--- scummvm/trunk/engines/cine/script.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/script.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -175,9 +175,9 @@
 		{ 0, 0 },
 		{ 0, 0 },
 		{ 0, 0 },
-		{ o1_op63, "wwww" },
+		{ o1_setScreenDimensions, "wwww" },
 		/* 64 */
-		{ o1_op64, "" },
+		{ o1_displayBackground, "" },
 		{ o1_initializeZoneData, "" },
 		{ o1_setZoneDataEntry, "bw" },
 		{ o1_getZoneDataEntry, "bb" },
@@ -335,9 +335,9 @@
 		{ 0, 0 },
 		{ 0, 0 },
 		{ 0, 0 },
-		{ o1_op63, "wwww" },
+		{ o1_setScreenDimensions, "wwww" },
 		/* 64 */
-		{ o1_op64, "" },
+		{ o1_displayBackground, "" },
 		{ o1_initializeZoneData, "" },
 		{ o1_setZoneDataEntry, "bw" },
 		{ o1_getZoneDataEntry, "bb" },
@@ -525,7 +525,7 @@
 	return 0;
 }
 
-scriptStruct scriptTable[NUM_MAX_SCRIPT];
+ScriptStruct scriptTable[NUM_MAX_SCRIPT];
 
 void stopGlobalScript(uint16 scriptIdx) {
 	prcLinkedListStruct *currentHead = &globalScriptsHead;
@@ -1429,8 +1429,8 @@
 	unloadAllMasks();
 }
 
-void o1_op63() {
-	warning("STUB: o1_op63()");
+void o1_setScreenDimensions() {
+	warning("STUB: o1_setScreenDimensions()");
 	getNextWord();
 	getNextWord();
 	getNextWord();
@@ -1438,8 +1438,8 @@
 	// setupScreenParam
 }
 
-void o1_op64() {
-	warning("STUB: o1_op64()");
+void o1_displayBackground() {
+	warning("STUB: o1_displayBackground()");
 }
 
 void o1_initializeZoneData() {
@@ -2761,7 +2761,7 @@
 				sprintf(lineBuffer, "stopSample()\n");
 				break;
 			}
-		case OP_79:
+		case 0x79:
 			{
 				byte param;
 

Modified: scummvm/trunk/engines/cine/script.h
===================================================================
--- scummvm/trunk/engines/cine/script.h	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/script.h	2007-12-14 19:21:19 UTC (rev 29860)
@@ -30,7 +30,7 @@
 
 #define SCRIPT_STACK_SIZE 50
 
-struct scriptStruct {
+struct ScriptStruct {
 	byte *ptr;
 	uint16 size;
 	int16 stack[SCRIPT_STACK_SIZE];
@@ -38,9 +38,9 @@
 
 #define NUM_MAX_SCRIPT 50
 
-extern scriptStruct scriptTable[NUM_MAX_SCRIPT];
+extern ScriptStruct scriptTable[NUM_MAX_SCRIPT];
 
- void setupOpcodes(); 
+void setupOpcodes();
 
 void computeScriptStack(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize);
 void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 scriptIdx);
@@ -50,8 +50,6 @@
 #define OP_loadNewPrcName               0x41
 #define OP_requestCheckPendingDataLoad  0x42
 #define OP_endScript                    0x50
-#define OP_changeDataDisk               0x6B
-#define OP_79                           0x79
 
 void addScriptToList0(uint16 idx);
 int16 checkCollision(int16 objIdx, int16 x, int16 y, int16 numZones, int16 zoneIdx);
@@ -122,8 +120,8 @@
 void o1_declareFunctionName();
 void o1_freePartRange();
 void o1_unloadAllMasks();
-void o1_op63();
-void o1_op64();
+void o1_setScreenDimensions();
+void o1_displayBackground();
 void o1_initializeZoneData();
 void o1_setZoneDataEntry();
 void o1_getZoneDataEntry();

Modified: scummvm/trunk/engines/cine/texte.cpp
===================================================================
--- scummvm/trunk/engines/cine/texte.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/texte.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -34,9 +34,9 @@
 byte textTable[256][2][16 * 8];
 
 const char **failureMessages;
-const commandeType *defaultActionCommand;
-const commandeType *systemMenu;
-const commandeType *confirmMenu;
+const CommandeType *defaultActionCommand;
+const CommandeType *systemMenu;
+const CommandeType *confirmMenu;
 const char **otherMessages;
 const char *commandPrepositionOn;
 
@@ -200,7 +200,7 @@
 		"A wall of silence ..."
 	};
 
-	static const commandeType defaultActionCommand_EN[] = {
+	static const CommandeType defaultActionCommand_EN[] = {
 		"EXAMINE",
 		"TAKE",
 		"INVENTORY",
@@ -210,7 +210,7 @@
 		"NOACTION"
 	};
 
-	static const commandeType systemMenu_EN[] = {
+	static const CommandeType systemMenu_EN[] = {
 		"Pause",
 		"Restart Game",
 		"Quit",
@@ -230,7 +230,7 @@
 		"on"
 	};
 
-	static const commandeType confirmMenu_EN[] = {
+	static const CommandeType confirmMenu_EN[] = {
 		"Ok, go ahead ...",
 		"Absolutely Not!"
 	};
@@ -268,7 +268,7 @@
 		"Un mur de silence ..."
 	};
 
-	static const commandeType defaultActionCommand_FR[] = {
+	static const CommandeType defaultActionCommand_FR[] = {
 		"EXAMINER",
 		"PRENDRE",
 		"INVENTAIRE",
@@ -278,7 +278,7 @@
 		"NOACTION"
 	};
 
-	static const commandeType systemMenu_FR[] = {
+	static const CommandeType systemMenu_FR[] = {
 		"Pause",
 		"Nouvelle partie",
 		"Quitter",
@@ -287,7 +287,7 @@
 		"Sauver la partie"
 	};
 
-	static const commandeType confirmMenu_FR[] = {
+	static const CommandeType confirmMenu_FR[] = {
 		"Ok , Vas-y ...",
 		"Surtout Pas !"
 	};
@@ -336,7 +336,7 @@
 		"Un muro de silencio ..."
 	};
 
-	static const commandeType defaultActionCommand_ES[] = {
+	static const CommandeType defaultActionCommand_ES[] = {
 		"EXAMINAR",
 		"COGER",
 		"INVENTARIO",
@@ -346,7 +346,7 @@
 		"NOACTION"
 	};
 
-	static const commandeType systemMenu_ES[] = {
+	static const CommandeType systemMenu_ES[] = {
 		"Pause",
 		"Nueva partida",
 		"Abandonar",
@@ -355,7 +355,7 @@
 		"Salvar la partida"
 	};
 
-	static const commandeType confirmMenu_ES[] = {
+	static const CommandeType confirmMenu_ES[] = {
 		"Ok , Vas a ...",
 		"Nade de nada !"
 	};
@@ -404,7 +404,7 @@
 		"Eine Wand des Schweigens..."
 	};
 
-	static const commandeType defaultActionCommand_DE[] = {
+	static const CommandeType defaultActionCommand_DE[] = {
 		"Pr\x81""fe",
 		"Nimm",
 		"Bestand",
@@ -414,7 +414,7 @@
 		"NOACTION"
 	};
 
-	static const commandeType systemMenu_DE[] = {
+	static const CommandeType systemMenu_DE[] = {
 		"Pause",
 		"Spiel Neu Starten",
 		"Lassen",
@@ -423,7 +423,7 @@
 		"Spiel Speichern"
 	};
 
-	static const commandeType confirmMenu_DE[] = {
+	static const CommandeType confirmMenu_DE[] = {
 		"Gut, Weitermachen",
 		"Absolut Nicht!"
 	};
@@ -472,7 +472,7 @@
 		"Un muro di silenzio ..."
 	};
 
-	static const commandeType defaultActionCommand_IT[] = {
+	static const CommandeType defaultActionCommand_IT[] = {
 		"ESAMINARE",
 		"PRENDERE",
 		"INVENTARIO",
@@ -482,7 +482,7 @@
 		"NOACTION"
 	};
 
-	static const commandeType systemMenu_IT[] = {
+	static const CommandeType systemMenu_IT[] = {
 		"Pausa",
 		"Parte nuova",
 		"Quit",
@@ -491,7 +491,7 @@
 		"Salvare una parte"
 	};
 
-	static const commandeType confirmMenu_IT[] = {
+	static const CommandeType confirmMenu_IT[] = {
 		"Ok, vacci ...",
 		"Supratutto non!"
 	};

Modified: scummvm/trunk/engines/cine/texte.h
===================================================================
--- scummvm/trunk/engines/cine/texte.h	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/texte.h	2007-12-14 19:21:19 UTC (rev 29860)
@@ -31,15 +31,15 @@
 
 namespace Cine {
 
-typedef char commandeType[20];
+typedef char CommandeType[20];
 
 extern byte *textDataPtr;
 extern byte textTable[256][2][16 * 8];
 
 extern const char **failureMessages;
-extern const commandeType *defaultActionCommand;
-extern const commandeType *systemMenu;
-extern const commandeType *confirmMenu;
+extern const CommandeType *defaultActionCommand;
+extern const CommandeType *systemMenu;
+extern const CommandeType *confirmMenu;
 extern const char **otherMessages;
 extern const char *commandPrepositionOn;
 

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/various.cpp	2007-12-14 19:21:19 UTC (rev 29860)
@@ -44,10 +44,8 @@
 int16 commandVar1;
 int16 commandVar2;
 
-unk1Struct messageTable[NUM_MAX_MESSAGE];
+Message messageTable[NUM_MAX_MESSAGE];
 
-uint32 var6;
-
 uint16 var2;
 uint16 var3;
 uint16 var4;
@@ -74,11 +72,9 @@
 uint16 isDrawCommandEnabled;
 uint16 waitForPlayerClick;
 uint16 menuCommandLen;
-uint16 var17;
-uint16 var18;
-uint16 var19;
-uint16 var20;
-byte var21;
+bool _paletteNeedUpdate;
+uint16 _messageLen;
+byte _danKeysPressed;
 
 int16 playerCommand;
 
@@ -105,16 +101,16 @@
 byte inputVar1 = 0;
 uint16 inputVar2 = 0, inputVar3 = 0;
 
-selectedObjStruct currentSelectedObject;
+SelectedObjStruct currentSelectedObject;
 
-static commandeType currentSaveName[10];
+static CommandeType currentSaveName[10];
 int16 currentDisk;
 
 static const int16 choiceResultTable[] = { 1, 1, 1, 2, 1, 1, 1 };
 static const int16 subObjectUseTable[] = { 3, 3, 3, 3, 3, 0, 0 };
 static const int16 canUseOnItemTable[] = { 1, 0, 0, 1, 1, 0, 0 };
 
-commandeType objectListCommand[20];
+CommandeType objectListCommand[20];
 int16 objListTab[20];
 
 uint16 exitEngine;
@@ -122,7 +118,10 @@
 uint16 zoneData[NUM_MAX_ZONE];
 
 
-void mainLoopSub3(void) {
+void stopMusicAfterFadeOut(void) {
+//	if (g_sfxPlayer->_fadeOutCounter != 0 && g_sfxPlayer->_fadeOutCounter < 100) {
+//		g_sfxPlayer->stop();
+//	}
 }
 
 int16 stopObjectScript(int16 entryIdx) {
@@ -217,7 +216,7 @@
 	currentHeadPtr->previous = pNewElement;
 }
 
-int16 getRelEntryForObject(uint16 param1, uint16 param2, selectedObjStruct *pSelectedObject) {
+int16 getRelEntryForObject(uint16 param1, uint16 param2, SelectedObjStruct *pSelectedObject) {
 	int16 i;
 	int16 di = -1;
 
@@ -1016,7 +1015,7 @@
 	gfxDrawLine(x + width - offset, y + offset, x + width - offset, currentY + 4 - offset, color, page);	// right
 }
 
-void makeTextEntry(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width) {
+void makeTextEntry(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width) {
 	byte color = 2;
 	byte color2 = defaultMenuBoxColor2;
 	int16 paramY = (height * 9) + 10;
@@ -1193,7 +1192,7 @@
 			isDrawCommandEnabled = 1;
 
 			if (playerCommand != -1 && choiceResultTable[playerCommand] == commandVar1) {
-				selectedObjStruct obj;
+				SelectedObjStruct obj;
 				obj.idx = commandVar3[0];
 				obj.param = commandVar3[1];
 				int16 di = getRelEntryForObject(playerCommand, commandVar1, &obj);
@@ -1215,7 +1214,7 @@
 uint16 menuVar4 = 0;
 uint16 menuVar5 = 0;
 
-int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y,
+int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y,
     uint16 width, bool recheckValue) {
 	byte color = 2;
 	byte color2 = defaultMenuBoxColor2;
@@ -1365,9 +1364,9 @@
 
 			blitRawScreen(page1Raw);
 
-			if (needMouseSave) {
-				gfxFuncGen2();
-			}
+//			if (needMouseSave) {
+//				gfxRedrawMouseCursor();
+//			}
 		}
 
 	} while (!var_A);
@@ -1401,7 +1400,7 @@
 
 	gfxDrawPlainBoxRaw(x, y, x + 300, y + 10, 0, page2Raw);
 
-	drawMessageBox(x, y, 300, y + 6, -1, lColor, page2Raw);		
+	drawMessageBox(x, y, 300, y + 6, -1, lColor, page2Raw);
 
 	x += 2;
 	y += 2;
@@ -1422,7 +1421,7 @@
 		}
 	}
 
-	gfxFuncGen2();
+//	gfxRedrawMouseCursor();
 }
 
 void makeActionMenu(void) {
@@ -1516,7 +1515,7 @@
 							int16 relEntry;
 
 							drawMenuBox(commandBuffer, 10, defaultMenuBoxColor);
-							selectedObjStruct obj;
+							SelectedObjStruct obj;
 							obj.idx = commandVar3[0];
 							obj.param = commandVar3[1];
 
@@ -1895,7 +1894,7 @@
 		return;
 	}
 
-	var20 += strlen(messagePtr);
+	_messageLen += strlen(messagePtr);
 
 	drawMessage(messagePtr, x, y, width, color);
 
@@ -1908,7 +1907,7 @@
 	const char *messagePtr = failureMessages[msgIdx];
 	int len = strlen(messagePtr);
 
-	var20 += len;
+	_messageLen += len;
 
 	int16 width = 6 * len + 20;
 
@@ -1935,7 +1934,7 @@
 
 	backupOverlayPage();
 
-	var20 = 0;
+	_messageLen = 0;
 
 	currentOverlay = (&overlayHead)->next;
 
@@ -1995,10 +1994,9 @@
 
 				drawDialogueMessage(messageIdx, x, y, partVar1, partVar2);
 
-				//blitScreen(page0, NULL);
+				// blitScreen(page0, NULL);
+				// gfxRedrawMouseCursor();
 
-				gfxFuncGen2();
-
 				waitForPlayerClick = 1;
 
 				break;
@@ -2012,10 +2010,9 @@
 
 				drawFailureMessage(currentOverlay->objIdx);
 
-				//blitScreen(page0, NULL);
+				// blitScreen(page0, NULL);
+				// gfxRedrawMouseCursor();
 
-				gfxFuncGen2();
-
 				waitForPlayerClick = 1;
 
 				break;
@@ -2577,7 +2574,7 @@
 
 	int quit = 0;
 	bool redraw = true;
-	commandeType tempString;
+	CommandeType tempString;
 	int inputLength = strlen(inputString);
 	int inputPos = inputLength + 1;
 

Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h	2007-12-14 13:55:18 UTC (rev 29859)
+++ scummvm/trunk/engines/cine/various.h	2007-12-14 19:21:19 UTC (rev 29860)
@@ -35,21 +35,21 @@
 
 void initLanguage(Common::Language lang);
 
-int16 makeMenuChoice(const commandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue = false);
+int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue = false);
 void makeCommandLine(void);
 void makeActionMenu(void);
 
 extern bool disableSystemMenu;
 extern bool inMenu;
 
-struct unk1Struct {
+struct Message {
 	byte *ptr;
 	uint16 len;
 };
 
 #define NUM_MAX_MESSAGE 255
 
-extern unk1Struct messageTable[NUM_MAX_MESSAGE];
+extern Message messageTable[NUM_MAX_MESSAGE];
 
 struct SeqListElement {
 	struct SeqListElement *next;
@@ -71,15 +71,11 @@
 
 extern SeqListElement seqList;
 
-extern uint32 var6;
-extern uint32 var8;
-
 extern uint16 var2;
 extern uint16 var3;
 extern uint16 var4;
 extern uint16 var5;
 
-void mainLoopSub1(void);
 void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4);
 
 extern uint16 errorVar;
@@ -93,11 +89,9 @@
 extern uint16 isDrawCommandEnabled;
 extern uint16 waitForPlayerClick;
 extern uint16 menuCommandLen;
-extern uint16 var17;
-extern uint16 var18;
-extern uint16 var19;
-extern uint16 var20;
-extern byte var21;
+extern bool _paletteNeedUpdate;
+extern uint16 _messageLen;
+extern byte _danKeysPressed;
 
 extern int16 playerCommand;
 
@@ -117,7 +111,7 @@
 extern char currentPartName[15];
 
 void stopSample(void);
-void mainLoopSub3(void);
+void stopMusicAfterFadeOut(void);
 uint16 executePlayerInput(void);
 
 void drawOverlays(void);
@@ -140,7 +134,7 @@
 
 void removeExtention(char *dest, const char *source);
 
-struct selectedObjStruct {
+struct SelectedObjStruct {
 	int16 idx;
 	int16 param;
 };


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