aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver/d_draw.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-28 06:36:15 +0000
committerTorbjörn Andersson2003-08-28 06:36:15 +0000
commitf7ce39763e36af527d85683b47ff18ea2e534174 (patch)
treed943c4e564ca308feb4118696457ce2830eb4f1e /sword2/driver/d_draw.h
parent76df5a2733d7fd4b1d1e78d800649aa4c3e1e773 (diff)
downloadscummvm-rg350-f7ce39763e36af527d85683b47ff18ea2e534174.tar.gz
scummvm-rg350-f7ce39763e36af527d85683b47ff18ea2e534174.tar.bz2
scummvm-rg350-f7ce39763e36af527d85683b47ff18ea2e534174.zip
Removed the Surface class in favor of small struct specially made for the
block surfaces. (A block surface is a 64x64 tile of a parallax layer.) I've also done a few things to try and optimize the drawing: * The back buffer is no longer cleared between frames. This may cause regressions, but I do believe that the entire picture area is always completely re-rendered for each frame. As a result of this, the menu code is now responsible for clearing the icon areas itself. * A few unnecessary copy_rect() calls were commented out in favor of one big copy_rect() in ServiceWindows(). * Completely opaque block surfaces are copied with memcpy(), one line at a time. Unless we manage to add intelligent screen redrawing, I don't think it will get that much faster than this, though there is some unnecessary data copying in DrawSprite() that could be removed. And the game is still a terrible CPU hog. I believe the animation runs at approximately 12 fps. If there's still time left, it will pump out further frames to get smooth scrolling. We ought to put a cap on that, and if it has already reached the scroll target it should sleep for the rest of the render cycle. svn-id: r9886
Diffstat (limited to 'sword2/driver/d_draw.h')
-rw-r--r--sword2/driver/d_draw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sword2/driver/d_draw.h b/sword2/driver/d_draw.h
index 50b4afb82a..4cc1fe927e 100644
--- a/sword2/driver/d_draw.h
+++ b/sword2/driver/d_draw.h
@@ -78,7 +78,7 @@ extern "C" {
extern uint8 *lpPalette; // palette
-extern Surface *lpBackBuffer; // back surface
+extern byte *lpBackBuffer; // back surface
// extern Surface *lpPrimarySurface; // DirectDraw front buffer.
extern uint8 *lpDD2; // DirectDraw2 object
extern BOOL bFullScreen; // Defines whether the app is running in full screen mode or not.