Commit Graph

16745 Commits

Author SHA1 Message Date
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
Martin Kiewitz
698f10611c SCI: fix regression of r50405 - sq1vga right at the beginning - scripts are pausing sound and then sending manually commands afterwards
svn-id: r50411
2010-06-28 08:16:20 +00:00
Martin Kiewitz
31af2bfe32 SCI: show arguments on selector invoke breakpoint even when VM_DEBUG_SEND is not used, but in a compressed fashion
svn-id: r50410
2010-06-28 07:42:16 +00:00
Robert Špalek
76b8c33aaf Fade palette in/out when entering/leaving a location
svn-id: r50409
2010-06-28 04:59:13 +00:00
Robert Špalek
d4a0c8a1ad bugfix for the item fast-switching commit
svn-id: r50408
2010-06-28 04:16:00 +00:00
Robert Špalek
c7554c267e Implement shortcuts for switching items in the inventory
slash: switch between the last held item and normal mouse
comma, period: replace the currently held item with the previous/next item in the inventory

Also, commented a bit better what happens when ESCAPE is present with respect to map
programs and cut-scenes.

svn-id: r50407
2010-06-28 04:04:16 +00:00
Filippos Karapetis
048ceb73d3 SCI: Removed the hack for loading games from the launcher from run_vm(). This is now done on startup. This should fix loading from the launcher for LSL6
svn-id: r50406
2010-06-27 23:20:08 +00:00
Martin Kiewitz
a887d4898d SCI: tell midiparser that he lost ownership of channels in case we take them away
svn-id: r50405
2010-06-27 21:41:30 +00:00
Filippos Karapetis
8db94ef991 Cleanup
svn-id: r50404
2010-06-27 21:38:45 +00:00
Filippos Karapetis
1faebccce2 Cleanup, remove unused/obsolete code
svn-id: r50403
2010-06-27 21:29:35 +00:00
Filippos Karapetis
4a60ff4090 Made the script initialization/uninitialization methods part of the segment manager
svn-id: r50402
2010-06-27 21:18:19 +00:00
Martin Kiewitz
456265f8fa SCI: resetting curPos as well when mixing sound resources
svn-id: r50401
2010-06-27 21:12:38 +00:00
Johannes Schickel
819dc92802 Escape a "?" character to prevent "??)" to be interpreted as trigraph and thus becoming "]".
svn-id: r50399
2010-06-27 21:04:47 +00:00
Filippos Karapetis
2843feeb9a SCI: Made the code for initializing script classes, objects and locals part of the Script class
svn-id: r50398
2010-06-27 21:00:34 +00:00
Martin Kiewitz
5f9cc9e8f8 SCI: adding alias for vmvars ("vv") and vmvarlist ("vl")
svn-id: r50397
2010-06-27 20:43:32 +00:00
Filippos Karapetis
bb992b0b93 SCI: Moved all the script-related code inside script.cpp/.h, and all script opcode-related code inside vm.cpp/.h
svn-id: r50396
2010-06-27 20:38:43 +00:00
Martin Kiewitz
0436f2823d SCI: added additional output to vmvars command
svn-id: r50395
2010-06-27 20:38:41 +00:00
Filippos Karapetis
e6a9a9da82 Silenced a false positive in MSVC about a potentially uninitialized variable
svn-id: r50392
2010-06-27 20:22:09 +00:00
Martin Kiewitz
1537d61299 SCI: added alias for bplist ("bl") and bpdel ("bc"), added capability of deleting all breakpoints by using "bc *"
svn-id: r50391
2010-06-27 20:11:15 +00:00
Filippos Karapetis
aa9b9dd08f SCI: Separated the code for initializing script classes from the code for initializing script objects
svn-id: r50390
2010-06-27 20:09:51 +00:00
Martin Kiewitz
7644631daf SCI: removing debug command "set_acc", use "vmvars a" instead
svn-id: r50389
2010-06-27 20:02:58 +00:00
Martin Kiewitz
4653153910 SCI: added new command "p" / "stepover" to execute one command, but skip send/calls processing. single-step is now "trace" (alias "s" and "t"), stepping till ret is "step_ret" (alias "pret"), removed unused kDebugSeek
svn-id: r50388
2010-06-27 19:58:32 +00:00
Martin Kiewitz
303dc06388 SCI: fixing regression from one of the merges
svn-id: r50387
2010-06-27 18:41:07 +00:00
Martin Kiewitz
777794d11d SCI: filter out set signal commands from midi streams, if they happen at ticker 0. fixes castle daventry getting removed immediately in kq5 french/mac
svn-id: r50385
2010-06-27 17:58:26 +00:00
Torbjörn Andersson
5997307081 Fixed GCC warnings. (Same warning twice, actually.)
svn-id: r50383
2010-06-27 17:06:26 +00:00
Martin Kiewitz
a2cdc47530 SCI: now showing kernel call name when argument signature check fails
svn-id: r50380
2010-06-27 16:09:17 +00:00
Filippos Karapetis
d7f212647a Turned the error when failing to locate an invalid object back to a warning (KQ5 French has an invalid object in script 202)
svn-id: r50379
2010-06-27 16:02:03 +00:00
Martin Kiewitz
01bfcf98cc SCI: debug command vmvars - adding acc support
svn-id: r50378
2010-06-27 15:50:51 +00:00
Lars Skovlund
6864d09d68 SCI: Fix for large views in GK2. At least it does not segfault now.
svn-id: r50376
2010-06-27 13:15:01 +00:00
Eugene Sandulenko
25ca058fa8 Add support for Chinese The DIG.
svn-id: r50375
2010-06-27 13:06:22 +00:00
Martin Kiewitz
32ee0338f8 SCI: better solution for the lsl6 uninit issue, we now go through all the parents till we find a working workaround - we can use Narrator::startText that way inside the workaround table
svn-id: r50374
2010-06-27 11:51:44 +00:00
Martin Kiewitz
0b6bd84aba SCI: adding uninit workaround for lsl6 (Narrator::startText)
svn-id: r50373
2010-06-27 11:19:23 +00:00
Paul Gilbert
b6b4247335 Workaround that corrects some bad frame data in the Russian version that was causing the several game crashes
svn-id: r50372
2010-06-27 11:16:49 +00:00
Paul Gilbert
c7682f5117 Added proper conversion of message RGB colour values
svn-id: r50371
2010-06-27 06:35:32 +00:00
Paul Gilbert
9a8683ac65 Added accidentally deleted line
svn-id: r50369
2010-06-27 05:58:11 +00:00
Travis Howell
be399485cd Add Nintendo Wii (PAL) versions of Freddi Fish: Kelp Seed Mystery.
svn-id: r50367
2010-06-27 05:30:18 +00:00
Paul Gilbert
965cdb6fbf Several bugfixes to the loading, display, and digital sound playing of messages during cutscenes
svn-id: r50366
2010-06-27 05:18:21 +00:00
Paul Gilbert
c922af06c2 Centralised the update logic for the various system lists into the MadsView class
svn-id: r50365
2010-06-27 05:17:40 +00:00
Nicola Mettifogo
6a6091f6d7 Prevent execution of the STOP script command when its Zone does not exist. Patch #3021744 by fuzzie with some comments.
svn-id: r50363
2010-06-27 04:58:48 +00:00
Robert Špalek
ae332b620e Run possible cut-scenes before each location change.
This is the behavior of the original player.  It is not necessary to click on
the hero.

svn-id: r50361
2010-06-27 04:19:55 +00:00
Paul Gilbert
b161310193 Script workaround fix for bug #2917661 - Crash when interacting with D'Blah
svn-id: r50360
2010-06-27 01:06:51 +00:00
Filippos Karapetis
daab502028 Cleanup
svn-id: r50359
2010-06-27 00:08:00 +00:00
Filippos Karapetis
7a14846bdd Removed the misleading getHeap() function (only valid for SCI0-SCI1), plus removed some unused defines
svn-id: r50358
2010-06-26 23:48:27 +00:00
Filippos Karapetis
3cf0114164 Moved script_instantiate_sci0() inside the segment manager, and renamed it to scriptInitialiseObjectsSci0()
svn-id: r50357
2010-06-26 23:13:05 +00:00
Filippos Karapetis
3dcebcb1bc Shuffled some functions around. Also, the filename in kResCheck can never be bigger than 9 characters, when dealing with VMD videos
svn-id: r50355
2010-06-26 23:01:22 +00:00
Filippos Karapetis
b2f2c48c7e Added a workaround for broken script 377 in Castle of Dr. Brain, room 320. It constantly tries to free the saved area rectangle (underbits) underneath the popup window
svn-id: r50352
2010-06-26 22:50:39 +00:00
Filippos Karapetis
e2026f4a26 Zero out the memory pointer of a hunk when freeing it
svn-id: r50351
2010-06-26 22:48:47 +00:00
Martin Kiewitz
25cb3092f4 SCI: added comment to vm-workaround table
svn-id: r50347
2010-06-26 21:57:13 +00:00
Johannes Schickel
09b4f7cbed Define WIN32_LEAN_AND_MEAN before including windows.h.
This will cause our code to include less functionality, but might on the other hand fasten up the compilation.

svn-id: r50346
2010-06-26 21:55:52 +00:00
Willem Jan Palenstijn
af755b0b3d Further improve readability
svn-id: r50345
2010-06-26 21:36:25 +00:00
Martin Kiewitz
1ca0cdc8b1 SCI: fix warning
svn-id: r50341
2010-06-26 20:47:28 +00:00
Willem Jan Palenstijn
caded4f892 Improve readability
svn-id: r50340
2010-06-26 20:28:42 +00:00
Martin Kiewitz
710fc6c71e SCI: do boundary checking when loading sci1 sounds and mixing them together. The final end credits song (resource 699) in kq5 has some channels with invalid offsets, crashing ScummVM before
svn-id: r50339
2010-06-26 19:55:49 +00:00
Matthew Hoops
e5e90eb8a8 Add a debug console command to Riven for displaying combinations to puzzles.
svn-id: r50338
2010-06-26 19:09:45 +00:00
Matthew Hoops
2b9f4e5068 Gehn's cage should be closed initially, so initialize ocage to 1.
svn-id: r50337
2010-06-26 18:44:32 +00:00
Matthew Hoops
c2cb3bb799 Add the page turning sound for the Riven journals and stub off the swipe transition used when turning pages.
svn-id: r50336
2010-06-26 18:27:18 +00:00
Martin Kiewitz
9a0e2e9c46 SCI: add another unint temp workaround for kq5 - when playing harp for the harpies
svn-id: r50334
2010-06-26 17:37:28 +00:00
Matthew Hoops
554640ee8a Fix saving while viewing the inventory in Riven and cleanup the save/load code.
svn-id: r50333
2010-06-26 17:21:50 +00:00
Martin Kiewitz
61295bcc4e SCI: pseudo-adding workaround for kq5 room 25 witch forest
svn-id: r50332
2010-06-26 16:54:09 +00:00
Martin Kiewitz
41aca44b03 SCI: another commit for adding a workaround for islang room 300 again (although i already commited it already, stupid torturegit)
svn-id: r50330
2010-06-26 16:27:01 +00:00
Martin Kiewitz
79b5e7d77e SCI: fixing stupid torturegit conflict merge
svn-id: r50329
2010-06-26 16:21:28 +00:00
Willem Jan Palenstijn
691323f16e Fix format string warning
svn-id: r50325
2010-06-26 15:55:40 +00:00
Filippos Karapetis
783b71d585 Load the correct speech file pack for the intro of Rex Nebular
svn-id: r50321
2010-06-26 13:28:22 +00:00
Martin Kiewitz
a4f139c4d2 SCI: adding more comment for export workaround (sq1)
svn-id: r50318
2010-06-26 12:20:40 +00:00
Martin Kiewitz
cb5d9f6af5 SCI: added workaround for island of dr. brain elements puzzle
svn-id: r50317
2010-06-26 12:04:15 +00:00
Martin Kiewitz
e4153044d4 SCI: reverting r50315 - had the deadlock just again...
svn-id: r50316
2010-06-26 11:48:42 +00:00
Martin Kiewitz
be75870100 SCI: fixing deadlock possiblity on samples (sq3 deadlocked on door opening/where am i on me)
svn-id: r50315
2010-06-26 11:43:14 +00:00
Paul Gilbert
8eb206b6b9 Bugfix to correctly handle transparency when rendering scaled sprites
svn-id: r50314
2010-06-26 11:31:04 +00:00
Martin Kiewitz
18d9f917a0 SCI: set _driver to 0 in MidiParser_SCI destructor to stop the MidiParser destructor call allNotesOff() which would affect all channels all the time - fixes sq1 ship flying away sound getting stopped when ladder falls down
svn-id: r50313
2010-06-26 11:16:25 +00:00
Paul Gilbert
d7fe988251 Bugfix to dirty area handling to prevent creation of invalid rects
svn-id: r50312
2010-06-26 11:14:38 +00:00
Martin Kiewitz
906b3221f5 SCI: removing fixme (issue got already solved)
svn-id: r50311
2010-06-26 10:51:38 +00:00
Martin Kiewitz
16f854ba64 SCI: dont call midiparser->stop() if paused sound gets stopped
svn-id: r50310
2010-06-26 10:47:38 +00:00
Martin Kiewitz
cf3a37585c SCI: making hack inside kAbs hoyle1 specific, added fixme
svn-id: r50309
2010-06-26 09:34:14 +00:00
Martin Kiewitz
258494f036 SCI: adding capability to resolve local calls as well for valgrind-sci, adding another workaround for a script bug in sq1 (this time export 1 gets called locally)
svn-id: r50308
2010-06-26 08:29:55 +00:00
Paul Gilbert
70e4a8605b Minor bugfix for correctly positioning where background sprites are drawn
svn-id: r50298
2010-06-26 00:37:44 +00:00
Paul Gilbert
ab261facee Added extra validation for sprite decoding
svn-id: r50297
2010-06-26 00:36:43 +00:00
Paul Gilbert
e328bd8f7f Added support for Fab compressed sprite sets
svn-id: r50295
2010-06-25 23:43:07 +00:00
Martin Kiewitz
56d9acad90 SCI: implementing workaround for issue in room 58 sq1 (operation lt, doing comparsion against pointer)
svn-id: r50294
2010-06-25 22:48:55 +00:00
Martin Kiewitz
fc4fa25ec4 SCI: adding capability for detecting export-calls into valgrind-sci, adding workaround for export 1 of script 703 in sq1 (gets called from various objects)
svn-id: r50292
2010-06-25 22:34:53 +00:00
Florian Kagerer
b96c0a1f07 SCI: fix typo
svn-id: r50291
2010-06-25 21:04:22 +00:00
Florian Kagerer
e1a333570e SCI: set MDT_PREFER_GM instead od MDT_PREFER_MT32
svn-id: r50289
2010-06-25 20:58:52 +00:00
Florian Kagerer
c35e350531 AUDIO: get rid of MDT_PREFER_MIDI since it should be sufficient to either select MDT_PREFER_MT32 or MDT_PREFER_GM
svn-id: r50288
2010-06-25 20:51:57 +00:00
Martin Kiewitz
683d54a746 SCI: adding workaround for uninitialized read in sq1
svn-id: r50287
2010-06-25 20:46:08 +00:00
Filippos Karapetis
4785e1fd3f Renamed some variables
svn-id: r50284
2010-06-25 19:09:19 +00:00
Florian Kagerer
6561b93f1e KYRA: fixed typo
svn-id: r50283
2010-06-25 19:06:10 +00:00
Florian Kagerer
e34d7342f5 KYRA: implement new gui option flags
svn-id: r50282
2010-06-25 18:57:50 +00:00
Florian Kagerer
3962f8ba59 AUDIO: some fixes in the audio device code (no sound option, new GUIO flags)
svn-id: r50281
2010-06-25 18:47:52 +00:00
Matthew Hoops
be8a596668 Add support for the third inventory case in Riven: you have the two journals but not the trap book (happens at the end of the game).
svn-id: r50280
2010-06-25 18:20:31 +00:00
Filippos Karapetis
784f52a677 Removed the getHunkPointer error - it's valid SCI behavior (e.g. when loading/quitting sometimes, since hunks are not saved). We check for valid hunk pointers anyway, so there's no reason for the warning/error
svn-id: r50279
2010-06-25 17:59:49 +00:00
Martin Kiewitz
69694f3619 SCI: changing workaround results for opcodes from signal_reg to make_reg(0, 1)
svn-id: r50278
2010-06-25 17:59:48 +00:00
Filippos Karapetis
aedc77f0bd When loading a game, stop all running VMs recursively, and also stop kAnimate's current recursion. This fixes the invalid execution stack frame in SQ1, when loading from the death screen after dying from the acid drops in Kerona. This should also fix the invalid hunk pointers, thus the warning about invalid hunk pointers has been turned into an error, as it shouldn't occur anymore
svn-id: r50277
2010-06-25 17:25:00 +00:00
Filippos Karapetis
b6d1b3bc0b Do not allow the VM to run on non-existent scripts (which shouldn't be happening anymore)
svn-id: r50276
2010-06-25 17:13:47 +00:00
Filippos Karapetis
ab19e87414 Removed all of the non-validating code - there's no real point in removing script validations
svn-id: r50275
2010-06-25 16:54:03 +00:00
Martin Kiewitz
b188fc14a2 SCI: only send new volume to currently mapped channels, fixes assert in sq1 because setVolume is called on an object that's currently not playing. added fixme
svn-id: r50274
2010-06-25 16:43:09 +00:00
Max Horn
6ee82a2027 SCI: Introduce SciGameId enum
svn-id: r50273
2010-06-25 16:16:29 +00:00
Max Horn
23d384e6b8 SCI: Remove SciEngine::getFlags()
svn-id: r50272
2010-06-25 16:12:38 +00:00
Max Horn
1e9977a725 SCI: Restrict some 'error' exceptions to the places they occur; cleanup
svn-id: r50271
2010-06-25 16:11:00 +00:00
Max Horn
7d4d58bab4 SCUMM: Set some more detection file sizes
svn-id: r50270
2010-06-25 16:08:34 +00:00
Martin Kiewitz
8ff6a709fb SCI: when writing to a temp, check for segment 0xFFFF and remove it. This fixes a false-positive uninitialized read error in room 44 sq1
svn-id: r50269
2010-06-25 16:04:37 +00:00
Filippos Karapetis
e55686590e Removed the checking of parameters again (it's wrong, as it happens after, instead of before) and restored the workaround for SQ1 in op_add again
svn-id: r50268
2010-06-25 15:28:24 +00:00
Filippos Karapetis
159958fbe2 Some more info on kText(), removed dead code
svn-id: r50267
2010-06-25 15:06:00 +00:00
Martin Kiewitz
2b43c3a668 SCI: changes to the op GT workaround
svn-id: r50266
2010-06-25 14:50:27 +00:00
Filippos Karapetis
df37aff357 Added the SCI2.1 kText kernel function (subop 0, kTextSize for now)
svn-id: r50265
2010-06-25 14:50:10 +00:00
Filippos Karapetis
494a7fa8ab Extended validate_read_var to check for parameters too, and fixed the uninitialized variable in SQ1 there
svn-id: r50263
2010-06-25 12:43:43 +00:00
Filippos Karapetis
279da6ac48 Added workarounds for two issues which appear when throwing the water at Orat in SQ1, room 28
svn-id: r50262
2010-06-25 12:15:36 +00:00
Martin Kiewitz
c6b0a5e896 SCI: detect, if SCI1.1 game is merging or copying palette instead of using gameIds. Also prints method used, when using debug command "version"
svn-id: r50261
2010-06-25 10:04:31 +00:00
Filippos Karapetis
550209d1e6 Removed the game ID check for embedded priority in icon controls, and replaced it with a check for priority existence
svn-id: r50260
2010-06-25 09:57:37 +00:00
Johannes Schickel
1e29dc3641 Fixed use of uninitialized variable.
svn-id: r50250
2010-06-24 22:55:44 +00:00
Martin Kiewitz
aa3bfe5489 SCI: doing the exact opposite of r50236 code-wise now, as it was meant to be
svn-id: r50237
2010-06-24 21:46:57 +00:00
Martin Kiewitz
f014c9ed7e SCI: ignore segment 0xFFFF in segmanager getchar, when offset > 1 - so we dont write a warning, if the scripts use some uninitialized temp variable as terminator
svn-id: r50236
2010-06-24 21:42:08 +00:00
Martin Kiewitz
06a65d5c33 SCI: better initialize temp variables with FFFF:0 instead. foreign lsl3 uses kFileIO(readraw) and then kReadNumber directly. In that case we would produce many warnings because no terminating 0 is found
svn-id: r50235
2010-06-24 21:32:29 +00:00
Willem Jan Palenstijn
a03afd1898 SCI: Make kStrAt clear segment when writing characters
This is necessary since the uninitialized value detection from r50211,
and is analogous to seg_manager.cpp's setChar.
(Triggered in LSL3 age verification.)

svn-id: r50234
2010-06-24 21:09:38 +00:00
Martin Kiewitz
35b5da7e0f SCI: reverting r50232, didnt make sense. thx @ wjp for noticing
svn-id: r50233
2010-06-24 20:52:35 +00:00
Martin Kiewitz
893429d092 SCI: correctly put NUL inside SegManager::strncpy() even when using n = 0xFFFFFFFFU
svn-id: r50232
2010-06-24 20:40:57 +00:00
Martin Kiewitz
e8d31ccc07 SCI: fixing the tortoisegit commit disaster :P
svn-id: r50231
2010-06-24 20:10:51 +00:00
Martin Kiewitz
b0fde0a1f6 SCI: removing debug warning to show processes opcodes, accidentaly commited
svn-id: r50230
2010-06-24 20:03:32 +00:00
Martin Kiewitz
381a862d61 SCI: partly reverting r50208, iceman has script code (fred::canBeHere) that asks for property 380. sierra also returned a zero when going out of bounds (see gregs engine object.cpp, ::getPropertyN - fixes iceman, lsl3 and probably more
svn-id: r50229
2010-06-24 20:01:31 +00:00
Filippos Karapetis
42ca630f46 Fixed the LSL3 binoculars scene again, by fixing the invalid varselector reference
svn-id: r50227
2010-06-24 18:48:50 +00:00
Martin Kiewitz
346c3a3230 SCI: added uninitialized workaround for sq4cd
svn-id: r50226
2010-06-24 18:17:36 +00:00
Matthew Hoops
7edbcc26f7 Cleanup uninitialized read workaround(s).
svn-id: r50225
2010-06-24 17:48:15 +00:00
Martin Kiewitz
b8e2e8e5dd SCI: added uninitialized read for room 720 in lsl1
svn-id: r50222
2010-06-24 17:10:26 +00:00
Martin Kiewitz
00e88f15e3 SCI: arg5 is map for graph(updateBox), added comment
svn-id: r50221
2010-06-24 17:02:55 +00:00
Filippos Karapetis
6a811a8ae6 Added more information concerning the Dr. Brain uninitialized read
svn-id: r50219
2010-06-24 13:45:31 +00:00
Filippos Karapetis
59c908e97d Changed a warning which seems like regular SCI behavior into a debugC
svn-id: r50218
2010-06-24 13:44:27 +00:00
Martin Kiewitz
4b2661c06a SCI: removing warning for known uninitialized reads
svn-id: r50217
2010-06-24 13:38:24 +00:00
Martin Kiewitz
a268d3462b SCI: change fix for island to make it work
svn-id: r50216
2010-06-24 13:30:20 +00:00
Martin Kiewitz
3fcb833148 SCI: fixed workaround table from r50214 to have a valid terminator, also added another fix for pharkas
svn-id: r50215
2010-06-24 13:20:21 +00:00
Martin Kiewitz
e45ffc68a3 SCI: created a workaround table for uninitialized reads, removing old commented out workarounds for pharkas and laura bow 2
svn-id: r50214
2010-06-24 13:17:45 +00:00
Martin Kiewitz
898c9165d9 SCI: added currently known object/methodnames in comments for uninitialized reads
svn-id: r50213
2010-06-24 12:32:41 +00:00
Martin Kiewitz
e5f22da051 SCI: added objectname and method name printed out when uninitialized temps are read
svn-id: r50212
2010-06-24 12:25:47 +00:00
Martin Kiewitz
f93ca1e424 SCI: implement detection for uninitialized temp variable reads and implement direct fixes for them, i couldnt figure out a valid replacement for island, pharkas and laurabow2 work that way. this should also get changed to a replacement table
svn-id: r50211
2010-06-24 11:54:33 +00:00
Martin Kiewitz
0722d96a3e SCI: fix kTextSize to not crash when destination has an invalid rect in it
svn-id: r50210
2010-06-24 11:52:08 +00:00
Arnaud Boutonné
9a3ef9b8e1 Initialize properly paramCount in gob1. This fixes several valgrind errors, and the unknown opcodes are now skipped as expected. (related to bug #3018918, only partially solved)
svn-id: r50209
2010-06-24 11:50:25 +00:00
Filippos Karapetis
afffcec96e Turned two hacks inside validate_property() into errors till we find out where and why they occur (they shouldn't occur).
Also turned an error inside send_selector() when argc > 1 into a warning - these are usually script bugs and aren't fatal

svn-id: r50208
2010-06-24 11:29:26 +00:00
Filippos Karapetis
0fb5429318 Initialize the stack with 'S' or 's' characters, like SSCI does (ultimately, we should not change the stack again like we do in op_link - this is what Sierra is doing). Some cleanup
svn-id: r50207
2010-06-24 09:52:08 +00:00
Paul Gilbert
aa0c86e755 Bugfix for correctly decoding 2-bit encoded depth surfaces
svn-id: r50206
2010-06-24 08:17:46 +00:00
Paul Gilbert
cd8bec1ae2 Corrected rendering of sprites into a scene background
svn-id: r50205
2010-06-24 08:16:40 +00:00
Paul Gilbert
70e9df9566 Corrected incorrect variable name change
svn-id: r50204
2010-06-24 08:15:31 +00:00
Filippos Karapetis
bbb29e2650 Fixed script 140 in the Island of Dr. Brain by adding a workaround for it inside op_link
svn-id: r50203
2010-06-24 07:54:02 +00:00
Filippos Karapetis
f65c4f9886 Changed an error in LocalVariables::dereference() back to a warning, as it occurs in 2 places during the intro of LB2 (called from kMemory(peek))
svn-id: r50202
2010-06-24 07:32:34 +00:00
Matthew Hoops
7c9cbf75c0 Implement the rest of xvalvecontrol for the boiler puzzle in Riven, initialize a variable for the boiler platform switch.
svn-id: r50200
2010-06-24 05:31:07 +00:00
Matthew Hoops
3838197ac1 Silence gcc warnings.
svn-id: r50197
2010-06-24 01:29:46 +00:00
Martin Kiewitz
51ba34df0e SCI: we extended the showBits() rect all the way depending on where the object moved, fixed - fixes kq6cd flickering coin and pq1 flickering locker issue
svn-id: r50190
2010-06-23 20:13:33 +00:00
Filippos Karapetis
6d1f2d1d26 Fixed memory fragmentation warnings in Crazy Nick's games
svn-id: r50188
2010-06-23 17:30:18 +00:00
Martin Kiewitz
72ee20bc4d SCI: cnick-laurabow & cnick-kq are called with -Nw 0 0...
svn-id: r50187
2010-06-23 17:05:54 +00:00
Martin Kiewitz
e7634ee147 SCI: it seems that all cnick games are using the inbetween interpreter
svn-id: r50186
2010-06-23 16:58:42 +00:00
Martin Kiewitz
e39f2ae1c1 SCI: adding cnick-longbow to inbetween sci1.1 in GfxPalette
svn-id: r50185
2010-06-23 16:53:56 +00:00
Martin Kiewitz
496905dcc3 SCI: dont write palette in reorderView() if there is no palette :P
svn-id: r50184
2010-06-23 16:49:03 +00:00
Filippos Karapetis
0a102981f0 Moved the SelectorCache struct inside selector.h, where it belongs, and fixed some header dependencies in the process
svn-id: r50183
2010-06-23 15:23:37 +00:00
Filippos Karapetis
db6c7a3dee Removed a hack with SCI1.1 static selectors, and set them properly. This fixes scaling in the demo of QFG3
svn-id: r50182
2010-06-23 15:08:23 +00:00
Martin Kiewitz
c1d3fd670c SCI: global scaling implemented (hopefully, i'm not sure if it works 100% :P) thx to waltervn for telling me the vocab 994 stuff used for disassembly
svn-id: r50181
2010-06-23 14:06:31 +00:00
Martin Kiewitz
eeba2812c1 SCI: adding some more global scaling code, adding vanishingY and vanishingX as selectors
svn-id: r50180
2010-06-23 13:42:09 +00:00
Martin Kiewitz
3bc011357b SCI: some initial work on global scaling
svn-id: r50179
2010-06-23 12:58:14 +00:00
Martin Kiewitz
f0145e6dcd SCI: implementing boundary checking for GfxPalette::createFromData(), sq5 has a broken picture 0 resource, which would result in either crash or at least bad read from memory depending on whats read there
svn-id: r50178
2010-06-23 11:47:14 +00:00
Filippos Karapetis
3cdd841192 Made a warning more verbose
svn-id: r50177
2010-06-23 11:32:36 +00:00
Paul Gilbert
fedc060605 Corrected newly added palette conversion warning
svn-id: r50176
2010-06-23 11:28:53 +00:00
Filippos Karapetis
3569b49662 Changed some asserts to warnings
svn-id: r50175
2010-06-23 11:22:44 +00:00
Paul Gilbert
717005bf25 Rewrote the MADS animation frame decoder to better guard against invalid data causing memory overruns
svn-id: r50174
2010-06-23 10:11:01 +00:00
Martin Kiewitz
b68180efe5 SCI: added nicks picks sq to the sci1.1 interpreter games, the other ones may also use the same interpreter, but we currently can not verify
svn-id: r50172
2010-06-22 21:58:55 +00:00
Martin Kiewitz
04c04ff01e SCI: eco quest 1 demo also uses inbetween sci1.1 interpreter, fixing graphics
svn-id: r50170
2010-06-22 21:24:52 +00:00
Martin Kiewitz
d8968ee5b9 SCI: reversing r50168, demo is using the same offTop as well (demo.bat)
svn-id: r50169
2010-06-22 21:05:34 +00:00
Martin Kiewitz
93b2336aa2 SCI: demo of fairy tales uses regular offTop
svn-id: r50168
2010-06-22 21:01:34 +00:00
Martin Kiewitz
a836f965f8 SCI: set offTop to 26 for mixed up fairy tales to fix all sorts of non-fully-removed windows
svn-id: r50166
2010-06-22 20:40:41 +00:00
Matthew Hoops
99807b8894 Fix uncompressed MIDI in T7G Mac.
svn-id: r50165
2010-06-22 19:39:30 +00:00
Jordi Vilalta Prat
33b991ee9d Groovie: Add support for the compressed MIDI files of T7G Mac.
svn-id: r50163
2010-06-22 19:21:05 +00:00
Martin Kiewitz
38cf6aa3e4 SCI: implemented kAssertPalette and a palvary fix for ::set, fixes erana's place in qfg1vga nighttime
svn-id: r50162
2010-06-22 19:01:43 +00:00
Filippos Karapetis
56bf0c0e63 Fixed kMergePoly after discussing with waltervn so that it correctly returns a pointer to an empty (for now) polygon array. This means that you can walk over enemy bodies after killing them in QFG1VGA, but at least it fixes the crashes after killing monsters
svn-id: r50160
2010-06-22 18:33:19 +00:00
Filippos Karapetis
3a394793b6 Fixed 2 crashes in QFG1VGA, when dying:
- Ignoring a non-game breaking script bug (modifying the "longSong" object with argc = 2)
- Don't pop the callk stack frame if the stack is empty - fixes a crash when restoring from the death screen

svn-id: r50157
2010-06-22 18:25:15 +00:00
Martin Kiewitz
079e5c3135 SCI: fixed typo
svn-id: r50154
2010-06-22 17:13:44 +00:00