[Scummvm-cvs-logs] CVS: scummvm/backends/dc icon.cpp,1.2,1.3 icon.h,1.1.1.1,1.2
Marcus Comstedt
marcus_c at users.sourceforge.net
Sun Aug 3 09:50:04 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/dc selector.cpp,1.11,1.12
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/compacts 0compact.h,1.7,1.8 101comp.h,1.5,1.6 102comp.h,1.5,1.6 10comp.h,1.7,1.8 11comp.h,1.6,1.7 12comp.h,1.6,1.7 13comp.h,1.7,1.8 14comp.h,1.7,1.8 15comp.h,1.6,1.7 16comp.h,1.6,1.7 17comp.h,1.7,1.8 18comp.h,1.6,1.7 19comp.h,1.6,1.7 1compact.h,1.5,1.6 20comp.h,1.6,1.7 21comp.h,1.7,1.8 22comp.h,1.7,1.8 23comp.h,1.6,1.7 24comp.h,1.6,1.7 25comp.h,1.6,1.7 26comp.h,1.6,1.7 27comp.h,1.8,1.9 28comp.h,1.6,1.7 29comp.h,1.6,1.7 2compact.h,1.8,1.9 30comp.h,1.8,1.9 31comp.h,1.8,1.9 32comp.h,1.8,1.9 33comp.h,1.8,1.9 34comp.h,1.7,1.8 36comp.h,1.8,1.9 37comp.h,1.8,1.9 38comp.h,1.8,1.9 39comp.h,1.7,1.8 3compact.h,1.8,1.9 40comp.h,1.7,1.8 41comp.h,1.7,1.8 42comp.h,1.6,1.7 44comp.h,1.7,1.8 45comp.h,1.7,1.8 46comp.h,1.7,1.8 47comp.h,1.7,1.8 48comp.h,1.7,1.8 4compact.h,1.9,1.10 5compact.h,1.8,1.9 65comp.h,1.6,1.7 66comp.h,1.6,1.7 67comp.h,1.7,1.8 68comp.h,1.7,1.8 69comp.h,1.6,1.7 70comp.h,1.6,1.7 71comp.h,1.7,1.8 72comp.h,1.8,1.9 73comp.h,1.9,1.10 74comp.h,1.7,1.8 75comp.h,1.8,1.9 76comp.h,1.7,1.8 77comp.h,1.7,1.8 78comp.h,1.7,1.8 79comp.h,1.7,1.8 80comp.h,1.6,1.7 81comp.h,1.5,1.6 82comp.h,1.5,1.6 90comp.h,1.8,1.9 91comp.h,1.7,1.8 92comp.h,1.7,1.8 93comp.h,1.7,1.8 94comp.h,1.7,1.8 95comp.h,1.7,1.8 96comp.h,1.7,1.8 9compact.h,1.6,1.7 linc_gen.h,1.5,1.6 lincmenu.h,1.6,1.7 objects.h,1.6,1.7 savedata.cpp,1.4,1.5 z_compac.h,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/dc
In directory sc8-pr-cvs1:/tmp/cvs-serv11853
Modified Files:
icon.cpp icon.h
Log Message:
More const.
Index: icon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/icon.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- icon.cpp 7 Mar 2003 15:19:07 -0000 1.2
+++ icon.cpp 3 Aug 2003 16:49:33 -0000 1.3
@@ -132,7 +132,7 @@
return -1;
}
-bool Icon::load_image2(void *data, int len)
+bool Icon::load_image2(const void *data, int len)
{
struct {
int size, w, h;
@@ -156,16 +156,16 @@
return false;
if(hdr.w != 32 || hdr.h != 32 || hdr.bitcnt != 4 || hdr.used > 16)
return false;
- memcpy(palette, ((char *)data)+hdr.size, hdr.used<<2);
- memcpy(bitmap, ((char *)data)+hdr.size+(hdr.used<<2), 32*32/2);
+ memcpy(palette, ((const char *)data)+hdr.size, hdr.used<<2);
+ memcpy(bitmap, ((const char *)data)+hdr.size+(hdr.used<<2), 32*32/2);
for(int i=0; i<16; i++)
palette[i] |= 0xff000000;
for(int i=hdr.used; i<16; i++)
palette[i] = 0;
int unused = find_unused_pixel();
if(unused >= 0) {
- unsigned char *mask =
- ((unsigned char *)data)+hdr.size+(hdr.used<<2)+32*32/2;
+ const unsigned char *mask =
+ ((const unsigned char *)data)+hdr.size+(hdr.used<<2)+32*32/2;
unsigned char *pix = bitmap;
for(int y=0; y<32; y++)
for(int x=0; x<32/8; x++) {
@@ -183,7 +183,7 @@
return true;
}
-bool Icon::load_image1(void *data, int len, int offs)
+bool Icon::load_image1(const void *data, int len, int offs)
{
struct {
char w, h, colors, rsrv;
@@ -192,14 +192,14 @@
} hdr;
if(len < offs+16)
return false;
- memcpy(&hdr, ((char *)data)+offs, 16);
+ memcpy(&hdr, ((const char *)data)+offs, 16);
if(hdr.bytes > 0 && hdr.offs >= 0 && hdr.offs+hdr.bytes <= len)
- return load_image2(((char *)data)+hdr.offs, hdr.bytes);
+ return load_image2(((const char *)data)+hdr.offs, hdr.bytes);
else
return false;
}
-bool Icon::load(void *data, int len, int offs)
+bool Icon::load(const void *data, int len, int offs)
{
struct { short rsrv, type, cnt; } hdr;
memset(bitmap, 0, sizeof(bitmap));
@@ -207,7 +207,7 @@
texture = NULL;
if(len < offs+6)
return false;
- memcpy(&hdr, ((char *)data)+offs, 6);
+ memcpy(&hdr, ((const char *)data)+offs, 6);
if(hdr.type != 1 || hdr.cnt < 1 || offs+6+(hdr.cnt<<4) > len)
return false;
for(int i=0; i<hdr.cnt; i++)
Index: icon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/dc/icon.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- icon.h 21 Aug 2002 16:07:09 -0000 1.1.1.1
+++ icon.h 3 Aug 2003 16:49:33 -0000 1.2
@@ -7,11 +7,11 @@
void *texture;
int find_unused_pixel();
- bool load_image1(void *data, int len, int offs);
- bool load_image2(void *data, int len);
+ bool load_image1(const void *data, int len, int offs);
+ bool load_image2(const void *data, int len);
public:
- bool load(void *data, int len, int offs = 0);
+ bool load(const void *data, int len, int offs = 0);
bool load(const char *filename);
void create_texture();
void set_palette(int pal);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/dc selector.cpp,1.11,1.12
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky/compacts 0compact.h,1.7,1.8 101comp.h,1.5,1.6 102comp.h,1.5,1.6 10comp.h,1.7,1.8 11comp.h,1.6,1.7 12comp.h,1.6,1.7 13comp.h,1.7,1.8 14comp.h,1.7,1.8 15comp.h,1.6,1.7 16comp.h,1.6,1.7 17comp.h,1.7,1.8 18comp.h,1.6,1.7 19comp.h,1.6,1.7 1compact.h,1.5,1.6 20comp.h,1.6,1.7 21comp.h,1.7,1.8 22comp.h,1.7,1.8 23comp.h,1.6,1.7 24comp.h,1.6,1.7 25comp.h,1.6,1.7 26comp.h,1.6,1.7 27comp.h,1.8,1.9 28comp.h,1.6,1.7 29comp.h,1.6,1.7 2compact.h,1.8,1.9 30comp.h,1.8,1.9 31comp.h,1.8,1.9 32comp.h,1.8,1.9 33comp.h,1.8,1.9 34comp.h,1.7,1.8 36comp.h,1.8,1.9 37comp.h,1.8,1.9 38comp.h,1.8,1.9 39comp.h,1.7,1.8 3compact.h,1.8,1.9 40comp.h,1.7,1.8 41comp.h,1.7,1.8 42comp.h,1.6,1.7 44comp.h,1.7,1.8 45comp.h,1.7,1.8 46comp.h,1.7,1.8 47comp.h,1.7,1.8 48comp.h,1.7,1.8 4compact.h,1.9,1.10 5compact.h,1.8,1.9 65comp.h,1.6,1.7 66comp.h,1.6,1.7 67comp.h,1.7,1.8 68comp.h,1.7,1.8 69comp.h,1.6,1.7 70comp.h,1.6,1.7 71comp.h,1.7,1.8 72comp.h,1.8,1.9 73comp.h,1.9,1.10 74comp.h,1.7,1.8 75comp.h,1.8,1.9 76comp.h,1.7,1.8 77comp.h,1.7,1.8 78comp.h,1.7,1.8 79comp.h,1.7,1.8 80comp.h,1.6,1.7 81comp.h,1.5,1.6 82comp.h,1.5,1.6 90comp.h,1.8,1.9 91comp.h,1.7,1.8 92comp.h,1.7,1.8 93comp.h,1.7,1.8 94comp.h,1.7,1.8 95comp.h,1.7,1.8 96comp.h,1.7,1.8 9compact.h,1.6,1.7 linc_gen.h,1.5,1.6 lincmenu.h,1.6,1.7 objects.h,1.6,1.7 savedata.cpp,1.4,1.5 z_compac.h,1.8,1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list