aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2011-10-28 22:54:02 +0300
committerFilippos Karapetis2011-10-28 22:54:02 +0300
commit1cc30572e6807a701a560a7a79d2637bb14e1439 (patch)
tree89e2fbdada9b2c39f415016669152188470d91fc /engines/sci
parent739ceb851dd2f9a8dcc640905727079ca62b0749 (diff)
downloadscummvm-rg350-1cc30572e6807a701a560a7a79d2637bb14e1439.tar.gz
scummvm-rg350-1cc30572e6807a701a560a7a79d2637bb14e1439.tar.bz2
scummvm-rg350-1cc30572e6807a701a560a7a79d2637bb14e1439.zip
SCI: Remove unneeded casts (thanks to wjp for pointing that out)
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kgraphics.cpp16
-rw-r--r--engines/sci/graphics/text32.cpp8
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 1483b99125..76c6778f0a 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1666,8 +1666,8 @@ reg_t kBitmap(EngineState *s, int argc, reg_t *argv) {
memset(memoryPtr + BITMAP_HEADER_SIZE, back, width * height);
// Save totalWidth, totalHeight
// TODO: Save the whole bitmap header, like SSCI does
- WRITE_LE_UINT16((void *)memoryPtr, width);
- WRITE_LE_UINT16((void *)(memoryPtr + 2), height);
+ WRITE_LE_UINT16(memoryPtr, width);
+ WRITE_LE_UINT16(memoryPtr + 2, height);
return memoryId;
}
break;
@@ -1693,8 +1693,8 @@ reg_t kBitmap(EngineState *s, int argc, reg_t *argv) {
byte *memoryPtr = s->_segMan->getHunkPointer(hunkId);
// Get totalWidth, totalHeight
- uint16 totalWidth = READ_LE_UINT16((void *)memoryPtr);
- uint16 totalHeight = READ_LE_UINT16((void *)(memoryPtr + 2));
+ uint16 totalWidth = READ_LE_UINT16(memoryPtr);
+ uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2);
byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE;
GfxView *view = g_sci->_gfxCache->getView(viewNum);
@@ -1734,8 +1734,8 @@ reg_t kBitmap(EngineState *s, int argc, reg_t *argv) {
byte *memoryPtr = s->_segMan->getHunkPointer(hunkId);
// Get totalWidth, totalHeight
- uint16 totalWidth = READ_LE_UINT16((void *)memoryPtr);
- uint16 totalHeight = READ_LE_UINT16((void *)(memoryPtr + 2));
+ uint16 totalWidth = READ_LE_UINT16(memoryPtr);
+ uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2);
byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE;
GfxFont *font = g_sci->_gfxCache->getFont(fontId);
@@ -1777,8 +1777,8 @@ reg_t kBitmap(EngineState *s, int argc, reg_t *argv) {
byte *memoryPtr = s->_segMan->getHunkPointer(hunkId);
// Get totalWidth, totalHeight
- uint16 totalWidth = READ_LE_UINT16((void *)memoryPtr);
- uint16 totalHeight = READ_LE_UINT16((void *)(memoryPtr + 2));
+ uint16 totalWidth = READ_LE_UINT16(memoryPtr);
+ uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2);
uint16 width = MIN<uint16>(totalWidth - x, fillWidth);
uint16 height = MIN<uint16>(totalHeight - y, fillHeight);
byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE;
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index ff26845c51..2981a574b7 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -87,8 +87,8 @@ reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxH
byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE;
// Save totalWidth, totalHeight
- WRITE_LE_UINT16((void *)memoryPtr, width);
- WRITE_LE_UINT16((void *)(memoryPtr + 2), height);
+ WRITE_LE_UINT16(memoryPtr, width);
+ WRITE_LE_UINT16(memoryPtr + 2, height);
int16 charCount = 0;
uint16 curX = 0, curY = 0;
@@ -141,8 +141,8 @@ void GfxText32::drawTextBitmap(reg_t textObject) {
uint16 textX = planeRect.left + x;
uint16 textY = planeRect.top + y;
// Get totalWidth, totalHeight
- uint16 width = READ_LE_UINT16((void *)memoryPtr);
- uint16 height = READ_LE_UINT16((void *)(memoryPtr + 2));
+ uint16 width = READ_LE_UINT16(memoryPtr);
+ uint16 height = READ_LE_UINT16(memoryPtr + 2);
// Upscale the coordinates/width if the fonts are already upscaled
if (_screen->fontIsUpscaled()) {