Commit Graph

705 Commits

Author SHA1 Message Date
Torbjörn Andersson
37e204e3a5 A recent change to loadWAVFromStream() caused the AUTOFREE flag to be set,
which in turn causes Broken Sword 2 to crash. And that change made it into
0.8.1, too. Augh! Kudos to wjp for tracking down the bug while I was still
waiting for ScummVM to finish compiling.

svn-id: r20358
2006-02-03 20:19:01 +00:00
Max Horn
0b39c0ea9f Fix various incorrect usages of the word 'target' instead of 'gameid'; change the ambigiuous 'GameSettings::name' to 'GameSettings::gameid'
svn-id: r20115
2006-01-21 13:01:20 +00:00
Travis Howell
fd008f42b3 Make game titles consistent
svn-id: r20097
2006-01-19 23:11:56 +00:00
Eugene Sandulenko
ea42bad781 Update copyright notice
svn-id: r20088
2006-01-18 17:39:49 +00:00
Travis Howell
d6a5c39e3d Add full game titles.
svn-id: r20083
2006-01-18 14:06:20 +00:00
Torbjörn Andersson
5c75f5a6e5 Some cleanup/paranoia fixes to the previous missing voices/music fix. Treat
files marked as being on both CDs (I haven't seen any such file -- ever),
treat it as if it's on the hard disk.

Also, the "cd" field of the ResourceFile struct now holds 0, 1 or 2, not
the bit flags from the data file. (This last change is not in the 0.8
branch.)

svn-id: r19884
2006-01-01 16:29:23 +00:00
Torbjörn Andersson
f3a6427cd4 Hopefully fixed the missing speech bug reported on the forum, once and for
all.

svn-id: r19879
2006-01-01 13:46:42 +00:00
Torbjörn Andersson
8b666f622e Slightly more verbose debugging messages. Still trying to track down weird
bug report from the forum.

svn-id: r19865
2005-12-30 19:27:45 +00:00
Torbjörn Andersson
ca03d5a3e4 Added debugging messages to track which CD (1 or 2) the game thinks it's
supposed to be reading data from. Maybe this will help track down the
mysterious missing speech problem reported on the forum.

svn-id: r19823
2005-12-21 10:57:48 +00:00
Torbjörn Andersson
53f13b76e4 If drawSurface() is called with no clip rect, clip to the screen size. This
prevents the subtitles-only cutscenes fallback from drawing outside the
screen.

svn-id: r19813
2005-12-20 08:56:48 +00:00
Max Horn
0dbbdc6059 Fix warning
svn-id: r19776
2005-12-11 13:15:03 +00:00
Torbjörn Andersson
7cbb9af113 Fixed Valgrind memory leak warnings, either by freeing memory on exit or
(in one case) by not allocating file handles dynamically. While this isn't
really necessary at the moment, it makes it easier to find the real memory
leaks, if there are any.

svn-id: r19775
2005-12-11 08:30:48 +00:00
Torbjörn Andersson
7c34ec2567 Fixed misleading warning message when playing without sound files.
svn-id: r19661
2005-11-19 05:00:56 +00:00
Torbjörn Andersson
8f4e03935e Changed debug level to be slightly more consistent with Broken Sword 1.
svn-id: r19589
2005-11-13 19:42:54 +00:00
Torbjörn Andersson
267fc7e2f6 Cleanup
svn-id: r19587
2005-11-13 19:29:32 +00:00
Torbjörn Andersson
b69ea090e5 Keep German end credits from printing 'dud' characters.
svn-id: r19465
2005-11-05 15:21:28 +00:00
Torbjörn Andersson
ffbbafed15 Call flush() in the savegame stream, when saving. I think SAGA, Simon and
BS2 were the last engines that didn't. But I could be mistaken.

svn-id: r19463
2005-11-05 14:24:13 +00:00
Torbjörn Andersson
4d8e8b5487 More credits cleanups/fixes.
svn-id: r19404
2005-11-03 09:47:19 +00:00
Torbjörn Andersson
b14417537f Removed commented lines.
svn-id: r19402
2005-11-03 07:28:46 +00:00
Torbjörn Andersson
d37aaef6a2 Initialise variable.
svn-id: r19401
2005-11-03 07:28:21 +00:00
Torbjörn Andersson
756422830f Removed left-over debugging message.
svn-id: r19400
2005-11-03 07:27:36 +00:00
Torbjörn Andersson
aadfc0f5ed Used the Array class for storing the end credits lines, rather than a
statically allocated one. I hope I'm using it correctly.

svn-id: r19394
2005-11-02 17:04:44 +00:00
Torbjörn Andersson
089ce9a982 Always fade down the palette at the end of the credits. This fixes a
palette glitch that would only happen if the credits were allowed to run in
their entirety.

svn-id: r19371
2005-10-30 16:21:54 +00:00
Torbjörn Andersson
7f4cda6622 Applied my own patch #1341495, in an attempt to fix alignment issues
reported by Crilith.

To elaborate a bit, the engine no longer accesses resource data through
packed structs. Instead it uses memory streams and the READ/WRITE
functions.

If data is mainly read, not written, I have replaced the old struct with a
new one with a read() function to read the whole thing from memory into the
struct's variables, and a write() function to dump the struct's variables
to memory. In fact, most of these write() functions remain unused.

If data is both read and written, I have replaced the struct with a class
with individual get/set functions to replace the old variables. This
manipulates memory directly.

Since I'm fairly sure that these structs are frequently stored as local
variables for a script, all script variables (both local and global) are
stored as little-endian and accessed through the READ/WRITE functions,
rather than being treated as arrays of 32-bit integers.

On a positive note, the functions for doing endian conversion of resources
and save games have been removed, and some general cleanups have been made
to assist in the rewrite.

Initial reports indicate that this patch indeed fixes alignment issues, and
that I have not - surprisingly - broken the game on big-endian platforms.
At least not in any immediately obvious way. And there's still plenty of
time to fix regressions before 0.9.0, too.

svn-id: r19366
2005-10-29 21:24:54 +00:00
Max Horn
1eed529803 Some more Broken Sword I & II -> 1 & 2 changes
svn-id: r19257
2005-10-23 10:49:34 +00:00
Max Horn
ae6fb05c8f Unified Broken Sword 1 & 2 name (instead of I & II) -- usage is more consistent with other numerically numbered games (and also internally consistent). Work in progress.
svn-id: r19249
2005-10-23 10:03:28 +00:00
Eugene Sandulenko
b36677af71 Update FSF address. Eek. Actually that took place on May 1, 2005
svn-id: r19142
2005-10-18 01:30:26 +00:00
Torbjörn Andersson
290c8114de Fixed end credits crash. (See bug #1327650). Actually, there were several
more or less serious bugs here:

* The fnResetGlobals() function returned IR_CONT. Since it potentially
  kills its own script resource, this can lead to illegal read accesses.
  Not it returns IR_STOP instead. This was probably a bug in the original
  interpreter as well, but it handled memory allocation quite differently
  so it was probably never an issue.

* Since fnResetGlobals() forcibly closes resources, I've changed the
  closeResource() function to silently ignore requests to close resources
  where the data pointer is NULL. While it could signify an error, it isn't
  necessarily so.

* Don't force the screen to fade up after the credits -- let the script do
  it instead. This prevents it from fading up the wrong image.

svn-id: r19127
2005-10-17 06:45:54 +00:00
Torbjörn Andersson
1a717471ba Fixed off-by-one error when decoding the original sound files. I thought I
had already done this, but I guess not...

svn-id: r19126
2005-10-17 06:31:10 +00:00
Torbjörn Andersson
c6a6d89453 Don't remove the cursor character from the savegame name until the very
last moment. Should fix bug #1327439.

svn-id: r19109
2005-10-16 13:53:15 +00:00
Torbjörn Andersson
6ee249743c There was a mention of the "Expected XXX samples..." error in the IRC logs.
Without a proper bug report, it's hard to diagnose, but this change might
allow it to recover after such an error. Maybe.

svn-id: r19108
2005-10-16 13:31:57 +00:00
Marcus Comstedt
ee15539952 Try do display the virtual keyboard only when a string input widget has focus.
svn-id: r19102
2005-10-15 15:46:12 +00:00
Torbjörn Andersson
6cdfdd2fa1 Fixed long-standing bug with sound decompression that would cause a slight
pop at the end of some sounds because it was trying to decode one sample
too many.

svn-id: r18691
2005-08-15 15:37:17 +00:00
Jonathan Gray
603a5e4d6f Don't explicity check for tremor and vorbis everywhere and
require both USE_TREMOR and USE_VORBIS to be defined when
using tremor.

svn-id: r18642
2005-08-10 12:42:56 +00:00
Jonathan Gray
3c1b5648ae Rest of the changes required for tremor to actually work.
Based on patches against 0.7.1 by Jolan Luff.

svn-id: r18641
2005-08-10 06:16:26 +00:00
Eugene Sandulenko
6b4484472b Remove trailing whitespaces.
svn-id: r18604
2005-07-30 21:11:48 +00:00
Torbjörn Andersson
f7a6729a01 This should really be two or three different commits, but I'm too lazy for
that:

* Re-worked the elevator script bug workaround so that it's more consistent
  with the other two script bug workarounds.

* Some renamings to make it more clear that game events and input events
  are two completely different things.

* Added function for clearing pending input events, and used that to fix an
  annoying keyboard repeat bug when closing the debug console. (The console
  would keep re-opening because the key press to open it kept repeating
  even though the key had been released.)

svn-id: r18522
2005-07-09 13:21:21 +00:00
Torbjörn Andersson
ac071d6470 Worked around script bug which could cause Nico to be in the wrong state at
the Docks scene in London. See bug #1214168 for details. (The bug was not
serious, but could cause some very obvious glitches.)

svn-id: r18475
2005-06-28 10:25:25 +00:00
Torbjörn Andersson
ea72e5c49f Whitespace
svn-id: r18415
2005-06-20 06:29:36 +00:00
Torbjörn Andersson
050a1eaace Removed an old hack that I don't think is needed any more. Clear screen
when the dialog window is removed.

svn-id: r18359
2005-06-05 17:30:20 +00:00
Torbjörn Andersson
55f98f9b04 Added keyboard auto-repeat. (I've been meaning to do that for a long time.)
svn-id: r18302
2005-05-31 12:53:55 +00:00
Torbjörn Andersson
d34e5fc605 Whitespace: "(type *)something" instead of "(type *) something", because
that's how we write it in most other places.

svn-id: r18069
2005-05-12 13:12:15 +00:00
Torbjörn Andersson
f45b23b63f Moved some more animation stuff out of the Logic class and into the
increasingly misnamed Router class. (I'll fix the naming later. Probably.)

svn-id: r18066
2005-05-12 06:30:16 +00:00
Max Horn
2de46dc8eb Moved some more stuff to namespace Audio (enough for tonight)
svn-id: r18040
2005-05-11 00:01:44 +00:00
Max Horn
1a615346ab Moved class SoundMixer to Audio::Mixer (didn't call the namespace 'Sound' because we already have many classes with that name)
svn-id: r18039
2005-05-10 23:48:48 +00:00
Max Horn
72f4c03b0b Moved (In/Out)SaveFile(Manager) and Timer to namespace Common
svn-id: r18038
2005-05-10 23:17:38 +00:00
Max Horn
b75c969e66 Moved class File and the MD5 stuff to namespace Common
svn-id: r18037
2005-05-10 22:56:25 +00:00
Max Horn
74f15bea74 Fix doxygen warning
svn-id: r17970
2005-05-08 17:13:08 +00:00
Torbjörn Andersson
781472641e Made it possible to quit while the game is asking for a CD.
svn-id: r17963
2005-05-08 13:05:31 +00:00
Torbjörn Andersson
e39dea37e7 Quitting the game now implies that the game is done fading the screen.
svn-id: r17962
2005-05-08 13:04:54 +00:00