aboutsummaryrefslogtreecommitdiff
path: root/sky/text.cpp
diff options
context:
space:
mode:
authorJoost Peters2003-04-20 21:50:48 +0000
committerJoost Peters2003-04-20 21:50:48 +0000
commit54c95e809950d8ee2cf9483fb8e9ac8b3355484c (patch)
treeeb045c4db1da9e4f692f57701e3f39c9cedadafc /sky/text.cpp
parent751561d28ea993a5f1a245415a17aff84b57bb6d (diff)
downloadscummvm-rg350-54c95e809950d8ee2cf9483fb8e9ac8b3355484c.tar.gz
scummvm-rg350-54c95e809950d8ee2cf9483fb8e9ac8b3355484c.tar.bz2
scummvm-rg350-54c95e809950d8ee2cf9483fb8e9ac8b3355484c.zip
changed casts to make more sense
svn-id: r7044
Diffstat (limited to 'sky/text.cpp')
-rw-r--r--sky/text.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sky/text.cpp b/sky/text.cpp
index 8b1e24cac2..fc3d5fbd4d 100644
--- a/sky/text.cpp
+++ b/sky/text.cpp
@@ -198,7 +198,7 @@ void SkyText::displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelW
}
lineWidth += *(_characterSet+textChar); //add character width
- lineWidth += (int)_dtCharSpacing; //include character spacing
+ lineWidth += (uint16)_dtCharSpacing; //include character spacing
if (pixelWidth <= lineWidth) {
@@ -238,8 +238,8 @@ void SkyText::displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelW
//make the header
((struct dataFileHeader *)curDest)->s_width = TO_LE_16(_dtLineWidth);
- ((struct dataFileHeader *)curDest)->s_height = TO_LE_16((int)(_charHeight * _dtLines));
- ((struct dataFileHeader *)curDest)->s_sp_size = TO_LE_16((int)(_dtLineWidth * _charHeight * _dtLines));
+ ((struct dataFileHeader *)curDest)->s_height = TO_LE_16((uint16)(_charHeight * _dtLines));
+ ((struct dataFileHeader *)curDest)->s_sp_size = TO_LE_16((uint16)(_dtLineWidth * _charHeight * _dtLines));
((struct dataFileHeader *)curDest)->s_offset_x = TO_LE_16(0);
((struct dataFileHeader *)curDest)->s_offset_y = TO_LE_16(0);
@@ -278,7 +278,7 @@ void SkyText::displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelW
void SkyText::makeGameCharacter(char textChar, uint8 *charSet, uint8 *&dest, uint8 color) {
bool maskBit, dataBit;
- uint8 charWidth = (int)((*(charSet + textChar)) + 1 - _dtCharSpacing);
+ uint8 charWidth = (uint8)((*(charSet + textChar)) + 1 - _dtCharSpacing);
uint16 data, mask;
byte *charSpritePtr = (charSet + CHAR_SET_HEADER + ((_charHeight << 2) * textChar));
byte *startPos = dest;