Is this much code?

For everything that's not in any way related to PureBasic. General chat etc...
DarkDragon
Addict
Addict
Posts: 2347
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Is this much code?

Post by DarkDragon »

Well, hello,

I implemented a triangle collision in my engine, and now I want to know if this is much user-code for this little demo:

http://www.bradan.net/downloads/tricol.zip

Code: Select all

SF3DInit()

ID = SF3DCreate(0, 0, 800, 600, #PB_Window_ScreenCentered | #PB_Window_SystemMenu, "Test")

SF3DLoadMesh(0, "rutsche.sfm", 0, 0, 0)
SF3DRotateMesh(0, 0, 270, 0)
SF3DCube(1, -2.5, 1.5, 0.0)
SF3DScaleMesh(1, 0.5, 0.5, 0.5)
SF3DScaleMesh(0, 1.5, 1.5, 1.5)
SF3DLoadTexture(0, "tex0.bmp", 0)
SF3DSetMeshTexture(0, 0)
SF3DSetMeshTexture(1, 0)

Speed.f = ValF(InputRequester("Give me Speed", "Speed:", "0.005"))

Repeat
  SF3DSetCamera(45.0, 0.0, 0.0, -7.0, 0.0, 0.0, 0.0, 0.1, 50.0)
  
  SF3DClearBuffers(ID)
  SF3DDrawScene()
  
  SF3DMoveMesh(1, 0.0, Speed*-2, 0, 0)
  SF3DMoveMesh(1, Speed, 0.0, 0, 0)
  
  SF3DFlipBuffers(ID)
Until WindowEvent() = #PB_Event_CloseWindow
End

:roll:

I will optimize the triangle collision very hard in the next step.
bye,
Daniel