196 Commits

Author SHA1 Message Date
Martin Kiewitz
a7e51b8276 SCI: kAnimate now delays a bit if needed (fixes typing in intro of lsl5, kq6 sierra logo and much more)
svn-id: r45093
2009-10-14 21:45:16 +00:00
Filippos Karapetis
c713abc6c7 Cleanup
svn-id: r44991
2009-10-12 17:21:23 +00:00
Walter van Niftrik
6c1cac3956 SCI: kMessage() rewrite
svn-id: r44860
2009-10-10 02:16:23 +00:00
Filippos Karapetis
9bb73a8457 Removed the unused _flags variable from EngineState
svn-id: r44857
2009-10-09 23:53:37 +00:00
Filippos Karapetis
14f8d50a62 Moved actor movement detection in state.cpp, together with the other detections and rewrote it to work in a similar fashion to the other detections
svn-id: r44836
2009-10-09 17:41:59 +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
Filippos Karapetis
8568892bf5 - Renamed GUI -> Gui and capitalized as appropriate (e.g. SciGUIwindowMgr -> SciGuiWindowMgr)
- Renamed "cell" -> "cel"

svn-id: r44649
2009-10-05 07:10:01 +00:00
Max Horn
db8c6e3f6c SCI: Really remove sci/gui/gui.h include from engine/state.h
svn-id: r44644
2009-10-04 22:43:30 +00:00
Max Horn
43a9f9c2ef SCI: Add include guards for gui headers; don't include gui/gui.h from engine/state.h
svn-id: r44632
2009-10-04 20:01:21 +00:00
Max Horn
6ad5840181 SCI: Rename EngineState::segMan to _segMan
svn-id: r44629
2009-10-04 18:38:18 +00:00
Willem Jan Palenstijn
b9cdb1abb7 SCI: Merge new GUI code written by m_kiewitz.
This is a major rewrite of the graphics code. A slightly adapted
version of the old code is still available and currently the default.
The new code is selectable in sci.cpp, but is not yet finished.

svn-id: r44565
2009-10-03 20:49:18 +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
Max Horn
5f440854b7 SCI: Add EngineState::_kernel member for convenience
svn-id: r44173
2009-09-17 17:00:36 +00:00
Max Horn
730c7c9641 SCI: Get rid of the not_register() hack
svn-id: r44153
2009-09-17 13:22:00 +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
e1de3d0f3f Removed some unused variables from the engine state
svn-id: r44099
2009-09-15 07:59:48 +00:00
Max Horn
a550e2ea10 SCI: Replace "IntMapper *id_seg_map" in SegManager with a Common::HashMap<int,int>
This simplifies the code considerably. Also changed the savegame format
accordingly, which required me to bump the format version to 10. Old
saves should still load fine.

svn-id: r43986
2009-09-06 13:00:30 +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
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
Filippos Karapetis
97e0293dfd When opening files, open the English language part of the filename. Fixes some multilingual SCI1 games
svn-id: r43730
2009-08-25 18:27:55 +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
260a2019b6 SCI: Add autodetection for DoSound. Cleanup.
svn-id: r43482
2009-08-17 15:49:22 +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
00f4794c0a SCI: Stage 1 of the game detection overhaul. The end goal is to autodetect
as much as possible. All SCI_VERSION_* information was removed from
detection.cpp (much of it was incorrect anyway).

svn-id: r43449
2009-08-16 19:18:19 +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
982153e0ab restAdjust should be a signed integer. Fixes crashes with SCI1 games that take absolute lofs parameters (a regression of commit #42260)
svn-id: r42297
2009-07-09 15:46:26 +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
06144864e1 SCI: Partial support for dual-language games.
svn-id: r41833
2009-06-24 19:12: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
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
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
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
76406c35ec Started objectifying the vocabulary functions (WIP)
svn-id: r41051
2009-05-30 22:15:00 +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
Max Horn
518e005ec2 SCI: Revised code for listing savegames
svn-id: r40999
2009-05-29 14:36:56 +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