jpam Posted January 24, 2008 Author Share Posted January 24, 2008 copy paste seems not to work here are the files; Image_To_String.au3 Internal_Sprite_Drawing.au3 Link to comment Share on other sites More sharing options...
peter123 Posted January 27, 2008 Share Posted January 27, 2008 Yes, now it's work!! thnx Link to comment Share on other sites More sharing options...
SadBunny Posted February 2, 2008 Share Posted February 2, 2008 (edited) Two questions about sprites with prospeed:1) I want to put an updated sprite over an old one. Same dimensions, only different GIF or BMP content. Now when I just assign a new Sprite() return value to an old variable, everything works except for that the graphical contents of the first variable remain on screen, and kind of become the background of the new content. So I thought I'd just DeleteSprite() the old sprite first. But... The drawn sprite doesn't go away!So, how to remove a written sprite, or to overwrite an old sprite with a new one and including the background so it yields the same visible result?/edit: just realized that my question would probably also be solved if I knew how to draw a non-transparent sprite.Solved - problem described was caused by an incredibly stupid error in my array handling. Leaves 2 though:2) Reading through ProSpeed.au3 functions to accomplish aforementioned goal, I thought it might be necessary to set the background mode. But Func ChangeSpritePara($S_Alias, $Parameter, $new_value) is a bit unclear to me. I can't seem to find out what different values for 'Background_mode' do. How to use this? Or is it only for the 'real' background that was set by Background()?I do feel the need to compliment JPAM and Frank for creating such beautiful and ridiculously useful stuff. Edited February 2, 2008 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
jpam Posted February 2, 2008 Author Share Posted February 2, 2008 here's a better explanation of ChangeSpritePara i am working on a huge prospeed demo that is using all function's in the udf and combining different function's it will take some weeks to complete it, but it come's with source code so you can look how different effect''s are done. #cs $Spritebitmap = 0 sets new sprite bitmap $Offset_X = 4 change X offset in sprite bitmap $Offset_Y = 8 change Y offset in sprite bitmap $HDC_window = 56 change Hdc $Buffer_copie1 = 68 change screen buffer for sprite $Buffer_copie2 = 84 change screen buffer for sprite $Background_mode = 92 0= background not scrolling / 1= background is scrolling $Background_scroll_X = 96 sets how many pixels the background must scroll on X axis $Background_scroll_Y = 100 sets how many pixels the background must scroll on Y axis $sprite_markNR = 156 change sprite mark $Start_MoveSpriteWithTable = 312 startpoint for spritemove with table mode #CE Link to comment Share on other sites More sharing options...
SadBunny Posted February 2, 2008 Share Posted February 2, 2008 Right! Thanks for the info. Seems I have no use for the BackgroundMode option at this time, but at least I now know what I am missing out on Good luck on your demo! Nice to see you're so committed to completing your UDF and making it really usable. For practising basic ProSpeed usage I am making a clock. I like making clocks. If you want to, I'll post it here when I'm done. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
jpam Posted February 2, 2008 Author Share Posted February 2, 2008 if you want to change the background with sprites in it change the background picture with Background($S_FILE, $S_POSX, $S_POSY, $N_WIDTH, $N_HEIGHT) and set ChangeSpritePara($sprite1, 68, $S_fensterkopie1[0]) ChangeSpritePara($sprite1, 84, $S_fensterkopie2[0]) then $sprite1 has the new background buffer $S_fensterkopie1[0] = a temporary solution to change the background buffer when you load a new background the $S_fensterkopie1[0] will automatic get a copy of the new background when i have the demo ready this will be fixed Link to comment Share on other sites More sharing options...
SadBunny Posted February 4, 2008 Share Posted February 4, 2008 (edited) Well, I've finished the best alarm clock in the WORLD thanks to you Check it out! (I credited you and Frank in my background pic...) I have only used a small portion of all options you provide though; I'm planning on improving my script to be able to set the alarm time and turn on/shut off the alarm using the joypad, because I have this wireless rumblepad thingy that I can use from bed! Zip file contains ProSpeed.dll, psclock.au3 (my clock script) and a bunch of pictures. Just keep everything in the same folder All pictures were created from scratch by myself. psclock.zip /edit: 04-02-2008 new version - fixed a major AM/PM conversion bug, and some minor bugs (forgotten test code, some window handling and error checking/prevention) Edited February 4, 2008 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
peter123 Posted February 10, 2008 Share Posted February 10, 2008 @nice work Bunny @jpam, when come's the new version of prospeed :) Link to comment Share on other sites More sharing options...
SadBunny Posted February 11, 2008 Share Posted February 11, 2008 Thanks peter123! Hey JPAM I have a question... Why are there global variables used, for instance for GetBackgroundInfos? Why not let it return a variable or an array with information, like most other udf's and built-in info gathering functions? That would be cleaner, wouldn't it? Thanks again. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
jpam Posted February 11, 2008 Author Share Posted February 11, 2008 (edited) @ peter123 demo is allmost done lots of changes in udf frank has updated the prospeed.dll with new function bitblitarrays (very fast array's copying with tranparant masks) properly bug in dll with FreeExtFX function , frank is looking at it @ Sadbunny i don't use Global's in the udf GetBackgroundInfos use Struct's mybe in an old version btw ,Your clock look's good but i am open for improments give me an example how thing's could be better Edited February 11, 2008 by jpam Link to comment Share on other sites More sharing options...
SadBunny Posted February 11, 2008 Share Posted February 11, 2008 Thanks! But... In the last version of prospeed.au3 that I downloaded, a couple of days ago from your first post in this thread (which you say to have updated - I guess that contains the latest version), I see the following: (..) Dim $S_WIDTH[1], $S_HEIGHT[1], $Window_Width, $Window_height, $Offset_X, $Offset_Y (..) Func GetBackgroundInfos() $B_BackgroundInfos = DllStructCreate("long;long;long;long;long;long;long") DllCall($S_DLL, "long", "GetBackgroundInfos", "long", DllStructGetPtr($B_BackgroundInfos)) $Scrollmodus = DllStructGetData($B_BackgroundInfos, 1) $Window_Width = DllStructGetData($B_BackgroundInfos, 2) $Window_height = DllStructGetData($B_BackgroundInfos, 3) $Offset_X = DllStructGetData($B_BackgroundInfos, 4) $Offset_Y = DllStructGetData($B_BackgroundInfos, 5) $Speed_X = DllStructGetData($B_BackgroundInfos, 6) $Speed_Y = DllStructGetData($B_BackgroundInfos, 7) EndFuncoÝ÷ ØÚ0P*Ø^)¨ºÛ"uêiû§rf¤zËazö«¦åzÈ%¡¶¥jwHq©÷öÛ¬yú+{-jw*0MúZ)Ý£Ûa¶¶«Â+a¦º,¥çjíÍ£ ²²è zËb¢|(ºW[y«¢+ÙÕ¹Ñ É½Õ¹%¹½Ì ¤($ÀÌØí } ɽչ%¹½Ìô±±MÑÉÕÑ ÉÑ ÅÕ½Ðí±½¹í±½¹í±½¹í±½¹í±½¹í±½¹í±½¹ÅÕ½Ðì¤(%±± ±° ÀÌØíM}10°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÅÕ½ÐíÑ É½Õ¹%¹½ÌÅÕ½Ðì°ÅÕ½Ðí±½¹ÅÕ½Ðì°±±MÑÉÕÑÑAÑÈ ÀÌØí } ɽչ%¹½Ì¤¤(%¥´ÀÌØíÉÍÕ±ÑlÝt($ÀÌØíÉÍÕ±ÑlÁtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°Ä¤($ÀÌØíÉÍÕ±ÑlÅtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°È¤($ÀÌØíÉÍÕ±ÑlÉtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°Ì¤($ÀÌØíÉÍÕ±ÑlÍtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°Ð¤($ÀÌØíÉÍÕ±ÑlÑtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°Ô¤($ÀÌØíÉÍÕ±ÑlÕtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°Ø¤($ÀÌØíÉÍÕ±ÑlÙtôm±±MÑÉÕÑÑÑ ÀÌØí } ɽչ%¹½Ì°Ü¤(%IÑÕɸÀÌØíÉÍÕ±Ð)¹Õ¹ìôôÐíÑ É½Õ¹%¹½Ì ... or something along those lines. Perhaps make an 8-element array with the first element containing the number 7 (for indicating that there are 7 values returned, like for instance the StringSplit() behaviour). Now since you use the return to feed back information from some other functions, I wonder why not in all functions? IMHO these global variables are a less than perfect solution, and returning values in the manner I described here is way cleaner (since then I can put the result array in an array variable of my own choosing). But probably I misunderstand the situation, presuming you have a reason for it, and that was what I was asking about... Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
jpam Posted February 17, 2008 Author Share Posted February 17, 2008 (edited) ImageDemo released !http://prospeed-jan.xprofan.com/Its a huge 7 MBmakes full use of the udf !exe contains all the graphics , sound and newest Prospeed.dllBrandnew functions are BitBlitArray ExchangeRGB and PNG alpha transperancy incl Invert PNGnewest udf ;http://prospeed-jan.xprofan.com/source demo (does not run without graphics and sound !)but its for seeing how effects are donehttp://prospeed-jan.xprofan.com/Please Let me know if you guys like it ! Edited February 23, 2008 by jpam Link to comment Share on other sites More sharing options...
SadBunny Posted February 17, 2008 Share Posted February 17, 2008 I am in huge expectation! Only problem is, the link seems to be dead... Any ideas? Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
Dellairion Posted February 18, 2008 Share Posted February 18, 2008 http://home.orange.nl/jpamvanderouderaa/ImageDemo.exeCapital letters xD Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
jpam Posted February 18, 2008 Author Share Posted February 18, 2008 thanks Dellairion was mistake from me changed the link ! Link to comment Share on other sites More sharing options...
Nordwind Posted February 18, 2008 Share Posted February 18, 2008 Hi. Great work, jpan! Your demo is the best ProSpeed-Demo I know. And I wrote myself several ProSpeed-Demos... We'll skpye... Link to comment Share on other sites More sharing options...
SadBunny Posted February 18, 2008 Share Posted February 18, 2008 I have seen my share of demos, but this ROCKS. I watched it breathlessly. The soundtrack is also AWESOME, especially the voice. Too bad she's married I can't decide whether to explore your code, open the .XM files in fasttracker for old-times sake (probably requires a Dos 6.22 vpc since DosBox doesn't seem to be up to the task ), or just watch the demo again. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
jpam Posted February 18, 2008 Author Share Posted February 18, 2008 i have made a very simple mod player for testing if you want i can post it, but its nothing special Link to comment Share on other sites More sharing options...
SadBunny Posted February 18, 2008 Share Posted February 18, 2008 I am becoming a fan... I am very much into trackers, composed many songs myself between 1994-2000... After that I started using fruityloops. Since I wouldn't have the slightest idea where to start building a mod player, I would love to take a look at yours! Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
jpam Posted February 18, 2008 Author Share Posted February 18, 2008 simple player fmod_test.au3 udf FMod.au3 have fun 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