Commit Graph

5 Commits

Author SHA1 Message Date
Torbjörn Andersson
f7ce39763e 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
2003-08-28 06:36:15 +00:00
James Brown
ec447fdfbb Remove a bunch of unneeded cruft - but barely the surface of it. This code is depressing and duplicated all over the place... I don't think I can bear to touch this code until it's undergone some MAJOR cleanup :)
svn-id: r9782
2003-08-19 14:57:26 +00:00
Jonathan Gray
48ceff0545 patch #790060 SWORD2: Initial graphics work from erik very nice indeed :)
svn-id: r9737
2003-08-17 14:07:16 +00:00
Jonathan Gray
6822552a10 slightly changed version of erik's implmentation of FadeServer
svn-id: r9328
2003-07-31 14:51:02 +00:00
Jonathan Gray
dc6aa9912c bs2 driver
svn-id: r9212
2003-07-28 01:47:41 +00:00