Max Horn
9a350f4398
ENGINES: Get rid of some (f)printfs
...
svn-id: r54011
2010-11-01 16:04:47 +00:00
Martin Kiewitz
8ca076fb3a
SCI: fixing another warning
...
svn-id: r51789
2010-08-06 15:30:23 +00:00
Max Horn
4fdbd14a60
SCI: Move a few remaining Script methods to engine/script.cpp
...
svn-id: r50441
2010-06-28 12:28:46 +00:00
Max Horn
6c0205b104
SCI: Fix DEBUG_GC mode and permanently enable it
...
svn-id: r50430
2010-06-28 11:23:00 +00:00
Max Horn
31b2902714
SCI: Revise GC interface: use Common::Array<reg_t> instead of callbacks
...
This means a little bit more overhead but makes the code much more readable
and understandable.
svn-id: r50429
2010-06-28 11:22:41 +00:00
Filippos Karapetis
bb992b0b93
SCI: Moved all the script-related code inside script.cpp/.h, and all script opcode-related code inside vm.cpp/.h
...
svn-id: r50396
2010-06-27 20:38:43 +00:00
Filippos Karapetis
daab502028
Cleanup
...
svn-id: r50359
2010-06-27 00:08:00 +00:00
Filippos Karapetis
7a14846bdd
Removed the misleading getHeap() function (only valid for SCI0-SCI1), plus removed some unused defines
...
svn-id: r50358
2010-06-26 23:48:27 +00:00
Max Horn
6ee82a2027
SCI: Introduce SciGameId enum
...
svn-id: r50273
2010-06-25 16:16:29 +00:00
Max Horn
1e9977a725
SCI: Restrict some 'error' exceptions to the places they occur; cleanup
...
svn-id: r50271
2010-06-25 16:11:00 +00:00
Filippos Karapetis
f65c4f9886
Changed an error in LocalVariables::dereference() back to a warning, as it occurs in 2 places during the intro of LB2 (called from kMemory(peek))
...
svn-id: r50202
2010-06-24 07:32:34 +00:00
Filippos Karapetis
c28fa2cf19
Reverted the code which handles objects without a base object when loading, for now. This possibly indicates an issue related to the garbage collector
...
svn-id: r50142
2010-06-22 15:03:19 +00:00
Filippos Karapetis
db70d66e4a
Strict mode: Changed several warnings due to logic bugs into errors. If an error pops up from these ones, please add the game where it occurred and the steps to reproduce the error before turning it into a warning
...
svn-id: r49973
2010-06-17 23:50:28 +00:00
Lars Skovlund
9a1db3f770
Add support for SCI32 segment types to seg_table and vr debug commands
...
svn-id: r49686
2010-06-15 08:21:39 +00:00
Filippos Karapetis
1fde7f1abc
Removed the code used for tracking script code block relocations in SCI0-SCI1 games, as we don't actually relocate these blocks, and it was used solely for verification of the exports table. The issue that this warning was created for should no longer occur
...
svn-id: r49669
2010-06-14 20:45:00 +00:00
Filippos Karapetis
4f3bb60cd5
Really silence the warning with _bufSize
...
svn-id: r49652
2010-06-14 13:53:15 +00:00
Filippos Karapetis
5230930d95
Silenced warning
...
svn-id: r49651
2010-06-14 13:41:06 +00:00
Filippos Karapetis
2a78b82799
Fixed a bug with commit #49640
...
svn-id: r49650
2010-06-14 13:13:02 +00:00
Filippos Karapetis
cd77cb96fc
Some cleanup of the script locals code
...
svn-id: r49649
2010-06-14 12:44:57 +00:00
Filippos Karapetis
b5ebd40d61
The offset of script local variables is now calculated when the script is loaded, thus we no longer need to save it. Merged scriptInitialiseLocals() with scriptInitialiseLocalsZero()
...
svn-id: r49640
2010-06-13 22:15:30 +00:00
Filippos Karapetis
86b452d36c
Moved several object-related defines inside vm.h into segment.h, where the Object class resides. Also, removed several unused defines
...
svn-id: r49406
2010-06-03 10:16:21 +00:00
Filippos Karapetis
c4bdca72d7
Fixed regression from commit #49332 (merging of the SCI0 and SCI11 relocate functions, where the SCI0 equivalent had a +1 count): it seems that we should skip over zero exports, however the total number of valid exports remains the same. Fixes KQ5 and QFG2. This also fixes the relocation calculation of script 71 in SQ3, so remove the comment that the script has broken relocation entries
...
svn-id: r49394
2010-06-02 15:31:20 +00:00
Filippos Karapetis
de2e935b2c
Wrote the initialization code for the exports and synonyms table to make more sense and fixed a bug with the initialization of the synonyms pointer, introduced with rev #49336
...
svn-id: r49360
2010-05-31 18:31:37 +00:00
Filippos Karapetis
3f4302214c
The save/load object init code is now unified with the regular object init code
...
svn-id: r49346
2010-05-31 11:25:59 +00:00
Filippos Karapetis
50cd1d1da4
Limited access to the script export table and synonyms block
...
svn-id: r49338
2010-05-30 23:31:33 +00:00
Max Horn
4e25867a67
SCI: Merge setLockers(1) call into Script::init
...
svn-id: r49337
2010-05-30 23:00:32 +00:00
Filippos Karapetis
a0ee93ece5
SCI: Script exports and synonyms are now initialized when a script is loaded. Removed a sanity check inside script_instantiate_sci0 for a bug which no longer exists
...
svn-id: r49336
2010-05-30 21:49:07 +00:00
Filippos Karapetis
dc4d61f718
- Merged the SCI0 scriptRelocate() and SCI11 heapRelocate() functions inside relocate(). scriptRelocate checked one more relocation entry, which seems wrong, so we're now checking for the correct number of relocations in all SCI versions
...
- Re-added the error when script + heap exceed 64KB (better than an assert) - this should theoretically never happen, and it never has for the games tested
- Removed the relocated sanity check - again, it shouldn't occur (else something else is wrong)
svn-id: r49332
2010-05-30 20:06:50 +00:00
Filippos Karapetis
016862ac3a
Moved setScriptSize() inside Script::init(), and removed a FIXME - the SCI1.1 word-align is done inside Script::init()
...
svn-id: r49330
2010-05-30 18:45:07 +00:00
Filippos Karapetis
29c2f30558
Unified the script loading code, and marked an issue with the SCI11 heap addresses
...
svn-id: r49329
2010-05-30 17:02:21 +00:00
Filippos Karapetis
5cdb13b3e8
Made load_script() a member of the Script class
...
svn-id: r49328
2010-05-30 16:38:08 +00:00
Lars Skovlund
dbe561c59b
Clarify reasoning behind hack in Script::scriptRelocate()
...
svn-id: r49320
2010-05-30 10:27:39 +00:00
Max Horn
4ecacdad16
SCI: Merge Script::relocateBlock and Object::relocate
...
The shared code now resides in a new static function named
relocateBlock, which is invoked by the two methods.
svn-id: r49316
2010-05-29 23:09:00 +00:00
Max Horn
42d6ed880b
SCI: Make Script::_exportTable const (yay :-)
...
svn-id: r49315
2010-05-29 21:42:42 +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
Max Horn
0197e9f6a1
SCI: Making various object and script related things const
...
svn-id: r49246
2010-05-26 16:30:10 +00:00
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
bca7c6eef3
SCI: Move more stuff around
...
svn-id: r47836
2010-02-03 01:34:15 +00:00
Willem Jan Palenstijn
06bd17ee71
SCI: Remove extra '\n's in debugC messages
...
svn-id: r47707
2010-01-30 11:59:05 +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
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
Martin Kiewitz
c992cd018c
SCI: returning back raw == 0, when script trying to access invalid memory
...
svn-id: r46720
2009-12-29 22:26:09 +00:00
Martin Kiewitz
3e5d8280fa
SCI: dont crash when scripts are trying to access invalid memory (fixes intro of lb2cd)
...
svn-id: r46718
2009-12-29 21:37:26 +00:00