Filippos Karapetis
6e6336ece7
Fixed an issue when examining callk calls in the new graphics functions detection routine
...
svn-id: r44829
2009-10-09 16:20:15 +00:00
Filippos Karapetis
4011e948e7
Finished the automatic detection of the graphics functions used in SCI0 games. Also, introduced a new helper function to detect the offset of a ret call inside a script, with possible uses in other script detection routines
...
svn-id: r44828
2009-10-09 16:15:56 +00:00
Max Horn
76996301d1
SCI: Removed obsolete stringfrags code
...
svn-id: r44803
2009-10-08 21:29:45 +00:00
Filippos Karapetis
bcade54247
Started rewriting the check for the graphics functions type (still not finished)
...
svn-id: r44787
2009-10-08 14:37:55 +00:00
Filippos Karapetis
ce75c9270a
Removed the unused game_time variable, and fixed the incorrect calculation of start_game_time when restoring a game
...
svn-id: r44770
2009-10-08 07:25:18 +00:00
Filippos Karapetis
1562add631
- Cleaned up the cursor code
...
- Renamed gui -> _gui in EngineState, for consistency
- Added a reference to SciGuiCursor in EngineState, to be used by current code
- Renamed setCursorHide -> hideCursor, setCursorShow -> showCursor
- Moved the cursor zone limiting code inside SciGuiCursor. This code is currently not functioning, as we need to call refreshPosition() before each updateScreen() call to limit the cursor position.
svn-id: r44760
2009-10-07 21:29:47 +00:00
Max Horn
6ad5840181
SCI: Rename EngineState::segMan to _segMan
...
svn-id: r44629
2009-10-04 18:38:18 +00:00
Max Horn
0da9ad5ff5
SCI: Add SegManager::findObjectByName() method, make parse_reg_t() local to console.cpp, and switch other code using it to use findObjectByName() instead.
...
svn-id: r44628
2009-10-04 18:36:58 +00:00
Max Horn
8ba75fc522
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
...
svn-id: r44495
2009-09-30 16:16:53 +00:00
Filippos Karapetis
fd21bb2611
- Moved the list of synonyms and parser nodes inside the vocabulary class
...
- Added a convenience member inside the EngineState struct to access the instance of the Vocabulary class
svn-id: r44481
2009-09-30 12:17:38 +00:00
Max Horn
2fe6b32968
SCI: Remove EngineState::game_version, it was only used for saving anyway. Also remove syncCStr()
...
svn-id: r44358
2009-09-25 13:02:11 +00:00
Filippos Karapetis
13ad217cdd
- Moved the SCI version in a global variable
...
- Changed all the SCI version checks to use getSciVersion()
- Also made getSciVersionDesc a global function (removes some ugly accessing of the SCI engine)
The fallback detector should work correctly now
svn-id: r44269
2009-09-23 10:55:35 +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
364640cfd5
SCI: Rename selector_map_t -> SelectorCache and _selectorMap -> _selectorCache
...
svn-id: r44152
2009-09-17 13:21:42 +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
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
e1de3d0f3f
Removed some unused variables from the engine state
...
svn-id: r44099
2009-09-15 07:59:48 +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
f5d846d482
Removed the animation_granularity variable from the engine state (it never changes, and it's used in one place only)
...
svn-id: r43936
2009-09-04 07:21:51 +00:00
Filippos Karapetis
1bbab8f191
Some renaming:
...
getresourceManager -> getResourceManger
resourceManager -> resMan
segmentManager ->segMan
svn-id: r43908
2009-09-02 12:02:37 +00:00
Walter van Niftrik
b16641c0b8
SCI: Fix missing 'else' in r43824.
...
svn-id: r43831
2009-08-30 17:47:48 +00:00
Walter van Niftrik
3e543d2518
SCI: Add lofs detection.
...
svn-id: r43824
2009-08-30 14:53:58 +00:00
Walter van Niftrik
cf5483c3d8
SCI: Add SetCursor detection. Cleanup.
...
svn-id: r43812
2009-08-30 01:37:52 +00:00
Matthew Hoops
2ceafbae77
- Fix the opcode formats for some opcodes in SCI32 (some arguments are now words instead of bytes).
...
- Fix the SCI2.1 kernel table.
- Add DoSound detection for SCI2.
svn-id: r43762
2009-08-26 22:11:31 +00:00
Filippos Karapetis
ac025f4294
- Replaced more cases of EngineState parameters
...
- Made some version comparisons for old SCI0 versions easier to read
- Removed the GET_SEL32SV macro
svn-id: r43729
2009-08-25 15:14:29 +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
Walter van Niftrik
4b9bfe2013
SCI: Build fix.
...
svn-id: r43483
2009-08-17 16:07:47 +00:00
Walter van Niftrik
260a2019b6
SCI: Add autodetection for DoSound. Cleanup.
...
svn-id: r43482
2009-08-17 15:49:22 +00:00
Walter van Niftrik
5709e524f9
SCI: Rename sci_version_t to SciVersion
...
svn-id: r43407
2009-08-15 12:09:47 +00:00
Walter van Niftrik
65e9ae163f
SCI: Added a crude speed throttler.
...
svn-id: r43289
2009-08-11 20:18:15 +00:00
Walter van Niftrik
dd9e569325
SCI: Improved multilanguage support for SCI1 and SCI1.1.
...
svn-id: r43217
2009-08-10 18:37:47 +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
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
Walter van Niftrik
1d0f4782fc
SCI: Fix regression in r41833.
...
svn-id: r41834
2009-06-24 19:26:06 +00:00
Walter van Niftrik
06144864e1
SCI: Partial support for dual-language games.
...
svn-id: r41833
2009-06-24 19:12:45 +00:00
Filippos Karapetis
744323ca33
Replaced/removed KP_UINT, KP_SINT, SKPV and UKPV as well as the VIEW_PRIORITY and PRIORITY_BAND_FIRST wrappers
...
svn-id: r41338
2009-06-07 15:53:30 +00:00
Max Horn
4f4005f0b0
oops
...
svn-id: r41178
2009-06-04 21:53:45 +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
3091de6735
SCI: Added FIXME comment to not_register()
...
svn-id: r41172
2009-06-04 20:50:51 +00:00
Filippos Karapetis
d405b2880b
Removed some unused variables from the engine state
...
svn-id: r41123
2009-06-02 07:59:04 +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
Max Horn
4fba6e5d4c
SCI: Fixed loading; added 'const' keywords to several Vocabulary methods
...
svn-id: r41071
2009-05-31 15:08:16 +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
Filippos Karapetis
a4d13cef8c
More objectification of the Vocabulary functions
...
svn-id: r41057
2009-05-31 02:37:24 +00:00
Filippos Karapetis
4ab05f0b38
- Moved 3 more commands to console.cpp: "draw_pic", "draw_rect" and "fill_screen"
...
- Removed some FreeSCI-specific variables for checking of the on-screen console
- Removed the Control-1 key combo - the console command "visual_state" can be used for the same reason
svn-id: r41040
2009-05-30 18:22:55 +00:00
Filippos Karapetis
3490819a66
- Removed debug_mode from the engine state
...
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function
- Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND
- Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables
svn-id: r41033
2009-05-30 15:40:49 +00:00
Filippos Karapetis
e9444e2b93
- Rewrote kSetCursor to be a bit simpler to understand, and got rid of GF_SCI1_NEWSETCURSOR
...
- Removed the 3 mouse pointer view, loop and cell variables (and their 3 "save" versions) from the game state, as they're all actually not used anywhere
- Cleanup
svn-id: r40976
2009-05-29 08:25:42 +00:00
Max Horn
d70504c910
SCI: Renamed sfx_state_t -> SfxState, preparing it to become a class eventually
...
svn-id: r40958
2009-05-28 10:54:30 +00:00
Max Horn
b431254070
SCI: Removed the 'save_dir' gui hack
...
svn-id: r40772
2009-05-21 21:50:11 +00:00
Max Horn
4c786a44c9
SCI: Changed EngineState::opcodes to a Common::Array (maybe we shold just remove the relevant code completely, though, it seems useless, esp. as long as we hardcode the way we interpret every opcode
...
svn-id: r40740
2009-05-20 17:52:33 +00:00
Max Horn
4755fcb130
SCI: got rid of EngineState::savegame_version; some cleanup
...
svn-id: r40713
2009-05-19 00:33:48 +00:00
Max Horn
091b347a7e
SCI: Init the diff .#&$ EngineState::flags field in the constructor and when loading -- fixes many weird crashes upon loading (lesson to be learned: if you add fields to a class, then (a) init it in the construtor and (b) if the class support serializing, make sure the new field is handled when saving/loading :-)
...
svn-id: r40712
2009-05-19 00:02:44 +00:00
Max Horn
b0c1cf52e0
SCI: Got rid of EngineState::execution_stack_pos; overally, the resulting code should be even stricter in detecting invalid VM stack access (and some bugs when loading saves might be fixed now...)
...
svn-id: r40694
2009-05-18 18:15:45 +00:00
Max Horn
9da07f21fe
SCI: cleanup
...
svn-id: r40689
2009-05-18 15:07:04 +00:00
Filippos Karapetis
891a8fae05
- Removed SCI_VERSION_FTU_NEW_GETTIME
...
- Added defines for SCI0 flags, to simplify game entries
- Removed the leftover version_lock_flag from EngineState
svn-id: r40553
2009-05-14 10:24:39 +00:00
Filippos Karapetis
999d46b241
Started using game-specific flags and removed/replaced some SCI version checks with flags.
...
- The SCI0 new script header and the angles check have been replaced by the GF_SCI0_OLD flag
- The SCI0 new drawpic parameter and the new priority check have been replaced by the GF_SCI0_OLDGFXFUNCS flag
- Removed the code which retries to use the newer script header in SCI0 games if the detected one is wrong, as that case should be covered by the GF_SCI0_OLD flag
- Removed the leftover min_version and max_version variables from gamestate
- Cleaned up kGetTime() a bit
svn-id: r40552
2009-05-14 09:12:27 +00:00
Max Horn
98fb95589c
SCI: Changed EngineState::pics to a Common::Array
...
svn-id: r40434
2009-05-10 20:13:43 +00:00
Max Horn
294bd0dc07
SCI: Renamed execution_stack -> _executionStack and turned it into a Common::Array
...
svn-id: r40182
2009-04-28 15:58:19 +00:00
Max Horn
b5e9d79e15
SCI: Turned classtable into a Common::Array<Class>
...
svn-id: r40161
2009-04-27 12:31:27 +00:00
Max Horn
5881abb213
SCI: Removed unused vars; doxygenified some comments; cleanup
...
svn-id: r40159
2009-04-27 12:29:51 +00:00
Max Horn
486f10edaf
SCI: Store parse_tree_branch_t in a Common::Arraay
...
svn-id: r40100
2009-04-24 10:42:53 +00:00
Max Horn
3af8918e1a
SCI: Changed kfunct_table to a Common::Array
...
svn-id: r40080
2009-04-22 17:54:11 +00:00
Max Horn
b1e43f3ca0
SCI: Changed knames (kernel function name table) to Common::StringList
...
svn-id: r40078
2009-04-22 17:53:29 +00:00
Max Horn
1e94b9cd3c
SCI: Rewrote vocabulary code to use a Common::HashMap<String,ResultWord>
...
svn-id: r39671
2009-03-24 17:42:12 +00:00
Max Horn
d38590e6d4
SCI: Turned synonyms list into a Common::List
...
svn-id: r39669
2009-03-24 17:41:26 +00:00
Max Horn
b76f7fea4e
SCI: Changed some char* into Common::String
...
svn-id: r39663
2009-03-24 12:46:48 +00:00
Max Horn
9ea32d4aa1
SCI: C++ify menu code
...
svn-id: r39659
2009-03-24 11:31:16 +00:00
Max Horn
466ba4bbfe
SCI: Rewrote the save/load code, see also patch #2687400 .
...
The new format is incompatible with the old one, and is still subject to
some further changes. Also, regressions are quite possible, so watch out.
Finally, the new code still contains some TODOs and FIXMEs. Several of
these will be more or less automatically resolved once other code gets
C++ified.
svn-id: r39430
2009-03-15 20:31:29 +00:00
Lars Skovlund
3cddcb1660
String fragments support
...
WIP: No regressions in this part, I hope
svn-id: r39297
2009-03-10 14:52:02 +00:00
Max Horn
efa5493b2d
SCI: Changed suffix list to be stored as a Common::List; also fixed spelling: suffices -> suffixes
...
svn-id: r39214
2009-03-08 08:17:43 +00:00
Max Horn
479751104f
SCI: Renamed include/engine.h to engine/state.h; added a corresponding .cpp file with the EngineState constructor
...
svn-id: r38921
2009-02-27 02:23:40 +00:00