aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kpathing.cpp
AgeCommit message (Collapse)Author
2018-08-26SCI: Fix compilation when SCI32 is disabledFilippos Karapetis
2018-08-25SCI: Fix compilation when SCI32 is disabledFilippos Karapetis
2018-08-25SCI32: Adapt the pathfinding debug code to work woth SCI32 gamesFilippos Karapetis
2018-05-20SCI: Update rad2deg usageDavid Fioramonti
2016-10-09SCI32: Change storage type of int16 arrays to hold reg_ts insteadColin Snover
Memory references and integers in SSCI are both 16-bit numbers, so game scripts frequently (incorrectly) use an IntArray instead of an IDArray for holding references. Since references in ScummVM are 32-bit reg_ts, IntArray entries must be large enough to hold reg_ts in order to be compatible with game scripts that store references in integer arrays. The alternative solution is to find and patch all incorrect use of IntArray across all games. This is possible, but a bit risky from a save game stability perspective, since incorrect IntArray usage is sometimes not apparent until well after the array is instantiated (like GK1's global interview array). This change invalidates existing SCI32 save games.
2016-09-29SCI32: Rewrite kArray & kStringColin Snover
This change invalidates earlier SCI32 save games, which separated arrays and strings in an incompatible manner. Old save games contain invalid references to a string segment which no longer exists, and contain incompatible array structures that lack critical type information.
2016-06-21SCI32: Implement line drawing (kAddLine/kUpdateLine/kRemoveLine)Colin Snover
This line drawing code lives in a remodelled GfxPaint32 class that is totally separate from GfxPaint16.
2016-03-01SCI: Use uint32 instead of unsigned intFilippos Karapetis
2016-01-07SCI32: Add initial support for palette cycling (kPalCycle) and fading (kPalFade)Colin Snover
Graphics palette code was rewritten between SCI1 and SCI2, so SCI32 palette engine code has been moved to a separate GfxPalette32 class.
2014-06-02SCI: Silence double to float conversion warning.Johannes Schickel
2014-02-18SCI: Make GPL headers consistent in themselves.Johannes Schickel
2013-07-14JANITORIAL: Remove trailing whitespaceSven Hesse
2013-04-15SCI: Fix memory leakWillem Jan Palenstijn
2012-10-22SCI: Add a workaround for bug #3568452 - "SCI: QFG1VGA - Path finding bug in ↵Filippos Karapetis
the forest" This workaround has been added for now to stop the game from freezing. A more correct solution would be to match our pathfinding algorithm to what SSCI is doing, but with this workaround we can stop the more immediate problem (game freezing) now.
2012-10-01SCI: Fix compilation with MSVC (atan2() was ambiguous)Filippos Karapetis
2012-09-30SCI: Implement kMergePolyWillem Jan Palenstijn
Thanks to Walter for creating debugging tools for MergePoly and testing.
2012-06-18SCI: Add setter/getter methods to reg_t'sFilippos Karapetis
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-01-29SCI: Remove unnecessary break after return statement.Johannes Schickel
2011-06-20ALL: Remove trailing whitespacesMax Horn
This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-05-31SCI: Fix up start/end points when pathfinding with opt == 0.Walter van Niftrik
Fixes bug #3304901: "SCI: Freddy Pharkas - Stuck in the brothel door".
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-03-04SCI: Remove SCI version check from READ/WRITE_SCI1ENDIAN_UINT16.Walter van Niftrik
2011-03-03SCI: Fixed path finding in Amiga SCI1 gamesmd5
Added wrapper functions to read/write from dynmem segments, as these are treated as BE in Amiga versions (as we treat them like raw data instead of reg_t's), whereas the rest are LE. Thanks to waltervn and wjp for their help on this
2011-01-01SCI: debugC calls no longer require a debug level of 2 to show outputFilippos Karapetis
svn-id: r55086
2010-11-13SCI: Fixup pathfinding start point when on polygon edge.Walter van Niftrik
We now also fixup the start point when it's on the edge of an obstacle. If the start point is also on the edge of the screen, the actor is now allowed to walk through that obstacle to find his way to clear territory. This is based on observation of SSCI behavior. svn-id: r54230
2010-11-11SCI: Allow paths along the edge of the screen in kAvoidPath.Walter van Niftrik
Paths along the edge of the screen are now taken as a last resort. Fixes bugs #3047418 and #3059595. svn-id: r54199
2010-10-15SCI: Changed the check for vertex_min into an assert (thanks wjp)Filippos Karapetis
svn-id: r53504
2010-10-15SCI: Fixed code bugs from bug #3087872 - "SCI: Code analysis warnings"Filippos Karapetis
svn-id: r53482
2010-08-27SCI: Fixed potential memory leak in convert_polygon()Torbjörn Andersson
svn-id: r52413
2010-08-18SCI: Fixed bug #3041232 - "LB2Floppy: Crash at Museum"Filippos Karapetis
svn-id: r52197
2010-08-17SCI: Refactored readPoint() to accept a segment reference to the polygon ↵Filippos Karapetis
data, thus removing the check for invalid segment types. Also, added a sanity check to verify that the memory reference to polygon data is big enough to hold all the expected polygon vertices (thanks to waltervn) svn-id: r52176
2010-08-17Limited the sanity check in rev #52174 to invalid segment types only ↵Filippos Karapetis
(apparently, polygon data may be placed in non-dynmem segments too) svn-id: r52175
2010-08-17SCI: Fixed bug #3034501 - "LSL6: Segfault while leaving the penthouse"Filippos Karapetis
svn-id: r52174
2010-08-07SCI: Turned a warning into an errorFilippos Karapetis
svn-id: r51838
2010-07-29SCI: also break in AvoidPath instead of continuing, when the start point is ↵Filippos Karapetis
contained in multiple polygons, otherwise we'll end up in an infinite loop svn-id: r51458
2010-07-28SCI: Break out instead of continuing when an end point is contained in ↵Filippos Karapetis
multiple polygons, while running the avoidpath algorithm (or we'll end up in an infinite loop). Fixes bug #3036299 - "LB2CD: Game Hangs at Speakeasy" svn-id: r51450
2010-07-28SCI: Changed another warning into debug outputFilippos Karapetis
svn-id: r51445
2010-07-28SCI: Changed a warning into a debug messageFilippos Karapetis
svn-id: r51444
2010-07-21SCI: Moved the SCI32 kernel functions out of kernel32.cpp and into their ↵Filippos Karapetis
respective files svn-id: r51108
2010-06-25SCI: Introduce SciGameId enumMax Horn
svn-id: r50273
2010-06-22Fixed kMergePoly after discussing with waltervn so that it correctly returns ↵Filippos Karapetis
a pointer to an empty (for now) polygon array. This means that you can walk over enemy bodies after killing them in QFG1VGA, but at least it fixes the crashes after killing monsters svn-id: r50160
2010-06-18SCI: Doxygenify some commentsMax Horn
svn-id: r50013
2010-06-17SCI: Change SciEngine's 'char *getGameID()' to 'Common::String getGameId()'Max Horn
svn-id: r49968
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-28Added comments to kMergePoly()Filippos Karapetis
svn-id: r49289
2010-05-28Added a stub for kMergePoly, to avoid crashing in QFG1VGA after killing a ↵Filippos Karapetis
monster svn-id: r49288
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-05-04Move DebugChannel related code to new headerMax Horn
svn-id: r48935
2010-04-27COMMON: Move DebugChannel stuff into a new DebugMan singletonMax Horn
svn-id: r48821
2010-02-17SCI: Cleanup resource.hMax Horn
svn-id: r48084