Max Horn
a278c07aa6
SCI: get rid of Script::allocateObject
...
svn-id: r50438
2010-06-28 12:27:48 +00:00
Max Horn
30218a2c32
SCI: Make Script member vars private; add const qualifiers
...
Only three Script members remain public (for now)
svn-id: r50428
2010-06-28 11:22:20 +00:00
Max Horn
85038e7d6c
SCI: Change warning back to error in Script::initialiseObjectsSci0
...
Instead of turning the error into a warning globally, we now have
code which ignores the error in Script 202 of KQ5 French, but will
keep reporting if it turns up in other places.
svn-id: r50427
2010-06-28 11:21:55 +00:00
Max Horn
12099176f7
SCI: More formatting cleanup
...
svn-id: r50426
2010-06-28 11:21:39 +00:00
Filippos Karapetis
4a60ff4090
Made the script initialization/uninitialization methods part of the segment manager
...
svn-id: r50402
2010-06-27 21:18:19 +00:00
Filippos Karapetis
2843feeb9a
SCI: Made the code for initializing script classes, objects and locals part of the Script class
...
svn-id: r50398
2010-06-27 21:00:34 +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
aa9b9dd08f
SCI: Separated the code for initializing script classes from the code for initializing script objects
...
svn-id: r50390
2010-06-27 20:09:51 +00:00
Martin Kiewitz
303dc06388
SCI: fixing regression from one of the merges
...
svn-id: r50387
2010-06-27 18:41:07 +00:00
Filippos Karapetis
d7f212647a
Turned the error when failing to locate an invalid object back to a warning (KQ5 French has an invalid object in script 202)
...
svn-id: r50379
2010-06-27 16:02:03 +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
Filippos Karapetis
3cf0114164
Moved script_instantiate_sci0() inside the segment manager, and renamed it to scriptInitialiseObjectsSci0()
...
svn-id: r50357
2010-06-26 23:13:05 +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
Filippos Karapetis
60d8cc5180
Removed the now unused EngineState parameter of script_adjust_opcode_formats(), as well as an obsolete TODO
...
svn-id: r49684
2010-06-15 07:21:52 +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
86878450ee
Cleanup of the SCI0 object initialization code
...
svn-id: r49666
2010-06-14 19:37:19 +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
844ef9ba1a
Merged all the script relocation code inside script_instantiate(), and changed the warning when reading an invalid species into an error (as it's severe, and if it happens it means something is seriously wrong)
...
svn-id: r49361
2010-05-31 18:35:13 +00:00
Filippos Karapetis
66d4bddb30
Merged several script instantiation-related functions inside script_instantiate()
...
svn-id: r49343
2010-05-31 08:11:49 +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
3b96e4833e
Cleanup
...
svn-id: r49334
2010-05-30 20:30: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
c32e88fe0b
Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
...
svn-id: r49327
2010-05-30 16:14:31 +00:00
Filippos Karapetis
5f2ff0b1e7
Limit access to the _classTable array (now it's directly accessible only inside saveLoadWithSerializer()
...
svn-id: r49318
2010-05-29 23:56:37 +00:00
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