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
Willem Jan Palenstijn
c01fed7159
SCI: Avoid incrementing lockers of deleted script
...
Having a deleted script with non-zero lockers had the side effect of
making the deleted script re-appear in the GC's work list, including
any (deleted) objects in the script.
This should be the root cause of bugs #3299458 and #3295849 , so
also delete the workaround added for that in 35086fe1.
2011-05-13 23:09:04 +02:00
md5
c9cef5e971
SCI: Marked the sanity check inside processWorkList() as a workaround
...
The sanity check added in rev #35086fe17c fixes the crashes with that
code when an invalid reference is about to be processed, but these
references shouldn't be in the stack at all in the first place, so the
root cause seems to be somewhere else.
2011-05-13 00:15:41 +03:00
md5
35086fe17c
SCI: Fixed bugs #3299458 and #3295849
2011-05-12 12:52:12 +03:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +02:00
md5
89f9c5a9c3
SCI: Moved the engine hunk pointer processing code inside the GfxPorts class
...
This allows us make _windowList private again
2011-03-20 15:29:12 +02:00
md5
92093d267f
SCI: Fixed typos
2011-03-08 15:24:59 +02:00
md5
0642b30933
SCI: Cleanup
2011-03-08 14:46:03 +02:00
Max Horn
2cbefc8bb5
SCI: Constify some code
2011-03-07 23:21:35 +01:00
Matthew Hoops
167ff5dd1b
SCI: Fix garbage collection for SCI32
...
SCI32 has no ports
2011-03-02 10:20:31 -05:00
Willem Jan Palenstijn
db536da8d3
SCI: Skip Ports when iterating over Windows in GC
2011-02-28 21:37:12 +01: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
Ori Avtalion
3354204f53
JANITORIAL: Remove extraneous parentheses
...
svn-id: r55890
2011-02-12 10:36:35 +00:00
Filippos Karapetis
d050b811bb
SCI: Slight cleanup to the garbage collector
...
svn-id: r55116
2011-01-04 12:29:23 +00: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
07e4fe9fdc
SCI: Disabled some debug related GC code, which effectively
...
wastes cycles if we're not debugging the GC
svn-id: r52465
2010-08-31 09:45:36 +00:00
Max Horn
9d47b191f6
SCI: Rename some more stuff
...
svn-id: r50553
2010-07-01 16:05:47 +00:00
Max Horn
b8904a48ed
SCI: Make SegManager::_heap private
...
svn-id: r50552
2010-07-01 16:05:29 +00:00
Filippos Karapetis
0b470dde63
SCI: Some cleanup of the GC code.
...
The version of push() that pushes arrays inside WorklistManager has been renamed to pushArray(), so that it's more apparent where arrays are pushed.
svn-id: r50486
2010-06-29 09:02:59 +00:00
Max Horn
9b4406fd35
SCI: Some more GC cleanup
...
svn-id: r50443
2010-06-28 12:55:47 +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
Walter van Niftrik
1e67b56eee
SCI: Revert r47925 and put fix inside GC instead.
...
svn-id: r47940
2010-02-06 19:41:55 +00:00
Max Horn
bb5e34a014
SCI: Get rid of EngineState::stack_segment
...
svn-id: r47833
2010-02-03 01:32:59 +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
Filippos Karapetis
d6f5d93dbf
Started rewriting the Object struct into a class
...
svn-id: r44878
2009-10-10 15:58:51 +00:00
Max Horn
6ad5840181
SCI: Rename EngineState::segMan to _segMan
...
svn-id: r44629
2009-10-04 18:38:18 +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
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
10f898c90e
SCI: Rename MemObject -> SegmentObj
...
svn-id: r44130
2009-09-17 00:45:12 +00:00
Max Horn
a277123f54
SCI: Rename Script class members, change Script from struct to class
...
svn-id: r44126
2009-09-16 23:32:27 +00:00
Max Horn
d04b5d2c9b
SCI: Rename resManager -> resMan; segManager -> segMan
...
svn-id: r43980
2009-09-06 12:57: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
Filippos Karapetis
ac025f4294
- Replaced more cases of EngineState parameters
...
- Made some version comparisons for old SCI0 versions easier to read
- Removed the GET_SEL32SV macro
svn-id: r43729
2009-08-25 15:14:29 +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
Filippos Karapetis
522b161bec
Replaced sciprintf() calls with printf, DebugPrintf, warning and error calls
...
svn-id: r42167
2009-07-06 10:39:22 +00:00
Willem Jan Palenstijn
60e02ad6a8
Store long-term pointers to object variables in a new ObjVarRef struct.
...
Storing them as reg_t* could cause the pointers to become invalid
when they pointed into CloneTable since CloneTable can be re-allocated.
svn-id: r41220
2009-06-06 11:38:20 +00:00
Filippos Karapetis
69582f0179
Moved 3 more debug commands to console.cpp ("simkey", "segment_table" and "show_map") and removed the GFXWC macro. Some cleanup
...
svn-id: r41032
2009-05-30 14:30:39 +00:00
Willem Jan Palenstijn
67fa1fb59c
SCI: Fix potential dangling pointer more robustly,
...
by changing the executionStack implementation to a list.
svn-id: r40971
2009-05-28 22:42:18 +00:00
Filippos Karapetis
4799cbf1c3
Removed the PREG, PSTK, IS_NULL_REG and REG_EQ defines
...
svn-id: r40767
2009-05-21 17:18:46 +00:00
Max Horn
b0c1cf52e0
SCI: Got rid of EngineState::execution_stack_pos; overally, the resulting code should be even stricter in detecting invalid VM stack access (and some bugs when loading saves might be fixed now...)
...
svn-id: r40694
2009-05-18 18:15:45 +00:00
Max Horn
019f87fd1b
SCI: Changed object list in Script instances to use Common:::Array
...
svn-id: r40431
2009-05-10 19:17:51 +00:00
Max Horn
574dee8e1f
SCI: Got rid of last traces of class SegInterface
...
svn-id: r40377
2009-05-08 09:54:24 +00:00
Max Horn
0223b7e490
SCI: Moved findCanonicAddress from SegInterface to MemObject
...
svn-id: r40376
2009-05-08 09:54:06 +00:00
Max Horn
8d4a4271bb
SCI: Moved freeAtAddress from SegInterface to MemObject
...
svn-id: r40375
2009-05-08 09:53:49 +00:00
Max Horn
d8738b9090
SCI: Started to merge SegInterface into MemObject
...
svn-id: r40373
2009-05-08 09:53:10 +00:00
Max Horn
d960c1e2a5
SCI: Completed transition from MemObject (a union of various structs) to MemObjectNEW (a baseclass for these structs)
...
svn-id: r40294
2009-05-03 22:46:38 +00:00
Max Horn
82f2672008
SCI: Changed SegManager to store the heap pointers in a Common::Arrray
...
svn-id: r40293
2009-05-03 22:46:11 +00:00