October 09, 2024, 04:45:40 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Does anyone have the "functions.inc" file

Started by pistol350, September 15, 2007, 08:24:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pistol350

Hi All,
I just wondered if by chance,someone out there could still have the "functions.inc" file that could be used with the sample code below written by Lewis.
Well , i no longer remember if Lewis wrote the include file himself but i had the .zip file with the .exe + other files which i can't find anymore.By the way, i am not sure the "include" file was included.
If one could post the former zip + the "functions.inc"  file , it would be great.

PS : Just a reminder to tell you that only those who purchased the 3D beta Pack from the Pixia days can get this code compile as a special library is required.

Thanks.



'############################################'
'###                                      ###'
'### Program Information - Function Lists ###'
'###                                      ###'
'############################################'
'### BrowserHandler()                     ###'
'### Handles Browser Window Messages      ###'
'###--------------------------------------###'
'### CreateLights()                       ###'
'### Sets Up Lights For Main Scene        ###'
'###--------------------------------------###'
'### CreateMainScene()                    ###'
'### Create Scene And Adds Objects To It  ###'
'###--------------------------------------###'
'### DrawMainScene()                      ###'
'### Clears Scene And Prepares To Render  ###'
'###--------------------------------------###'
'### DrawMiniMap()                        ###'
'### Sets Up The Minimap Ready For Render ###'
'###--------------------------------------###'
'### GetRenderInfo()                      ###'
'### Sets Up Fog And Selects Camera       ###'
'###--------------------------------------###'
'### GetUserInput()                       ###'
'### Gets Users Input To Control Camera   ###'
'###--------------------------------------###'
'### Load2DScreen()                       ###'
'### Displays The 2D "Loading..." Screen  ###'
'###--------------------------------------###'
'### Load3DScreen()                       ###'
'### Displays The 3D "Loading..." Screen  ###'
'###--------------------------------------###'
'### LoadCameras()                        ###'
'### Creates The Cameras For The Scene    ###'
'###--------------------------------------###'
'### LoadLandscape()                      ###'
'### Loads The Landscape For The Scene    ###'
'###--------------------------------------###'
'### LoginHandler()                       ###'
'### Handles The Login Dialog Messages    ###'
'###--------------------------------------###'
'### MainHandler()                        ###'
'### Handles The Browser Window Messages  ###'
'###--------------------------------------###'
'### Manager2DHandler()                   ###'
'### Handles The 2D Window Messages       ###'
'###--------------------------------------###'
'### Manager3DHandler()                   ###'
'### Handles The 3D Window Messages       ###'
'###--------------------------------------###'
'### Render2DScreen()                     ###'
'### Renders The Prepared 2D Screen       ###'
'###--------------------------------------###'
'### Render3DScreen()                     ###'
'### Renders The Prepared 3D Screen       ###'
'###--------------------------------------###'
'### SetupCollisions()                    ###'
'### Sets Up The Collisions Of 3D Objects ###'
'###--------------------------------------###'
'### ShowDebugInformation()               ###'
'### Shows The Position And Mode Info etc ###'
'###--------------------------------------###'
'### ShutdownDirectX()                    ###'
'### Destroy Objects And Closes Screen    ###'
'###--------------------------------------###'
'############################################'

'##############################'
'### Pre Processor Commands ###'
'##############################'

$MAIN
'AUTODEFINE "OFF"

'##############################'
'### Include Required Files ###'
'##############################'

$INCLUDE "Functions.inc"

'#######################'
'### Dfine Constants ###'
'#######################'

CONST DIK_UP = 0xC8
CONST DIK_DOWN = 0xD0
CONST DIK_LEFT = 0xCB
CONST DIK_RIGHT = 0xCD

CONST DIK_PRIOR = 0xC9
CONST DIK_NEXT = 0xD1

CONST DIK_Z = 0x2C
CONST DIK_X = 0x2D

CONST DIK_RSHIFT = 0x36
CONST DIK_LSHIFT = 0x2A

'###########################'
'### Declare API Imports ###'
'###########################'

DECLARE IMPORT, GetCommandLineA(),STRING
DECLARE IMPORT,timeGetTime(),UINT
DECLARE IMPORT,ZeroMemory ALIAS RtlZeroMemory(source as POINTER,size as INT)

'#########################'
'### Define Data Types ###'
'#########################'

DEF Main as WINDOW
DEF Browser as WINDOW
DEF Manager2D as WINDOW
DEF Manager3D as WINDOW

DEF dlgLogin as DIALOG

DEF RunMain as INT
DEF RunLogin as INT
DEF TopToolbarArray[11] as INT
DEF BottomToolbarArray[11] as INT
DEF startTime as INT

DEF FullCommandLine as STRING
DEF CommandLine as STRING
DEF HTMLPath as STRING

DEF WhiteAlpha as UINT

DEF fadjust as FLOAT
DEF fTarget as FLOAT
DEF CameraFOV as FLOAT

DEF Cam1 as DXCAMERA
DEF Cam2 as DXCAMERA
DEF pLandscape as DXOBJECT
DEF pScene as DXOBJECT
DEF pMesh as DXOBJECT

DEF pBoxCam1 as DXOBJECT
DEF pBoxCam2 as DXOBJECT

DEF Background as POINTER
DEF MapPointer1 as POINTER
DEF MapPointer2 as POINTER
DEF CurrentCamera as POINTER

DEF pLight as DXLIGHT

DEF Position as VECTOR3
DEF Position1 as VECTOR3
DEF Position2 as VECTOR3
DEF Direction as VECTOR3

'############################'
'### Initialize Variables ###'
'############################'

RunMain = 1

FullCommandLine = GetCommandLineA()
CommandLine = MID$(MID$(FullCommandLine,1,LEN(FullCommandLine)-2),2)
HTMLPath = "res://"+CommandLine+"/"

WhiteAlpha = RGBA(255,255,255,255)

blockSizeX = 50.0f
blockSizeZ = 50.0f
maximumLandHeight = 1000.0f
landTextureScaleX = 0.5f
landTextureScaleZ = 0.5f
grayScaleLightMap = true

CameraFOV = 45.0f

CamToggle = 1

fTarget = 1.0f / 60.0f * 500.0f
fAdjust = 1.0f

ShowInformation = 0
ShowFog = 0

fps=0

'##############################'
'### Create The Main Window ###'
'##############################'

OPENWINDOW Main,0,0,640,480,@NOCAPTION|@MDIFRAME|@MAXIMIZED,0,"3D Testing Suite",&MainHandler

'########################'
'### Create Main Menu ###'
'########################'

LOADMENU(Main,1)

'###########################'
'### Create Main Toolbar ###'
'###########################'

TopToolbarArray = 1,2,0,3,4,5,6,0,7,0,8

IF LOADTOOLBAR(Main,1,98,TopToolbarArray,11,@TBTOP|@TBFLAT|@TBTOOLTIPS|@TBLIST)

   CONTROLCMD Main,98,@TBENABLEBUTTON,2,0
   CONTROLCMD Main,98,@TBENABLEBUTTON,3,0
   CONTROLCMD Main,98,@TBENABLEBUTTON,4,0
   CONTROLCMD Main,98,@TBENABLEBUTTON,5,0
   CONTROLCMD Main,98,@TBENABLEBUTTON,6,0

   CONTROLCMD Main,98,@TBSETLABELS,"Login|Logout|Duno|Duno|Duno|Duno|Exit|Help||"

ENDIF

'#############################'
'### Create Bottom Toolbar ###'
'#############################'

BottomToolbarArray = 9,10,0,11,12,13,14,0,15,0,16

IF LOADTOOLBAR(Main,2,97,BottomToolbarArray,11,@TBBOTTOM|@TBFLAT|@TBTOOLTIPS|@TBLIST)

   CONTROLCMD Main,97,@TBENABLEBUTTON,16,0

   CONTROLCMD Main,97,@TBSETBUTTONSTYLE,11,@TBBUTTONGROUP|@TBBUTTONCHECK
   CONTROLCMD Main,97,@TBSETBUTTONSTYLE,12,@TBBUTTONGROUP|@TBBUTTONCHECK
   CONTROLCMD Main,97,@TBSETBUTTONSTYLE,14,@TBBUTTONCHECK
   CONTROLCMD Main,97,@TBSETBUTTONSTYLE,15,@TBBUTTONCHECK

   CONTROLCMD Main,97,@TBSETLABELS,"FOV +|FOV -|Camera 1|Camera 2|Snap Camera|Show Info|Show Fog|Duno||"

ENDIF

'#############################'
'### Create Browser Window ###'
'#############################'

OPENWINDOW Browser,@USEDEFAULT,0,0,0,@CAPTION|@SYSMENU|@MINIMIZED,Main,"Browser",&BrowserHandler
ATTACHBROWSER(Browser,HTMLPath+"Contents.gkml")

'################################'
'### Create 2D DirectX Window ###'
'################################'

OPENWINDOW Manager2D,0,0,256,256,@CAPTION|@SYSMENU|@NOAUTODRAW|@TOOLWINDOW,Main,"2D Map View",&Manager2DHandler

   IF(ATTACHSCREEN(Manager2D,256,256,TRUE) < 0)

      MESSAGEBOX Manager2D,"Couldn't create DirectX window","Error"

   ELSE

      FILLSCREEN RGB(0,0,0)
      FLIP

   ENDIF

'###########################'
'### Create Login Dialog ###'
'###########################'

CREATEDIALOG dlgLogin,0,0,400,200,@CAPTION|@SYSMENU|@NOAUTODRAW,Main,"Profile Login",&LoginHandler

'################################'
'### Create 3D Manager Window ###'
'################################'

OPENWINDOW Manager3D,256,0,640,480,@SYSMENU|@CAPTION|@NOAUTODRAW|@TOOLWINDOW,Main,"3D Real View",&Manager3DHandler

   IF(DXATTACH3DSCREEN(Manager3D,TRUE) <> 0)

      MESSAGEBOX Manager3D,"Couldn't Attach Screen","Error"

   ELSE

      LoadCameras()

      Load3DScreen()
      Load2DScreen()

      LoadLandscape()

      SetupCollisions()

      CreateMainScene()

      CreateLights()

      DO

         GetRenderInfo()

         GetUserInput()

         DrawMainScene()
         DrawMiniMap()

         ShowDebugInformation()


         Render3DScreen()
         Render2DScreen()

      '--- Wait Until Main Program Exits ---'

      UNTIL RunMain = 0

      ShutdownDirectX()

'############################'
'### Setup Run Peramaters ###'
'############################'

WAITUNTIL RunMain = 0
   CLOSEWINDOW Main
END

'########################################'
'### Subroutine To Manage Main Window ###'
'########################################'

SUB MainHandler

   SELECT @CLASS

      CASE @IDCREATE

         CENTERWINDOW Main

      CASE @IDCLOSEWINDOW

         RunMain = 0

      CASE @IDCONTROL

         IF @NOTIFYCODE = 0

            SELECT @CONTROLID

               CASE 1

                  DOMODAL dlgLogin

               CASE 7

                  RunMain = 0

               CASE 8

                  SHOWWINDOW(Browser,@SWMAXIMIZED)

               CASE 9

                  CameraFOV += 5
                  DXSETFOV(CurrentCamera,DTR(CameraFOV))

               CASE 10

                  CameraFOV -= 5
                  DXSETFOV(CurrentCamera,DTR(CameraFOV))

               CASE 11

                  CamToggle = 1

               CASE 12

                  CamToggle = 2

               CASE 13

                  IF CamToggle = 1

                     DXCAMERALOOKAT(CurrentCamera,Position2.x,Position2.y,Position2.z)

                  ELSE

                     DXCAMERALOOKAT(CurrentCamera,Position1.x,Position1.y,Position1.z)

                  ENDIF

               CASE 14

                  IF ShowInformation = 1

                     ShowInformation = 0

                  ELSE

                     ShowInformation = 1

                  ENDIF

               CASE 15

                  IF ShowFog = 1

                     ShowFog = 0

                  ELSE

                     ShowFog = 1

                  ENDIF

            ENDSELECT

         ENDIF

      CASE @IDMENUPICK

         SELECT @MENUNUM

            CASE 1

               DOMODAL dlgLogin

            CASE 99

               RunMain = 0

         ENDSELECT

   ENDSELECT

   RETURN

ENDSUB

'#########################################'
'### Subroutine To Handle Login Dialog ###'
'#########################################'

SUB LoginHandler

   SELECT @CLASS

      CASE @IDCLOSEWINDOW

         CLOSEWINDOW dlgLogin

      CASE @IDINITDIALOG

         CENTERWINDOW dlgLogin

   ENDSELECT

   RETURN

ENDSUB

'###########################################'
'### Subroutine To Handle Browser Window ###'
'###########################################'

SUB BrowserHandler

   SELECT @CLASS

      CASE @IDCLOSEWINDOW

         SHOWWINDOW Browser,@SWMINIMIZED

      CASE @IDBEFORENAV

         URL = ""

         BROWSECMD(Browser,@GETNAVURL,URL,255)

         IF(MID$(URL,0,3) <> "res")

            BROWSECMD(Browser,@CANCELNAV)
            MESSAGEBOX Browser,"No External Navigation Allowed","Navigation Error",@MB_ICONSTOP

         ENDIF

   ENDSELECT

   RETURN

ENDSUB

'#######################################'
'### Subroutine To Handle 3D Manager ###'
'#######################################'

SUB Manager3DHandler

   SELECT @MESSAGE

      CASE @IDCLOSEWINDOW

         SHOWWINDOW Manager3D,@SWMINIMIZED

   ENDSELECT

   RETURN

ENDSUB

'######################################'
'### Subroutine To Handle 2D Window ###'
'######################################'

SUB Manager2DHandler

   SELECT @CLASS

      CASE @IDCLOSEWINDOW

         SHOWWINDOW Manager2D,@SWMINIMIZED

   ENDSELECT

   RETURN

ENDSUB

'########################################'
'### Subroutine To Load The 3D Screen ###'
'########################################'

SUB Load3DScreen()

   DXCLEAR(RGBA(0,0,0,255))

   DXBEGINSCENE(Cam1)

   DXWRITETEXT(10,10,"Loading...",WhiteAlpha)

   DXENDSCENE

   DXRENDER()

   RETURN

ENDSUB

'########################################'
'### Subroutine To Load The 2D Screen ###'
'########################################'

SUB Load2DScreen()

   Background = LOADSPRITE("MiniMap")

   MapPointer1 = LOADSPRITE("Pointer1")
   MapPointer2 = LOADSPRITE("Pointer2")

   FRONTPEN BackBuffer,RGB(255,255,255)
   DRAWMODE BackBuffer,@TRANSPARENT

   WRITETEXT(10,10,"Loading...")

   FLIP

   RETURN

ENDSUB

'################################################'
'### Subroutine To Load The Cameras And Boxes ###'
'################################################'

SUB LoadCameras()

   Cam1 = DXCREATECAMERA

   DXPOSITIONCAMERA(Cam1,0,0,0)
   DXORIENTCAMERA(Cam1,0.71,-0.21,-0.98,0,1,0)

   DXSETFRONTPLANE(Cam1,0.1)
   DXSETBACKPLANE(Cam1,50000)

   pBoxCam1 = DXCREATEBOX(100,100,100,FALSE)
   DXPOSITIONOBJECT(pBoxCam1,0,0,0)

   '--- Setup Camera 2 ---'

   Cam2 = DXCREATECAMERA

   DXPOSITIONCAMERA(Cam2,0,0,0)
   DXORIENTCAMERA(Cam2,0.71,-0.21,-0.98,0,1,0)

   DXSETFRONTPLANE(Cam2,0.1)
   DXSETBACKPLANE(Cam2,10000)

   pBoxCam2 = DXCREATEBOX(100,100,100,FALSE)
   DXPOSITIONOBJECT(pBoxCam2,0,0,0)

   RETURN

ENDSUB

'####################################'
'### Subroutine To Load Landscape ###'
'####################################'

SUB LoadLandscape()

   pLandscape = DXCREATELANDSCAPE("Map","Lightmap","Coverage","Tile1","Tile2","Tile3",blockSizeX, blockSizeZ, maximumLandHeight, landTextureScaleX, landTextureScaleZ, grayScaleLightMap)

   DXPOSITIONOBJECT(pLandscape,0,0,0)

   RETURN

ENDSUB

'######################################'
'### Subroutine To Setup Collisions ###'
'######################################'

SUB SetupCollisions()

   DXINITCOLLISION(pLandscape,FALSE)

   RETURN

ENDSUB

'#######################################'
'### Subroutine To Create Main Scene ###'
'#######################################'

SUB CreateMainScene()

   pScene = DXCREATESCENE()

   DXADDCHILDOBJECT(pScene,pLight)
   DXADDCHILDOBJECT(pScene,pLandscape)
   DXADDCHILDOBJECT(pScene,pBoxCam1)
   DXADDCHILDOBJECT(pScene,pBoxCam2)

   RETURN

ENDSUB

'###################################'
'### Subroutine To Get Variables ###'
'###################################'

SUB GetRenderInfo()

   IF CamToggle = 1

      CurrentCamera = Cam1

   ELSE

      CurrentCamera = Cam2

   ENDIF

   '--- Fog Settings ---'

   IF ShowFog = 1

      DXENABLECAMERAFOG(CurrentCamera,TRUE)
      DXSETCAMERAFOGCOLOR(CurrentCamera,0,0,0)
      DXSETCAMERAFOGRANGE(CurrentCamera,500,2000)

   ELSE

      DXENABLECAMERAFOG(CurrentCamera,FALSE)

   ENDIF

   '--- Get Camera Position ---'

   Position = DXGETCAMERAPOSITION(CurrentCamera)
   Direction = DXGETCAMERALOOKAT(CurrentCamera)

   Position1 = DXGETCAMERAPOSITION(Cam1)
   Position2 = DXGETCAMERAPOSITION(Cam2)

   startTime = timeGetTime()   

   RETURN

ENDSUB

'####################################'
'### Subroutine To Get User Input ###'
'####################################'

SUB GetUserInput()

   IF KEYDOWN(DIK_UP)

      DXPOSITIONOBJECT(pBoxCam1,Position1.x,Position1.y,Position1.z)
      DXPOSITIONOBJECT(pBoxCam2,Position2.x,Position2.y,Position2.z)

      IF(KEYDOWN(DIK_LSHIFT)) OR (KEYDOWN(DIK_RSHIFT))

         DXMOVECAMERA(CurrentCamera,0.0f,5f * fAdjust)

      ELSE

         DXMOVECAMERA(CurrentCamera,0.0f,1f * fAdjust)

      ENDIF

   ENDIF

   '--- Move Camera Backwards ---'

   IF KEYDOWN(DIK_DOWN)

      DXPOSITIONOBJECT(pBoxCam1,Position1.x,Position1.y,Position1.z)
      DXPOSITIONOBJECT(pBoxCam2,Position2.x,Position2.y,Position2.z)

      IF(KEYDOWN(DIK_LSHIFT)) OR (KEYDOWN(DIK_RSHIFT))

         DXMOVECAMERA(CurrentCamera,0.0f,-5f * fAdjust)

      ELSE

         DXMOVECAMERA(CurrentCamera,0.0f,-1f * fAdjust)

      ENDIF

   ENDIF

   '--- Turn Current Camera Right ---'

   IF KEYDOWN(DIK_RIGHT)

      DXPOSITIONOBJECT(pBoxCam1,Position1.x,Position1.y,Position1.z)
      DXPOSITIONOBJECT(pBoxCam2,Position2.x,Position2.y,Position2.z)

      DXROTATECAMERA(CurrentCamera,1*.01745 * fAdjust,0,0)

   ENDIF

   '--- Turn Camera Left ---'

   IF KEYDOWN(DIK_LEFT)

      DXPOSITIONOBJECT(pBoxCam1,Position1.x,Position1.y,Position1.z)
      DXPOSITIONOBJECT(pBoxCam2,Position2.x,Position2.y,Position2.z)

      DXROTATECAMERA(CurrentCamera,-1*.01745 * fAdjust,0,0)

   ENDIF

   '--- Rotate Camera Left ---'

   IF KEYDOWN(DIK_X)

      DXROTATECAMERA(CurrentCamera,0,0,-1 *.01745 * fAdjust)

   ENDIF

   '--- Rotate Camera Rigth ---'

   IF KEYDOWN(DIK_Z)

      DXROTATECAMERA(CurrentCamera,0,0,1 *.01745 * fAdjust)

   ENDIF

   '--- Look Camera Up ---'

   IF KEYDOWN(DIK_PRIOR)

      DXROTATECAMERA(CurrentCamera,0,-1 *.01745 * fAdjust,0)

   ENDIF

   '--- Look Camera Down ---'

   IF KEYDOWN(DIK_NEXT)

      DXROTATECAMERA(CurrentCamera,0,1 *.01745 * fAdjust,0)

   ENDIF

   RETURN

ENDSUB

'######################################'
'### Subroutine To Show Information ###'
'######################################'

SUB ShowDebugInformation()

   IF ShowInformation = 1

      DXWRITETEXT(15,15,"FPS: "+STR$(fps),WhiteAlpha)
      DXWRITETEXT(15,30,"FOV: "+STR$(CameraFOV),WhiteAlpha)

      DXWRITETEXT(15,60,"X POS: "+STR$(Position.x),WhiteAlpha)
      DXWRITETEXT(15,75,"Y POS: "+STR$(Position.y),WhiteAlpha)
      DXWRITETEXT(15,90,"Z POS: "+STR$(Position.z),WhiteAlpha)

      DXWRITETEXT(15,120,"X DIR: "+STR$(Direction.x),WhiteAlpha)
      DXWRITETEXT(15,135,"Y DIR: "+STR$(Direction.y),WhiteAlpha)
      DXWRITETEXT(15,150,"Z DIR: "+STR$(Direction.z),WhiteAlpha)

      DXWRITETEXT(15,180,"Camera: "+STR$(CamToggle),WhiteAlpha)

      '--- Fog Status ---'

      IF ShowFog = 1

         DXWRITETEXT(15,210,"Fog: On",WhiteAlpha)

      ELSE

         DXWRITETEXT(15,210,"Fog: Off",WhiteAlpha)

      ENDIF

      '--- Who Can See Who? ---'

      IF DXOBJECTINVIEW(Cam1,pBoxCam2)

         DXWRITETEXT(15,240,"Cam 1 See Box 2: Yes",WhiteAlpha)

      ELSE

         DXWRITETEXT(15,240,"Cam 1 See Box 2: No",WhiteAlpha)

      ENDIF

      IF DXOBJECTINVIEW(Cam2,pBoxCam1)

         DXWRITETEXT(15,255,"Cam 2 See Box 1: Yes",WhiteAlpha)

      ELSE

         DXWRITETEXT(15,255,"Cam 2 See Box 1: No",WhiteAlpha)

      ENDIF

   ENDIF

   RETURN

ENDSUB

'#####################################'
'### Subroutine To Draw Main Scene ###'
'#####################################'

SUB DrawMainScene()

   DXCLEAR(RGBA(0,0,0,255))

   '--- Select Camera View To Render ---'

   DXBEGINSCENE(CurrentCamera)

   '--- Draw The Scene ---'

   DXDRAWOBJECT(pScene)

   RETURN

ENDSUB

'###################################'
'### Subroutine To Draw Mini Map ###'
'###################################'

SUB DrawMiniMap()

   DRAWSPRITE(Background)

   PointerPos1X = ABS(Position1.x / 50)
   PointerPos1Z = ABS(Position1.z / 50)

   PointerPos2X = ABS(Position2.x / 50)
   PointerPos2Z = ABS(Position2.z / 50)

   SPRITEDRAWMODE(MapPointer1,@TRANS)
   SPRITEDRAWMODE(MapPointer2,@TRANS)

   SPRITEMASKCOLOR(MapPointer1,RGB(0,0,0))
   SPRITEMASKCOLOR(MapPointer2,RGB(0,0,0))

   IF CamToggle = 1

      DRAWSPRITEXY(MapPointer2,PointerPos2X,PointerPos2Z,BackBuffer)
      DRAWSPRITEXY(MapPointer1,PointerPos1X,PointerPos1Z,BackBuffer)

   ELSE

      DRAWSPRITEXY(MapPointer1,PointerPos1X,PointerPos1Z,BackBuffer)
      DRAWSPRITEXY(MapPointer2,PointerPos2X,PointerPos2Z,BackBuffer)

   ENDIF

   RETURN

ENDSUB

'######################################'
'### Subroutine To Render 3D Screen ###'
'######################################'

SUB Render3DScreen()

   fps = DXRENDERSCENE()

   fAdjust = (timeGetTime() - startTime) / fTarget

   RETURN

ENDSUB

'######################################'
'### Subroutine To Render 2D Screen ###'
'######################################'

SUB Render2DScreen()

   FLIP

   RETURN

ENDSUB

'#########################################'
'### Subroutine To Free Memory Destroy ###'
'###   Objects And Shutdown Direct-X   ###'
'#########################################'

SUB ShutdownDirectX()

   IF pScene <> NULL

      DXFREEOBJECT(pScene)

   ENDIF

   IF Cam1 <> NULL

      DXFREECAMERA(Cam1)

   ENDIF

   IF Cam2 <> NULL

      DXFREECAMERA(Cam2)

   ENDIF

   DXCLOSESCREEN

   CLOSESCREEN

   ENDIF

   RETURN

ENDSUB

'###################################'
'### Subroutine To Create Lights ###'
'###################################'

SUB CreateLights()

   pLight = DXCREATELIGHT(LIGHT_POINT,1)

   DXPOSITIONOBJECT(pLight,0,20,-150)
   DXSETLIGHTATTENUATION(pLight,0,1/200.0,0)
   DXSETLIGHTSPECULAR(pLight,.5,.5,.5,1)
   DXSETLIGHTAMBIENT(pLight,.3,.3,.3,1)

   RETURN

ENDSUB
Regards,

Peter B.

Haim

Sorry,
Could not find such a file, although I did purchase the 3D pak for IBPRO.
Haim

pistol350

Hi Haim,

the include file was not delivered with 3D pak Beta, so don't worry if you don't have it.
I think that probably only  a few users got it.My last chance will be to try to join Lewis ,if anyone find the file.
Thank you anyway.


Regards,
PeterB

Regards,

Peter B.