Commit Graph
500 Commits
Author SHA1 Message Date
Willem Jan Palenstijn 0192d2f2de SCI: Fix restarting SCI engine with different SCI version 2011-11-29 18:34:34 +01:00
Filippos Karapetis 381e92a576 SCI: Added handling of invalid jump offsets (e.g. QFG2, script 260) 2011-11-28 22:36:58 +02:00
Filippos Karapetis 267c6f1756 SCI: Made more fields of the Script class private. Some cleanup. 2011-11-05 03:00:42 +02:00
Filippos Karapetis ffe7073037 SCI: Script 64036 in Torin's passage contains an invalid export 2011-10-16 13:01:13 +03:00
Filippos Karapetis 7f675de855 SCI: Fixed compilation with VM_DEBUG_SEND defined 2011-09-22 04:18:11 +03:00
Willem Jan Palenstijn bc4691a23e SCI: Fix incorrect usage of sizeof
Thanks to salty-horse for the reports.
2011-06-25 21:16:12 +02:00
Max Horn 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
md5 eea48434f5 SCI: Changed order of script and room in error messages
This matches the order in which workarounds are stored in workarounds.cpp
2011-06-11 14:00:02 +03:00
Lars Skovlund ff62a6050a Revert "SCI: Don't attempt to modify null/disposed objects."
This fix for bug #3303802 is a potential cause of unreproducible bugs
in all SCI games that taint savegames.
This reverts commit 48140a012d.
2011-05-27 13:15:57 +02:00
md5 48140a012d SCI: Don't attempt to modify null/disposed objects.
These cases occur usually because of script bugs. Fixes script bug
#3303802 - "SCI: PQ1VGA - Crash at the jail"
2011-05-27 03:06:06 +03:00
md5 bd2bfe85c9 SCI: Don't include several debug tables when REDUCE_MEMORY_USAGE is defined 2011-05-13 16:12:52 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
D G Turner 344369c294 SCI: Fix Compilation with --enable-release set. 2011-03-28 22:45:01 +01:00
md5 4133945850 SCI: Renamed restAdjust to r_rest (like r_acc and r_prev) 2011-03-28 02:23:58 +03:00
md5 6487d05ddf SCI: Moved some debug functions from vm.cpp to scriptdebug.cpp 2011-03-27 01:52:23 +02:00
md5 6ec9c9f62d SCI: Removed the READ_VAR and WRITE_VAR wrappers 2011-03-26 12:25:48 +02:00
md5 cc074b013f SCI: Refactored and cleaned up the VM call stack handling code
- Removed the CallsStruct intermediate stack. Calls are inserted directly
in the execution stack
- Added a constructor for the ExecStack struct and removed
add_exec_stack_varselector() and add_exec_stack_entry()
2011-03-26 02:37:10 +02:00
md5 10d1a58cb2 SCI: Reordered some functions 2011-03-25 14:09:09 +02:00
md5 d86504ef88 SCI: Cleaned up the BreakpointType enum and documented the bpe command 2011-03-25 13:37:00 +02:00
md5 4ceb4838ed SCI: Cleaned up send_selector()
- Placed all of the associated debug code in a separate function
- Unified debug output
2011-03-25 13:25:38 +02:00
md5 aaa6c9a071 SCI: Improved debug output of validate_property() 2011-03-04 00:25:19 +02:00
Willem Jan Palenstijn ce288024b4 SCI: Fix crash with hunk refs in logkernel output 2011-02-28 21:37:12 +01:00
md5 cf904b1156 SCI: Added code to aid in detecting infinite loops in scripts
When the ABORT_ON_INFINITE_LOOP define is defined in vm.cpp, the VM will now
abort in cases where a conditional statement is followed by an unconditional
jump (which will most likely lead to an infinite loop). Aids in detecting
infinite loop bugs such as #3040722.
2011-02-22 18:52:44 +02:00
md5 4766774b3d SCI: Fixed script bug #3040722 in QFG3 2011-02-21 20:43:54 +02:00
md5 601e8c0de1 SCI: Added a custom modulo reg_t operator
This version only handles signed integers. The modulo operator was changed in
SCI0 late (Iceman, and perhaps all SCI0 0.000.685 and later) so that it handles
negative numbers as well. We need to see if there really is a need to keep two
different modulo operators (which will only be necessary if any SCI0 game asks
for the modulo of a negative number by mistake, or a number larger than 32767).
Thus, error out in such a case for SCI0, so that this can be investigated
properly
2011-02-21 05:18:21 +02:00
md5 ef38e4f57f SCI: Moved the gcCountdown() code inside the op_callk case, since that's the only place where it's used 2011-02-20 00:18:27 +02:00
md5 4e88d75eb6 SCI: Refactored the reg_t related operations and comparisons
This refactoring reduces a lot of code duplication, allows for better control,
makes the code more readable and allows us to remove a lot of now unneeded
workarounds
2011-02-19 20:22:43 +02:00
md5 9505becefa SCI: Removed several redundant helper functions
Removed validate_arithmetic(), signed_validate_arithmetic(), validate_unsignedInteger() and validate_signedInteger()
2011-02-15 11:25:54 +02:00
Filippos Karapetis 0f9c33e02f SCI: cleaned up checkSelectorBreakpoint()
svn-id: r55250
2011-01-15 12:18:13 +00:00
Filippos Karapetis 2b87eebdb0 SCI: Moved the handling of the op_line debug opcode inside readPMachineInstruction()
The handling has been moved inside readPMachineInstruction(), instead of run_vm(), as a
lot of parts of the code depend on this function handling all opcodes correctly (e.g. the
script dissassembler, the features class, find_callk etc)

svn-id: r55154
2011-01-07 20:24:49 +00:00
Filippos Karapetis 32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +00:00
Filippos Karapetis a5db890260 SCI: Sync in-game speech/subtitle options with the ones from the ScummVM GUI.
- Obtain speech/subtitle options from the ScummVM GUI and set them in CD games.
- Also, set simultaneous speech and subtitles in games that support them
(currently SQ4 CD and Freddy Pharkas CD). There is no GUI option for setting
simultaneous speech and subtitles in Freddy Pharkas CD, so this is the only
current way of achieving this (unless the text speed slider inside the Freddy
Pharkas options window is repurposed - but that will require extensive changes)

svn-id: r55005
2010-12-22 13:58:28 +00:00
Filippos Karapetis ffcd6783c7 SCI: Removed incorrect pointer arithmetic support for SCI2 strings
There was never pointer arithmetic support in SCI2 and newer games

svn-id: r54400
2010-11-21 00:49:54 +00:00
Lars Persson c7cf764890 SCI: Only handle seg_type_string if ENABLE_SCI32 is defined
svn-id: r54376
2010-11-19 13:03:31 +00:00
Lars Skovlund 1a6597ebc2 SCI3: Implement new opcode 0x4c.
svn-id: r54370
2010-11-19 12:47:47 +00:00
Filippos Karapetis c19e8377f9 SCI: Added pointer arithmetic support for SCI2 strings
svn-id: r54365
2010-11-19 10:28:43 +00:00
Filippos Karapetis 3b07056a47 SCI: Moved the Object class in a separate file
svn-id: r54361
2010-11-19 08:18:24 +00:00
Lars Skovlund f0fea21639 SCI3: Fix new opcode 0x4e
svn-id: r54347
2010-11-18 21:38:00 +00:00
Filippos Karapetis 49468fdfff SCI3: Added another previously unused opcode (0x27 / 0x4e)
svn-id: r54341
2010-11-18 19:20:30 +00:00
Lars Skovlund c5252071db SCI3: Add proper support for the calle instruction
svn-id: r54327
2010-11-18 17:04:00 +00:00
Filippos Karapetis ddbda3eb15 SCI: Code formatting
svn-id: r54305
2010-11-17 20:50:24 +00:00
Lars Skovlund 8a6efcac65 SCI3: Implement opcode to retrieve the info selector.
svn-id: r54303
2010-11-17 20:43:51 +00:00
Lars Skovlund 5ab823b16a SCI3: relocate operand of the lofsa opcode
svn-id: r54301
2010-11-17 20:29:10 +00:00
Lars Skovlund e086ef0096 Adapt SCI property instructions (pToa etc.) to SCI3
svn-id: r54296
2010-11-17 17:21:02 +00:00
Filippos Karapetis 47e137fd8e SCI: lofsa/lofss functionality for SCI3
- Updated detectLofsType() for SCI3
- Cleaned up op_lofsa and op_lofss and updated them for SCI3

svn-id: r54293
2010-11-17 14:28:32 +00:00
Filippos Karapetis bb9b7c24f9 SCI: Added some SCI3 selector related information
- Added a TODO for the usage of the -info- selector in kClone and kDisposeClone in
SCI3 scripts, as it's no longer used in SCI3
- Added information about which of the selectors are missing in SCI3. There are
some more which are missing, but aren't used in SCI2-SCI3 anyway
- Some styling

svn-id: r54291
2010-11-17 14:03:14 +00:00
Filippos Karapetis 1e9407be3f SCI: Added comments for rev. 54150 and fixed a typo
svn-id: r54153
2010-11-09 11:57:54 +00:00
Lars Skovlund 53a4a64b16 treat pushSelf opcode with low bit set as pushSelf (in fangames only, currently). Fixes bug #3038686.
(SCI Fanmade - Circus Quest: Crash when starting).

svn-id: r54150
2010-11-09 10:07:34 +00:00
Max Horn ba3e826872 SCI: Remove any use of printf
svn-id: r54037
2010-11-02 09:49:47 +00:00