[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.139,2.140 gfx.h,1.39,1.40
Max Horn
fingolfin at users.sourceforge.net
Wed Jun 4 17:19:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20577
Modified Files:
gfx.cpp gfx.h
Log Message:
there are a few places in maniac and zakdemo where we *do* have to store the run & color <grmbl>
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.139
retrieving revision 2.140
diff -u -d -r2.139 -r2.140
--- gfx.cpp 5 Jun 2003 00:12:23 -0000 2.139
+++ gfx.cpp 5 Jun 2003 00:18:15 -0000 2.140
@@ -989,8 +989,8 @@
const int right = left + (numstrip << 3);
byte *dst = bgbak_ptr;
const byte *src;
- byte color = 0, data = 0;
- int run = 1;
+ byte color, data = 0;
+ int run;
bool dither = false;
byte dither_table[128];
byte *ptr_dither_table;
@@ -998,10 +998,14 @@
int theX, theY, maxX;
if (table) {
+ run = table->run[stripnr];
+ color = table->color[stripnr];
src = smap_ptr + table->offsets[stripnr];
theX = left;
maxX = right;
} else {
+ run = 1;
+ color = 0;
src = smap_ptr;
theX = 0;
maxX = width;
@@ -1022,10 +1026,10 @@
run = data >> 4;
dither = false;
}
+ color = data & 0x0f;
if (run == 0) {
run = *src++;
}
- color = data & 0x0f;
}
if (!dither) {
*ptr_dither_table = color;
@@ -1264,9 +1268,10 @@
for (x = 0 ; x < width; x++) {
if ((x % 8) == 0) {
- assert(x < 160 * 8);
- assert(run == 1);
- table->offsets[x >> 3] = src - bitmapStart;
+ assert(x/8 < 160);
+ table->run[x/8] = run;
+ table->color[x/8] = color;
+ table->offsets[x/8] = src - bitmapStart;
}
for (y = 0; y < height; y++) {
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- gfx.h 4 Jun 2003 21:45:29 -0000 1.39
+++ gfx.h 5 Jun 2003 00:18:15 -0000 1.40
@@ -98,6 +98,8 @@
struct StripTable {
int offsets[160];
+ int run[160];
+ int color[160];
int zoffsets[120]; // FIXME: Why only 120 here?
int zrun[120]; // FIXME: Why only 120 here?
};
More information about the Scummvm-git-logs
mailing list