[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.482,2.483
Max Horn
fingolfin at users.sourceforge.net
Mon Jan 2 15:37:02 CET 2006
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/kyra animator.cpp,NONE,1.1 animator.h,NONE,1.1 gui.cpp,NONE,1.1 text.cpp,NONE,1.1 text.h,NONE,1.1 timer.cpp,NONE,1.1 debugger.cpp,1.4,1.5 debugger.h,1.2,1.3 kyra.cpp,1.107,1.108 kyra.h,1.60,1.61 module.mk,1.10,1.11 script.cpp,1.21,1.22 script_v1.cpp,1.55,1.56 seqplayer.cpp,1.9,1.10 sprites.cpp,1.16,1.17 sprites.h,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.349,1.350
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8689
Modified Files:
gfx.cpp
Log Message:
V7/V8 games do not use the text masking anymore at all, so we can optimize drawStripToScreen for them (this should improve CoMI speed a bit)
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.482
retrieving revision 2.483
diff -u -d -r2.482 -r2.483
--- gfx.cpp 1 Jan 2006 09:55:56 -0000 2.482
+++ gfx.cpp 2 Jan 2006 23:36:33 -0000 2.483
@@ -535,19 +535,26 @@
// Compute screen etc. buffer pointers
const byte *src = vs->getPixels(x, top);
byte *dst = _compositeBuf + x + y * _screenWidth;
- const byte *text = (byte *)_charset->_textSurface.pixels + x + y * _charset->_textSurface.pitch;
- // Compose the text over the game graphics
- for (int h = 0; h < height; ++h) {
- for (int w = 0; w < width; ++w) {
- if (text[w] == CHARSET_MASK_TRANSPARENCY)
- dst[w] = src[w];
- else
- dst[w] = text[w];
+ if (_version < 7) {
+ // Handle the text mask in older games; newer (V7/V8) games do not use it anymore.
+ const byte *text = (byte *)_charset->_textSurface.pixels + x + y * _charset->_textSurface.pitch;
+
+ // Compose the text over the game graphics
+ for (int h = 0; h < height; ++h) {
+ for (int w = 0; w < width; ++w) {
+ if (text[w] == CHARSET_MASK_TRANSPARENCY)
+ dst[w] = src[w];
+ else
+ dst[w] = text[w];
+ }
+ src += vs->pitch;
+ dst += _screenWidth;
+ text += _charset->_textSurface.pitch;
}
- src += vs->pitch;
- dst += _screenWidth;
- text += _charset->_textSurface.pitch;
+ } else {
+ // Just do a simple blit in V7/V8 games.
+ blit(dst, _screenWidth, src, vs->pitch, width, height);
}
if (_renderMode == Common::kRenderCGA)
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/kyra animator.cpp,NONE,1.1 animator.h,NONE,1.1 gui.cpp,NONE,1.1 text.cpp,NONE,1.1 text.h,NONE,1.1 timer.cpp,NONE,1.1 debugger.cpp,1.4,1.5 debugger.h,1.2,1.3 kyra.cpp,1.107,1.108 kyra.h,1.60,1.61 module.mk,1.10,1.11 script.cpp,1.21,1.22 script_v1.cpp,1.55,1.56 seqplayer.cpp,1.9,1.10 sprites.cpp,1.16,1.17 sprites.h,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm README,1.349,1.350
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list