aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorJoost Peters2003-05-03 23:32:04 +0000
committerJoost Peters2003-05-03 23:32:04 +0000
commit6e094b7f2036d916dcb4c40f20b068f44fa3eba0 (patch)
tree6eb81fcf8e08d26e06c048aa745808195ddb6f30 /sky
parent975d325a924a5a55d87d1ed4c3fd1cfb1de9e876 (diff)
downloadscummvm-rg350-6e094b7f2036d916dcb4c40f20b068f44fa3eba0.tar.gz
scummvm-rg350-6e094b7f2036d916dcb4c40f20b068f44fa3eba0.tar.bz2
scummvm-rg350-6e094b7f2036d916dcb4c40f20b068f44fa3eba0.zip
fixed pink-text bug
svn-id: r7294
Diffstat (limited to 'sky')
-rw-r--r--sky/screen.cpp20
-rw-r--r--sky/text.cpp4
2 files changed, 11 insertions, 13 deletions
diff --git a/sky/screen.cpp b/sky/screen.cpp
index b1ee067768..b3db1d4d9e 100644
--- a/sky/screen.cpp
+++ b/sky/screen.cpp
@@ -65,21 +65,21 @@ void SkyState::initialiseScreen(void) {
//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 @@ void SkyState::fnFadeDown(uint8 action) {
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 @@ void SkyState::paletteFadeUp(uint8 *pal) {
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);
diff --git a/sky/text.cpp b/sky/text.cpp
index 15e569f2fe..c9ed08b3c5 100644
--- a/sky/text.cpp
+++ b/sky/text.cpp
@@ -311,9 +311,7 @@ void SkyText::makeGameCharacter(char textChar, uint8 *charSetPtr, uint8 *&dest,
*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++;
}