Commit Graph

188 Commits

Author SHA1 Message Date
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
Max Horn
10f898c90e SCI: Rename MemObject -> SegmentObj
svn-id: r44130
2009-09-17 00:45:12 +00:00
Max Horn
a277123f54 SCI: Rename Script class members, change Script from struct to class
svn-id: r44126
2009-09-16 23:32:27 +00:00
Filippos Karapetis
90ae20c3ea - Made obj_get and obj_get_name methods of SegManager (getObject and getObjectName, respectively)
- Renamed alloc_List -> allocateList, alloc_Node->allocateNode, alloc_hunk_entry->allocateHunkEntry, free_hunk_entry->freeHunkEntry, for consistency

svn-id: r44039
2009-09-12 00:10:07 +00:00
Max Horn
d04b5d2c9b SCI: Rename resManager -> resMan; segManager -> segMan
svn-id: r43980
2009-09-06 12:57:42 +00:00
Filippos Karapetis
1bbab8f191 Some renaming:
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan

svn-id: r43908
2009-09-02 12:02:37 +00:00
Filippos Karapetis
bc8770cafb Removed the "op_" prefix from opcode names in the script debugger
svn-id: r43798
2009-08-29 11:56:59 +00:00
Filippos Karapetis
faa3c64d1b Stop loading opcodes from vocab.998. They are the same in all SCI games and are hardcoded anyway (plus, vocab.998 is unreliable in some games, e.g. QFG3, or completely missing in others). Also hardcoded the opcode names for the script debugger, the only place they're actually used. The only place where vocab.998 is loaded on demand is when using the "opcodes" console command (for debug/verification purposes)
svn-id: r43775
2009-08-27 23:39:59 +00:00
Filippos Karapetis
ed66cad677 - Simplified the parameters of some functions
- Replaced some EngineState parameters
- The SCI version is now obtained from the resource manager or the segment manager, thereby simplifying several functions
- Plugged 2 leaks in the fallback detector
- Renamed the segment manager and resource manager to "segmentManager" and "resourceManager" in all places, for consistency

svn-id: r43722
2009-08-25 08:38:14 +00:00
Filippos Karapetis
c38f58598b - Simplified some functions to accept only the parts of the EngineState they need as parameters, instead of the whole EngineState
- Moved the class table in the Segment manager - it's the only class using it directly
- Removed the sci11 flag from save games (we already know this, we don't need to store it)
- Moved script_get_segment() and get_class_address() inside the segment manager class
- Removed the script_locate_by_segment wrapper
- Simplified script_lookup_export() a lot by removing some paranoia checks
- Added some WIP code for automatically determining the game id in the fallback detector (still not working)
- General cleanup

svn-id: r43458
2009-08-17 05:55:21 +00:00
Walter van Niftrik
353e9fb36a SCI: Turn off logging in debugger.
svn-id: r43268
2009-08-11 12:57:51 +00:00
Willem Jan Palenstijn
a1bb715611 SCI: Fix stepping in debugger
svn-id: r42587
2009-07-18 12:51:12 +00:00
Filippos Karapetis
31a0c80905 Moved the kernel and the vocabulary outside of the engine state (they're static data, which never changes during a game)
svn-id: r42398
2009-07-11 23:45:54 +00:00
Filippos Karapetis
763c6c8ca1 Fixed regression in the script parser from commit 42260
svn-id: r42371
2009-07-11 06:19:29 +00:00
Filippos Karapetis
62499054a0 Some cleanup for the script debugger code:
- Renamed struct DebugState to ScriptState and r_amp_rest to restAdjust inside EngineState. Changed restAdjust to be a uint16 (actually it is a uint16, but it was being casted back and forth from an unsigned integer, so this clears up its type and size)
- Moved the script state variables from inside the run_vm() into the ScriptState struct, so that they can be accessed by the console commands and the script debugger all the time, and removed the weird isValid code

svn-id: r42260
2009-07-08 10:25:37 +00:00
Filippos Karapetis
d55f7e72d0 Added auto-detection for games with older headers for script blocks, and removed game flag GF_SCI0_OLD
svn-id: r42211
2009-07-07 10:28:05 +00:00
Filippos Karapetis
522b161bec Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
svn-id: r42167
2009-07-06 10:39:22 +00:00
Max Horn
72512db7fb SCI: Fixed warning
svn-id: r42055
2009-07-03 10:41:03 +00:00
Filippos Karapetis
c3403ac739 Moved some more debug state related variables in the DebugState struct
svn-id: r42044
2009-07-02 23:58:05 +00:00
Filippos Karapetis
80cb18e87f Moved all the debug state variables in a separate struct and re-enabled several places where they're used
svn-id: r42043
2009-07-02 23:16:40 +00:00
Filippos Karapetis
245a2764fc Cleanup
svn-id: r41727
2009-06-21 13:06:08 +00:00
Filippos Karapetis
95d32180df Moved some more debug commands to ScummVM's console
svn-id: r41364
2009-06-08 08:38:10 +00:00
Filippos Karapetis
7375039158 Moved some more debug commands to ScummVM's coneole
svn-id: r41302
2009-06-06 20:29:37 +00:00
Filippos Karapetis
e572811aed Moved some more debug commands to ScummVM's coneole
svn-id: r41227
2009-06-06 16:43:13 +00:00
Willem Jan Palenstijn
60e02ad6a8 Store long-term pointers to object variables in a new ObjVarRef struct.
Storing them as reg_t* could cause the pointers to become invalid
when they pointed into CloneTable since CloneTable can be re-allocated.

svn-id: r41220
2009-06-06 11:38:20 +00:00
Filippos Karapetis
7c84cca81d Moved some more debug commands to ScummVM's coneole and removed some unused code
svn-id: r41198
2009-06-05 19:04:14 +00:00
Max Horn
10c54394bd SCI: Renamed EngineState::flags and version to _flags and _version (following our conventions); also slightly changed the EngineState constructor to init _version & _flags, and used this to make them constant
svn-id: r41177
2009-06-04 21:44:39 +00:00
Max Horn
870db34cd1 SCI: Renamed _kfuncTable -> _kernelFuncs; and simplified/streamlined the kernel func map in kernel.cpp a bit
svn-id: r41176
2009-06-04 21:42:24 +00:00
Max Horn
382ebea3fa SCI: Renamed various debug related global variables to have a g_ prefix; and moved any 'extern' decls of them into a new header file
svn-id: r41163
2009-06-04 11:28:05 +00:00
Filippos Karapetis
9673beb082 Moved some more console commands to ScummVM's console
svn-id: r41141
2009-06-03 14:47:32 +00:00
Filippos Karapetis
cb0aed3303 Moved some more console commands to ScummVM's console
svn-id: r41137
2009-06-03 11:38:12 +00:00
Filippos Karapetis
2ce6cca98b Moved some more console commands to ScummVM's debug console
svn-id: r41129
2009-06-02 23:29:58 +00:00
Filippos Karapetis
ac544e73e9 Moved some more console commands to ScummVM's debug console
svn-id: r41127
2009-06-02 21:07:34 +00:00
Filippos Karapetis
780926991e Moved some more console commands to ScummVM's debug console
svn-id: r41126
2009-06-02 19:03:43 +00:00
Filippos Karapetis
98f64cfa2f Removed the gfxw_new_visual and gfxw_new_port wrappers, moved _kfuncTable inside the Kernel class and moved gfxw_find_port inside the GfxVisual struct
svn-id: r41125
2009-06-02 14:16:59 +00:00
Filippos Karapetis
99c6874630 Split the kernel functions away from the vocabulary functions (WIP, saving/loading is broken)
svn-id: r41101
2009-06-01 14:12:43 +00:00
Filippos Karapetis
e55388c787 Removed script_error_flag and script_debug_flag, which were used to error out if something went wrong and open the debugger console. Changed all the places where they were used to error() out instead, as ScummVM's debugger console can open on error()
svn-id: r41073
2009-05-31 15:34:23 +00:00
Filippos Karapetis
4441ca4b3e - Further objectification of the SCI vocabulary functions
- Rewrote the sci_opcodes enum so that it's easier to read
- Made the engine error out if data is sent to an invalid selector (which is a fatal condition)

svn-id: r41069
2009-05-31 14:55:32 +00:00
Filippos Karapetis
e317012cce Further objectification of the SCI vocabulary functions. Removed the "kernel_words" console command, as it's exactly the same as "parser_words"
svn-id: r41065
2009-05-31 12:05:49 +00:00
Torbjörn Andersson
0999534749 The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)

svn-id: r41061
2009-05-31 10:02:16 +00:00
Filippos Karapetis
a4d13cef8c More objectification of the Vocabulary functions
svn-id: r41057
2009-05-31 02:37:24 +00:00
Filippos Karapetis
76406c35ec Started objectifying the vocabulary functions (WIP)
svn-id: r41051
2009-05-30 22:15:00 +00:00
Filippos Karapetis
dcecdc7b94 Moved the "songlib" command to console.cpp and removed the non-working "set_vismap" command - we can view the different maps with "show_map", but it doesn't make much sense to redirect the game's graphics output to another screen map on demand
svn-id: r41048
2009-05-30 20:45:57 +00:00