[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.h,1.29,1.30 gfx.cpp,2.118,2.119 resource.cpp,1.90,1.91 string.cpp,1.120,1.121 scummvm.cpp,2.180,2.181 scumm.h,1.214,1.215
Max Horn
fingolfin at users.sourceforge.net
Mon May 26 06:15:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv15107
Modified Files:
gfx.h gfx.cpp resource.cpp string.cpp scummvm.cpp scumm.h
Log Message:
more const qualifiers
Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gfx.h 15 May 2003 22:30:31 -0000 1.29
+++ gfx.h 26 May 2003 13:14:55 -0000 1.30
@@ -134,28 +134,28 @@
/* Bitmap decompressors */
bool decompressBitmap(byte *bgbak_ptr, byte *smap_ptr, int numLinesToProcess);
- void decodeStripEGA(byte *dst, byte *src, int height);
- void decodeStripOldEGA(byte *dst, byte *src, int height, int stripnr);
- void decompressMaskImgOld(byte *dst, byte *src, int stripnr);
- void unkDecodeA(byte *dst, byte *src, int height);
- void unkDecodeA_trans(byte *dst, byte *src, int height);
- void unkDecodeB(byte *dst, byte *src, int height);
- void unkDecodeB_trans(byte *dst, byte *src, int height);
- void unkDecodeC(byte *dst, byte *src, int height);
- void unkDecodeC_trans(byte *dst, byte *src, int height);
+ void decodeStripEGA(byte *dst, const byte *src, int height);
+ void decodeStripOldEGA(byte *dst, const byte *src, int height, int stripnr);
+ void decompressMaskImgOld(byte *dst, const byte *src, int stripnr);
+ void unkDecodeA(byte *dst, const byte *src, int height);
+ void unkDecodeA_trans(byte *dst, const byte *src, int height);
+ void unkDecodeB(byte *dst, const byte *src, int height);
+ void unkDecodeB_trans(byte *dst, const byte *src, int height);
+ void unkDecodeC(byte *dst, const byte *src, int height);
+ void unkDecodeC_trans(byte *dst, const byte *src, int height);
- void unkDecode7(byte *dst, byte *src, int height);
- void unkDecode8(byte *dst, byte *src, int height);
- void unkDecode9(byte *dst, byte *src, int height);
- void unkDecode10(byte *dst, byte *src, int height);
- void unkDecode11(byte *dst, byte *src, int height);
+ void unkDecode7(byte *dst, const byte *src, int height);
+ void unkDecode8(byte *dst, const byte *src, int height);
+ void unkDecode9(byte *dst, const byte *src, int height);
+ void unkDecode10(byte *dst, const byte *src, int height);
+ void unkDecode11(byte *dst, const byte *src, int height);
- void draw8ColWithMasking(byte *dst, byte *src, int height, byte *mask);
- void draw8Col(byte *dst, byte *src, int height);
+ void draw8ColWithMasking(byte *dst, const byte *src, int height, byte *mask);
+ void draw8Col(byte *dst, const byte *src, int height);
void clear8ColWithMasking(byte *dst, int height, byte *mask);
void clear8Col(byte *dst, int height);
- void decompressMaskImgOr(byte *dst, byte *src, int height);
- void decompressMaskImg(byte *dst, byte *src, int height);
+ void decompressMaskImgOr(byte *dst, const byte *src, int height);
+ void decompressMaskImg(byte *dst, const byte *src, int height);
void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b);
void updateDirtyScreen(VirtScreen *vs);
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.118
retrieving revision 2.119
diff -u -d -r2.118 -r2.119
--- gfx.cpp 24 May 2003 21:33:54 -0000 2.118
+++ gfx.cpp 26 May 2003 13:14:55 -0000 2.119
@@ -510,7 +510,7 @@
}
}
-void Scumm::blit(byte *dst, byte *src, int w, int h) {
+void Scumm::blit(byte *dst, const byte *src, int w, int h) {
assert(h > 0);
assert(src != NULL);
assert(dst != NULL);
@@ -1276,7 +1276,7 @@
}
}
-void Gdi::decodeStripEGA(byte *dst, byte *src, int height) {
+void Gdi::decodeStripEGA(byte *dst, const byte *src, int height) {
byte color = 0;
int run = 0, x = 0, y = 0, z;
@@ -1438,7 +1438,7 @@
return useOrDecompress;
}
-void Gdi::draw8ColWithMasking(byte *dst, byte *src, int height, byte *mask) {
+void Gdi::draw8ColWithMasking(byte *dst, const byte *src, int height, byte *mask) {
byte maskbits;
do {
@@ -1464,8 +1464,8 @@
#if defined(SCUMM_NEED_ALIGNMENT)
memcpy(dst, src, 8);
#else
- ((uint32 *)dst)[0] = ((uint32 *)src)[0];
- ((uint32 *)dst)[1] = ((uint32 *)src)[1];
+ ((uint32 *)dst)[0] = ((const uint32 *)src)[0];
+ ((uint32 *)dst)[1] = ((const uint32 *)src)[1];
#endif
}
src += _vm->_screenWidth;
@@ -1509,13 +1509,13 @@
} while (--height);
}
-void Gdi::draw8Col(byte *dst, byte *src, int height) {
+void Gdi::draw8Col(byte *dst, const byte *src, int height) {
do {
#if defined(SCUMM_NEED_ALIGNMENT)
memcpy(dst, src, 8);
#else
- ((uint32 *)dst)[0] = ((uint32 *)src)[0];
- ((uint32 *)dst)[1] = ((uint32 *)src)[1];
+ ((uint32 *)dst)[0] = ((const uint32 *)src)[0];
+ ((uint32 *)dst)[1] = ((const uint32 *)src)[1];
#endif
dst += _vm->_screenWidth;
src += _vm->_screenWidth;
@@ -1534,7 +1534,7 @@
} while (--height);
}
-void Gdi::decompressMaskImg(byte *dst, byte *src, int height) {
+void Gdi::decompressMaskImg(byte *dst, const byte *src, int height) {
byte b, c;
while (height) {
@@ -1559,7 +1559,7 @@
}
}
-void Gdi::decompressMaskImgOr(byte *dst, byte *src, int height) {
+void Gdi::decompressMaskImgOr(byte *dst, const byte *src, int height) {
byte b, c;
while (height) {
@@ -1592,7 +1592,7 @@
} \
} while (0)
-void Gdi::unkDecodeA(byte *dst, byte *src, int height) {
+void Gdi::unkDecodeA(byte *dst, const byte *src, int height) {
byte color = *src++;
uint bits = *src++;
byte cl = 8;
@@ -1640,7 +1640,7 @@
} while (--height);
}
-void Gdi::unkDecodeA_trans(byte *dst, byte *src, int height) {
+void Gdi::unkDecodeA_trans(byte *dst, const byte *src, int height) {
byte color = *src++;
uint bits = *src++;
byte cl = 8;
@@ -1692,7 +1692,7 @@
} while (--height);
}
-void Gdi::unkDecodeB(byte *dst, byte *src, int height) {
+void Gdi::unkDecodeB(byte *dst, const byte *src, int height) {
byte color = *src++;
uint bits = *src++;
byte cl = 8;
@@ -1722,7 +1722,7 @@
} while (--height);
}
-void Gdi::unkDecodeB_trans(byte *dst, byte *src, int height) {
+void Gdi::unkDecodeB_trans(byte *dst, const byte *src, int height) {
byte color = *src++;
uint bits = *src++;
byte cl = 8;
@@ -1754,7 +1754,7 @@
} while (--height);
}
-void Gdi::unkDecodeC(byte *dst, byte *src, int height) {
+void Gdi::unkDecodeC(byte *dst, const byte *src, int height) {
byte color = *src++;
uint bits = *src++;
byte cl = 8;
@@ -1786,7 +1786,7 @@
} while (--x);
}
-void Gdi::unkDecodeC_trans(byte *dst, byte *src, int height) {
+void Gdi::unkDecodeC_trans(byte *dst, const byte *src, int height) {
byte color = *src++;
uint bits = *src++;
byte cl = 8;
@@ -1839,7 +1839,7 @@
h = height; \
}
-void Gdi::unkDecode7(byte *dst, byte *src, int height) {
+void Gdi::unkDecode7(byte *dst, const byte *src, int height) {
uint h = height;
if (_vm->_features & GF_OLD256) {
@@ -1855,15 +1855,15 @@
#if defined(SCUMM_NEED_ALIGNMENT)
memcpy(dst, src, 8);
#else
- ((uint32 *)dst)[0] = ((uint32 *)src)[0];
- ((uint32 *)dst)[1] = ((uint32 *)src)[1];
+ ((uint32 *)dst)[0] = ((const uint32 *)src)[0];
+ ((uint32 *)dst)[1] = ((const uint32 *)src)[1];
#endif
dst += _vm->_screenWidth;
src += 8;
} while (--height);
}
-void Gdi::unkDecode8(byte *dst, byte *src, int height) {
+void Gdi::unkDecode8(byte *dst, const byte *src, int height) {
uint h = height;
int x = 8;
@@ -1878,7 +1878,7 @@
}
}
-void Gdi::unkDecode9(byte *dst, byte *src, int height) {
+void Gdi::unkDecode9(byte *dst, const byte *src, int height) {
unsigned char c, bits, color, run;
int i, j;
uint buffer = 0, mask = 128;
@@ -1929,7 +1929,7 @@
}
}
-void Gdi::unkDecode10(byte *dst, byte *src, int height) {
+void Gdi::unkDecode10(byte *dst, const byte *src, int height) {
int i;
unsigned char local_palette[256], numcolors = *src++;
uint h = height;
@@ -1956,7 +1956,7 @@
}
-void Gdi::unkDecode11(byte *dst, byte *src, int height) {
+void Gdi::unkDecode11(byte *dst, const byte *src, int height) {
int bits, i;
uint buffer = 0, mask = 128;
unsigned char inc = 1, color = *src++;
@@ -2733,7 +2733,7 @@
setPalColor(15, 252, 252, 252);
}
-void Scumm::setPaletteFromPtr(byte *ptr) {
+void Scumm::setPaletteFromPtr(const byte *ptr) {
int i;
byte *dest, r, g, b;
int numcolor;
@@ -3607,7 +3607,7 @@
#pragma mark --- Bomp ---
#pragma mark -
-int32 Scumm::bompDecodeLineMode0(byte *src, byte *line_buffer, int32 size) {
+int32 Scumm::bompDecodeLineMode0(const byte *src, byte *line_buffer, int32 size) {
if (size <= 0)
return size;
@@ -3617,7 +3617,7 @@
return size;
}
-int32 Scumm::bompDecodeLineMode1(byte *src, byte *line_buffer, int32 size) {
+int32 Scumm::bompDecodeLineMode1(const byte *src, byte *line_buffer, int32 size) {
int32 t_size = READ_LE_UINT16(src) + 2;
if (size <= 0)
return t_size;
@@ -3644,7 +3644,7 @@
return t_size;
}
-int32 Scumm::bompDecodeLineMode3(byte *src, byte *line_buffer, int32 size) {
+int32 Scumm::bompDecodeLineMode3(const byte *src, byte *line_buffer, int32 size) {
int32 t_size = READ_LE_UINT16(src) + 2;
line_buffer += size;
if (size <= 0)
@@ -3761,7 +3761,7 @@
}
}
-void Scumm::decompressBomp(byte *dst, byte *src, int w, int h) {
+void Scumm::decompressBomp(byte *dst, const byte *src, int w, int h) {
int len, num;
byte code, color;
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- resource.cpp 25 May 2003 02:02:37 -0000 1.90
+++ resource.cpp 26 May 2003 13:14:56 -0000 1.91
@@ -1354,7 +1354,7 @@
return ptr + _resourceHeaderSize;
}
-int Scumm::getResourceDataSize(byte *ptr) {
+int Scumm::getResourceDataSize(const byte *ptr) const {
if (ptr == NULL)
return 0;
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- string.cpp 25 May 2003 12:40:53 -0000 1.120
+++ string.cpp 26 May 2003 13:14:57 -0000 1.121
@@ -334,7 +334,7 @@
gdi._mask = _charset->_str;
}
-void Scumm::drawDescString(byte *msg) {
+void Scumm::drawDescString(const byte *msg) {
byte c, *buf, buffer[256];
buf = _msgPtrToAdd = buffer;
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.180
retrieving revision 2.181
diff -u -d -r2.180 -r2.181
--- scummvm.cpp 24 May 2003 22:42:26 -0000 2.180
+++ scummvm.cpp 26 May 2003 13:14:57 -0000 2.181
@@ -1600,7 +1600,7 @@
_scaleSlots[slot-1].scale1 = scale1;
}
-void Scumm::dumpResource(char *tag, int idx, byte *ptr, int length) {
+void Scumm::dumpResource(const char *tag, int idx, byte *ptr, int length) {
char buf[256];
File out;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- scumm.h 26 May 2003 02:26:13 -0000 1.214
+++ scumm.h 26 May 2003 13:14:57 -0000 1.215
@@ -621,8 +621,8 @@
int _lastLoadedRoom;
public:
byte *findResourceData(uint32 tag, byte *ptr);
- int getResourceDataSize(byte *ptr);
- void dumpResource(char *tag, int index, byte *ptr, int length = -1);
+ int getResourceDataSize(const byte *ptr) const;
+ void dumpResource(const char *tag, int index, byte *ptr, int length = -1);
protected:
int getArrayId();
@@ -826,7 +826,7 @@
byte *getPalettePtr();
void setupEGAPalette();
void setPalette(int pal);
- void setPaletteFromPtr(byte *ptr);
+ void setPaletteFromPtr(const byte *ptr);
void setPaletteFromRes();
void setPalColor(int index, int r, int g, int b);
void setDirtyColors(int min, int max);
@@ -885,7 +885,7 @@
void dissolveEffect(int width, int height);
void scrollEffect(int dir);
- void blit(byte *dst, byte *src, int w, int h);
+ void blit(byte *dst, const byte *src, int w, int h);
// bomp
protected:
@@ -897,12 +897,12 @@
void drawBomp(BompDrawData *bd, int decode_mode, int mask);
protected:
- void decompressBomp(byte *dst, byte *src, int w, int h);
+ void decompressBomp(byte *dst, const byte *src, int w, int h);
int32 setupBompScale(byte *scalling, int32 size, byte scale);
void bompScaleFuncX(byte *line_buffer, byte *scalling_x_ptr, byte skip, int32 size);
- int32 bompDecodeLineMode0(byte *src, byte *line_buffer, int32 size);
- int32 bompDecodeLineMode1(byte *src, byte *line_buffer, int32 size);
- int32 bompDecodeLineMode3(byte *src, byte *line_buffer, int32 size);
+ int32 bompDecodeLineMode0(const byte *src, byte *line_buffer, int32 size);
+ int32 bompDecodeLineMode1(const byte *src, byte *line_buffer, int32 size);
+ int32 bompDecodeLineMode3(const byte *src, byte *line_buffer, int32 size);
void bompApplyMask(byte *line_buffer, byte *mask_out, byte bits, int32 size);
void bompApplyShadow0(byte *line_buffer, byte *dst, int32 size);
void bompApplyShadow1(byte *line_buffer, byte *dst, int32 size);
@@ -1051,7 +1051,7 @@
protected:
void CHARSET_1();
void drawString(int a);
- void drawDescString(byte *msg);
+ void drawDescString(const byte *msg);
const byte *addMessageToStack(const byte *msg);
void addIntToStack(int var);
void addVerbToStack(int var);
More information about the Scummvm-git-logs
mailing list