Page 3 of 8

Posted: Sat Feb 26, 2005 7:06 pm
by S.M.
@Psychophanta

Is S3DR_TestCollision() not enough ? :)
regards
Stefan

Posted: Sat Feb 26, 2005 7:11 pm
by Shannara
Heh, any news on an update/fix to the library?

Posted: Sat Feb 26, 2005 8:00 pm
by Psychophanta
S.M. wrote:@Psychophanta

Is S3DR_TestCollision() not enough ? :)
regards
Stefan
Hi,
Well, mmm... Where is the doc? :)

Albert

Posted: Thu Mar 10, 2005 3:51 am
by Shannara
Heh, I think he forgot about this project or is too busy to post :P

Posted: Thu Mar 10, 2005 5:02 pm
by Psychophanta
yes :roll:

Posted: Thu Mar 10, 2005 7:55 pm
by S.M.
Sorry. There is no update for now. :(
I hadn't much free time.(But maybe I will have time at this weekend :D )
regards
Stefan

Posted: Sun Mar 20, 2005 12:09 pm
by S.M.
Hi

Here is a small update: :wink:
Sprite3DReal 1.1beta

Changes:

Code: Select all

- S3DR_FreeZBuffer() is called automatically
- Converter for x-files added
- support for Meshes
regards
Stefan

Posted: Sun Mar 20, 2005 5:37 pm
by Shannara
Cool, can't wait till you fix the color bug :)

Posted: Mon Mar 28, 2005 11:58 am
by Psychophanta
Moebius,
if you take a look here you'll see the importance of collision detection :wink:
viewtopic.php?t=14507

Posted: Sat Apr 09, 2005 1:26 am
by Shannara
Cool News

Posted: Sat May 14, 2005 8:56 am
by Psychophanta
Hi,
Is stopped this project, or aborted?

Posted: Sat May 14, 2005 2:19 pm
by S.M.
@Psychophanta
neither stopped nor aborted. I hadn't much free time.
But here is a new version: :D
Sprite3DReal v1.2

regards
Stefan

Posted: Sat May 14, 2005 3:41 pm
by Psychophanta
S.M. wrote:@Psychophanta
neither stopped nor aborted. I hadn't much free time.
But here is a new version: :D
Sprite3DReal v1.2
I see.
THANX :!: :D

Posted: Sat May 14, 2005 5:01 pm
by Shannara
Looks nice :) Any chance to add into the readme file what bugs were fixed as well?

Posted: Sat May 14, 2005 9:45 pm
by Shannara
Here is the newest update, the tile is now 32x32, yet the library stretches it out to 256x256 .. maybe I am doing something wrong ..?

Code: Select all

Global SprWidth.l
Global SprHeight.l

InitSprite()
InitSprite3D()
InitKeyboard()

OpenWindow(1,0,0,800,600,#PB_Window_ScreenCentered,"Texture Coordinates")
OpenWindowedScreen(WindowID(),0,0,800,600,0,0,0)

S3DR_CreateZBuffer()

;LoadSprite(1, "grass.bmp",#PB_Sprite_Texture)
CreateSprite(1, 32,32,#PB_Sprite_Texture)
StartDrawing(SpriteOutput(1))
Box(0,0,32,32,RGB(255,255,255))
StopDrawing() 
SprWidth = SpriteWidth(1)
SprHeight = SpriteHeight(1)

Quit = #False
Repeat
  EventID.l = WindowEvent()
  If EventID = #PB_Event_CloseWindow  ; If the user has pressed on the close button
    Quit = #True
  EndIf
  
  Start3D()
  
  S3DR_BeginReal3D()
  
  S3DR_ClearScreenAndZBuffer(#blue)
  
  S3DR_SelectTexture(1)
  S3DR_SetDiffuseColors(RGB(0,255,0),RGB(255,0,0),RGB(0,0,255),RGB(0,0,0))
  ;S3DR_SetDiffuseColors(RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255))
  
  X1=10
  Y1=10
  
  X2=SprWidth-10
  Y2=10
  
  X3=10
  Y3=SprHeight-10
  
  X4=SprWidth-10
  Y4=SprHeight-10
  
  ;convert the pixel-coordinates to texture-coordinates.
  TU1.f=X1/SprWidth
  TV1.f=Y1/SprHeight
  
  TU2.f=X2/SprWidth
  TV2.f=Y2/SprHeight
  
  TU3.f=X3/SprWidth
  TV3.f=Y3/SprHeight
  
  TU4.f=X4/SprWidth
  TV4.f=Y4/SprHeight
  
  
  ; tu1,tv1     tu2,tv2
  ;    +---------+
  ;    |         |
  ;    |         |
  ;    |         |
  ;    |         |
  ;    |         |
  ;    +---------+
  ; tu3,tv3     tu4,tv4
  
  
  S3DR_SetTextureCoordinates(TU1.f,TV1.f,TU2.f,TV2.f,TU3.f,TV3.f,TU4.f,TV4.f)
  
  ;             X1  Y1  Z1  X2  Y2  Z2  X3  Y3  Z3  X4  Y4  Z4
  S3DR_Draw3D(  -1,  1,  5,  1,  1,  5, -1, -1,  5,  1, -1,  5);draws the selected sprite
  
  S3DR_EndReal3D()
  
  Stop3D()
  
  FlipBuffers()
  
  ExamineKeyboard()
  If KeyboardPushed(#PB_Key_Escape)
    Quit = #True
  EndIf
Until Quit = #True

S3DR_FreeZBuffer()