Willem Jan Palenstijn
0ed87062ed
SCI: Add hack to gui to fix loading
...
svn-id: r44581
2009-10-03 23:56:49 +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
Filippos Karapetis
4df106e1f0
Copy the internal game name when loading, and don't recreate it
...
svn-id: r44250
2009-09-22 09:16:16 +00:00
Filippos Karapetis
e331269a36
Removed unused variable
...
svn-id: r44249
2009-09-22 09:00:32 +00:00
Max Horn
c5cc785802
SCI: Change SystemStrings to use RAW storage consistenly
...
svn-id: r44246
2009-09-22 01:08:42 +00:00
Max Horn
97d1f79e2d
SCI: Change SystemString::name from char* to Common::String
...
svn-id: r44243
2009-09-22 00:36:05 +00:00
Max Horn
5fc2428c99
SCI: SegmentObj's now set their type in constructor; replace central SegmentObj::createSegmentObj call in SegManager::allocSegment by several explicit 'new' statements; some extra cleanup
...
svn-id: r44242
2009-09-22 00:35:46 +00:00
Max Horn
d2a6713a8e
SCI: Replace IntMapper Script::_objIndices and Common::Array Script::_objects by a HashMap -- goodbye, class IntMapper
...
svn-id: r44240
2009-09-21 21:38:43 +00:00
Max Horn
57dfb9bafd
SCI: Rename Object::flags and pos to _flags and _pos; tweak scriptObjInit0 and scriptObjInit11 to be more similar
...
svn-id: r44234
2009-09-21 21:35:43 +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
e40cbe574e
SCI: Rename engine/memobj.* to engine/segment.*
...
svn-id: r44155
2009-09-17 13:22:46 +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
e1de3d0f3f
Removed some unused variables from the engine state
...
svn-id: r44099
2009-09-15 07:59:48 +00:00
Max Horn
bfe1538715
SCI: Misc cleanup
...
svn-id: r44093
2009-09-14 22:34:53 +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
37e51f1575
Fixed some (pedantic) warnings
...
svn-id: r44015
2009-09-08 22:03:07 +00:00
Max Horn
44b60d2750
SCI: Replace GET_SEGMENT_ANY and GET_OBJECT_SEGMENT macros by new segman methods
...
svn-id: r43999
2009-09-07 06:07:18 +00:00
Max Horn
eb8cf07db2
SCI: Rename SegManager::exports_wide to _exportsAreWide and changed it to a bool, and rename setExportWidth() to setExportAreWide()
...
svn-id: r43988
2009-09-06 13:01:26 +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
Max Horn
1d075291da
SCI: Convert saveload code to use the versioning feature of Common::Serializer
...
svn-id: r43985
2009-09-06 12:59:56 +00:00
Max Horn
fdbb167ea3
SCI: Cleanup for some SegManager internals
...
- rename segGet and getSegment to getScriptSegment; the two can be
distinguished by the parameter count.
- rename type SCRIPT_GET to ScriptLoadType to conform with our code
formatting conventions
- rename get_class_address to getClassAddress
- some cleanup
svn-id: r43981
2009-09-06 12:58:16 +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
142922387c
Moved some functions inside the SegManager class, and renamed alloc_clone() to allocateClone()
...
svn-id: r43935
2009-09-04 07:17:34 +00:00
Walter van Niftrik
ac078040e1
SCI: Relocate export table when restoring SCI1.1 savegames
...
svn-id: r43916
2009-09-03 11:51:18 +00:00
Filippos Karapetis
9829378a98
Fixed loading again (broken accidentally in rev. 43504
...
svn-id: r43913
2009-09-02 23:11:50 +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
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
60af2db2fd
- Added more mappings from Sierra's internal IDs to our own ones. Hopefully, all SCI0-SCI11 games can now be detected correctly from the fallback detector
...
- Simplified some checks for old script types
svn-id: r43678
2009-08-23 21:57:30 +00:00
Filippos Karapetis
ca9bbce9b3
- Added game ID detection to the fallback detector. We still need to map some of Sierra's internal IDs to our own ones
...
- The class table is now created in the segment manager constructor
svn-id: r43504
2009-08-18 10:01:18 +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
f99932b72a
SCI: Added enum for map and volume versions. Removed res_version setting from
...
detection.cpp (should be detectable). Cleanup.
svn-id: r43390
2009-08-15 00:28:59 +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
d351c7b9cb
Only the kernel needs to be initialized before anything else, when saving/loading
...
svn-id: r42262
2009-07-08 10:44:25 +00:00
Filippos Karapetis
a764f274f8
Fixed saving/loading again (broken with the latest changes for game feature auto-detection)
...
svn-id: r42261
2009-07-08 10:35:51 +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
c716e43a2b
- Added auto-detection for EGA graphics. As a result of this, GF_SCI1_EGA has been removed and versions SCI_VERSION_01_EGA and SCI_VERSION_01_VGA have been merged into SCI_VERSION_01
...
- Simplified the checks for EGA and VGA graphics
- Fixed a bug in script_adjust_opcode_formats()
- Simplified the code in GfxResManager::getView() a bit
svn-id: r42206
2009-07-07 07:44:25 +00:00
Filippos Karapetis
219b0de0d2
Renamed SCI_VERSION_01 -> SCI_VERSION_01_EGA
...
svn-id: r42181
2009-07-06 16:22:14 +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
Filippos Karapetis
ed46e223eb
Hopefully fixed memory corruption when loading games
...
svn-id: r41361
2009-06-07 23:29:11 +00:00
Walter van Niftrik
a6ed05740f
SCI: Moved resource36 handling into resource manager.
...
svn-id: r41349
2009-06-07 19:15:55 +00:00
Max Horn
21d948ec05
SCI: Simplified SongLibrary code a bit
...
svn-id: r41345
2009-06-07 17:07:25 +00:00
Max Horn
d07e9dfb13
SCI: Objectified SongLibrary
...
svn-id: r41343
2009-06-07 17:06:51 +00:00