aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kmovement.cpp
AgeCommit message (Collapse)Author
2010-07-30SCI: Switch to Common::RandomSource.Johannes Schickel
Since I got no response to my mail to -devel, I just assume that there is no specific reason for using rand() in SCI. As explained in my mail to -devel about why SCI uses rand, this might allow SCI to work with our event recording, when that ever gets finished. I adapted kRandom so that it also supports negative random numbers. And furthermore that the toNumber argument is smaller than the fromNumber argument. I am not sure whether that really happens though, but it should be safer to have this. I marked that place with an TODO/CHECKME. svn-id: r51521
2010-07-29SCI: fixing hoyle 3Martin Kiewitz
hoyle 3 is using kCanBeHere, but it has cantBeHere and canBeHere selectors so our auto detection would fail it also has a cantBeHere stub in Actor, thus it won't set acc at all. We reset acc because of that before calling cantBeHere selector (!) of the actors (canBeHere isnt used) so that we wont get a collision otherwise because acc is non zero when calling kDoBresen (fixes all sorts of bugs, clone2727 should clean it up :P svn-id: r51485
2010-07-29SCI: reverting r51479 and adding TODOs for fixing the hoyle issue (fixing ↵Martin Kiewitz
this properly should make credits etc. appear and solve all the other issues that clone submitted) svn-id: r51484
2010-07-29SCI: Fixed Hoyle 3 bugs #3035077, #3035080, #3035081 and #3035242, by using ↵Filippos Karapetis
the "completed" case removed in rev #50921 for Hoyle 3 svn-id: r51479
2010-07-19SCI: kDoBresen - check xLast/yLast selectorsMartin Kiewitz
fixed mixed-up fairy tales demo svn-id: r51035
2010-07-16SCI: enable r50931 for sci1late+ only, lsl1vga doesn't like it (ego gets stuck)Martin Kiewitz
svn-id: r50935
2010-07-16SCI: added comments about when xLast/yLast were exactly introducedMartin Kiewitz
svn-id: r50934
2010-07-16SCI: only use xLast/yLast in kDoBresen for sci1middle+ only. qfg1 ega has ↵Martin Kiewitz
those selector names, but doesn't use them inside mover objects svn-id: r50933
2010-07-16SCI: kDoBresen - save last position of client inside mover - fixes lsl6 tram ↵Martin Kiewitz
still shaking while gotten stopped due ego svn-id: r50931
2010-07-15SCI: kDoBresen now returns result of CantBeHere() like sierra sci does it, ↵Martin Kiewitz
also adding another comment about r50921 svn-id: r50922
2010-07-15SCI: solved lsl1 casino door, lsl6 tram disappearing and qfg1 vga gate issue ↵Martin Kiewitz
- i hope this won't cause regressions, but calling the method in collision case is definitely wrong svn-id: r50921
2010-06-18SCI: Rewrap some overlong commentsMax Horn
svn-id: r50012
2010-06-17Strict mode: Changed several warnings due to logic bugs into errors. If an ↵Filippos Karapetis
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-10Fixed regression from commit #49564Filippos Karapetis
svn-id: r49569
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-23SCI: removed hack for iceman in kDoBresen - fixes all sorts of automatic ↵Martin Kiewitz
walking issues (like rescueing ambassador) in iceman, dancing at the beginning also still works - thx to [md5] svn-id: r49163
2010-05-23Cleaned up the game ID code:Filippos Karapetis
- The game ID is now obtained from ScummVM ID directly, not by converting Sierra's internal ID - Moved the code which reads the internal Sierra ID inside the resource manager - Moved the code which converts the internal Sierra ID to ScummVM's IDs together with the rest of the detection code svn-id: r49152
2010-03-08SCI: Make EngineState parameter to INV_SEL explicitMax Horn
svn-id: r48202
2010-02-13SCI: Remove EngineState::_kernel, use SciEngine::_kernel insteadMax Horn
svn-id: r48050
2010-02-13SCI: Move GameFeatures from EngineState to SciEngineMax Horn
svn-id: r48049
2010-02-05SCI: Add a 'SELECTOR' macroMax Horn
svn-id: r47918
2010-02-03Placed all the game feature detection code in a separate classFilippos Karapetis
svn-id: r47850
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-05More renamingFilippos Karapetis
svn-id: r47009
2010-01-05Renamed /gui to /graphics and /sfx to /sound, to better illustrate their purposeFilippos Karapetis
svn-id: r47007
2009-12-27Renamed gameName -> gameId, to keep the same vocabulary everywhereFilippos Karapetis
svn-id: r46635
2009-11-14Moved getAngle() inside kmovement.cpp, the only place where it's actually usedFilippos Karapetis
svn-id: r45903
2009-10-21- Removed kShow() and the related code it uses - it's a debugging function, ↵Filippos Karapetis
and we have the same functionality in the debug console - Merged the view signal flags from kernel.h and gui_animate.h, and named them appropriately. Also, updated the notes next to them, cause some were incorrectly marked as not used in our engine - Added a note about a hack used in the old GUI in the view signal flags - Moved the control state flags inside gui_helpers.h svn-id: r45310
2009-10-18SCI: Make the implicit segMan param to GET_SEL32(V) and PUT_SEL32(V) explicitMax Horn
svn-id: r45234
2009-10-15SCI: added fix for iceman (dance with girl walking)Martin Kiewitz
svn-id: r45122
2009-10-09Moved actor movement detection in state.cpp, together with the other ↵Filippos Karapetis
detections and rewrote it to work in a similar fashion to the other detections svn-id: r44836
2009-10-04SCI: Rename EngineState::segMan to _segManMax Horn
svn-id: r44629
2009-10-04SCI: Add SegManager::findObjectByName() method, make parse_reg_t() local to ↵Max Horn
console.cpp, and switch other code using it to use findObjectByName() instead. svn-id: r44628
2009-09-30Added a new special reg_t, SIGNAL_REG, for signaling when an error occurs ↵Filippos Karapetis
(usually), or to signal success in some special occasions svn-id: r44505
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-25Create a define for the special "signal" offset used throughout the engine, ↵Filippos Karapetis
and fixed the arbitrary 0 values from commit #44294, set when some math functions do invalid calculations svn-id: r44359
2009-09-23- Moved the SCI version in a global variableFilippos Karapetis
- Changed all the SCI version checks to use getSciVersion() - Also made getSciVersionDesc a global function (removes some ugly accessing of the SCI engine) The fallback detector should work correctly now svn-id: r44269
2009-09-17SCI: Add EngineState::_kernel member for convenienceMax Horn
svn-id: r44173
2009-09-17SCI: Add a global getSciVersion() function and make use of itMax Horn
svn-id: r44170
2009-09-17SCI: Get rid of the not_register() hackMax Horn
svn-id: r44153
2009-09-17SCI: Rename selector_map_t -> SelectorCache and _selectorMap -> _selectorCacheMax Horn
svn-id: r44152
2009-09-17SCI: More cleanupMax Horn
svn-id: r44129
2009-09-16SCI: Rename Script class members, change Script from struct to classMax Horn
svn-id: r44126
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