[Scummvm-cvs-logs] CVS: scummvm/sword2/driver animation.cpp,1.25,1.26 animation.h,1.19,1.20 d_sound.cpp,1.107,1.108 palette.cpp,1.29,1.30 rdwin.cpp,1.43,1.44

Max Horn fingolfin at users.sourceforge.net
Sat Feb 28 05:16:06 CET 2004


Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32588/sword2/driver

Modified Files:
	animation.cpp animation.h d_sound.cpp palette.cpp rdwin.cpp 
Log Message:
renamed more OSystem methods to follow our naming scheme; renamed NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- animation.cpp	22 Feb 2004 18:13:54 -0000	1.25
+++ animation.cpp	28 Feb 2004 12:58:13 -0000	1.26
@@ -121,7 +121,7 @@
 	lutcalcnum = (BITDEPTH + palettes[palnum].end + 2) / (palettes[palnum].end + 2);
 #else
 	buildLookup();
-	overlay = (NewGuiColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(NewGuiColor));
+	overlay = (OverlayColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(OverlayColor));
 	_vm->_system->show_overlay();
 #endif
 
@@ -229,13 +229,13 @@
 
 #else
 
-NewGuiColor *AnimationState::lookup = 0;
+OverlayColor *AnimationState::lookup = 0;
 
 void AnimationState::buildLookup() {
 	if (lookup)
 		return;
 
-	lookup = (NewGuiColor *)calloc(BITDEPTH * BITDEPTH * 256, sizeof(NewGuiColor));
+	lookup = (OverlayColor *)calloc(BITDEPTH * BITDEPTH * 256, sizeof(OverlayColor));
 
 	int y, cb, cr;
 	int r, g, b;
@@ -262,9 +262,9 @@
 }
 
 
-void AnimationState::plotYUV(NewGuiColor *lut, int width, int height, byte *const *dat) {
+void AnimationState::plotYUV(OverlayColor *lut, int width, int height, byte *const *dat) {
 
-	NewGuiColor *ptr = overlay + (MOVIE_HEIGHT - height) / 2 * MOVIE_WIDTH + (MOVIE_WIDTH - width) / 2;
+	OverlayColor *ptr = overlay + (MOVIE_HEIGHT - height) / 2 * MOVIE_WIDTH + (MOVIE_WIDTH - width) / 2;
 
 	int x, y;
 
@@ -289,12 +289,12 @@
 }
 
 void AnimationState::drawTextObject(SpriteInfo *s, uint8 *src) {
-	NewGuiColor *dst = overlay + RENDERWIDE * (s->y) + s->x;
+	OverlayColor *dst = overlay + RENDERWIDE * (s->y) + s->x;
 
 	// FIXME: These aren't the "right" colours, but look good to me.
 
-	NewGuiColor pen = _vm->_system->RGBToColor(255, 255, 255);
-	NewGuiColor border = _vm->_system->RGBToColor(0, 0, 0);
+	OverlayColor pen = _vm->_system->RGBToColor(255, 255, 255);
+	OverlayColor border = _vm->_system->RGBToColor(0, 0, 0);
 
 	for (int y = 0; y < s->h; y++) {
 		for (int x = 0; x < s->w; x++) {
@@ -315,7 +315,7 @@
 }
 
 void AnimationState::clearDisplay(void) {
-	NewGuiColor black = _vm->_system->RGBToColor(0, 0, 0);
+	OverlayColor black = _vm->_system->RGBToColor(0, 0, 0);
 
 	for (int i = 0; i < MOVIE_WIDTH * MOVIE_HEIGHT; i++)
 		overlay[i] = black;

Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- animation.h	15 Feb 2004 14:22:54 -0000	1.19
+++ animation.h	28 Feb 2004 12:58:13 -0000	1.20
@@ -105,8 +105,8 @@
 		byte pal[4 * 256];
 	} palettes[50];
 #else
-	static NewGuiColor *lookup;
-	NewGuiColor *overlay;
+	static OverlayColor *lookup;
+	OverlayColor *overlay;
 #endif
 
 public:
@@ -130,7 +130,7 @@
 	bool checkPaletteSwitch();
 #else
 	void buildLookup(void);
-	void plotYUV(NewGuiColor *lut, int width, int height, byte *const *dat);
+	void plotYUV(OverlayColor *lut, int width, int height, byte *const *dat);
 #endif
 };
 

Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- d_sound.cpp	15 Feb 2004 14:22:54 -0000	1.107
+++ d_sound.cpp	28 Feb 2004 12:58:13 -0000	1.108
@@ -54,7 +54,7 @@
 
 Sound::Sound(Sword2Engine *vm) {
 	_vm = vm;
-	_mutex = _vm->_system->create_mutex();
+	_mutex = _vm->_system->createMutex();
 
 	memset(_fx, 0, sizeof(_fx));
 
@@ -83,7 +83,7 @@
 	for (int i = 0; i < MAXFX; i++)
 		stopFxHandle(i);
 	if (_mutex)
-		_vm->_system->delete_mutex(_mutex);
+		_vm->_system->deleteMutex(_mutex);
 }
 
 void Sound::fxServer(int16 *data, uint len) {

Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/palette.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- palette.cpp	5 Feb 2004 14:19:07 -0000	1.29
+++ palette.cpp	28 Feb 2004 12:58:13 -0000	1.30
@@ -113,11 +113,11 @@
 	if (noEntries) {
 		memcpy(&_palCopy[startEntry][0], colourTable, noEntries * 4);
 		if (fadeNow == RDPAL_INSTANT) {
-			_vm->_system->set_palette((const byte *) _palCopy, startEntry, noEntries);
+			_vm->_system->setPalette((const byte *) _palCopy, startEntry, noEntries);
 			setNeedFullRedraw();
 		}
 	} else {
-		_vm->_system->set_palette((const byte *) _palCopy, 0, 256);
+		_vm->_system->setPalette((const byte *) _palCopy, 0, 256);
 		setNeedFullRedraw();
 	}
 }
@@ -128,7 +128,7 @@
 	for (int i = 0; i < 256 * 4; i++)
 		p[i] /= 2;
 
-	_vm->_system->set_palette(p, 0, 256);
+	_vm->_system->setPalette(p, 0, 256);
 	setNeedFullRedraw();
 }
 
@@ -230,7 +230,7 @@
 		}
 	}
 
-	_vm->_system->set_palette(newPalette, 0, 256);
+	_vm->_system->setPalette(newPalette, 0, 256);
 	setNeedFullRedraw();
 }
 

Index: rdwin.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/rdwin.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- rdwin.cpp	24 Feb 2004 22:39:42 -0000	1.43
+++ rdwin.cpp	28 Feb 2004 12:58:13 -0000	1.44
@@ -139,7 +139,7 @@
 	}
 
 	// We always need to update because of fades, menu animations, etc.
-	_vm->_system->update_screen();
+	_vm->_system->updateScreen();
 }
 
 /**





More information about the Scummvm-git-logs mailing list