[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,1.81,1.82 gfx.h,1.10,1.11 scumm.h,1.82,1.83
Max Horn
fingolfin at users.sourceforge.net
Sun Dec 15 15:41:01 CET 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv28547
Modified Files:
gfx.cpp gfx.h scumm.h
Log Message:
cleanup; reordering stuff in gfx.cpp, trying to group code into logical groups (cursor, bomp, camera, palette, fades)
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- gfx.cpp 15 Dec 2002 21:59:59 -0000 1.81
+++ gfx.cpp 15 Dec 2002 23:40:37 -0000 1.82
@@ -26,11 +26,84 @@
#include "resource.h"
#include "util.h"
+
+#ifdef _MSC_VER
+# pragma warning( disable : 4068 ) // turn off "unknown pragma" warning
+#endif
+
+
enum {
kScrolltime = 500, // ms scrolling is supposed to take
[...2113 lines suppressed...]
+ code = *src++;
+ num = (code >> 1) + 1;
+ if (num > len)
+ num = len;
+ len -= num;
+ if (code & 1) {
+ color = *src++;
+ do
+ *dst++ = color;
+ while (--num);
+ } else {
+ do
+ *dst++ = *src++;
+ while (--num);
+ }
+ }
+ } while (--h);
}
void Scumm::drawBomp(BompDrawData * bd, int decode_mode, int mask) {
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gfx.h 4 Dec 2002 15:00:35 -0000 1.10
+++ gfx.h 15 Dec 2002 23:40:37 -0000 1.11
@@ -114,12 +114,10 @@
public:
Scumm *_vm;
-public:
int _numZBuffer;
int _imgBufOffs[5];
byte _disable_zbuffer;
int32 _numStrips;
-public:
int16 _mask_top, _mask_bottom, _mask_right, _mask_left;
protected:
@@ -174,6 +172,9 @@
void decompressMaskImgOr(byte *dst, byte *src, int height);
void decompressMaskImg(byte *dst, byte *src, int height);
+ void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b);
+ void updateDirtyScreen(VirtScreen *vs);
+
public:
void drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h, int stripnr, int numstrip, byte flag);
void clearUpperMask();
@@ -182,8 +183,6 @@
void enableZBuffer() { _disable_zbuffer--; }
void resetBackground(int top, int bottom, int strip);
- void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b);
- void updateDirtyScreen(VirtScreen *vs);
enum DrawBitmapFlags {
dbAllowMaskOr = 1,
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- scumm.h 15 Dec 2002 20:53:10 -0000 1.82
+++ scumm.h 15 Dec 2002 23:40:37 -0000 1.83
@@ -794,10 +794,6 @@
void fadeIn(int effect);
void fadeOut(int effect);
- void unkScreenEffect1();
- void unkScreenEffect2();
- void unkScreenEffect3();
- void unkScreenEffect4();
void unkScreenEffect5(int a);
void unkScreenEffect6();
void transitionEffect(int a);
@@ -846,7 +842,14 @@
uint16 _palManipCounter;
byte *_palManipPalette;
byte *_palManipIntermediatePal;
+
+ /* For each screen strip, gfxUsageBits contains a bitmask.
+ * The lower 30 bits each correspond to one actor and signify if any part
+ * of that actor is currently contained in that strip.
+ * If the left most bit is set, the strip (background) is dirty needs to be redrawn.
+ */
uint32 gfxUsageBits[410];
+
byte *_shadowPalette;
int _shadowPaletteSize;
byte _currentPalette[3 * 256];
More information about the Scummvm-git-logs
mailing list