Commit Graph

413 Commits

Author SHA1 Message Date
Torbjörn Andersson
9ea89568da Fixed some debugging messages so they refer to the correct function.
svn-id: r12152
2004-01-05 11:01:12 +00:00
Torbjörn Andersson
5f9cfba548 Slowed down the credits slightly. With the recent optimizations, the music
lasted longer than the text. Now the text lasts longer than the music.

svn-id: r12151
2004-01-05 11:00:12 +00:00
Torbjörn Andersson
8a91ae3257 Adapted LavosSpawn's idea for more efficient screen updating. It still
renders the entire screen every frame, but it tries to update (i.e. copy to
the backend) only the parts of the screen that actually changed. At least
approximately so.

svn-id: r12142
2004-01-04 15:11:30 +00:00
Torbjörn Andersson
5607f41e2d Some cleanup and Valgrind warning fixes.
svn-id: r12141
2004-01-04 15:05:54 +00:00
Torbjörn Andersson
14acddb167 Update a comment to reflect that some functions have different names now.
svn-id: r12140
2004-01-04 14:59:36 +00:00
Max Horn
d1e6c6059e renamed global var _debugLevel to g_debugLevel; let Engine constructor init it (this way all engines get it for free, allows further cleanup); removed some useless/duplicate member vars in SwordEngine
svn-id: r12134
2004-01-04 14:00:58 +00:00
Max Horn
cf6a5c0a04 cleanup
svn-id: r12116
2004-01-03 19:12:23 +00:00
Max Horn
ee3558b748 fix for BE systems
svn-id: r12115
2004-01-03 19:02:18 +00:00
Torbjörn Andersson
c1cddedca8 Fixed bug that made ScummVM crash when loading a savegame where the main
character was walking. (I had missed a case where pointers were cast to
integers.)

svn-id: r12113
2004-01-03 15:52:05 +00:00
Torbjörn Andersson
fa523f7f7e It was pointed out to me that we can't use the DEMO variable here, because
the missing file may be the one with the resource for the global variables.

svn-id: r12112
2004-01-03 14:49:52 +00:00
Max Horn
bfea71b0c4 renamed AudioInputStream -> AudioStream
svn-id: r12110
2004-01-03 14:10:13 +00:00
Torbjörn Andersson
bb8ff0cd90 Made the music code more like the one in BS1, i.e. the fade time is longer
and it now fades both up and down.

Plenty of cleanups, simplifications and just moving code around to group it
in what I hope is a more logical fashion.

Fixed a long-standing bug where spot effects would eventually use up all
available sound effect handles. (I may have introduced this when I removed
the expiration of sound effects from FxServer().)

svn-id: r12108
2004-01-03 11:24:39 +00:00
Torbjörn Andersson
033a847e77 Oops, that was the wrong data type. (Not that it should matter, but...)
svn-id: r12069
2004-01-01 15:15:47 +00:00
Torbjörn Andersson
0d327b3b79 Some tweaking of the new credits code. It is no longer necessary to have
to have the credits.bmp file, though if you don't you won't see the
"Smacker" logo. (Whether or not this is a feature is open to debate.)

Happy New Year!

svn-id: r12062
2003-12-31 23:32:40 +00:00
Torbjörn Andersson
2687402c6b oops, forgot one case
svn-id: r12056
2003-12-31 14:10:42 +00:00
Torbjörn Andersson
c85301b2a9 When saving the music state, remember the name of the music file that was
open so that it can be re-opened afterwards. It's not so much that it may
have changed, but it may have been closed.

This should fix a crash when escaping the credits.

svn-id: r12055
2003-12-31 14:05:53 +00:00
Torbjörn Andersson
6899aa23cb I still don't know how to draw the credits like the original did, but at
least the credits text is showing now.

svn-id: r12053
2003-12-31 13:14:07 +00:00
Torbjörn Andersson
28eb8c4b76 Don't allow the credits to be displayed while in conversation mode.
svn-id: r12052
2003-12-31 12:58:18 +00:00
Torbjörn Andersson
bfd457d913 Enable the line that increases _gameCycle. There's a debugger command that
will display it, and it's so much more interesting this way. :-)

svn-id: r12051
2003-12-31 12:54:41 +00:00
Torbjörn Andersson
40419b1aee tiny cleanup
svn-id: r12017
2003-12-29 17:26:56 +00:00
Torbjörn Andersson
ea39ef6d7d The game sets its own DEMO variable, so we might as well check that one as
checking the GF_DEMO flag. (There's still one "unnecessary" reference to
GF_DEMO in functions.cpp, but I plan on rewriting that function soon so I
don't want to touch it right now.)

svn-id: r12009
2003-12-29 15:30:10 +00:00
Torbjörn Andersson
6ae8218d53 Hopefully the last big renaming. Now the datatypes have names like
"StandardHeader" instead of "_standardHeader".

svn-id: r11997
2003-12-28 15:08:12 +00:00
Max Horn
859a9c0129 o Added SoundMixer::isReady()
o Removed SoundMixer::bindToSystem()
o In scumm, replaced _silentMixer, _silentDigitalImuse and _noDigitalSamples by SoundMixer::isReady()

svn-id: r11893
2003-12-24 17:42:22 +00:00
Max Horn
e9269257f3 turned PlayingSoundHandle into an 'opaque' (well not really :-) data type, mainly because people kept (accidentally and sometimes on purpose :-) misusing them
svn-id: r11881
2003-12-24 00:25:18 +00:00
Max Horn
f19f73eb50 Make it possible for game detection functions to detect language/platform (not yet done by any detector, but will come with the MD5 detection code)
svn-id: r11811
2003-12-21 15:29:52 +00:00
Nicolas Bacca
9e1dda1f68 Make VC6/EVC happier
svn-id: r11764
2003-12-20 01:17:02 +00:00
Torbjörn Andersson
c2c250edc1 Fixed bug with looping music. It must have been there all along, but maybe
the recent mixer changes made it more audible. Or maybe I just didn't
listen until now.

svn-id: r11763
2003-12-19 17:07:37 +00:00
Torbjörn Andersson
dc0c7bf845 Implemented scroll wheel handling for save/load dialogs. (This turned up a
few other hitherto harmless bugs, which I've hopefully managed to fix.)

svn-id: r11762
2003-12-19 16:50:03 +00:00
Max Horn
d8903123b0 distinguish between end of stream and end of data
svn-id: r11756
2003-12-19 01:30:19 +00:00
Max Horn
0cddca5f43 unregister the premix proc when you go away
svn-id: r11755
2003-12-19 01:08:30 +00:00
Max Horn
97ee61963c I am going to remove the default implementation of readBuffer() (AudioInputStream subclasses really really should implement readBuffer() for good performance)
svn-id: r11753
2003-12-19 00:27:09 +00:00
Torbjörn Andersson
9a1bbb361b My last commit didn't work on big-endian. Maybe this one does...
svn-id: r11711
2003-12-17 11:52:05 +00:00
Torbjörn Andersson
a739f3ae3b The mixer handles little-endian samples now. Take advantage of that.
svn-id: r11707
2003-12-17 11:07:40 +00:00
Paweł Kołodziejski
7f03b140d4 fixed warning
svn-id: r11705
2003-12-17 08:36:09 +00:00
Torbjörn Andersson
8b12be81e5 cleanup
svn-id: r11704
2003-12-17 08:01:59 +00:00
Max Horn
e7bf167428 Made sure that *all* AudioInputStream 'know' their sample rate; removed pointless MusicStream class; removed various specific Channel subclasses and instead generalized the base class some more
svn-id: r11699
2003-12-17 02:19:24 +00:00
Torbjörn Andersson
4e736a6602 Tiny whitespace change. (No, as a matter of fact I don't have anything
better to do. :-)

svn-id: r11649
2003-12-15 07:31:22 +00:00
Torbjörn Andersson
4420b15d9f Mostly cleanups, but I believe this also fixes an endian problem in the
"restart script" opcode. To actually verify this, though, I'd need to find
a case where any other script than script 0 at offset 0 is restarted...

svn-id: r11638
2003-12-14 16:33:27 +00:00
Torbjörn Andersson
ce04dd9f7e Fixed a potential crash bug where an audio buffer would be freed at the end
of an animated cutscene while the mixer was still using it. Oddly enough, I
didn't encounter this bug when I played through the game recently, but
today it happened every time at the end of the cutscene where Nico finds
the jaguar stone.

svn-id: r11637
2003-12-14 16:32:21 +00:00
Max Horn
35b62c294d removed GameSettings::detectname and GameSettings::midi; renamed GameSettings::gameName to name; added temporary experimental MD5 hack
svn-id: r11603
2003-12-13 00:20:01 +00:00
Torbjörn Andersson
9f465dab04 cleanup
svn-id: r11581
2003-12-11 13:08:36 +00:00
Torbjörn Andersson
7153d77024 Restored some relevant information to a comment that was removed by my
previous commit.

svn-id: r11551
2003-12-10 13:14:50 +00:00
Torbjörn Andersson
a2221c88e9 Sprite surfaces (as opposed to standard sprites) are always display
aligned, never flipped and never RLE16-compressed. Simplified the code
accordingly. (Displaying the restore dialog when specifying an unused save
slot from the command-line works again now.)

Plus some minor cleanups.

svn-id: r11550
2003-12-10 08:01:58 +00:00
Torbjörn Andersson
f89739b8f3 Cleaned up keyboard handling. The old code would misinterpret some keys,
e.g. it's 'C' or 'c' to display the credits, not some random function key.

svn-id: r11549
2003-12-10 07:59:45 +00:00
Torbjörn Andersson
7d8839ab52 I've played through the whole game, and I've scanned through the cluster
files with a primitive and incomplete tool to present resource information.
(It may evolve into something useful and/or presentable later. Much later.)

I've found no evidence whatsoever that the mysterious blend & 0x02 case is
ever used. Since the code makes no sense to me, I've removed it.

svn-id: r11538
2003-12-09 08:09:18 +00:00
Torbjörn Andersson
5c539040e4 Shut up Valgrind warnings.
svn-id: r11528
2003-12-08 07:30:22 +00:00
Travis Howell
d78ccc55a4 Change Broken Sword 2 default to no subtitles
To match original version and other games.

svn-id: r11479
2003-12-03 01:04:54 +00:00
Torbjörn Andersson
6d3c760ffd Since all other engines have been changed to use "subtitles" instead of
"nosubtitles", let's change this one as well. Of course, it does break
compatibility with old config files, but I guess the worst that can happen
is that we have an unused "nosubtitles" line in addition to the used
"subtitles" line...

svn-id: r11464
2003-12-02 10:25:12 +00:00
Torbjörn Andersson
af02beefd9 cleanup
svn-id: r11457
2003-12-02 07:41:04 +00:00
Torbjörn Andersson
b0037e29e2 Removed semi-colon after REGISTER_PLUGIN() to be consistent with the other
game engines.

svn-id: r11447
2003-12-01 10:24:02 +00:00