Commit graph

27 commits

Author SHA1 Message Date
Torbjörn Andersson
1d831d0cea cleanup
svn-id: r10432
2003-09-27 17:41:02 +00:00
Torbjörn Andersson
95a59bd049 Must ... make ... space ... for ... FotAQ ...
svn-id: r10383
2003-09-23 16:38:38 +00:00
Torbjörn Andersson
bef1facdbc Removed the screenshot code. (The SDL backend already has the ability to
make screenshots.)

svn-id: r10382
2003-09-23 16:13:13 +00:00
Torbjörn Andersson
57d99796ea Changed the keyboard handling to store "keyboard events", rather than just
characters. Hopefully this will make things work smoother on the Mac, but I
have no way of testing that.

svn-id: r10376
2003-09-23 15:59:52 +00:00
Torbjörn Andersson
273e1ac1a0 Fixed really brain-dead bug. (I made it myself - I can call it whatever I
want to! :-) Escaping a cutscene while the voice-over is playing should
work now.

svn-id: r10369
2003-09-23 06:34:19 +00:00
Torbjörn Andersson
fa8ccef9a4 Removed unused code
svn-id: r10368
2003-09-23 06:31:13 +00:00
Torbjörn Andersson
bd6eece093 Initialize the cutscene voice-over sound handle, in case you press Escape
before there is any speech.

svn-id: r10364
2003-09-23 06:22:36 +00:00
Torbjörn Andersson
8e28b0c6b4 Cleaned up the sound code enough to add cutscene voice-overs. I haven't had
the time to do much testing yet, but it seems to work for me.

svn-id: r10361
2003-09-22 06:36:38 +00:00
Oliver Kiehl
7eaf33e014 actually this is the correct fix to "Cutscene - Press ESC to exit" :)
svn-id: r10259
2003-09-14 23:42:07 +00:00
Oliver Kiehl
685d44940f fix "Cutscene - Press ESC to exit" message
svn-id: r10258
2003-09-14 23:39:06 +00:00
Oliver Kiehl
5b20c4fb91 disable code because it crashes
svn-id: r10160
2003-09-10 16:05:26 +00:00
Torbjörn Andersson
d5f4297221 HACK: Display instructions during the cutscenes, so that the user won't
think ScummVM has hung or something.

svn-id: r10138
2003-09-09 15:54:13 +00:00
Torbjörn Andersson
78afd89698 Reworked the last commit a bit, so that PlaySmacker() doesn't need to know
as much about the text handling functions.

svn-id: r10137
2003-09-09 15:17:12 +00:00
Torbjörn Andersson
bc28dac67d In PlaySmacker(), make sure there really is a text sprite to draw.
svn-id: r10136
2003-09-09 15:10:07 +00:00
Torbjörn Andersson
fb6e8dd628 Clarified some comments in PlaySmacker(). At this point it should be fairly
trivial to actually play the Smacker voice-overs, but I think the sound
code needs a bit more cleaning up first. (I'm pretty sure it isn't
alignment-safe, and it might not be endian-safe either.)

svn-id: r10123
2003-09-09 07:01:04 +00:00
Torbjörn Andersson
a6661b2070 Cleanup.
svn-id: r10104
2003-09-08 17:44:26 +00:00
Torbjörn Andersson
c2070e28fa Added some code to display the subtitles for the Smacker movies, when
available, since they are separate from the Smacker files themselves.

Next step will be to play the voice-over sounds as well, and to make sure
subtitles settings etc. are taken into account (if they aren't already).

svn-id: r10099
2003-09-08 17:18:38 +00:00
Torbjörn Andersson
ed698cb635 Added some code to stop producing interpolation frames if the scene has
already reached its scroll target. This keeps BS2 from using all available
CPU time all of the time.

It may still be that we need a mechanism for throttling the frame rate when
the scene is moving towards a scroll target, but my computer isn't really
fast enough to test that.

Two other bugs fixed in the process:

* I think the last frame of the render cycle was rendered, but not
  displayed. If so, that should be fixed now.

* I discovered that there are cases where we do need to clear the screen
  (e.g. at the "Meanwhile..." message when George has found out about the
  Glease Gallery), so I've re-enabled the function and disabled it in the
  render cycle.

svn-id: r9904
2003-08-29 06:42:34 +00:00
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
Torbjörn Andersson
8277c6cb79 The graphics detail settings partially work now. They only affect how
sprites are drawn, but I think that's how it should be.

1: No bells or whistles.
2: This setting adds sprite blending, e.g. the smoke at the docks or the
   display cases at the Glease Gallery.
3: This setting adds light map support, e.g. when walking under the shack
   at the docks.
4: This setting adds better scaling algorithms.

The first three settings should work fine now. In fact, the third setting
is what we used to implement. The fourth setting still needs work and
testing. I've added code for downscaling case, but frankly I'm not
convinced the result is any better than with the simpler scaler. I usually
can't even tell the difference.

Of course, my translation of the original code could very well be buggy.

svn-id: r9867
2003-08-26 06:53:00 +00:00
Torbjörn Andersson
df247cff62 Unstubbed the Create/Draw/DeleteSurface() functions, and removed some
unnecessary stuff from our own Surface class. The former allows the in-game
dialogs to at least sort of work, and the latter gained me a few frames per
second, according to the built-in FPS counter.

svn-id: r9825
2003-08-23 13:02:21 +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
84bccaa83b substitute long int for LARGE_INTEGER
svn-id: r9236
2003-07-28 08:08:42 +00:00
Travis Howell
ccc40eecc9 Compiles on mingw now
svn-id: r9222
2003-07-28 03:12:49 +00:00
Max Horn
544168e96b fixed yet more warnings
svn-id: r9220
2003-07-28 02:37:47 +00:00
Jonathan Gray
dc6aa9912c bs2 driver
svn-id: r9212
2003-07-28 01:47:41 +00:00