Commit Graph
230 Commits
Author SHA1 Message Date
Tarek Soliman a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
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 7f675de855 SCI: Fixed compilation with VM_DEBUG_SEND defined 2011-09-22 04:18:11 +03: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
Willem Jan Palenstijn 4296ac6d15 SCI: Fix sign in disasm of relative jumps 2011-06-12 02:00:09 +02: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
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
Willem Jan Palenstijn 6fe95780d3 SCI: Continue disasm until no jumps go past the current opcode
This should ensure disasm will disassemble an entire function, and
not stop at an intermediate ret opcode.
2011-03-12 23:46:32 +01:00
David Turner a7f7b90aee SCI: Fixed possible use of uninitialized variable in SCI Script Debugger.
svn-id: r55487
2011-01-23 23:25:34 +00:00
Filippos Karapetis 169c6be32b SCI: Fixed a bug in the script disassembler
svn-id: r54463
2010-11-24 21:32:34 +00:00
Johannes Schickel 94d3d82f59 SCI: Slight formatting fix and use \t instead of a tab character in debugN.
svn-id: r54349
2010-11-18 21:45:31 +00:00
Lars Skovlund c325d815d2 SCI: Fix debugger disassembly of property accesses in SCI3
svn-id: r54348
2010-11-18 21:41:13 +00:00
Filippos Karapetis c36f072190 SCI: Updated dissectScript() to handle synonym blocks
svn-id: r54277
2010-11-17 08:10:36 +00:00
Filippos Karapetis 9d318497f7 SCI: Unified the functionality and parameters of the disasm and disasm_addr commands
svn-id: r54276
2010-11-17 08:05:11 +00:00
Filippos Karapetis c2d9c1b06b SCI: Added the ability to display original script bytecode in the "disasm" console command
svn-id: r54275
2010-11-17 00:05:09 +00:00
Max Horn ba3e826872 SCI: Remove any use of printf
svn-id: r54037
2010-11-02 09:49:47 +00:00
Martin Kiewitz 63c945f93a SCI: fix warning and remove duplicate code
svn-id: r51243
2010-07-24 11:59:40 +00:00
Martin Kiewitz e000d28654 SCI: fix debugging code of parser, add 0xffe special group into debug support
svn-id: r50956
2010-07-17 12:06:31 +00:00
Max Horn 1d3a0f6dec SCI: Turn global object g_debugState into SciEngine member var
svn-id: r50836
2010-07-12 23:20:33 +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
Filippos Karapetis 1faebccce2 Cleanup, remove unused/obsolete code
svn-id: r50403
2010-06-27 21:29:35 +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
Max Horn cfcbdf8656 SCI: Remove selector_name function, some cleanup
svn-id: r49966
2010-06-17 23:13:30 +00:00
Filippos Karapetis 93f33c7dab Resolved a FIXME with getSciLanguage(), by creating a separate setter. Also, some camelCase changes
svn-id: r49568
2010-06-10 11:18:10 +00:00
Filippos Karapetis 10aeb33a42 Merged restAdjust and restAdjustCur, as we don't save the restAdjust modifier inside saved games (rightfully so). Also, the segment manager is now reset inside the main loop, when the game is restarted, not in game_exit()
svn-id: r49533
2010-06-09 07:32:17 +00:00
Filippos Karapetis 2c950b321c Fixed regression from commit #49465 - there are in fact two restAdjust variables, the current and global one
svn-id: r49486
2010-06-07 15:14:58 +00:00
Filippos Karapetis 3c82b6578f Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
2010-06-06 23:00:33 +00:00
Filippos Karapetis c32e88fe0b Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
svn-id: r49327
2010-05-30 16:14:31 +00:00
Filippos Karapetis 67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +00:00
Max Horn 0197e9f6a1 SCI: Making various object and script related things const
svn-id: r49246
2010-05-26 16:30:10 +00:00
Filippos Karapetis 1c0bbb10cb More work on controlling access to members of the Object class:
- Moved the code for initializing the object class, species and base object inside the Object class
- Made propertyOffsetToId() a method of the Object class
- Made relocateObject() a method of the Object class
- The Object getVariable() method now returns a reference to the requested variable

Only SegManager::reconstructScripts() is left needing direct access to the members of the Object class

svn-id: r49228
2010-05-26 08:27:24 +00:00
Filippos Karapetis 893af1600a Fixed signed/unsigned warning, changed to CamelCase
svn-id: r49100
2010-05-19 14:45:56 +00:00
Filippos Karapetis f3892a506b - Removed the wrapper kalloc, kmem and kfree functions. Now, the associated Segment manager functions allocateHunkEntry, getHunkPointer and freeHunkEntry are used directly (which are more descriptive, anyway)
- Replaced the GET_SEGMENT macro by a method of the segment manager
- Removed the unused reference to the created hunk in allocateHunkEntry(), only the reg_t reference to it is returned now

svn-id: r49078
2010-05-18 13:05:09 +00:00
Filippos Karapetis 8b7c29a4ad Moved breakpointWasHit inside the DebugState struct, thus resolving a FIXME
svn-id: r49071
2010-05-18 09:18:27 +00:00
Matthew Hoops 3dda73d9a2 Add initial support for KQ6 Mac. Wrapper functions for read/writing to pointers are now used (found in util.*) for code that has different endianness in SCI1.1+ Mac games. Add support for Mac 'snd ' and 'CURS' resources. QFG1 Mac is not yet playable due to script compression.
svn-id: r49070
2010-05-18 04:17:58 +00:00
Max Horn e45f0f309a SCI: Remove EngineState::_kernel, use SciEngine::_kernel instead
svn-id: r48050
2010-02-13 17:45:40 +00:00
Max Horn 4cfcf57546 SCI: Convert disassemble to use readPMachineInstruction.
This change is untested, please check it. Also, the opparams
array is not used but could be used to simplify the reading code.

svn-id: r47958
2010-02-07 12:14:49 +00:00
Max Horn 6c322506dd SCI: Move some code around (no code changes)
svn-id: r47823
2010-02-02 22:50:32 +00:00
Max Horn b124a0c1cd SCI: Reduce header interdependencies a bit
svn-id: r47666
2010-01-29 11:05:06 +00:00
Walter van Niftrik 08bf02ccf2 SCI: Fixed debugger opcode names.
svn-id: r45158
2009-10-16 10:46:09 +00:00
Filippos Karapetis 6d030126d7 More work on the Object class
svn-id: r44921
2009-10-11 13:46:58 +00:00
Filippos Karapetis d6f5d93dbf Started rewriting the Object struct into a class
svn-id: r44878
2009-10-10 15:58:51 +00:00
Max Horn 6ad5840181 SCI: Rename EngineState::segMan to _segMan
svn-id: r44629
2009-10-04 18:38:18 +00:00
Max Horn 5f440854b7 SCI: Add EngineState::_kernel member for convenience
svn-id: r44173
2009-09-17 17:00:36 +00:00
Max Horn eb77efda78 SCI: Add a global getSciVersion() function and make use of it
svn-id: r44170
2009-09-17 16:50:53 +00:00
Max Horn b2c386ed00 SCI: Move parts of struct ScriptState into a new struct DebugState
svn-id: r44151
2009-09-17 13:21:19 +00:00
Filippos Karapetis f890a69428 Changed the way object selectors are accessed, by removing the relevant defines and adding appropriate methods to the Object structure
svn-id: r44138
2009-09-17 08:51:38 +00:00