Latest News - 13-November-2005 / 00:40
Here is an actual overview of all keywords in SpriteDX9 v0.58 - Download: http://www.deeem2031.de/PB/SpriteDX9.zip DOWNLOAD LINK !!!
BoxDX9(x,y,width,height,RGB)
CatchSpriteDX9(Buffer, Size)
CatchTextureDX9(Buffer, Size)
CheckResolutionDX9(depth, flags)
ClearScreenDX9(RGBColor)
CloseScreenDX9()
ColorFilterDX9()
ConvertColorDX9(*D3D9_DrawingBuffer,RGBA)
CreateSpriteDX9(width, height)
CreateTextureDX9(width,height)
DisplaySpriteDX9(hSprite,x,y)
DisplayTextureDX9(texture,x.f,y.f[,*DisplaySettings.DisplayTexture_Struc])
DrawingBufferStartDX9(*D3D9_DrawingBuffer)
DrawingBufferStartTextureDX9(*D3D9_DrawingBuffer,hTexture)
DrawingBufferPlotDX9(*D3D9_DrawingBuffer,x,y, RGBA[,flags])
DrawingBufferStopDX9()
DrawingBufferStopTextureDX9(hTexture)
DrawTextDX9()
FlipBuffersDX9()
FreeFontDX9()
FreeSpriteDX9(hSprite)
FreeTextureDX9(hTexture)
GetLineWidthDX9()]
InitSpriteDX9()
LineDX9()
LoadFontDX9()]
LoadSpriteDX9(Filename.s)
LoadTextureDX9(filename.s)
OpenScreenDX9(w,h,d,t.s)
RGBA(R,G,B,A)
SaveSpriteDX9(hTexture, Filename.s, Format)
SaveTextureDX9(hTexture, Filename.s, Format)
ScreenDX9Output()
SetAlphaBlendingDX9(enable,src,dest)
SetLineWidthDX9()]
StartDX9([flags])
StopDX9()
Whats new in version 0.58:
- SetTextureRotationCenterDX9() added
- ZoomTextureDX9() added
- RotateTextureDX9() added
Now Deeem2031 will try to solve the Alt+Tab problem and then he could start with 3D stuff

Whats new in version 0.579:
- LoadTexture() has been fixed and seems to work now!
LoadTextureDX9() works now, however Deeem2031 always still not reached the state he wanted to have for version 0.58! So here is 0.579 Smile! For changes since 0.57 just simple read the last postings. Only difference are the fixed LoadTextureDX9(), updated helpfile and resident file!
feedback is welcome

Code: Select all
Just a small example by Deeem2031 for v0.56+:
----------------------------------------------------------
InitSpriteDX9()
InitKeyboard()
Debug CheckResolutionDX9(32,#PB_D3D_Windowed)
If OpenScreenDX9(800,600,32,OpenWindow(0,0,0,800,600,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,":)"),#PB_D3D_Windowed|#PB_D3D_AlphaBlending)
;SetWindowPos_(WindowID(),#HWND_TOPMOST,0,0,0,0,#SWP_NOSIZE|#SWP_NOMOVE)
hTexture = LoadTextureDX9("c:\link2.png") ;You should free the texture before you exit the program the library don't do it by itself (supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, .tga)
If hTexture = 0
CloseScreenDX9()
Debug "Couldn't load the texture!"
End
EndIf
hTexture2 = CreateTextureDX9(256,256) ;You should free the texture before you exit the program the library don't do it by itself
If hTexture2 = 0
CloseScreenDX9()
Debug "Couldn't create the texture!"
End
EndIf
hSprite= LoadSpriteDX9("c:\link2.png")
If hSprite = 0
CloseScreenDX9()
Debug "Couldn't load the sprite!"
End
EndIf
If DrawingBufferStartDX9(hSprite, DrawingBuffer.D3D9_DrawingBuffer)
For y = 0 To 56-1
For x = 0 To 56-1
DrawingBufferPlotDX9(DrawingBuffer,x,y,RGB(x*4,0,y*4))
Next
Next
DrawingBufferStopDX9(hSprite)
EndIf
hTexture_DisplaySettings.DisplayTexture_Struc
hTexture_Center.POINT
hTexture_SrcRect.RECT
;ClipTexture...
hTexture_SrcRect\top = 0
hTexture_SrcRect\left = 0
hTexture_SrcRect\bottom = 100
hTexture_SrcRect\right = 100
hTexture_DisplaySettings\pSrcRect = hTexture_SrcRect
;SetCenter...
hTexture_Center\x = 50
hTexture_Center\y = 50
hTexture_DisplaySettings\pCenter = hTexture_Center
;I don't like red:
hTexture_DisplaySettings\ColorFilter = $FF00FFFF ;Don't display the red channel (AARRGGBB)
If DrawingBufferStartTextureDX9(hTexture2,@DrawingBuffer.D3D9_DrawingBuffer)
Debug DrawingBuffer\PixelBuffer
Debug DrawingBuffer\Pitch
Debug DrawingBuffer\BytesperPixel
For y = 0 To 256-1
For x = y To 256-1
DrawingBufferPlotDX9(DrawingBuffer,x,y,RGBA($FF,x,y,Random(255)))
Next
For x = 0 To y-1
DrawingBufferPlotDX9(DrawingBuffer,x,y,$FFFFFFFF!RGBA($FF,x,y,$80)) ;Invert color
Next
Next
DrawingBufferStopTextureDX9(hTexture2)
EndIf
alpha.f = 0.0
Repeat
alpha + 0.01
ClearScreenDX9(RGBA(0,0,0,0))
BoxDX9(5,5,600,400,RGBA(150,150,150,255))
If DrawingBufferStartDX9(DrawingBuffer.D3D9_DrawingBuffer)
Color = ConvertColorDX9(DrawingBuffer,RGBA(255,0,0,$FF))
For y = 10 To 1*256-1
For x = 10 To 2*256-1
DrawingBufferPlotDX9(DrawingBuffer,x,y,Color,#PB_Plot_NoConvert)
Next
Next
DrawingBufferStopDX9()
EndIf
SetAlphaBlendingDX9(#True,#D3DBLEND_SRCALPHA,#D3DBLEND_ONE) ;Default
StartDX9() ;>
DisplayTextureDX9(hTexture,100.0,600-Abs(500.0*Sin(alpha)),hTexture_DisplaySettings)
DisplayTextureDX9(hTexture2,200.0,600-Abs(500.0*Sin(alpha)))
StopDX9() ;<
DisplaySpriteDX9(hSprite,Abs(500.0*Sin(alpha)),100)
FlipBuffersDX9()
DisableDebugger
WE = WindowEvent()
While WE
If WE = #PB_Event_CloseWindow
quit = 1
EndIf
WE = WindowEvent()
Wend
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape) Or quit
EnableDebugger
FreeSpriteDX9(hSprite)
FreeTextureDX9(hTexture)
FreeTextureDX9(hTexture2)
CloseScreenDX9()
Else
Debug "OpenScreenDX9-Error"
EndIf