I work a little on it with the first example.
Code: Select all
Enumeration
#IRRDLL
EndEnumeration
If OpenLibrary(#IRRDLL, "IRRlichtWrapper.dll")
If ExamineLibraryFunctions(#IRRDLL)
i=0
While NextLibraryFunction()
func$ = LibraryFunctionName()
Debug Str(i)+"-"+func$
i+1
Wend
EndIf
EndIf
Procedure IRRStart( device_type.l, iwidth.l, iheight.l, fullscreen.l, use_shadows.l, iCaptureMouse.l)
*F = GetFunction(#IRRDLL, "IRRStart")
If *F
res=CallFunctionFast(*F,device_type.l, iwidth.l, iheight.l, fullscreen.l, use_shadows.l, iCaptureMouse.l)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrSetWindowCaption(text.s)
*F = GetFunction(#IRRDLL, "IrrSetWindowCaption")
If *F
res=CallFunctionFast(*F,text.s)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrAddStaticText(text.s,TopX.l,TopY.l,BotX.l,BotY.l,border.l,wordwrap.l)
*F = GetFunction(#IRRDLL, "IrrAddStaticText")
If *F
res=CallFunctionFast(*F,text.s,TopX.l,TopY.l,BotX.l,BotY.l,border.l,wordwrap.l)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrRunning()
*F = GetFunction(#IRRDLL, "IrrRunning")
If *F
res=CallFunctionFast(*F)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrBeginScene(red.l,green.l,blue.l)
*F = GetFunction(#IRRDLL, "IrrBeginScene")
If *F
res=CallFunctionFast(*F,red.l,green.l,blue.l)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrDrawGUI()
*F = GetFunction(#IRRDLL, "IrrDrawGUI")
If *F
res=CallFunctionFast(*F)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrEndScene()
*F = GetFunction(#IRRDLL, "IrrEndScene")
If *F
res=CallFunctionFast(*F)
EndIf
ProcedureReturn res
EndProcedure
Procedure IrrStop()
*F = GetFunction(#IRRDLL, "IrrStop")
If *F
res=CallFunctionFast(*F)
EndIf
ProcedureReturn res
EndProcedure
; Procedure IrrSetWindowCaption(text.s)
; ProcedureReturn CallFunction(#IRRDLL, "IrrSetWindowCaption",text.s)
; EndProcedure
; Procedure IrrAddStaticText(text.s,TopX.l,TopY.l,BotX.l,BotY.l,border.l,wordwrap.l)
; ProcedureReturn CallFunction(#IRRDLL, "IrrAddStaticText",text.s,TopX.l,TopY.l,BotX.l,BotY.l,border.l,wordwrap.l)
; EndProcedure
; Procedure IrrRunning()
; ProcedureReturn CallFunction(#IRRDLL, "IrrRunning")
; EndProcedure
; Procedure IrrBeginScene(red.l,green.l,blue.l)
; ProcedureReturn CallFunction(#IRRDLL, "IrrBeginScene",red.l,green.l,blue.l)
; EndProcedure
; Procedure IrrDrawGUI()
; ProcedureReturn CallFunction(#IRRDLL, "IrrDrawGUI")
; EndProcedure
; Procedure IrrEndScene()
; ProcedureReturn CallFunction(#IRRDLL, "IrrEndScene")
; EndProcedure
; Procedure IrrStop()
; ProcedureReturn CallFunction(#IRRDLL, "IrrStop")
; EndProcedure
Enumeration 0
#IRR_EDT_NULL; = 0 ' a NULL device with no display
#IRR_EDT_SOFTWARE; ' #IRRlichts default software renderer
#IRR_EDT_SOFTWARE2; ' An improved quality software renderer
#IRR_EDT_OPENGL ; ' hardware accelerated OpenGL renderer
#IRR_EDT_DIRECT3D8 ; ' hardware accelerated DirectX 8 renderer
#IRR_EDT_DIRECT3D9 ; ' hardware accelerated DirectX 9 renderer
EndEnumeration
Enumeration 0;IRR_MATERIAL_FLAGS
#IRR_EMF_WIREFRAME ;= 0 ; render as wireframe outline
#IRR_EMF_GOURAUD_SHADING ; render smoothly across polygons
#IRR_EMF_LIGHTING ; material is effected by lighting
#IRR_EMF_ZBUFFER ; enable z buffer
#IRR_EMF_ZWRITE_ENABLE ; can write as well as read z buffer
#IRR_EMF_BACK_FACE_CULLING ; cull polygons facing away
#IRR_EMF_BILINEAR_FILTER ; enable bilinear filtering
#IRR_EMF_TRILINEAR_FILTER ; enable trilinear filtering
#IRR_EMF_ANISOTROPIC_FILTER ; reduce blur in distant textures
#IRR_EMF_FOG_ENABLE ; enable fogging in the distance
#IRR_EMF_NORMALIZE_NORMALS ; use when scaling dynamically lighted models
EndEnumeration
; Material Types
Enumeration 0;IRR_MATERIAL_TYPES
#IRR_EMT_SOLID; = 0 ; Standard solid rendering uses one texture
#IRR_EMT_SOLID_2_LAYER ; 2 blended textures (not available on OpenGL)
#IRR_EMT_LIGHTMAP ; 2 textures: 0=color 1=lighting level
#IRR_EMT_LIGHTMAP_ADD ; ... as above but adds levels
#IRR_EMT_LIGHTMAP_M2 ; ... as above but multiplies levels by 2
#IRR_EMT_LIGHTMAP_M4
#IRR_EMT_LIGHTMAP_LIGHTING ; ... as above with dynamic lighting
#IRR_EMT_LIGHTMAP_LIGHTING_M2
#IRR_EMT_LIGHTMAP_LIGHTING_M4
#IRR_EMT_DETAIL_MAP ; 2 textures blended one can be scaled
#IRR_EMT_SPHERE_MAP
#IRR_EMT_REFLECTION_2_LAYER
#IRR_EMT_TRANSPARENT_ADD_COLOR
#IRR_EMT_TRANSPARENT_ALPHA_CHANNEL
#IRR_EMT_TRANSPARENT_ALPHA_CHANNEL_REF
#IRR_EMT_TRANSPARENT_VERTEX_ALPHA
#IRR_EMT_TRANSPARENT_REFLECTION_2_LAYER
#IRR_EMT_NORMAL_MAP_SOLID
#IRR_EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR
#IRR_EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA
#IRR_EMT_PARALLAX_MAP_SOLID
#IRR_EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR
#IRR_EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA
#IRR_EMT_FORCE_32BIT ;= &h7fffffff
EndEnumeration
; Mouse events
Enumeration 0;IRR_MOUSE_EVENTS
#IRR_EMIE_LMOUSE_PRESSED_DOWN; = 0
#IRR_EMIE_RMOUSE_PRESSED_DOWN
#IRR_EMIE_MMOUSE_PRESSED_DOWN
#IRR_EMIE_LMOUSE_LEFT_UP
#IRR_EMIE_RMOUSE_LEFT_UP
#IRR_EMIE_MMOUSE_LEFT_UP
#IRR_EMIE_MOUSE_MOVED
#IRR_EMIE_MOUSE_WHEEL
EndEnumeration
; MD2 Animation sequences
Enumeration 0;IRR_MD2_ANIM_SEQUENCES
#IRR_EMAT_STAND ;= 0
#IRR_EMAT_RUN
#IRR_EMAT_ATTACK
#IRR_EMAT_PAIN_A
#IRR_EMAT_PAIN_B
#IRR_EMAT_PAIN_C
#IRR_EMAT_JUMP
#IRR_EMAT_FLIP
#IRR_EMAT_SALUTE
#IRR_EMAT_FALLBACK
#IRR_EMAT_WAVE
#IRR_EMAT_POINT
#IRR_EMAT_CROUCH_STAND
#IRR_EMAT_CROUCH_WALK
#IRR_EMAT_CROUCH_ATTACK
#IRR_EMAT_CROUCH_PAIN
#IRR_EMAT_CROUCH_DEATH
#IRR_EMAT_DEATH_FALLBACK
#IRR_EMAT_DEATH_FALLFORWARD
#IRR_EMAT_DEATH_FALLBACKSLOW
#IRR_EMAT_BOOM
EndEnumeration
;{
#IRR_OFF=0
#IRR_ON=1
; Input definitions
#IRR_KEY_UP=0
#IRR_KEY_DOWN=1
; System Device definitions
#IRR_WINDOWED=0
#IRR_FULLSCREEN=1
#IRR_NO_SHADOWS=0
#IRR_SHADOWS=1
#IRR_IGNORE_EVENTS=0
#IRR_CAPTURE_EVENTS=1
#IRR_LINEAR_FOG=0
#IRR_EXPONENTIAL_FOG=1
; Filing system definitions
#IRR_USE_CASE=0
#IRR_IGNORE_CASE=1
#IRR_USE_PATHS=0
#IRR_IGNORE_PATHS=1
; 2D image definitions
#IRR_IGNORE_ALPHA=0
#IRR_USE_ALPHA=1
; Node definitions
#IRR_INVISIBLE=0
#IRR_VISIBLE=1
#IRR_ONE_SHOT=0
#IRR_LOOP=1
; Particle definitions
#IRR_NO_EMITTER=0
#IRR_DEFAULT_EMITTER=1
; GUI Interface definitions
#IRR_GUI_NO_BORDER=0
#IRR_GUI_BORDER=1
#IRR_GUI_NO_WRAP=0
#IRR_GUI_WRAP=1
;}
IRRStart( #IRR_EDT_OPENGL, 400, 200, #IRR_WINDOWED, #IRR_NO_SHADOWS, #IRR_IGNORE_EVENTS )
; Set the title of the display
IRRSetWindowCaption( "Example 01: Hello World - The GUI" )
; add a static text object to the graphical user interface, at the moment
; this is the only interface object we support. The text will be drawn inside
; the defined rectangle, the box will not have a border and the text will not
; be wrapped around if it runs off the end
IRRAddStaticText( "Hello World", 4,0,200,16, #IRR_GUI_NO_BORDER, #IRR_GUI_NO_WRAP )
; while the scene is still running
Repeat
; begin the scene, erasing the canvas to white before rendering
IRRBeginScene( 255,255,255 )
; draw the Graphical User Interface
IRRDrawGUI()
; end drawing the scene and render it
IRREndScene()
Until IRRRunning()
; -----------------------------------------------------------------------------
; Stop the #IRRlicht engine and release resources
IRRStop()