Hello guys:
I´ve read the wiki article and (i think) all the threads related with animations . My problem is:
I´ve created a multiple animations (traffic cars for be precisely) with 2048 frames and four with 4096 frames, i´ve followed the wiki exactly (i think), parted the file in two (and four for the 4095 frames), then edited the first file, adding the rest of the frames, interpolated the animation, and else. Everything works perfectly but....after about 4 to 6 minutes and after completing many cycles, of both times animations... All the cars freezes. I have checked the data many times and it is as it says in wiki article.
I don´t know what else to do.
Maybe the file or FS does not support having two different times in the file or there is too many animations (33 for being precisely)?
What do you think? I really appreciate your help.
Regards
Mauricio
Here is part of the code:
I´ve read the wiki article and (i think) all the threads related with animations . My problem is:
I´ve created a multiple animations (traffic cars for be precisely) with 2048 frames and four with 4096 frames, i´ve followed the wiki exactly (i think), parted the file in two (and four for the 4095 frames), then edited the first file, adding the rest of the frames, interpolated the animation, and else. Everything works perfectly but....after about 4 to 6 minutes and after completing many cycles, of both times animations... All the cars freezes. I have checked the data many times and it is as it says in wiki article.
I don´t know what else to do.
Maybe the file or FS does not support having two different times in the file or there is too many animations (33 for being precisely)?
What do you think? I really appreciate your help.
Regards
Mauricio
Here is part of the code:
Code:
CODE FOR 4096 frames
; Animation parameters for animation: 0
CUN_VEA_ENTRYA_9_tick18_mod_1 label word
dw 8
dw -32768,0,-16386,16383
dw -16384,0,-2,16383
dw 0,0,16382,16383
dw 16384,0,32766,16383
CUN_VEA_ENTRYA_9_tick18_mod_2 label word
dw 8
dw 0,0,4095,4095
dw 4096,0,8191,4095
dw 8192,0,12287,4095
dw 12288,0,16383,4095
CUN_VEA_ENTRYA_9_float_convert_hi label word
dw 14 ; num entries
dw 0,0
dw 1,16256
dw 2,16384
dw 4,16512
dw 8,16640
dw 16,16768
dw 32,16896
dw 64,17024
dw 128,17152
dw 256,17280
dw 512,17408
dw 1024,17536
dw 2048,17664
dw 4096,17792
CUN_VEA_ENTRYA_trans_9 label word
dw 1 ; 1: Point (translation)
real4 -1.0 ; Previous panim value
real4 16 dup (0.0) ; Cached matrix
dw 988 ; number of entries
bgl_animation_command_start_CUN_VEA_ENTRYA_1 label BGLCODE
; usrvar = tick18 mod 1024
LOCAL_BASE_32 CUN_VEA_ENTRYA_9_tick18_mod_1
BGL_INTERPOLATE VAR_BASE_GLOBAL,BGL_TICK18,\
VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_9_tick18_mod_1 - offset CUN_VEA_ENTRYA_9_tick18_mod_1)
LOCAL_BASE_32 CUN_VEA_ENTRYA_9_tick18_mod_2
BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_9_tick18_mod_2 - offset CUN_VEA_ENTRYA_9_tick18_mod_2)
; convert usrvar to float and store in usrvr2-usrvr3
LOCAL_BASE_32 CUN_VEA_ENTRYA_9_float_convert_hi
BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_GLOBAL,usrvr3,\
VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_9_float_convert_hi - CUN_VEA_ENTRYA_9_float_convert_hi)
VAR_BASE_32 VAR_BASE_GLOBAL
SETWRD usrvr2,0
IFIN1 CUN_VEA_ENTRYA_9_fc_512, usrvar,257,512
IFMSK CUN_VEA_ENTRYA_9_fc_512, usrvar,0001h
SETWRD usrvr2,08000h
CUN_VEA_ENTRYA_9_fc_512 label word
IFIN1 CUN_VEA_ENTRYA_9_fc_1024, usrvar,513,1024
IFMSK CUN_VEA_ENTRYA_9_fc_1024, usrvar,0003h
SETWRD usrvr2,04000h
IFMSK CUN_VEA_ENTRYA_9_fc_1024, usrvar,0002h
SETWRD usrvr2,08000h
IFMSK CUN_VEA_ENTRYA_9_fc_1024, usrvar,0001h
SETWRD usrvr2,0C000h
CUN_VEA_ENTRYA_9_fc_1024 label word
IFIN1 CUN_VAA_ENTRYA_9_fc_2048, usrvar,1025,2048
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0007h
SETWRD usrvr2,02000h
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0006h
SETWRD usrvr2,04000h
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0005h
SETWRD usrvr2,06000h
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0004h
SETWRD usrvr2,08000h
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0003h
SETWRD usrvr2,0A000h
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0002h
SETWRD usrvr2,0C000h
IFMSK CUN_VAA_ENTRYA_9_fc_2048, usrvar,0001h
SETWRD usrvr2,0E000h
CUN_VAA_ENTRYA_9_fc_2048 label word
IFIN1 CUN_VAA_ENTRYA_9_fc_4096, usrvar,2049,4096
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Fh
SETWRD usrvr2,01000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Eh
SETWRD usrvr2,02000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Dh
SETWRD usrvr2,03000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Ch
SETWRD usrvr2,04000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Bh
SETWRD usrvr2,05000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,000Ah
SETWRD usrvr2,06000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0009h
SETWRD usrvr2,07000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0008h
SETWRD usrvr2,08000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0007h
SETWRD usrvr2,09000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0006h
SETWRD usrvr2,0A000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0005h
SETWRD usrvr2,0B000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0004h
SETWRD usrvr2,0C000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0003h
SETWRD usrvr2,0D000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0002h
SETWRD usrvr2,0E000h
IFMSK CUN_VAA_ENTRYA_9_fc_4096, usrvar,0001h
SETWRD usrvr2,0F000h
CUN_VAA_ENTRYA_9_fc_4096 label word
LOCAL_BASE_32 CUN_VEA_ENTRYA_trans_9
BGL_ANIMATE_INDIRECT VAR_BASE_GLOBAL,usrvr2,VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_trans_9 - offset CUN_VEA_ENTRYA_trans_9),0.0,0.0,0.0,1
bgl_animation_command_end_CUN_VEA_ENTRYA_1 label BGLCODE
CODE FOR 2048 frames
CUN_VEA_ENTRYA_12_tick18_mod_1 label word
dw 8
dw -32768,0,-16386,16383
dw -16384,0,-2,16383
dw 0,0,16382,16383
dw 16384,0,32766,16383
CUN_VEA_ENTRYA_12_tick18_mod_2 label word
dw 8
dw 0,0,2047,2047
dw 2048,0,4095,2047
dw 4096,0,6143,2047
dw 6144,0,8191,2047
CUN_VEA_ENTRYA_12_float_convert_hi label word
dw 13 ; num entries
dw 0,0
dw 1,16256
dw 2,16384
dw 4,16512
dw 8,16640
dw 16,16768
dw 32,16896
dw 64,17024
dw 128,17152
dw 256,17280
dw 512,17408
dw 1024,17536
dw 2048,17664
CUN_VEA_ENTRYA_trans_12 label word
dw 1 ; 1: Point (translation)
real4 -1.0 ; Previous panim value
real4 16 dup (0.0) ; Cached matrix
dw 914 ; number of entries
bgl_animation_command_start_CUN_VEA_ENTRYA_7 label BGLCODE
; usrvar = tick18 mod 1024
LOCAL_BASE_32 CUN_VEA_ENTRYA_12_tick18_mod_1
BGL_INTERPOLATE VAR_BASE_GLOBAL,BGL_TICK18,\
VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_12_tick18_mod_1 - offset CUN_VEA_ENTRYA_12_tick18_mod_1)
LOCAL_BASE_32 CUN_VEA_ENTRYA_12_tick18_mod_2
BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_12_tick18_mod_2 - offset CUN_VEA_ENTRYA_12_tick18_mod_2)
; convert usrvar to float and store in usrvr2-usrvr3
LOCAL_BASE_32 CUN_VEA_ENTRYA_12_float_convert_hi
BGL_INTERPOLATE VAR_BASE_GLOBAL,usrvar,\
VAR_BASE_GLOBAL,usrvr3,\
VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_12_float_convert_hi - CUN_VEA_ENTRYA_12_float_convert_hi)
VAR_BASE_32 VAR_BASE_GLOBAL
SETWRD usrvr2,0
IFIN1 CUN_VEA_ENTRYA_12_fc_512, usrvar,257,512
IFMSK CUN_VEA_ENTRYA_12_fc_512, usrvar,0001h
SETWRD usrvr2,08000h
CUN_VEA_ENTRYA_12_fc_512 label word
IFIN1 CUN_VEA_ENTRYA_12_fc_1024, usrvar,513,1024
IFMSK CUN_VEA_ENTRYA_12_fc_1024, usrvar,0003h
SETWRD usrvr2,04000h
IFMSK CUN_VEA_ENTRYA_12_fc_1024, usrvar,0002h
SETWRD usrvr2,08000h
IFMSK CUN_VEA_ENTRYA_12_fc_1024, usrvar,0001h
SETWRD usrvr2,0C000h
CUN_VEA_ENTRYA_12_fc_1024 label word
IFIN1 CUN_VEA_ENTRYA_12_fc_2048, usrvar,1025,2048
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0007h
SETWRD usrvr2,02000h
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0006h
SETWRD usrvr2,04000h
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0005h
SETWRD usrvr2,06000h
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0004h
SETWRD usrvr2,08000h
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0003h
SETWRD usrvr2,0A000h
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0002h
SETWRD usrvr2,0C000h
IFMSK CUN_VEA_ENTRYA_12_fc_2048, usrvar,0001h
SETWRD usrvr2,0E000h
CUN_VEA_ENTRYA_12_fc_2048 label word
LOCAL_BASE_32 CUN_VEA_ENTRYA_trans_12
BGL_ANIMATE_INDIRECT VAR_BASE_GLOBAL,usrvr2,VAR_BASE_LOCAL,(offset CUN_VEA_ENTRYA_trans_12 - offset CUN_VEA_ENTRYA_trans_12),0.0,0.0,0.0,7
bgl_animation_command_end_CUN_VEA_ENTRYA_7 label BGLCODE
