Hi PureBasic users
Just want to tell that , OgreMagic is supporting PureBasic now. So you can easlly use OgreMagic Library with your favorite basic language.
Here is a small test programe.
;**********************************************
;
;
; OgreMagic Library with PureBasic Test
;
; By Emil Halim
;
; 22/8/2007
;
;**********************************************
XIncludeFile #PB_Compiler_Home + "Includes\Imports\Dx9.pbi"
XIncludeFile #PB_Compiler_Home + "Includes\Imports\OgreMagic.pbi"
Global D3DDevice.IDirect3DDevice9
OpenWindow(1,0,0,640,480,"OgreMagic with PureBasic",#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget )
SetWindowPos_(WindowID(1),#HWND_TOPMOST,0,0,0,0,#SWP_NOSIZE|#SWP_NOMOVE)
D3DDevice = D3D_OpenWindowedScreen(WindowID(1),640,480)
InitialMagicLibrary(D3DDevice,640,480)
If(ML_FileExist("MagicMedia.cfg"))
ML_SetMediaDirectoryFromFile("MagicMedia.cfg")
Else
ML_SetMediaDirectory("../OgreMagic/MagicMedia/")
EndIf
Tweety.l = ML_LoadStaticSprite("Tweety.bmp",0)
ML_SetSpriteColorKeyFromPoint(Tweety,0,0)
Repeat
D3DDevice\Clear(0,0,#D3DCLEAR_TARGET,0,0,0)
D3DDevice\BeginScene()
ML_UseOrthogonalView()
ML_SetAlpha(1.0,#AllPoints)
ML_SetColor(255,255,255,#AllPoints)
ML_SetBlendMode(#ALPHABLEND)
ML_SetSpriteTexture(ML_GetDefualtFont(),0)
ML_SetColor(255,255,0,#AllPoints)
ML_DrawString("Welcome To OgreMagic World",200,350)
ML_SetSpriteTexture(Tweety,0)
ML_DrawSprite(Tweety,320,240)
ML_DrawLogo(0.8,75,60)
ML_UsePerspectiveView()
D3DDevice\EndScene()
D3DDevice\Present(0,0,0,0)
EventID = WindowEvent()
Until EventID = #PB_Event_CloseWindow
D3D_Release(D3DDevice)
End