Jump to content

A2D v2


cppman
 Share

Recommended Posts

Why wont this :

Func _DrawSpriteEx($nSpriteId, $nSourceX, $nSourceY, $nSourceWidth, $nSourceHeight, $nDestinationX, $nDestinationY, $nTextureId, $nColor = 0xFFFFFFFF, $nRotation = 0, $nScaleX = 1, $nScaleY = 1, $nCenterX = 0, $nCenterY = 0)
    _A2DSpriteBegin($nSpriteId)
    _A2DDrawSpriteEx($nSpriteId, $nSourceX, $nSourceY, $nSourceWidth, $nSourceHeight, $nDestinationX, $nDestinationY, $nColor, $nTextureId, $nRotation, $nScaleX, $nScaleY, $nCenterX, $nCenterY)
    _A2DSpriteEnd($nSpriteId)   
EndFunc

work ?

My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity
Link to comment
Share on other sites

Why wont this :

Func _DrawSpriteEx($nSpriteId, $nSourceX, $nSourceY, $nSourceWidth, $nSourceHeight, $nDestinationX, $nDestinationY, $nTextureId, $nColor = 0xFFFFFFFF, $nRotation = 0, $nScaleX = 1, $nScaleY = 1, $nCenterX = 0, $nCenterY = 0)
    _A2DSpriteBegin($nSpriteId)
    _A2DDrawSpriteEx($nSpriteId, $nSourceX, $nSourceY, $nSourceWidth, $nSourceHeight, $nDestinationX, $nDestinationY, $nColor, $nTextureId, $nRotation, $nScaleX, $nScaleY, $nCenterX, $nCenterY)
    _A2DSpriteEnd($nSpriteId)   
EndFunc

work ?

Hmm.. I'm not sure :). It works perfectly fine if you put that function's code inside the main while loop.. very strange. Edited by chris95219
Link to comment
Share on other sites

  • 2 weeks later...

noob question, my first reply using autoeat >>> why i have always an error like this?

"

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

return ^ ERROR

>Exit code: 1 Time: 0.63"

Edited by crashburn
Link to comment
Share on other sites

still no one answer?

i got here an error what should i do?

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

return ^ ERROR

error : Unknown Function Name

someone? pls reply ty

Link to comment
Share on other sites

It's because you don't have the A2D.dll file in the directory of your script or you haven't told the script the correct location for it.

still no one answer?

i got here an error what should i do?

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

return ^ ERROR

error : Unknown Function Name

someone? pls reply ty

Link to comment
Share on other sites

I've been having problems with my kidneys, and apparently my doctor thinks I have kidney stones. - I have to go see a urologist sometime this month... :rolleyes:.

You must drink more water. Much water. It is the best prevention...

Edit: Also it is recommendable beer in moderate

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

  • 7 months later...

I noticed that there have been no new messages since June 2007. I downloaded A2D.zip and have had no success trying to run any of the examples (using Go or what is generated with Build). I am wondering if something is "broke" in either AutoIt or SciTE in the time since this was first released.

I am running the latest v3.2.10.0 AutoIt and SciTE on Windows XP Pro with SP2.

I get the following error for all the demo programs:

C:\AutoItProjects\A2D\A2D.au3 (189) : ==> Unknown function name.:

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

return ^ ERROR

I updated DirectX to the recommended version. A2D.dll is located in both the A2D and A2D/Demos directories, and I even tried copying d3dx9_32.dll into the demo directory. I still get the same error.

I think it could be something with how plugins are handled.

In the original A2D.au3, there is the following:

;Hush compiler about plugin functions

#compiler_plugin_funcs = A2DCreateDevice

First of all, the documentation on plugins is nonexistent in the current AutoIt help. I could not find anywhere where #compiler_plugin_funcs is mentioned or defined. I couldn't find anything in SciTE.

Curiously, if SyntaxCheck Prod is applied to A2D.au3, it reports "Found OLD #Compiler Directives" and when I let it update, it converts all the "#compiler_plugin_funcs =" to "#AutoIt3Wrapper_plugin_funcs=". Even with this change, I still get the same error.

If I comment out the lines with "#AutoIt3Wrapper_plugin_funcs=" and then try to run the demo program I get a pile of the following type errors:

C:\AutoItProjects\A2D\Demos\A2D.au3(160,102) : ERROR: A2DCreateDevice(): undefined function.

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^

So apparently, the compiler directive to hush complaints does work. The problem seems to be that the compiler is not linking to the functions in the dll.

Does anyone know how to fix this problem?

Link to comment
Share on other sites

Hmm... that's interesting. I'm not sure why it did that for you, and yet it works for others. I can't exactly reproduce that because it runs fine for me (with the latest beta).

On a related note, I doubt anyone does, but it's worth a shot. Does anybody have the source to A2D? I would like to make a few changes/updates but I no longer have the source.

Link to comment
Share on other sites

FYI:

I found the problem. Maybe someone else can benefit from my 2 day search for resolve the following problem every time I tried to run the sample files on A2D.zip.

C:\AutoItProjects\A2D\A2D.au3 (189) : ==> Unknown function name.:

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

return ^ ERROR

The most useful clue was when I found an entry for the error in the event viewer (system). It reported:

Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.

A little Googling eventually produced the following suggestion:

You may need to download and install the Microsoft Visual C++ 2005 Redistributable Package:

It can be found at:

http://www.microsoft.com/downloads/details...;displaylang=en

Once I downloaded and installed this, the error went away.

My guess is that A2D.dll must have been built with MVC++ 2005. The author of the .dll and the UDF had this on their computer. I did not. They couldn't detect a problem. I struggled.

Despite the struggle, it was a good learning experience. I want to learn C++ and try to develop AutoIt plugins. I ask chris95219 to publish/document the source to A2D.dll so the rest of us can learn from his experience.

Link to comment
Share on other sites

FYI:

I found the problem. Maybe someone else can benefit from my 2 day search for resolve the following problem every time I tried to run the sample files on A2D.zip.

C:\AutoItProjects\A2D\A2D.au3 (189) : ==> Unknown function name.:

return A2DCreateDevice($hParent, $nWidth, $nHeight, $nFormat, $nDeviceType, $nWindowed, $nSwapEffect)

return ^ ERROR

The most useful clue was when I found an entry for the error in the event viewer (system). It reported:

Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.

A little Googling eventually produced the following suggestion:

You may need to download and install the Microsoft Visual C++ 2005 Redistributable Package:

It can be found at:

http://www.microsoft.com/downloads/details...;displaylang=en

Once I downloaded and installed this, the error went away.

My guess is that A2D.dll must have been built with MVC++ 2005. The author of the .dll and the UDF had this on their computer. I did not. They couldn't detect a problem. I struggled.

Despite the struggle, it was a good learning experience. I want to learn C++ and try to develop AutoIt plugins. I ask chris95219 to publish/document the source to A2D.dll so the rest of us can learn from his experience.

Right. That makes sense.

I'll post the source as soon as I find it.

Edited by chris95219
Link to comment
Share on other sites

  • 1 month later...

i have a question, i have a Direct X model (.X) file, i want to load it, and then apply a .dds texture, i also have an animation file but i dunno how far we can go with this, so any help would be appiciated

Spoiler

Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)-----------------------------------

 

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...

Hi, I really really like what you've done here - it's easier to use than prospeed >_<

I'd like to ask you 2 questions:

1. What is the difference between:

$SpriteTexture1 = _A2DCreateTexture("texture1.dds")
$SpriteTexture2 = _A2DCreateTexture("texture2.dds")
$Sprite1 = _A2DCreateSprite()
$Sprite2 = _A2DCreateSprite()

_A2DSpriteBegin($Sprite1) 
_A2DDrawSprite($Sprite1, 300, 400, $SpriteTexture1, 0xFFFFFFFF, $Rotation, 60, 50, 300, 98)
_A2DSpriteEnd($Sprite1)
_A2DSpriteBegin($Sprite2) 
_A2DDrawSprite($Sprite2, 300, 400, $SpriteTexture2, 0xFFFFFFFF, $Rotation, 60, 50, 300, 98)
_A2DSpriteEnd($Sprite2)

and

$SpriteTexture1 = _A2DCreateTexture("texture1.dds")
$SpriteTexture2 = _A2DCreateTexture("texture2.dds")
$Sprite = _A2DCreateSprite()

_A2DSpriteBegin($Sprite) 
_A2DDrawSprite($Sprite, 300, 400, $SpriteTexture1, 0xFFFFFFFF, $Rotation, 60, 50, 300, 98)
_A2DDrawSprite($Sprite, 300, 400, $SpriteTexture2, 0xFFFFFFFF, $Rotation, 60, 50, 300, 98)
_A2DSpriteEnd($Sprite)

I saw that you can create only one sprite and draw whatever texture you need with it but this doesn't seem right to me...

2. I can build and distribute free games with this library... right??? :(

EDIT: 3. I initialized a fullscreen dx device and switched to another app using alt-tab. How do I resurrect the fullscreen-device-window? It won't work by simply maximizing the window...

Cheers!

Edited by madflame991
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...