diff options
author | Einar Johan Trøan Sømåen | 2012-05-12 06:49:10 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-02 13:02:10 +0200 |
commit | 11aadc56902ae97d6aa2467a94a041623b3c599d (patch) | |
tree | 6a44c5473c35b50bdd94ab1c82185652eeacef04 /engines/wintermute/BRenderSDL.cpp | |
parent | 25f08ba402dfa3b29e996a262b4c6217915de57e (diff) | |
download | scummvm-rg350-11aadc56902ae97d6aa2467a94a041623b3c599d.tar.gz scummvm-rg350-11aadc56902ae97d6aa2467a94a041623b3c599d.tar.bz2 scummvm-rg350-11aadc56902ae97d6aa2467a94a041623b3c599d.zip |
WINTERMUTE: Solve some const-char related warnings.
Diffstat (limited to 'engines/wintermute/BRenderSDL.cpp')
-rw-r--r-- | engines/wintermute/BRenderSDL.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/wintermute/BRenderSDL.cpp b/engines/wintermute/BRenderSDL.cpp index 0574b3e7b9..fbb683dfb6 100644 --- a/engines/wintermute/BRenderSDL.cpp +++ b/engines/wintermute/BRenderSDL.cpp @@ -274,24 +274,29 @@ HRESULT CBRenderSDL::FadeToColor(uint32 Color, RECT *rect) { // Replacement for SDL2's SDL_RenderCopy
void CBRenderSDL::drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect) {
for (int i = 0; i < srcRect->height(); i++) {
- void *destPtr = _renderSurface->getBasePtr(dstRect->left, dstRect->top + i);
- void *srcPtr = surf->getBasePtr(srcRect->left, srcRect->top + i);
+ byte *destPtr = (byte*)_renderSurface->getBasePtr(dstRect->left, dstRect->top + i);
+ byte *srcPtr = (byte*)surf->getBasePtr(srcRect->left, srcRect->top + i);
for (int j = 0; j < srcRect->width(); j++) {
// TODO: Replace this with something less ugly, and more portable.
if (((byte *)srcPtr)[0] == 255) {
memcpy(destPtr, srcPtr, _renderSurface->format.bytesPerPixel);
}
- ((byte *)srcPtr) += _renderSurface->format.bytesPerPixel;
- ((byte *)destPtr) += _renderSurface->format.bytesPerPixel;
+ srcPtr += _renderSurface->format.bytesPerPixel;
+ destPtr += _renderSurface->format.bytesPerPixel;
}
}
}
//////////////////////////////////////////////////////////////////////////
HRESULT CBRenderSDL::DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color) {
- byte r = D3DCOLGetR(Color);
+ static bool hasWarned = false;
+ if (!hasWarned) {
+ warning("CBRenderSDL::DrawLine - not fully ported yet");
+ hasWarned = true;
+ }
+/* byte r = D3DCOLGetR(Color);
byte g = D3DCOLGetG(Color);
byte b = D3DCOLGetB(Color);
- byte a = D3DCOLGetA(Color);
+ byte a = D3DCOLGetA(Color);*/
//SDL_SetRenderDrawColor(_renderer, r, g, b, a);
//SDL_SetRenderDrawBlendMode(_renderer, SDL_BLENDMODE_BLEND);
|