diff options
| author | Max Horn | 2002-12-25 20:07:09 +0000 |
|---|---|---|
| committer | Max Horn | 2002-12-25 20:07:09 +0000 |
| commit | 5c39a82633fd158fe40ae107160b07da699ef169 (patch) | |
| tree | 007e43c86b2232447d132c4a1b994d8cee2da6ed /scumm/gfx.cpp | |
| parent | 5f5e96e24f9864c185846a9257b61ea26dc51a34 (diff) | |
| download | scummvm-rg350-5c39a82633fd158fe40ae107160b07da699ef169.tar.gz scummvm-rg350-5c39a82633fd158fe40ae107160b07da699ef169.tar.bz2 scummvm-rg350-5c39a82633fd158fe40ae107160b07da699ef169.zip | |
two good rules of thumb: don't use typecasts if you don't have to - type cast have a nasty habit of hiding and causing problems. When a method takes a pointer argument, if possible make it const. :-). Cleanup. Fixed font rendering in CMI: you need to call updateDirtyRect() if you modify the screen...
svn-id: r6143
Diffstat (limited to 'scumm/gfx.cpp')
| -rw-r--r-- | scumm/gfx.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index efedd8d1dd..075aee2760 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -331,7 +331,7 @@ void Scumm::drawDirtyScreenParts() _system->copy_rect(src, _realWidth, 0, vs->topline, _realWidth, vs->height - _screenTop); for (i = 0; i < gdi._numStrips; i++) { - vs->tdirty[i] = (byte)vs->height; + vs->tdirty[i] = vs->height; vs->bdirty[i] = 0; } } @@ -372,9 +372,9 @@ void Gdi::updateDirtyScreen(VirtScreen *vs) if (bottom) { top = vs->tdirty[i]; - vs->tdirty[i] = (byte)vs->height; + vs->tdirty[i] = vs->height; vs->bdirty[i] = 0; - if (i != (_numStrips - 1) && vs->bdirty[i + 1] == (byte)bottom && vs->tdirty[i + 1] == (byte)top) { + if (i != (_numStrips - 1) && vs->bdirty[i + 1] == bottom && vs->tdirty[i + 1] == top) { // Simple optimizations: if two or more neighbouring strips form one bigger rectangle, // blit them all at once. w += 8; |
