AdmiralAlkex Posted January 20, 2010 Author Share Posted January 20, 2010 Silly me For anyone that saw this comment:Note1 = The _SDL_*Color funcs doesn't paint the right colors.You can safely IGNORE IT.I was only testing it the wrong way. It works fine if you use 0xRRGGBBAA To make a solid red, use :0xFF0000FFTo make a solid green, use :0x00FF00FFTo make a semi-transparent blue, use :0x0000FF80 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 21, 2010 Author Share Posted January 21, 2010 (edited) @ALLI have been experimenting with something that would greatly simplify distribution for the UDF.The idea is to have the dll file included as binary in the include, and in the beginning of the *Init() func, check if the file exist and create it if it doesn't.This would mean that you would never have to package any dll, and the total filesize would be smaller (in compiled form).Working with source would be easier too. Copy include and you're done!What do you think?Makes sense?Doesn't make sense?Am I crazy?Am I hungry? (actually yes I am)Here's something for you to test so you see what I mean:1. Download the updated SDL.au32. Download the "blob" containing the dll3. Run a test script, like this:#include "SDL.au3" ConsoleWrite("FileExist(SDL.dll) says: " & FileExists("SDL.dll") & @CRLF) _SDL_Init($_SDL_INIT_EVERYTHING) ConsoleWrite("FileExist(SDL.dll) says: " & FileExists("SDL.dll") & @CRLF) _SDL_Quit()4. Pay attention to the ConsoleWrite. Neat, right? (attachment removed, it's worthless without the "blob" (damn upload site that keeps deleting my files for no obvious reason), if it isn't in the next release, you could probably rebuild it in minutes anyway, or just ask me for the code)SDL.au3 (52.35K) Number of downloads: 162 Edited April 26, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
jcval Posted March 15, 2010 Share Posted March 15, 2010 Português Olá pessoal, preciso saber como enviar o pressionamento de um botão no joystick, pois o jogo "street fighter 4" o player 2 não tem comandos no teclado. Alguém sabe me ajudar? Translate by google Inglês Hello everybody, need to know how to send the push of a button on the joystick, because the game "street fighter 4" player 2 has no controls on the keyboard. Someone help me know? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 15, 2010 Author Share Posted March 15, 2010 @jcval SDL can't do that, it's for creating games, not automating them. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
jcval Posted March 16, 2010 Share Posted March 16, 2010 @AdmiralAlkexSDL can't do that, it's for creating games, not automating them.Obrigado,mas você tem alguma idéia de como fazê-lo?thanks,but you have any idea how to do it? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 16, 2010 Author Share Posted March 16, 2010 thanks,but you have any idea how to do it?I'm sorry, but no, I don't. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
dantay9 Posted May 8, 2010 Share Posted May 8, 2010 If I am using _SDL_GuiCreate to construct a gui, how do I reposition the gui to the center of my screen? Currently, it is in the top left hand corner. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 8, 2010 Author Share Posted May 8, 2010 (edited) You could set where the window should be created by setting the environment variable "SDL_VIDEO_WINDOW_POS", like this:EnvSet("SDL_VIDEO_WINDOW_POS", 0 & ", " & 0)The first number is X, and second Y. Don't forget the comma between them. Note that SDL read the environment variables when you do _SDL_Init(), so set them before that or nothing will happen.Then there's always WinMove() (but that wouldn't look good, would it?) or you could create a normal AutoIt window and let SDL use that with SDL_WINDOWID. See the script "SDL Example Transparent PNG on AutoIt GUI.au3" for that.And remember, controls ARE windows, so you could create a label or something, get it's handle and pass that to SDL_WINDOWID.Just get the sizes right or things will get really weird.Big EDit:I was a bit bored so I wrote this half-crazy example:expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Include "SDL.au3" Local $GX = 640, $GY = 480 $hWnd = GUICreate(@ScriptName, $GX, $GY, 0, 0) EnvSet("SDL_WINDOWID", $hWnd) _SDL_Init($_SDL_INIT_VIDEO) $pSurface = _SDL_SetVideoMode($GX, $GY, 0, $_SDL_SWSURFACE) ;Just for some variation _SDL_FillRect($pSurface, 0, 0xFF0000) _SDL_Flip($pSurface) GUISetState() Do Sleep(10) Until GUIGetMsg() = -3 _SDL_Quit() GUIDelete($hWnd) Local $GX = 320, $GY = 240 $hWnd = GUICreate(@ScriptName, $GX*2, $GY*2, @DesktopWidth/2 - $GX, @DesktopHeight/2 - $GY) $hWnd2 = GUICtrlGetHandle(GUICtrlCreateLabel("", 30, 10, $GX, $GY)) EnvSet("SDL_WINDOWID", $hWnd2) _SDL_Init($_SDL_INIT_VIDEO) $pSurface = _SDL_SetVideoMode($GX, $GY, 0, $_SDL_SWSURFACE) ;Just for some variation _SDL_FillRect($pSurface, 0, 0x00FF00) _SDL_Flip($pSurface) GUISetState() Do Sleep(10) Until GUIGetMsg() = -3 _SDL_Quit() GUIDelete($hWnd) Local $GX = 640, $GY = 480 EnvSet("SDL_WINDOWID", "") EnvSet("SDL_VIDEO_WINDOW_POS", @DesktopWidth -$GX & ", " & @DesktopHeight -$GY) _SDL_Init($_SDL_INIT_VIDEO) $pSurface = _SDL_GuiCreate(@ScriptName, $GX, $GY, 32, $_SDL_SWSURFACE) _SDL_FillRect($pSurface, 0, 0x0000FF) _SDL_Flip($pSurface) While 1 Sleep(10) WEndPlease note that that script doesn't seem to close itself properly sometimes (not sure why) so you may want to check your task manager after running it. Edited May 8, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted May 8, 2010 Share Posted May 8, 2010 AdmiralAlkex, Neither links are working for me. Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 8, 2010 Author Share Posted May 8, 2010 AdmiralAlkex, Neither links are working for me.The one on post #44 works for me. Maybe it was just temporarily "confused", please try to click it again. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
yehia Posted May 18, 2010 Share Posted May 18, 2010 is there anyway to flip an image? like flipping it horizontally ... it would save some time and effort thanks My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 20, 2010 Author Share Posted May 20, 2010 (edited) @yehiaSorry buddy, missed you there a couple of days.SDL_gfx can flip a surface, see description on the official website (do a search in page for "Rotozoomer"). Edited May 20, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
yehia Posted May 21, 2010 Share Posted May 21, 2010 yes thanks a lot the function is _SDL_rotozoomSurfaceXY if anyone searched for this later My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
yehia Posted May 21, 2010 Share Posted May 21, 2010 any chance for the support of animated gifs? My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 22, 2010 Author Share Posted May 22, 2010 Well no, not from me anyway. I wouldn't even know where to begin. How would you expect that to work anyway? Every frame gets loaded to separate surfaces? Wouldn't it be just as easy (and use less disk-space) to use multiple .png files? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
yehia Posted May 22, 2010 Share Posted May 22, 2010 i found a dll somewhere yesterday for that but still the idea itself seemed stupid where the gif is going in a direction and the whole script using another timing i dont know but it seemed illogical thanks for the help again My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
Pottery Posted July 24, 2010 Share Posted July 24, 2010 Can someone update the link lol Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 26, 2010 Author Share Posted July 26, 2010 Did you try the link at post 44 as told? It works for me.http://hem.passagen.se/amax/autoit/SDL%20v14½.zip .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Delta Posted October 19, 2010 Share Posted October 19, 2010 I'm getting an error from both links.The second one from post 44 is giving me this. Du har försökt att ladda en sida på Passagens medlemsserver som inte finns. Det kan bero på : * Den angivna adressen är felaktig. Kontrollera stavningen och försök igen. * Medlemmen uppdaterar sidan. Försök igen senare.Du kommer att dirigeras om till Passagens f�rstasida om n�gra sekunderTill Passagen [size="1"]Please stop confusing "how to" with "how do"[/size] Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 22, 2010 Author Share Posted October 22, 2010 Ignore the popup, the linked page should start the download. You could try downloading with another browser.Some extra mirrors:Some Swedish file upload siteMy desktop (online at random times)I have intentions to create a more "permanent" solution, but that will not happen right now.It's pizza time! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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