Commit Graph

16713 Commits

Author SHA1 Message Date
Paul Gilbert
6c6d8b3fb3 Introduced a hash for storing all the miscellaneous data values, and used it to more properly implement display of all the wakeup text in the first room
svn-id: r50544
2010-07-01 12:01:17 +00:00
Robert Špalek
b45d2cd92b Implement playing RAW/MP3/OGG/FLAC dubbing from ZIP archives.
Playing works well, but I am not enabling it in the game player yet, because
I have not implemented measuring the time duration of compressed dubbing,
which is needed in the (exclusively used) blocking mode.

svn-id: r50543
2010-07-01 07:10:40 +00:00
Filippos Karapetis
b0b4f34d27 Added a workaround for an uninitialized temp read in KQ6 floppy, when opening the controls window - from bug report #3023602
svn-id: r50541
2010-07-01 05:33:51 +00:00
Filippos Karapetis
3cd5821085 SCI: Silenced a warning about a non game breaking script bug in Castle of Dr. Brain, room 360
svn-id: r50538
2010-06-30 17:47:44 +00:00
Filippos Karapetis
b85fd471a6 Added support for kAddAfter with 4 parameters (used in Torin's Passage, for example)
svn-id: r50537
2010-06-30 17:36:52 +00:00
Martin Kiewitz
1287e6f252 SCI: adjust brRect and nsRect, if sci2 hires views are used, fixes hotspots in gk1
svn-id: r50536
2010-06-30 15:44:26 +00:00
Martin Kiewitz
bcc010a56e SCI: remove some duplicate code
svn-id: r50535
2010-06-30 15:26:45 +00:00
Martin Kiewitz
04d8ac4114 SCI: removing sq1 workaround for kUnLoad for now, maybe it was originally meant for calling kUnLoad with just 1 argument
svn-id: r50534
2010-06-30 14:39:03 +00:00
Martin Kiewitz
4e999c8295 SCI: support for hires views in gk1
svn-id: r50533
2010-06-30 14:26:47 +00:00
Filippos Karapetis
bff3e89e48 SCI: Removed the FreeSCI music code
svn-id: r50532
2010-06-30 13:49:05 +00:00
Filippos Karapetis
a14c6d7815 Fixed the signature for kUnload (thanks m_kiewitz)
svn-id: r50530
2010-06-30 13:31:47 +00:00
Martin Kiewitz
bf6acef9a9 SCI: fixed a typo, so that workarounds really trigger an ignore kernel call for now
svn-id: r50529
2010-06-30 11:09:49 +00:00
Filippos Karapetis
cb897a1a15 Changed an error back to a warning - Torin's Passage calls kAddAfter with 4 parameters, and we don't know what the 4th parameter is yet
svn-id: r50528
2010-06-30 11:08:23 +00:00
Martin Kiewitz
cf5c60ed4f SCI: changing signature of kUnLoad, adding workaround for sq1 ulence flats bug
svn-id: r50527
2010-06-30 11:05:29 +00:00
Paul Gilbert
dcba035912 Corrected font display to properly use both colour indexes
svn-id: r50526
2010-06-30 10:42:34 +00:00
Martin Kiewitz
c6695b1d6a SCI: removing all the remaining debug output from signature matching
svn-id: r50525
2010-06-30 10:31:23 +00:00
Paul Gilbert
8de5715560 Removed deprecated destAdjust parameters from the frame drawing code
svn-id: r50524
2010-06-30 10:17:54 +00:00
Paul Gilbert
0c283ed197 Replaced Y offset from various drawing routines in favour of a viewport sub-surface - this will make it easier to clip sprites to within the drawable area
svn-id: r50523
2010-06-30 10:13:20 +00:00
Martin Kiewitz
915b9fa318 SCI: removing full debug output when signature fails to the point where we didnt find a workaround for a signature mismatch
svn-id: r50522
2010-06-30 10:09:07 +00:00
Filippos Karapetis
8752eed8f2 SCI: Reverting r50516, SSCI didn't reset the node value when deleting the node. Also, a slight fix in VM debug code.
svn-id: r50521
2010-06-30 09:51:21 +00:00
Martin Kiewitz
7595e7c1be SCI: implementing workarounds for kernel calls, removing original code workaround for kDisposeScript / qfg1 room 64 and adding it to workaround table
svn-id: r50520
2010-06-30 09:47:04 +00:00
Robert Špalek
c7f6a5b286 Generalize the sound archive framework to be able to open new formats
svn-id: r50519
2010-06-30 08:27:09 +00:00
Martin Kiewitz
764aa1a125 SCI: adding inheritancelevel to uninit workarounds to make them safer
svn-id: r50518
2010-06-30 08:01:19 +00:00
Filippos Karapetis
1e8b74f9de Updated incorrect comment
svn-id: r50517
2010-06-30 07:34:37 +00:00
Filippos Karapetis
7c5b31eb6d Also erase the value of the list node itself when deleting it inside kDeleteKey, as it might be referenced again before the GC is invoked
svn-id: r50516
2010-06-30 07:28:30 +00:00
Filippos Karapetis
9f1413b338 When deleting a list node, erase its references to predecessor and successor nodes. Fixes cases where game scripts could reference a list node after it was deleted (e.g. QFG1 intro, Longbow when exiting the cave). Some slight cleanup
svn-id: r50515
2010-06-30 07:18:43 +00:00
Martin Kiewitz
97186bd5b0 SCI: added sci32-specific signature for kGetSaveDir
svn-id: r50509
2010-06-29 21:53:27 +00:00
Martin Kiewitz
0f28c799f0 SCI: added mac-specific signature for kGetEvent
svn-id: r50508
2010-06-29 21:47:34 +00:00
Martin Kiewitz
2e58bdc202 SCI: implemented version specific signatures, added special kDrawCel signature for SCI1.1 (PC)/kq6
svn-id: r50507
2010-06-29 21:41:36 +00:00
Martin Kiewitz
c536630648 SCI: adding space in kernelmap for workaround table
svn-id: r50506
2010-06-29 21:13:19 +00:00
Max Horn
b09996cb5c SCI: Rewrap yet more comments
svn-id: r50505
2010-06-29 20:50:52 +00:00
Martin Kiewitz
7951e3ddcf SCI: kernelMap cleanup and making it possible to have version (not implemented yet) or platform specific entries - changing signature for kNewWindow - using old dummy-signature for mac-only
svn-id: r50504
2010-06-29 20:44:19 +00:00
Filippos Karapetis
3a2ac994d4 Handle empty clip rectangles in GfxView::drawScaled(). Fixes an assert in the first room of the game
svn-id: r50503
2010-06-29 20:13:57 +00:00
Filippos Karapetis
42351265f1 Fixed 2 uninitialized reads in SQ6
svn-id: r50502
2010-06-29 20:12:42 +00:00
Johannes Schickel
bf2b059a63 Silence possible use of uninitialized variable warning in g++.
svn-id: r50501
2010-06-29 18:20:10 +00:00
Max Horn
8db0f726c0 SCI: Rewrap more comments
svn-id: r50500
2010-06-29 14:55:32 +00:00
Max Horn
1027f870a6 SCI: Add some const qualifiers
svn-id: r50499
2010-06-29 14:55:09 +00:00
Max Horn
b743fcc9f5 SCI: Rename listEntry -> 'it' for better readability
svn-id: r50498
2010-06-29 14:54:47 +00:00
Max Horn
c8dca083d8 SCI: Simplify List::iterator usage in GfxAnimate
svn-id: r50497
2010-06-29 14:54:31 +00:00
Max Horn
32b69ccd9d SCI: Simplify GfxAnimate code, get rid of _listData
svn-id: r50496
2010-06-29 14:54:15 +00:00
Paul Gilbert
c96d44d928 Added code to properly detect when an animation sequence is complete
svn-id: r50493
2010-06-29 11:51:05 +00:00
Paul Gilbert
5f2c184e4e Changed reading of sprite frame depths to signed bytes - this fixes the problem with the Slippery Pig not showing up in the landing scene in the intro sequence
svn-id: r50492
2010-06-29 11:26:48 +00:00
Paul Gilbert
c1176498f1 Removed the old hardcoded calls to loadDSRFile
svn-id: r50491
2010-06-29 11:15:21 +00:00
Paul Gilbert
841356ac80 Added loading of the correct DSR file at the start of each animation scene
svn-id: r50490
2010-06-29 11:09:33 +00:00
Paul Gilbert
eb4a48bfd9 Reserved palette ranges used by on-screen messages
svn-id: r50489
2010-06-29 10:52:59 +00:00
Paul Gilbert
b91ba9c56e Bugfixes to reading in the animation font name correctly, as well as converted some Common::String usage to char buffers to fix incorrect String usage
svn-id: r50488
2010-06-29 10:40:24 +00:00
Martin Kiewitz
f75a6a6f47 SCI: print out actual and supposed parameter types when having a kernel call signature mismatch
svn-id: r50487
2010-06-29 10:39:13 +00:00
Filippos Karapetis
0b470dde63 SCI: Some cleanup of the GC code.
The version of push() that pushes arrays inside WorklistManager has been renamed to pushArray(), so that it's more apparent where arrays are pushed.

svn-id: r50486
2010-06-29 09:02:59 +00:00
Filippos Karapetis
316e96df2b SCI: Removed reg_t_EqualTo, since reg_t already defines an equals operator
svn-id: r50485
2010-06-29 09:01:17 +00:00
Filippos Karapetis
9f1320d5cc SCI: Made the SoundCommandParser a member of the SciEngine class and removed it from the EngineState, since it's static throughout the course of a game
svn-id: r50484
2010-06-29 09:00:08 +00:00
David Turner
59f4c903a6 GOB : Adding workaround for Bug #3018918 UOTODDV Reload Goblin Stuck Issue.
This was present in the original interpreter.

svn-id: r50480
2010-06-29 03:53:06 +00:00
Matthew Hoops
48a107b821 Update comment on CD swapping in Riven.
svn-id: r50479
2010-06-29 03:04:08 +00:00
Matthew Hoops
146cc7cb3c Silence a valgrind warning.
svn-id: r50478
2010-06-29 03:00:53 +00:00
Matthew Hoops
79aa49a509 Fix the load game dialog in Riven DVD's menu, borrowed from Parallaction.
svn-id: r50477
2010-06-29 02:55:31 +00:00
Martin Kiewitz
15f9f37d4d SCI: removing ignoring of channel volume change code from r50463, the lsl5 issue was actually caused by the old volume adjust code that was also causing the issues in gk1
svn-id: r50466
2010-06-28 22:26:28 +00:00
Martin Kiewitz
668d820afd SCI: its lsl5 sound resource 294, not 274 (changed comment only)
svn-id: r50465
2010-06-28 22:14:03 +00:00
Filippos Karapetis
ee6aebc780 Don't initialize graphics again when loading
svn-id: r50464
2010-06-28 22:08:46 +00:00
Martin Kiewitz
805374ff4e SCI: ignoring set signal on tick 0 directly in parseNextEvent instead of filtering, also now ignoring channel volume changes on tick 0 (fixes lsl5 fading of sound 274, almost at the end), fixing also fading in gk1 and enabling fading in sci32 again
svn-id: r50463
2010-06-28 22:06:19 +00:00
Filippos Karapetis
58732b9df1 SCI: More changes to the code for loading from the launcher
- Added support for the LSL2 menu bar object
- We no longer need a reference to the init() selector - it's always the first method of the menu bar object

svn-id: r50462
2010-06-28 22:01:26 +00:00
Filippos Karapetis
0b33cc0dab Fixed loading of saved games from the launcher
svn-id: r50460
2010-06-28 20:58:32 +00:00
Filippos Karapetis
438e670166 Applied patch #3022511 - "qfg4 detection cleanup"
svn-id: r50457
2010-06-28 20:31:30 +00:00
Martin Kiewitz
d8e4160f34 SCI: remove clipping of volume inside SciMidiParser::setvolume
svn-id: r50456
2010-06-28 20:17:43 +00:00
Martin Kiewitz
473c429b5c SCI: updated comment about transparent pixels in views
svn-id: r50454
2010-06-28 18:10:21 +00:00
Martin Kiewitz
bc77740306 SCI: kAnimate resetting _lastCastCount all the time
svn-id: r50453
2010-06-28 18:07:40 +00:00
Florian Kagerer
a0f42b07ce KYRA: change audio detection flags setting (since most users don't own a real mt-32/lapc1/cm32l/cm64 device and our emulator is incomplete)
svn-id: r50452
2010-06-28 17:03:04 +00:00
Martin Kiewitz
06648cb186 SCI: fix regression of r50422, please no refactoring without proper testing - fixes animations in all sorts of games
svn-id: r50451
2010-06-28 16:56:15 +00:00
Martin Kiewitz
e857cc623e SCI: added comment - lsl5 also has too large windows
svn-id: r50450
2010-06-28 16:35:20 +00:00
Martin Kiewitz
8410dbab53 SCI: stupid oversight fix r50446, too hot here :P
svn-id: r50447
2010-06-28 14:49:54 +00:00
Martin Kiewitz
66fb9e7a90 SCI: fixing valgrind issue in Script::initialiseClasses thx to wjp for valgrind testing
svn-id: r50446
2010-06-28 14:46:28 +00:00
Martin Kiewitz
6402d64419 SCI: cleanup of execstack, output of backtrace slightly modified, is now also displaying local calls and exports
svn-id: r50445
2010-06-28 14:21:56 +00:00
Max Horn
9b4406fd35 SCI: Some more GC cleanup
svn-id: r50443
2010-06-28 12:55:47 +00:00
Max Horn
8ae9774a00 SCI: Turn more warnings into errors.
If one of these is triggered for you, you can add an exception to
the error, together with a comment explaining why this exception
is necessary. Ideally after verifying that the cause is a script
bug and not a bug in our code...

svn-id: r50442
2010-06-28 12:29:06 +00:00
Max Horn
4fdbd14a60 SCI: Move a few remaining Script methods to engine/script.cpp
svn-id: r50441
2010-06-28 12:28:46 +00:00
Max Horn
4f606cc10d SCI: Clarify docs of GC related SegmentObj methods
svn-id: r50440
2010-06-28 12:28:29 +00:00
Max Horn
b3011faaef SCI: Make various SegManager const
svn-id: r50439
2010-06-28 12:28:12 +00:00
Max Horn
a278c07aa6 SCI: get rid of Script::allocateObject
svn-id: r50438
2010-06-28 12:27:48 +00:00
Willem Jan Palenstijn
0f0977535c Remove CRs
svn-id: r50435
2010-06-28 12:13:04 +00:00
Martin Kiewitz
445bfee08c SCI: add const again to newWidth
svn-id: r50434
2010-06-28 12:09:48 +00:00
Martin Kiewitz
6981b943b5 SCI: fix regression of r50424, 2x scaling
svn-id: r50433
2010-06-28 12:04:35 +00:00
Paul Gilbert
6063a9cba3 Bugfix to properly erase text messages when they expire
svn-id: r50432
2010-06-28 11:40:39 +00:00
Max Horn
e5509d38b6 SCI: More comment rewrapping
svn-id: r50431
2010-06-28 11:23:16 +00:00
Max Horn
6c0205b104 SCI: Fix DEBUG_GC mode and permanently enable it
svn-id: r50430
2010-06-28 11:23:00 +00:00
Max Horn
31b2902714 SCI: Revise GC interface: use Common::Array<reg_t> instead of callbacks
This means a little bit more overhead but makes the code much more readable
and understandable.

svn-id: r50429
2010-06-28 11:22:41 +00:00
Max Horn
30218a2c32 SCI: Make Script member vars private; add const qualifiers
Only three Script members remain public (for now)

svn-id: r50428
2010-06-28 11:22:20 +00:00
Max Horn
85038e7d6c SCI: Change warning back to error in Script::initialiseObjectsSci0
Instead of turning the error into a warning globally, we now have
code which ignores the error in Script 202 of KQ5 French, but will
keep reporting if it turns up in other places.

svn-id: r50427
2010-06-28 11:21:55 +00:00
Max Horn
12099176f7 SCI: More formatting cleanup
svn-id: r50426
2010-06-28 11:21:39 +00:00
Max Horn
1453093391 SCI: Cleanup GfxView code (formatting etc.); also insert some asserts to protect scalingX/Y arrays
svn-id: r50425
2010-06-28 11:21:23 +00:00
Max Horn
793d482f4f SCI: Optimized GfxScreen::scale2x a bit
svn-id: r50424
2010-06-28 11:21:07 +00:00
Max Horn
7e0240ab14 SCI: Comment cleanup
svn-id: r50423
2010-06-28 11:20:51 +00:00
Max Horn
2c01d10a36 SCI: Remove GfxView::getLoopInfo; add assert to GfxView::getCelInfo
The return value of GfxView::getCelInfo was used virtually everywhere
without a check for it being non-NULL. Hence instead of returning
NULL when the loop count is zero, it makes more sense to assert out
(instead of a segfault, or worse, random data being used).

svn-id: r50422
2010-06-28 11:20:33 +00:00
Max Horn
9f48a37671 SCI: Add const qualifiers to many GfxView methods and their return values.
This helps to ensure proper data encapsulation.
Also reformatted some overlong comments to 80 chars per line, and
fixed some other code formatting issues.

svn-id: r50421
2010-06-28 11:20:14 +00:00
Max Horn
db2d41a433 SCI: Make src param of GfxScreen::scale2x const
svn-id: r50420
2010-06-28 11:19:45 +00:00
Max Horn
4016bdfd27 SCI: cleanup
svn-id: r50419
2010-06-28 11:19:27 +00:00
Martin Kiewitz
22a8b2236e SCI: set volume all the time, fixes volume being 0 after fading in sci0
svn-id: r50418
2010-06-28 10:48:09 +00:00
Martin Kiewitz
caa4479bdf SCI: changed the way setVolume works for sci0 back to the way it was from r50414, because adlib driver doesn't support channel volume changes for sci0 games, fixes fading in those games
svn-id: r50417
2010-06-28 10:36:10 +00:00
Martin Kiewitz
10a9dfc0d7 SCI: added uninit workaround for lsl3 - when accessing set volume menu the first time sound got muted before (because a uninitialized temp was used to do it, would have been 's' in sierra sci)
svn-id: r50416
2010-06-28 10:15:13 +00:00
Martin Kiewitz
92cc16e6a5 SCI: reordering and cleanup, removing debug code from sci0 mix-code
svn-id: r50415
2010-06-28 10:00:12 +00:00
Martin Kiewitz
e4cb2703ca SCI: implementing real setVolume() support, fixing some fading in sci1 games (like pq3 intro)
svn-id: r50414
2010-06-28 09:22:57 +00:00
Martin Kiewitz
253036ec4d SCI: regression from implementing channel remapping and r50405 - center pitch wheels and hold pedal on init instead of unloadMusic(), fixes lsl5 piano scene
svn-id: r50413
2010-06-28 08:25:45 +00:00
Filippos Karapetis
52ddc711d0 SCI: separated the graphics initialization code a bit
- Moved all of the graphics initialization code on startup inside initGraphics()
- Moved all of the screen initialization (resolution, upscaled graphics etc) code inside GfxScreen()

svn-id: r50412
2010-06-28 08:18:55 +00:00