Nordwind Posted January 7, 2007 Share Posted January 7, 2007 Hi.I'm the autor of the ProSpeed.dll. jpam contacted me some weeks ago trying to use my dll with AutoIt3. And I think, he has made a great work. I decides to put his code to the ProSpeed package, with jpams permission. Myself, I'm not able to write AutoIt-sourcecodes. ProSpeed was designd as shareware to use with XProfan, an easy to learn basic/pascal like language. It is written in MASM32 Assembler. With version 2.7 I decided to make ProSpeed freeware.All grafic funktions bases on GDI and its HDCs, not on DirectX! That makes many things somewhat slower, but easier to use. The graficeffects are made by myself in assemblercode and they use GDIs fast DIBs.jpam don't use ProSpeeds sound functions in his demo, sorry for it. All ProSpeed sound function bases on DirectSound. You can use multiple sounds together at same time.A big part of ProSpeed are the sprite function. You can nearly use it veeery easy like hardware-sprites. The sprite are the best part of ProSpeed, I think.Many mouse, keyboard and joystick function are implemented. And several functions to work with strings or other memory types.Further ProSpeed have some functions to pack/unpack, tiles, timer, pixeleffects, ki (pathfinding), window manipulating, tooltips.... Test the demos to see, what is possible.About pathfinding: You better user my pathfind.dll from my website. It newer and works much better and faster.My website is available here.Have much fun with my dll and the other programs! And sorry for my bad english. I'm from germany.Best regard,Frank Abbing aka Nordwind. Link to comment Share on other sites More sharing options...
Lakes Posted January 7, 2007 Share Posted January 7, 2007 Many thanks for making this Dll freeware Frank! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 7, 2007 Author Share Posted January 7, 2007 Welcome to the forum Frank ! jpam Link to comment Share on other sites More sharing options...
Valik Posted January 7, 2007 Share Posted January 7, 2007 Hi.I'm the autor of the ProSpeed.dll. <snip>It is written in MASM32 Assembler.You might want to be careful about trashing the EBX register. This latest crash was caused because your DLL modifies the EBX register but never restore the original value. The compiler for AutoIt (Visual C++ 7 and 8) generated some code which used the EBX register after the DLL function was invoked but since your DLL had modified EBX, it was causing access violations. I've fixed this in AutoIt but you may wish to take a look at your DLL functions. I suspect other languages could have a crash problem in certain situations, too. Link to comment Share on other sites More sharing options...
Nordwind Posted January 7, 2007 Share Posted January 7, 2007 (edited) You might want to be careful about trashing the EBX register. This latest crash was caused because your DLL modifies the EBX register but never restore the original value. The compiler for AutoIt (Visual C++ 7 and 8) generated some code which used the EBX register after the DLL function was invoked but since your DLL had modified EBX, it was causing access violations. I've fixed this in AutoIt but you may wish to take a look at your DLL functions. I suspect other languages could have a crash problem in certain situations, too.Hi. Well, I know, the dll is at least in use with XProfan, C++, PureBasic and VisualBasic without any problems...But you're right. Most API saves EBX when jump back to program. So I made a new dll-version which functions do not trashes EBX. You can find it here. Hope, that will help you.> Welcome to the forum Frank !> Many thanks for making this Dll freeware Frank!Thank you! Edited January 7, 2007 by Nordwind Link to comment Share on other sites More sharing options...
Lakes Posted January 7, 2007 Share Posted January 7, 2007 Tested and working with current Autoit and Beta!! Party On!! Many thanks for fixing this so quickly frank! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
jpam Posted January 7, 2007 Author Share Posted January 7, 2007 WOW ! That was fast ! Thumbsup frank ! Link to comment Share on other sites More sharing options...
CoderDunn Posted January 7, 2007 Share Posted January 7, 2007 (edited) man this is cool. Thanks Frank for prospeed! jpam I think you should add a function parameter for the handel to a previously opened prospeed dll. Then we wont have to modify the code if it's some where other than the working dir. Plus, it won't be openend and closed every function. Hallman Edited January 7, 2007 by Hallman Link to comment Share on other sites More sharing options...
Lakes Posted January 7, 2007 Share Posted January 7, 2007 (edited) I`m still having a problem with the sprite arrangement, here`s the code.. expandcollapse popup#include <GUIConstants.au3> #include <Prospeed.au3> Opt("MouseCoordMode",0) Opt("GUIOnEventMode", 1) HotKeySet("{Esc}","_exit") $GUI = GUICreate("Prospeed",800,400,-1,-1,$WS_POPUP) GUISetState() ;Background(FILE, POSX, POSY) ;loads Background Background("D:\Hintergrund.jpg", 0, 0) $SprOfX = 0 $SprOfY = 0 $SpWid = 48 $SpHgt = 63 $SpFrms = 4 $SpStFrm = 1 $SpFrmSpd = 6 $SpPosX = -30 $SpriteLTar = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar1 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar2 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar3 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar4 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar5 = @scriptdir & "\Sprites_LargeTarget.gif" ;Sprite("Sprite picture", WIDTH, HEIGHT, FRAMES, START_FRAME, FRAME_SPEED, posX, posY) ;loads sprites sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 50) ;sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 80) ;sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid*2, $SpHgt*2, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 130) ;sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 160) ;sprite("c:\temp\Sprites.gif", $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 50) ;sprite("c:\temp\Frametest.gif",61, 55, 4, 1, 20,-30, 50) ;SetmovingRectangle(Sprite nr, LEFT, TOP, RIGHT, BOTTOM) sets cage for sprite SetmovingRectangle(1, 0, 0, 780, 380) ;SetmovingRectangle(2, 0, 0, 780, 380) ;SetmovingRectangle(3, 0, 0, 780, 380) ;SetmovingRectangle(4, 0, 0, 780, 380) ;SetmovingRectangle(5, 0, 0, 780, 380) ;SetmovingRectangle(6, 0, 0, 780, 380) ;Movesprite(Sprite nr, posx, posy, Speed_x, Speed_y) ;Sets sprites movement ;Movesprite(3,810,0,5,1) ;Movesprite(4,810,410,6,3) ;Movesprite(6,100,340,2,10) While 1 $pos = MouseGetPos() ; Movesprite(5,Random(5, 780, 1),Random(5, 410, 1), 6, 3) ; Sleep(20) ; Movesprite(4,Random(5, 780, 1),Random(5, 410, 1), 6, 3) ; Sleep(20) ; Movesprite(3,Random(5, 780, 1),Random(5, 410, 1), 6, 3) ; Sleep(20) Movesprite(1,Random(5, 780, 1),Random(5, 410, 1), 6, 3) Sleep(500) ; Movesprite(2,Random(5, 780, 1),Random(5, 410, 1), 6, 3) Sleep(20) WEnd Func _exit() Exit EndFunc Here`s the Gif file.. Thanks! Edited January 7, 2007 by Lakes 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
_Kurt Posted January 7, 2007 Share Posted January 7, 2007 Well, I know, the dll is at least in use with XProfan, C++, PureBasic and VisualBasic without any problems...But you're right. Most API saves EBX when jump back to program. So I made a new dll-version which functions do not trashes EBX. You can find it here. Hope, that will help you.Sweet! Frank thank you for the quick fix. Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
jpam Posted January 7, 2007 Author Share Posted January 7, 2007 quick fix download the updated prospeed.au3 from post 1 expandcollapse popup#include <GUIConstants.au3> #include <Prospeed.au3> Opt("MouseCoordMode",0) Opt("GUIOnEventMode", 1) HotKeySet("{Esc}","_exit") $GUI = GUICreate("Prospeed",800,400,-1,-1,$WS_POPUP) GUISetState() ;Background(FILE, POSX, POSY) ;loads Background Background("D:\Hintergrund.jpg", 0, 0) $SprOfX = 0 $SprOfY = 0 $SpWid = 48 $SpHgt = 65 $SpFrms = 4 $SpStFrm = 1 $SpFrmSpd = 6 $SpPosX = -30 $SpriteLTar = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar1 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar2 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar3 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar4 = @scriptdir & "\Sprites_LargeTarget.gif" ;$SpriteLTar5 = @scriptdir & "\Sprites_LargeTarget.gif" ;Sprite("Sprite picture", WIDTH, HEIGHT, FRAMES, START_FRAME, FRAME_SPEED, posX, posY) ;loads sprites sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 50) ;sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 80) ;sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid*2, $SpHgt*2, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 130) ;sprite($SpriteLTar, $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 160) ;sprite("c:\temp\Sprites.gif", $SprOfX, $SprOfY, $SpWid, $SpHgt, $SpFrms, $SpStFrm, $SpFrmSpd, $SpPosX, 50) ;sprite("c:\temp\Frametest.gif",61, 55, 4, 1, 20,-30, 50) ;SetmovingRectangle(Sprite nr, LEFT, TOP, RIGHT, BOTTOM) sets cage for sprite SetmovingRectangle(1, 0, 0, 780, 380) ;SetmovingRectangle(2, 0, 0, 780, 380) ;SetmovingRectangle(3, 0, 0, 780, 380) ;SetmovingRectangle(4, 0, 0, 780, 380) ;SetmovingRectangle(5, 0, 0, 780, 380) ;SetmovingRectangle(6, 0, 0, 780, 380) ;Movesprite(Sprite nr, posx, posy, Speed_x, Speed_y) ;Sets sprites movement ;Movesprite(3,810,0,5,1) ;Movesprite(4,810,410,6,3) ;Movesprite(6,100,340,2,10) SetSpriteAnimMove($SpriteLTar, 1, 1, 0, 0) SetSpriteAnimMove($SpriteLTar, 1, 2, 0, 0) SetSpriteAnimMove($SpriteLTar, 1, 3, 0, 0) SetSpriteAnimMove($SpriteLTar, 1, 5, 0, 80) SetSpriteAnimMove($SpriteLTar, 1, 6, 0, 80) SetSpriteAnimMove($SpriteLTar, 1, 7, 0, 80) While 1 $pos = MouseGetPos() ; Movesprite(5,Random(5, 780, 1),Random(5, 410, 1), 6, 3) ; Sleep(20) ; Movesprite(4,Random(5, 780, 1),Random(5, 410, 1), 6, 3) ; Sleep(20) ; Movesprite(3,Random(5, 780, 1),Random(5, 410, 1), 6, 3) ; Sleep(20) Movesprite(1,Random(5, 780, 1),Random(5, 410, 1), 6, 3) Sleep(500) ; Movesprite(2,Random(5, 780, 1),Random(5, 410, 1), 6, 3) Sleep(20) WEnd Func _exit() Exit EndFunc Link to comment Share on other sites More sharing options...
jpam Posted January 7, 2007 Author Share Posted January 7, 2007 Trying for every day to make minimal 2 prospeed functions With kind recards jpam Link to comment Share on other sites More sharing options...
XxXFaNtA Posted January 7, 2007 Share Posted January 7, 2007 greeeeat /[center][/center] Link to comment Share on other sites More sharing options...
Lakes Posted January 7, 2007 Share Posted January 7, 2007 Trying for every day to make minimal 2 prospeed functionsWith kind recards jpamBrilliant! great job! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Uten Posted January 8, 2007 Share Posted January 8, 2007 You might want to be careful about trashing the EBX register. This latest crash was caused because your DLL modifies the EBX register but never restore the original value. The compiler for AutoIt (Visual C++ 7 and 8) generated some code which used the EBX register after the DLL function was invoked but since your DLL had modified EBX, it was causing access violations. I've fixed this in AutoIt but you may wish to take a look at your DLL functions. I suspect other languages could have a crash problem in certain situations, too.Thank you @Valik for providing the information enabling @nortwind to fix the problem. Really looking forward to see if AutoIt and ProSpeed is a match for nice little (or big) games.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Lakes Posted January 8, 2007 Share Posted January 8, 2007 Thank you @Valik for providing the information enabling @nortwind to fix the problem. Really looking forward to see if AutoIt and ProSpeed is a match for nice little (or big) games..Yes, a BIG thanks to Valik and everyone else`s work on this! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lakes Posted January 8, 2007 Share Posted January 8, 2007 Ok, last question for today! lol Is there a limit of 10 Sprites that you can have? (I was setting up a scoring display and it won`t display the 11th sprite) Thanks as always! 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Locodarwin Posted January 8, 2007 Share Posted January 8, 2007 Great job, those responsible for making this DLL work with AutoIt. It's a neat little combination that takes me back to the days when programming a home computer was FUN. -S (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent] Link to comment Share on other sites More sharing options...
CoderDunn Posted January 8, 2007 Share Posted January 8, 2007 (edited) Here are some things I think you should do: The functions need return values. This would be usefull for the sprite function so you have a handel to use with spritemove(). If the .dll call doesn't return it, then just put like Global Const $PS_CURRENT_SPRITE = 0 at the top and have the sprite function add one integer to it every time the function is ran so you can return it. If it's possible, it would be nice to be able to draw the picture, then later do an effect to it using it's handel instead of having to draw a new picture each time to do an effect. You need a window refresh function because if for example, you open another window while the example is running (so it covers the example), then go back to the example the background turns into the standard GUI background color. It would be nice to have a GUI handel parameter for the functions as well, in case there is more than one GUI. You need at least a little bit of an explanation for the functions other than it's name and parameters. Like what it specifically does. Hallman Edited January 8, 2007 by Hallman Link to comment Share on other sites More sharing options...
Nordwind Posted January 8, 2007 Share Posted January 8, 2007 Is there a limit of 10 Sprites that you can have? (I was setting up a scoring display and it won`t display the 11th sprite)No limit. ProSpeed can handle unlimited sprites. Look at my game "Loss of sanity" that handles with hundred of sprites: HereThe functions need return values. This would be usefull for the sprite function so you have a handel to use with spritemove(). If the .dll call doesn't return it, then just put like Global Const $PS_CURRENT_SPRITE = 0 at the top and have the sprite function add one integer to it every time the function is ran so you can return it.There's no need for SpriteMove() to return an value. You can get all infos about a sprite by prospeeds get-functions, e.g. GetSpriteInfos():offset: 0 = actual x position 4 = actual y position 8 = destination x position12 = destination y position16 = has sprite arrived? (0=no / 1=yes) ?20 = x speed24 = y speed28 = anim statusGreetings, Nordwind/Frank Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now