Posted: Tue May 27, 2008 7:52 pm
1378 => CallNextHookEx(@pluginHook()....)

It will be very hard to debug this.
http://www.purebasic.com
https://www.purebasic.fr/english/
1378 => CallNextHookEx(@pluginHook()....)
Code: Select all
d:\programing\PB4\IDETools\PBIicon.ico
to
PBIicon.ico
Code: Select all
; used here include 16,32,50, etc. The findPath procedure uses this
; number to convert current and destination locations (see below)
; to locations in the walkability array.
; - startingX,startingY = location of the pathfinder (pixel based coordinates)
; - targetX,targetY = location of the target destination (pixel based coordinates)
; The findPath() procedure procedureReturns whether a path could be found (1) or
; if it's nonexistent (2). If there is a path, it stores it in a bank
; called pathBank(pathfinderID).
;2. readPath(pathfinderID,currentX,currentY,tileSize,pixelsPerFrame)
; This procedure reads the path data generated by findPath() and procedureReturns
; the x and y coordinates of the next step on the path. They are stored
; as xPath(pathfinderID) and yPath(pathfinderID). These coordinates are
; pixel coordinates on the screen. See the procedure for more info.
; The parameters are:
; - pathfinderID = same as above
; - currentX,currentY = current location of pathfinder in pixel
; based coordinates
; - tileSize = same as above
; - pixelsPerFrame = number of pixels traveled per frame. This info
; is used by the path finder to determine how close to the center
; of a square the pathFinder must get before it looks up the
; next step on the path.
;3. preProcessMap(mapWidth,mapHeight) = this procedure preprocesses
; the map for faster pathfinding.
;Background (for those who want to understand the findPath() procedure)
;----------
; The basic A* method is to begin at the starting location and search
; adjacent squares with the lowest F costs (see below) until you find
; the target. The path is then generated by working backwards from the
; target to the starting location, moving from each square to its
; adjacent "parent" square.
; F = G + H
; G = distance from starting location to a given square by
; going along the path generated to get to there.
; H = distance from the given square to the target square. This
; is often referred to as the "heuristic" - an unnecessarily
; confusing term in my opinion.
; The best way to follow how A* works is to do a step-by-step
; search in Demo #1
Declare readPath(pathfinderID, currentX, currentY, tileSize, pixelsPerFrame)