[Scummvm-cvs-logs] CVS: scummvm/sky screen.cpp,1.8,1.9 text.cpp,1.18,1.19
Joost Peters
joostp at users.sourceforge.net
Sat May 3 16:33:10 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv28249/sky
Modified Files:
screen.cpp text.cpp
Log Message:
fixed pink-text bug
Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/screen.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- screen.cpp 25 Apr 2003 23:14:40 -0000 1.8
+++ screen.cpp 3 May 2003 23:32:04 -0000 1.9
@@ -65,21 +65,21 @@
//set the remaining colors
for (i = 0; i < (VGA_COLOURS-GAME_COLOURS); i++) {
- tmpPal[GAME_COLOURS + i * 4] = (top16Colours[i * 3] << 2) + (top16Colours[i * 3] & 3);
- tmpPal[GAME_COLOURS + i * 4 + 1] = (top16Colours[i * 3 + 1] << 2) + (top16Colours[i * 3 + 1] & 3);
- tmpPal[GAME_COLOURS + i * 4 + 2] = (top16Colours[i * 3 + 2] << 2) + (top16Colours[i * 3 + 2] & 3);
- tmpPal[GAME_COLOURS + i * 4 + 3] = 0x00;
+ tmpPal[4 * GAME_COLOURS + i * 4] = (top16Colours[i * 3] << 2) + (top16Colours[i * 3] & 3);
+ tmpPal[4 * GAME_COLOURS + i * 4 + 1] = (top16Colours[i * 3 + 1] << 2) + (top16Colours[i * 3 + 1] & 3);
+ tmpPal[4 * GAME_COLOURS + i * 4 + 2] = (top16Colours[i * 3 + 2] << 2) + (top16Colours[i * 3 + 2] & 3);
+ tmpPal[4 * GAME_COLOURS + i * 4 + 3] = 0x00;
}
//set the palette
- _system->set_palette(tmpPal, 0, 256);
+ _system->set_palette(tmpPal, 0, VGA_COLOURS);
}
//set a new palette, pal is a pointer to dos vga rgb components 0..63
void SkyState::setPalette(uint8 *pal) {
convertPalette(pal, _palette);
- _system->set_palette(_palette, 0, 256);
+ _system->set_palette(_palette, 0, GAME_COLOURS);
}
void SkyState::convertPalette(uint8 *inPal, uint8* outPal) { //convert 3 byte 0..63 rgb to 4byte 0..255 rgbx
@@ -108,8 +108,8 @@
int i = 32;
do {
- palette_fadedown_helper((uint32 *)_palette, 256);
- _system->set_palette(_palette, 0, 256);
+ palette_fadedown_helper((uint32 *)_palette, GAME_COLOURS);
+ _system->set_palette(_palette, 0, GAME_COLOURS);
_system->update_screen();
delay(10);
@@ -150,8 +150,8 @@
do {
- palette_fadeup_helper((uint32 *)_palette, (uint32 *)tmpPal, 256);
- _system->set_palette(_palette, 0, 256);
+ palette_fadeup_helper((uint32 *)_palette, (uint32 *)tmpPal, GAME_COLOURS);
+ _system->set_palette(_palette, 0, GAME_COLOURS);
_system->update_screen();
delay(10);
} while (--i);
Index: text.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- text.cpp 30 Apr 2003 05:47:18 -0000 1.18
+++ text.cpp 3 May 2003 23:32:04 -0000 1.19
@@ -311,9 +311,7 @@
*curPos = color;
else
//black edge
- //FIXME: this is 240 in the original sources (with 1 commented out),
- //yet 240 appears to be white in most palettes.
- *curPos = 1; //240;
+ *curPos = 240;
curPos++;
}
More information about the Scummvm-git-logs
mailing list