- Messages
- 374
- Country

Hi,
using the logic behind VGDS I'm experimenting a new thing: I would show a box with a number mapped on a face and each 0.5 secs change to the next in order to create a bouncing counter
(1..2..3..4..5..4..3..2..1)
I create a long texture with square and on each square a number drawn. To tweak I used the BGL_TICK18, here's the code:
The code itself works, but I have a strange effects. The number are shown in a different order. I guess it depends on time calculation...sincerely I dunno how to calculate time fractions. any help?
using the logic behind VGDS I'm experimenting a new thing: I would show a box with a number mapped on a face and each 0.5 secs change to the next in order to create a bouncing counter
(1..2..3..4..5..4..3..2..1)
I create a long texture with square and on each square a number drawn. To tweak I used the BGL_TICK18, here's the code:
Code:
MATERIAL 1,0 ; <255,255,255,255> COUNTER.BMP;;;
IFMSK dian02, BGL_TICK18, 0020h
DRAW_TRI_BEGIN 24, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
BGL_JUMP_32 diend
dian02 label word
IFMSK dian03, BGL_TICK18, 0024h
DRAW_TRI_BEGIN 28, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
BGL_JUMP_32 diend
dian03 label word
IFMSK dian04, BGL_TICK18, 0026h
DRAW_TRI_BEGIN 32, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
BGL_JUMP_32 diend
dian04 label word
IFMSK dian05, BGL_TICK18, 0028h
DRAW_TRI_BEGIN 36, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
BGL_JUMP_32 diend
dian05 label word
IFMSK dian06, BGL_TICK18, 0030h
DRAW_TRI_BEGIN 32, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
BGL_JUMP_32 diend
dian06 label word
IFMSK dian07, BGL_TICK18, 0032h
DRAW_TRI_BEGIN 28, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
BGL_JUMP_32 diend
dian07 label word
DRAW_TRI_BEGIN 24, 4
DRAW_TRI 3, 2, 0 ; poly=12 part=1
DRAW_TRI 0, 1, 3 ; poly=11 part=1
DRAW_TRI_END
diend label word
BGL_RETURN
The code itself works, but I have a strange effects. The number are shown in a different order. I guess it depends on time calculation...sincerely I dunno how to calculate time fractions. any help?
