Commit graph

166 commits

Author SHA1 Message Date
Filippos Karapetis
a6156a6805 Removed the scriptRelocateExportsSci11() hack. The open spell in QFG1VGA works now (thanks to waltervn for all his help on this)
svn-id: r49311
2010-05-29 15:29:27 +00:00
Martin Kiewitz
453d13dc2d SCI: fixing -propDict- selector on instances to contain -propDict- of the corresponding class - fixes sq4cd/room 381 talk-clicking on robot - thx to waltervn & wjp
svn-id: r49263
2010-05-27 17:41:20 +00:00
Max Horn
db475d1501 SCI: More const related changes; remove unnecessary casts which hide const issues
svn-id: r49248
2010-05-26 18:11:17 +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
6408504c93 Slight cleanup
svn-id: r49129
2010-05-21 13:31:45 +00:00
Filippos Karapetis
92c1f4625d Fixed silly typo in #49099. Iceman works again (thanks m_kiewitz)
svn-id: r49104
2010-05-19 17:11:15 +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
d1f1c71f50 Cleaned up script_instantiate_sci0()
svn-id: r49099
2010-05-19 14:43:16 +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
Walter van Niftrik
b6c92b90b6 SCI: Fix regression in locals init for re-used segments
svn-id: r48783
2010-04-24 14:10:52 +00:00
Max Horn
9575cc08a2 SCI: Move GameFeatures from EngineState to SciEngine
svn-id: r48049
2010-02-13 17:44:58 +00:00
Filippos Karapetis
2fb37063a4 Placed all the game feature detection code in a separate class
svn-id: r47850
2010-02-03 11:02:43 +00:00
Max Horn
bca7c6eef3 SCI: Move more stuff around
svn-id: r47836
2010-02-03 01:34:15 +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
31728b32ca SCI: Add debug opcodes
svn-id: r47646
2010-01-28 19:22:58 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Martin Kiewitz
0dddf869fb SCI: changed scalesignal to scaleSignal - selector works now :)
svn-id: r47312
2010-01-15 21:26:02 +00:00
Martin Kiewitz
0338198876 SCI: adding scalesignal selector
svn-id: r47306
2010-01-15 13:33:26 +00:00
Martin Kiewitz
575bc45301 SCI: adjusting cel drawing according to left/top of plane
svn-id: r47002
2010-01-05 00:12:31 +00:00
Filippos Karapetis
a4990f6f33 Now using m_kiewitz's picture code to show pictures in SCI32. Also took some bits off a similar patch from clone2727. The Sierra logo screen and the menu screen in GK1 should now be shown fully!
svn-id: r46609
2009-12-27 01:49:39 +00:00
Matthew Hoops
ef79d7f017 SCI32:
- Fully implement kArray and kIsHiRes and mostly implement kString (printf and atoi subfunctions still missing).
	- Add a dummy SciGui class for SCI32 to bypass the views. Gabriel Knight 1 will now play the Sierra logo music and the main menu music.
	- Some other minor SCI32 changes.

svn-id: r46462
2009-12-21 14:32:54 +00:00
Filippos Karapetis
551ca5f2c0 Changed the lofs detection to iterate through all the methods of the Game object again, instead of a specific selector - fixes Jones
svn-id: r46006
2009-11-20 14:17:47 +00:00
Filippos Karapetis
e7820f972d Selector cleanup: rearranged all selectors to be in the same order as in Sierra's dictionary files, and removed several unused selectors
svn-id: r46005
2009-11-20 13:29:42 +00:00
Filippos Karapetis
893a8bb808 Some corrections for the lofs autodetection - SQ4 floppy works again
svn-id: r46002
2009-11-20 10:29:42 +00:00
Filippos Karapetis
effdfcd4b8 Added references to the scaleX and scaleY selectors, used for SCI1.1 view scaling
svn-id: r45659
2009-11-04 12:16:08 +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
Walter van Niftrik
725377f090 SCI: Fix scrolling in SCI1 list controls.
svn-id: r44429
2009-09-27 23:06:39 +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
364640cfd5 SCI: Rename selector_map_t -> SelectorCache and _selectorMap -> _selectorCache
svn-id: r44152
2009-09-17 13:21: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
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
af2668145a - Removed the unused selectors "prevSignal", "who" and "distance" from the quick access selector array
- Added the "motionCue" and "egoMoveSpeed" selectors to the selector array, to limit the places where findSelector() is used only in debugging functions
- Reordered the selector initialization in mapSelectors(), so that their order matches the order found in vocab.997

svn-id: r43779
2009-08-28 10:13:03 +00:00
Filippos Karapetis
c8b4fbe9c3 Removed the unused selectors (edgeHit, semanticFail and baseSetter)
svn-id: r43776
2009-08-28 00:20:27 +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
ba6a054dc5 Committed a slight patch by clone2727, which contains debug code to dump the selector table from a game. This is very useful to construct selector tables for games which don't have a vocab.997 resource, using dumped tables from similar versions or games
svn-id: r43760
2009-08-26 18:13:11 +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
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
a9aaf56b3e Cleanup: added an enum for the auto-detected features, removed the selectors which are only used for auto-detection from the convenience selector map and placed feature auto-detection in a separate function. Also, now the automatically detected graphics resources are shown in the console.
svn-id: r42212
2009-07-07 11:14:18 +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
0a8cd4a27d Removed unused define
svn-id: r42200
2009-07-07 06:29:07 +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
c31d1b3180 - Fixed feature auto-detection for Conquests of Camelot
- Auto-detected features are now printed in the console (to ease debugging)

svn-id: r42132
2009-07-05 11:49:05 +00:00
Filippos Karapetis
5c60d94725 SCI1 games with absolute parameters to lofs instructions are automatically detected now. Removed the GF_SCI1_LOFSABSOLUTE game flag
svn-id: r42118
2009-07-05 11:08:53 +00:00
Filippos Karapetis
b093511239 - Merged the "early" and "late" SCI1 versions - these are functionally equivalent, and the code that does the version check is unreliable (e.g. it sets SQ1 VGA to SCI1 "late" and EcoQuest 1 to SCI1 "early")
- Cleanup of the vocabulary setting functions
- Cleanup of the cursor manipulation code

svn-id: r42097
2009-07-04 16:30:20 +00:00
Filippos Karapetis
c5522b3766 - Kernel function names are no longer loaded from vocab.999, but are constructed from the hardcoded function table, depending on the SCI version used
- SCI0 games using older graphics functions are now detected by the presence of the "curAngle" selector
- SCI0 games using a SCI1 table (like KQ1 demo version and full version) are detected by the presence of the "sightAngle" selector (as no SCI0 game seems to have it)

svn-id: r42095
2009-07-04 15:45:04 +00:00
Filippos Karapetis
230e7a8d2c Newer DoSound() semantics are now detected automatically, by the existence of the "setVol" selector. Removed game flag GF_SCI1_NEWDOSOUND
svn-id: r42087
2009-07-04 11:24:09 +00:00