currently don't fade music that ends because we reached the end of the
musical cue, though. Only music that ends because it's being replaced by
another cue.
svn-id: r10003
but at least it doesn't seem to do any harm.
Disabled the sound FX "garbage collection" in FxServer(). I'm not really
convinced it's necessary at all, and even if it is, doing it from a
separate thread it just begging for trouble. I've modified OpenFx()
slightly to deal with this, but I may still have introduced regressions.
Temporarily disabled the "goto label1" hack, since it seems to be the main
reason for ScummVM crashing if I allow a piece of music to finish on its
own (i.e. when not terminating it prematurely by triggering another piece
of music).
svn-id: r9990
the functions which access data manipulated by FxServer().
For instance, FxServer() may free bufferFx[i], which sounds potentially
unhealthy to me.
svn-id: r9989
channel indexes, we should use stopHandle() instead of stop() to kill the
music channel.
Am I the only one who finds the distinction between channel indexes and
sound handles confusing at times? :-)
svn-id: r9967
music channel has faded out, destroy the channel immediately. Don't wait
for the mixer to finish it off.
This seems to fix a problem where the mixer would eventually run out of
slots if you left the Quit dialog showing for too long.
Unfortunately I don't know if it fixes the "out of slots" errors I
encountered once during normal play. Oh well, time will tell...
svn-id: r9942
is the only place I can think of where this could have happened, so I've
added a paranoid check to ensure the buffer length is even.
Let's see how that works out...
svn-id: r9933
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
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
I don't know if I got it right - the result doesn't look that great to me -
but at least the infrastructure is there.
This, I think, marks the point where BS2 graphics is pretty much done. Some
functions haven't been unstubbed yet, but I believe they're used for
debugging and/or profiling. I'm not sure they're worth the trouble.
Of course, there is still testing and clean-ups to make. For instance, I'd
like DrawSprite() to use malloc() a bit less.
svn-id: r9879