Posted By
|
Message
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
19th April, 2007 at 11:08:21 -
Ok, I think there's a good chance this problem won't be solved, but anyhow, any help at all would be very greatly appreciated.
I guess the short version would be "is it likely that this dll just won't work in mmf?
The long version...
I'm attempting to use AStarDLL.dll with the CallDll extension in MMF. This Dll was made for GameMaker to provide complex pathfinding using the A* algorithm. It is somewhat more powerful than the Grid and Pathfinding extensions, which is why I'm not just using them instead.
After getting the error "could not call function <insert function name here> from loaded dll", I used DLL Export Viewer to inspect the Dll. It turned out that the function names were slightly different from what I had expected reading the instructions. Mostly like "astar_setoptions" being shortened to "SetOptions", though a few were completely different (or absent?).
When I run these functions without setting any arguments CallDll reports "no errors". Whether or not anything is actually happening, I don't know. The function to initialize AStarDll for example, shouldn't need any arguments - is there any way to check if it has worked (besides retrieving the error message from CallDll)?
Any time I try to run a function having first set the arguments, the app just crashes. I think it is unlikely that I am setting the arguments incorrectly, as the instructions seem fairly clear on what to do:
From the instructions;
SetObstacle (x,y)
This function sets x,y as being an obstacle in which a path may not go through.
I would think it is safe to assume that the function above would require only that you set arguments 1 and 2 to values, no?
If anyone has any theories as to what I'm doing wrong, I'd love to hear them. Otherwise, is there just a problem with the Dll - do some just not work in MMF?
If anyone actually has the time and inclination to try it out for themselves, you can download the AStarDLL from http://www.angelfire.com/indie/homebrewpc/
Just to give you a head start, all functions are as written in the included readme, minus the astar_ part, with the following exceptions;
InitializeGrid - replaces astar_grid (or astar_initialise?)
InitOptions - replaces astar_initialise (or astar_grid?)
astar_startpath - doesn't seem to exist?
If not, no worries. Like I said, any help at all, would be awesome.
n/a
|
Reno
Registered 11/01/2005
Points 906
|
19th April, 2007 at 16:57:25 -
I could never figure out the dLL extension :\
Reborn Again
|
|
|