90 Commits

Author SHA1 Message Date
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis
2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Filippos Karapetis
aff92ea4cd SCI: Zero-terminate strings in SciString::fromString() 2012-01-15 21:02:02 +02:00
Filippos Karapetis
b3134650df SCI: Fixed a workaround 2011-11-03 22:44:11 +02:00
Eugene Sandulenko
6d2e7228b5 SCI: Add fixme comment to a weird comparison 2011-11-03 01:17:46 +00:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5
12e7d3078b SCI: Cleanup 2011-03-08 20:13:08 +02:00
md5
0642b30933 SCI: Cleanup 2011-03-08 14:46:03 +02:00
md5
0d555c497d SCI: Moved hunk pointer handling to the GC, and removed some related workarounds
SCI scripts can contain stale pointers, which are used later on. We now delete
the contents of hunk entries without invalidating the relevant pointers and let
the GC clear the references. Many thanks to waltervn and wjp for all their work
and help on this.
2011-02-28 15:56:03 +02:00
Filippos Karapetis
32d7e687ee SCI: debugC calls no longer require a debug level of 2 to show output
svn-id: r55086
2011-01-01 12:48:12 +00:00
Filippos Karapetis
de2ef2edc0 SCI: Removed the system strings code and replaced it with a much more simplified version, thus greatly simplifying handling of system strings
svn-id: r54805
2010-12-07 00:47:05 +00:00
Filippos Karapetis
3b07056a47 SCI: Moved the Object class in a separate file
svn-id: r54361
2010-11-19 08:18:24 +00:00
Filippos Karapetis
4609f11137 SCI: Added species selector functionality for SCI3
svn-id: r54351
2010-11-18 22:27:56 +00:00
Lars Skovlund
487feb3843 Get rid of a const_cast.
svn-id: r54333
2010-11-18 17:38:56 +00:00
Filippos Karapetis
58e4d9a97a SCI: Fixed the return values of Object::relocateSci3()
svn-id: r54289
2010-11-17 12:33:55 +00:00
Filippos Karapetis
b707d6e7dc SCI: More work on SCI3, based on a patch by lskovlun
- Added SCI3 equivalents for access to object selectors
- Added SCI3 implementation of object relocation
- Added SCI3 implementation of Script::initialiseClasses()

svn-id: r54283
2010-11-17 11:15:52 +00:00
Filippos Karapetis
f44b084deb SCI: Some restructuring. Added some SCI3 placeholders/stubs
svn-id: r54280
2010-11-17 08:53:02 +00:00
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