aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/klists.cpp
AgeCommit message (Collapse)Author
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
2009-08-25- Replaced more cases of EngineState parametersFilippos Karapetis
- Made some version comparisons for old SCI0 versions easier to read - Removed the GET_SEL32SV macro svn-id: r43729
2009-08-25- Simplified the parameters of some functionsFilippos Karapetis
- 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-20remove \n's from error() callsJoost Peters
svn-id: r43571
2009-06-04SCI: Slightly modified kAddAfter so that it does not modify its arguments ↵Max Horn
needlessly svn-id: r41174
2009-06-02Moved some more console commands to ScummVM's debug consoleFilippos Karapetis
svn-id: r41126
2009-06-01Replaced kernel_oops with error(), and added an enum to clarify the cases ↵Filippos Karapetis
where invoke_selector should stop svn-id: r41095
2009-05-31Removed script_error_flag and script_debug_flag, which were used to error ↵Filippos Karapetis
out if something went wrong and open the debugger console. Changed all the places where they were used to error() out instead, as ScummVM's debugger console can open on error() svn-id: r41073
2009-05-31The error() and warning() functions add ! and newline automatically. (I didn'tTorbjörn Andersson
look at debug() and debugC(), since I'm really bored with this now. :-) svn-id: r41061
2009-05-30- Removed debug_mode from the engine stateFilippos Karapetis
- Turned all SCIkwarn and SCIkdebug functions to ScummVM's debugC function - Placed some debug code in appropriate defines: DEBUG_PARSER, DEBUG_AVOIDPATH and DEBUG_SOUND - Removed the "debuglog" command and the "script_checkloads_flag" and "sci_debug_flags" variables svn-id: r41033
2009-05-21Removed the PREG, PSTK, IS_NULL_REG and REG_EQ definesFilippos Karapetis
svn-id: r40767
2009-05-18SCI: Removed ENTRY_IS_VALID macroMax Horn
svn-id: r40690
2009-05-18Don't print __FILE__,__LINE__ in *_list related debug output, it would only ↵Johannes Schickel
print klists.cpp and the according line anyway. svn-id: r40681
2009-05-18Fix some error/warning calls. (might need some review, from someone familiar ↵Johannes Schickel
with SCI) svn-id: r40680
2009-05-18Removed the unused file and line parameters from the list and list node ↵Filippos Karapetis
lookup functions, and removed the LOOKUP_LIST and LOOKUP_NODE defines. Also, disabled the unused LOOKUP_SPECIES define svn-id: r40676
2009-05-18Changed errors to be fatal, as most of them are fatal conditions. Some of ↵Filippos Karapetis
them have been changed to warnings for now, as they occur in certain games (e.g. SQ4 floppy, SQ4 CD and KQ5 CD) svn-id: r40675
2009-05-11SCI: Simplified the Table class, by making it use an Common::Array ↵Max Horn
internally. Increased savegame version, breaking compatibility to the previous one -- sorry for that, but some of my previous changes accidentally messed up the table syncing, resulting in messed up savegames anyway; these breakages should be fixed with this commit svn-id: r40453
2009-05-03SCI: Continue transition from MemObject to MemObjectNEWMax Horn
svn-id: r40274
2009-05-03SCI: Renamed MemObject::type and ::segmgr_id to _type resp. _segmgrId, and ↵Max Horn
added accessor methods getType() and getSegMgrId() svn-id: r40271
2009-04-28SCI: Improved the Table template a bit by taking advantage of C++ featuresMax Horn
svn-id: r40190
2009-03-12SCI: cleanupMax Horn
svn-id: r39353
2009-03-12SCI: Removed most uses of the 'inline' keyword. It is usually better to let ↵Max Horn
the compiler figure out what to inline. As it is, most of these looked as if they were randomly placed ;) svn-id: r39352
2009-03-11Changed a case inside inline_lookup_node() to non-fatal, for now, to make it ↵Filippos Karapetis
possible to walk around in SQ4 (check the FIXME comment) svn-id: r39348
2009-02-28SCI: Renamed some kernel types and general cleanupJordi Vilalta Prat
svn-id: r38961
2009-02-27SCI: Renamed include/engine.h to engine/state.h; added a corresponding .cpp ↵Max Horn
file with the EngineState constructor svn-id: r38921
2009-02-24SCI: Moved kernel.h and kdebug.h from include/ to engine/; untangled header ↵Max Horn
deps some more svn-id: r38833
2009-02-21SCI: Convert the segment manager into a classJordi Vilalta Prat
svn-id: r38767