Commit Graph

53 Commits

Author SHA1 Message Date
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
Max Horn
f108a31ad7 SCI: Made SegManager::heap_size unsigned
svn-id: r40290
2009-05-03 22:45:13 +00:00
Max Horn
5ef0e38fdd SCI: Changed VM GC code to use Common::Array
svn-id: r40263
2009-05-03 09:17:55 +00:00
Max Horn
294bd0dc07 SCI: Renamed execution_stack -> _executionStack and turned it into a Common::Array
svn-id: r40182
2009-04-28 15:58:19 +00:00
Jordi Vilalta Prat
501e4bb91a SCI: Renamed some kernel types and general cleanup
svn-id: r38961
2009-02-28 11:12:59 +00:00
Jordi Vilalta Prat
ac409a2ab7 SCI: Converted "segment interfaces" into classes
svn-id: r38782
2009-02-22 12:18:22 +00:00
Jordi Vilalta Prat
817fde6cdd SCI: Convert the segment manager into a class
svn-id: r38767
2009-02-21 23:27:24 +00:00
Max Horn
8430b662a9 SCI: Changed typedef struct -> struct
svn-id: r38752
2009-02-21 22:06:42 +00:00
Filippos Karapetis
426def4f44 Turned back all fprintf/exit(1) bits into error()
svn-id: r38716
2009-02-21 18:16:17 +00:00
Willem Jan Palenstijn
34f90ac043 revert large parts of r38621. error() is for fatal errors and does not return. warning() is not for debugging status messages.
svn-id: r38696
2009-02-21 14:11:41 +00:00
Jordi Vilalta Prat
d8d6aaa461 Replaced "typedef struct _seg_manager_t seg_manager_t" with "struct SegManager"
svn-id: r38679
2009-02-21 11:04:47 +00:00
Jordi Vilalta Prat
3cc6cdf719 Replaced "typedef struct _state state_t" with "struct EngineState"
svn-id: r38678
2009-02-21 10:47:56 +00:00
Oystein Eftevaag
25f7c37171 Wrapped the SCI engine in the Sci namespace.
svn-id: r38676
2009-02-21 10:23:36 +00:00
Filippos Karapetis
2ddce51a56 Changed more messages to warnings/errors
svn-id: r38621
2009-02-20 20:39:02 +00:00
Paweł Kołodziejski
8ca98d41a2 formating
svn-id: r38537
2009-02-19 08:43:28 +00:00
Eugene Sandulenko
22a009d3c6 Update headers. engine/
svn-id: r38408
2009-02-17 15:02:16 +00:00
Filippos Karapetis
d39d83e525 Replaced sci_free() with free() - it's OK to free a NULL pointer, so the checking that sci_free() performed is not necessary
svn-id: r38406
2009-02-17 13:51:52 +00:00