aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/klists.cpp
AgeCommit message (Collapse)Author
2010-07-17SCI: added special case for iceman when plotting course inside isSaneNodePointerMartin Kiewitz
svn-id: r50960
2010-07-14SCI:Filippos Karapetis
- Split SCI2 from SCI2.1 signature checks - Added signature checking for the subops of the SCI2.1 kernel call kList - Added support for calls to kAddToFront and kAddToEnd with 3 parameters (unimplemented code uncovered by the signature checks) - Added a FIXME for a potential incorrect subop (uncovered by the signature checks), which might be related to the crashes in the demo of Torin's Passage svn-id: r50861
2010-07-01SCI: Rename some variables to match our naming conventionsMax Horn
svn-id: r50549
2010-06-30Added support for kAddAfter with 4 parameters (used in Torin's Passage, for ↵Filippos Karapetis
example) svn-id: r50537
2010-06-30Changed an error back to a warning - Torin's Passage calls kAddAfter with 4 ↵Filippos Karapetis
parameters, and we don't know what the 4th parameter is yet svn-id: r50528
2010-06-30SCI: Reverting r50516, SSCI didn't reset the node value when deleting the ↵Filippos Karapetis
node. Also, a slight fix in VM debug code. svn-id: r50521
2010-06-30Updated incorrect commentFilippos Karapetis
svn-id: r50517
2010-06-30Also erase the value of the list node itself when deleting it inside ↵Filippos Karapetis
kDeleteKey, as it might be referenced again before the GC is invoked svn-id: r50516
2010-06-30When deleting a list node, erase its references to predecessor and successor ↵Filippos Karapetis
nodes. Fixes cases where game scripts could reference a list node after it was deleted (e.g. QFG1 intro, Longbow when exiting the cave). Some slight cleanup svn-id: r50515
2010-06-28SCI: Turn more warnings into errors.Max Horn
If one of these is triggered for you, you can add an exception to the error, together with a comment explaining why this exception is necessary. Ideally after verifying that the cause is a script bug and not a bug in our code... svn-id: r50442
2010-06-25Renamed some variablesFilippos Karapetis
svn-id: r50284
2010-06-24Initialize the stack with 'S' or 's' characters, like SSCI does (ultimately, ↵Filippos Karapetis
we should not change the stack again like we do in op_link - this is what Sierra is doing). Some cleanup svn-id: r50207
2010-06-18Turned more warnings into errors, some cleanupFilippos Karapetis
svn-id: r49990
2010-06-18Process kAddAfter with 4 parameters (Torin's Passage)Filippos Karapetis
svn-id: r49976
2010-06-13Fixed regression from commit #49251, and added an explanation. Calls to ↵Filippos Karapetis
kNewNode with 1 parameter are handled properly again. Fixes the demo of Phantasmagoria 1. Thanks to lskovlun and waltervn for spotting this svn-id: r49638
2010-06-10Unified invokeSelector() and invokeSelectorArgv(), and removed the INV_SEL ↵Filippos Karapetis
kludge. Also, removed the selectorInvocation parameter - if invokeSelector() fails, the error is in most cases unrecoverable, and the error description thrown covers all cases where kContinueOnInvalidSelector was used. This uncovered a bug too: in some places, non reg_t parameters were parsed svn-id: r49564
2010-05-29Mass renaming of selector-related functions, and removed some defines which ↵Filippos Karapetis
were just cloaking functions with a different name - GET_SEL32 -> readSelector - GET_SEL32V -> readSelectorValue - PUT_SEL32 -> writeSelector - PUT_SEL32V -> writeSelectorValue Also, changed some selector-related function names and variables to CamelCase svn-id: r49317
2010-05-26Made _k_new_node() a method of the segment manager, and fixed a bug with the ↵Filippos Karapetis
rarely used SCI0 kernel function kSort in the process (_k_new_node was called with key, value instead of value, key inside kSort) svn-id: r49251
2010-03-08SCI: Make EngineState parameter to INV_SEL explicitMax Horn
svn-id: r48202
2010-03-08SCI: Made some stuff staticMax Horn
svn-id: r48199
2010-02-12SCI: Revert r47929 (bad idea, as we may run out of offsets). Instead, adapt ↵Walter van Niftrik
SCI32 list iteration code to store node successor before invoking. svn-id: r48036
2010-02-06Added a sanity check for kListAt and made the hack for displaying text work ↵Filippos Karapetis
in SCI2 only svn-id: r47931
2010-02-05SCI: Add a 'SELECTOR' macroMax Horn
svn-id: r47918
2010-01-30SCI: Remove extra '\n's in debugC messagesWillem Jan Palenstijn
svn-id: r47707
2010-01-29SCI: Move selector stuff to new header; reorder k_argc & k_argp param of ↵Max Horn
invoke_selector svn-id: r47665
2010-01-28kDisposeList() is not needed according to waltervn, as the garbage collector ↵Filippos Karapetis
automatically clears unused objects svn-id: r47653
2010-01-28Disabled the automatic list fixing feature, introduced in rev. #47636 ↵Filippos Karapetis
(there's no point in fixing lists created by game scripts) svn-id: r47650
2010-01-28SCI: CleanupWalter van Niftrik
svn-id: r47649
2010-01-28Handle calls to NewNode() with just one parameter.Lars Skovlund
Takes care of Phantasmagoria, Torin, etc. svn-id: r47643
2010-01-28Since we fix the list problems inside isSaneNodePointer(), don't abort ↵Filippos Karapetis
processing of the list svn-id: r47637
2010-01-28- The list checks now throw more verbose warningsFilippos Karapetis
- Some obvious list problems are now fixed automatically when found, after the relevant warnings are shown - kDisposeList now clears all the nodes in the list - Some cleanup svn-id: r47636
2010-01-03sane_nodep() and sane_listp() should not be dummy functions when ↵Filippos Karapetis
DISABLE_VALIDATIONS is set, so that the engine doesn't try and refer to null pointer objects (and subsequently crash) svn-id: r46956
2010-01-03Fixed compilation with DISABLE_VALIDATIONS, and fixed a bug in kPrevNodeFilippos Karapetis
svn-id: r46949
2009-12-30Formatting.Johannes Schickel
svn-id: r46755
2009-12-30Fixed warningsFilippos Karapetis
svn-id: r46747
2009-12-30Initial implementation of the SCI21 kList kernel function (which calls all ↵Filippos Karapetis
the other list-related functions), thanks to the help of waltervn svn-id: r46744
2009-12-30SCI32: Moved all the list related kernel functions inside klists.cpp, and ↵Filippos Karapetis
implemented kListAllTrue with the help of waltervn svn-id: r46742
2009-10-18SCI: Make the implicit segMan param to GET_SEL32(V) and PUT_SEL32(V) explicitMax Horn
svn-id: r45234
2009-10-09Some const correctness changes; cleanupMax Horn
svn-id: r44850
2009-10-07SCI: Turn lookup_node & lookup_list into SegManager::lookupNode & ↵Max Horn
SegManager::lookupList svn-id: r44769
2009-10-04SCI: Rename EngineState::segMan to _segManMax Horn
svn-id: r44629
2009-10-02Fix some cppcheck warnings reported by salty-horseMax Horn
svn-id: r44538
2009-09-30Changed the list sanity checks to return warnings instead of errors in case ↵Filippos Karapetis
of failure - apparently, this can occur in some games, e.g. Longbow and QFG1 svn-id: r44503
2009-09-29- Changed the unimplemented debug SCI kernel functions (InspectObj, ↵Filippos Karapetis
ShowSends, ShowObjs, ShowFree, StackUsage and Profiler) to be dummy functions - we have our own debugger, and don't use these functions for debugging - Removed the function number parameter from all kernel functions, as it's no longer needed, and removed the FAKE_FUNCT_NR hack - Removed kUnknown() and kStub() - Dummy/unknown kernel functions are no longer invoked, and a warning is shown instead, with the paremeters passed to them Note: there is an evil hack used for debugging scripts in invoke_selector(), which probably no longer works now svn-id: r44461
2009-09-17SCI: Rename WAS_FUNCT_NR to FAKE_FUNCT_NR; turn some #defines into enumsMax Horn
svn-id: r44169
2009-09-17SCI: Rename MemObject -> SegmentObjMax Horn
svn-id: r44130
2009-09-12- Made obj_get and obj_get_name methods of SegManager (getObject and ↵Filippos Karapetis
getObjectName, respectively) - Renamed alloc_List -> allocateList, alloc_Node->allocateNode, alloc_hunk_entry->allocateHunkEntry, free_hunk_entry->freeHunkEntry, for consistency svn-id: r44039
2009-09-06SCI: Rename resManager -> resMan; segManager -> segManMax Horn
svn-id: r43980
2009-09-02Some renaming:Filippos Karapetis
getresourceManager -> getResourceManger resourceManager -> resMan segmentManager ->segMan svn-id: r43908
2009-09-02SCI: funct_nr is not used in 99% of all opcodes -- hide it in those (to be ↵Max Horn
removed eventually) svn-id: r43905