[Scummvm-cvs-logs] CVS: scummvm/saga gfx.cpp,1.59,1.60 gfx.h,1.37,1.38 script.h,1.109,1.110 sfuncs.cpp,1.167,1.168

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Tue Oct 4 10:45:42 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17153

Modified Files:
	gfx.cpp gfx.h script.h sfuncs.cpp 
Log Message:
Unstubbed sf75() as sfSetPortraitBgColor(), using information from sev. Any
mistake is strictly my own, however.


Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- gfx.cpp	27 Sep 2005 17:38:35 -0000	1.59
+++ gfx.cpp	4 Oct 2005 17:44:41 -0000	1.60
@@ -163,7 +163,6 @@
 	}
 }
 
-
 void Gfx::setPalette(const PalEntry *pal) {
 	int i;
 	byte *ppal;
@@ -182,6 +181,15 @@
 	_system->setPalette(_currentPal, 0, PAL_ENTRIES);
 }
 
+void Gfx::setPaletteColor(int n, int r, int g, int b) {
+	_currentPal[4 * n + 0] = r;
+	_currentPal[4 * n + 1] = g;
+	_currentPal[4 * n + 2] = b;
+	_currentPal[4 * n + 3] = 0;
+
+	_system->setPalette(_currentPal, n, 1);
+}
+
 void Gfx::getCurrentPal(PalEntry *src_pal) {
 	int i;
 	byte *ppal;

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gfx.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- gfx.h	27 Sep 2005 17:38:35 -0000	1.37
+++ gfx.h	4 Oct 2005 17:44:41 -0000	1.38
@@ -135,6 +135,7 @@
 	}
 
 	void setPalette(const PalEntry *pal);
+	void setPaletteColor(int n, int r, int g, int b);
 	void getCurrentPal(PalEntry *src_pal);
 	void palToBlack(PalEntry *src_pal, double percent);
 	void blackToPal(PalEntry *src_pal, double percent);

Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- script.h	28 Sep 2005 15:49:20 -0000	1.109
+++ script.h	4 Oct 2005 17:44:41 -0000	1.110
@@ -562,7 +562,7 @@
 	void sfPsychicProfileOff(SCRIPTFUNC_PARAMS);
 	void sfSetSpeechBox(SCRIPTFUNC_PARAMS);
 	void sf74(SCRIPTFUNC_PARAMS);
-	void sf75(SCRIPTFUNC_PARAMS);
+	void sfSetPortraitBgColor(SCRIPTFUNC_PARAMS);
 	void sfScriptStartVideo(SCRIPTFUNC_PARAMS);
 	void sfScriptReturnFromVideo(SCRIPTFUNC_PARAMS);
 	void sfScriptEndVideo(SCRIPTFUNC_PARAMS);

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -d -r1.167 -r1.168
--- sfuncs.cpp	3 Oct 2005 10:01:09 -0000	1.167
+++ sfuncs.cpp	4 Oct 2005 17:44:41 -0000	1.168
@@ -210,7 +210,7 @@
 		OPCODE(sfFadeMusic),
 		OPCODE(sfNull),
 		OPCODE(sf74),
-		OPCODE(sf75),
+		OPCODE(sfSetPortraitBgColor),
 		OPCODE(sfScriptStartCutAway),
 		OPCODE(sfReturnFromCutAway),
 		OPCODE(sfEndCutAway),
@@ -1844,8 +1844,12 @@
 	SF_stub("sf74", thread, nArgs);
 }
 
-void Script::sf75(SCRIPTFUNC_PARAMS) {
-	SF_stub("sf75", thread, nArgs);
+void Script::sfSetPortraitBgColor(SCRIPTFUNC_PARAMS) {
+	int16 red = thread->pop();
+	int16 green = thread->pop();
+	int16 blue = thread->pop();
+
+	_vm->_gfx->setPaletteColor(254, red, green, blue);
 }
 
 void Script::sfScriptStartCutAway(SCRIPTFUNC_PARAMS) {





More information about the Scummvm-git-logs mailing list