Commit graph

85 commits

Author SHA1 Message Date
Filippos Karapetis
bfaba64c6a Made find_unique_script_block() a member of the Script class
svn-id: r49241
2010-05-26 14:25:51 +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
174a043aa7 Removed the exportsAreWide variable from the segment manager and save games, and moved validateExportFunc() in the Script class, thus resolving a TODO
svn-id: r49093
2010-05-19 08:50:24 +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
Filippos Karapetis
6d38cf8b8f Made locateVarSelector() a method of the Object class
svn-id: r49031
2010-05-14 15:23:42 +00:00
Matthew Hoops
7147f8577e Search through arrays for outgoing references to fix possible garbage collector problems; minor cleanup.
svn-id: r47989
2010-02-08 15:51:00 +00:00
Max Horn
bec3a0d539 cleanup
svn-id: r47835
2010-02-03 01:33:48 +00:00
Matthew Hoops
da46fc9b35 Add support for saving/loading Arrays/Strings in SCI32. It's possible to save a game in GK1 now via the console, but not load (yet).
svn-id: r47696
2010-01-30 02:03:59 +00:00
Walter van Niftrik
473d8b7c2f SCI: Add string support for odd-offset pointers into reg_t-based segments.
svn-id: r47572
2010-01-26 19:51:08 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Walter van Niftrik
10da245619 SCI: Cleanup
svn-id: r47506
2010-01-24 17:52:27 +00:00
Matthew Hoops
5fbbd5b8d9 Zero the array before using it. You can go talk to Grace now, DrMcCoy.
svn-id: r47017
2010-01-05 04:00:13 +00:00
Walter van Niftrik
205f7437ea SCI: Fix segfault in dual-language KQ5.
svn-id: r46864
2010-01-01 23:48:22 +00:00
Matthew Hoops
7d131627fe Overload the = operator for SciArray which fixes the setType errors in GK1. Some other cleanup too. GK1 can now access the restore menu and get a bit further in the game (until a segfault in the Decompressor code).
svn-id: r46789
2009-12-31 05:11:58 +00:00
Matthew Hoops
5382aa1ab0 SCI32:
- Set signature for Array/String
	- Add the kernel table differences for the GK2 demo
	- Implement kMessage changes in SCI32
	- Use an empty string as the default path for all games now (and modify kValidPath to accept that only as valid)
	- Add dereferencing for Arrays

svn-id: r46756
2009-12-30 16:00:56 +00:00
Matthew Hoops
65dcc0b2a3 SCI32:
- Fix dup for kArray/kString
	- Implement kFileIO::rename (SCI1.1)
	- Implement part of the SCI32 additions to kFileIO
	- Implement the GetSaveDir part of kSave (SCI2.1)
	- Torin (SCI2.1!) now shows signs of life -- it will create the torin.prf file with correct data!

svn-id: r46521
2009-12-24 02:43:07 +00:00
Matthew Hoops
4be2788ffd Some SCI32 (minor) String bug fixes and cleanup.
svn-id: r46492
2009-12-23 05:10:16 +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
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
76996301d1 SCI: Removed obsolete stringfrags code
svn-id: r44803
2009-10-08 21:29:45 +00:00
Max Horn
3399c3aeb6 Change doxygen inline comments from "//!" to "///" as proposed on -devel
svn-id: r44802
2009-10-08 21:28:57 +00:00
Willem Jan Palenstijn
88a9099949 SCI: Remove unsafe unmarkDeleted function.
It did not undo all effects of a script being deleted (specifically its
superclasses remain unlocked), causing an inconsistent
state. Also removed EcoQuest CD hack that worked around a specific
instance of this problem.

svn-id: r44449
2009-09-28 20:21:09 +00:00
Willem Jan Palenstijn
5d2d8c580a SCI: Add utility functions for copying data between raw/non-raw segments
svn-id: r44387
2009-09-27 01:49:56 +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
5184f86e15 - Merged scriptObjInit0() and scriptObjInit11()
- Replaced some cases where getSciVersion() is used with _resMan->sciVersion(), as getSciVersion() will fail with the fallback detector (as the engine is not initialized). Object property accessors still crash currently, when used with the fallback detector

svn-id: r44261
2009-09-22 14:33:46 +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
5f5ab54810 SCI: Add new type SegmentRef which ultimately will allow us to distinguish between raw and 'reg_t' memory blocks in client code
svn-id: r44244
2009-09-22 00:36:24 +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
c2455aad87 SCI: Move CallsStruct into vm.cpp, the only place it is being used
svn-id: r44172
2009-09-17 16:56: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
Renamed from engines/sci/engine/memobj.h (Browse further)