- Messages
- 6,554
- Country

Hi all.
I'm posting here, as well as AVSIM, so the thread doesn't get buried in AVSIM's many posts.
A queston came up about whether shadows can be defined separately from the object shape in dynamic objects. The answer is yes.
Here's "Dynamic_Shadow_Test.asm", which defines one dynamic library object using "Dynamic_Shadow_Test_0.asm" as the object and "Dynamic_Shadow_Test_1.asm" as the shadow. Any *_0.asm output from Gmax/MakeMDL FS2002 should work. The scale is assumed as 0.5 standard FS2002 Gmax output. That translates to 15 in the Super_Scale command... this object being a "radius" of 41... equaling 82 for that command. By "radius", I mean that it more accurately describes diameter.... the size of a box that would hold the object.
Dick
I'm posting here, as well as AVSIM, so the thread doesn't get buried in AVSIM's many posts.
A queston came up about whether shadows can be defined separately from the object shape in dynamic objects. The answer is yes.
Here's "Dynamic_Shadow_Test.asm", which defines one dynamic library object using "Dynamic_Shadow_Test_0.asm" as the object and "Dynamic_Shadow_Test_1.asm" as the shadow. Any *_0.asm output from Gmax/MakeMDL FS2002 should work. The scale is assumed as 0.5 standard FS2002 Gmax output. That translates to 15 in the Super_Scale command... this object being a "radius" of 41... equaling 82 for that command. By "radius", I mean that it more accurately describes diameter.... the size of a box that would hold the object.
Code:
library_header label word
dw 0001
dd 000A00000h ; North Bound
dd 0FF600000h ; South Bound
dd 000000000h ; East Bound
dd 0FFFFFFFFh ; West Bound
dw 22 dup(0)
dd library_data - library_header
dw 10 dup(0)
dd 0D1FABE9Fh, 0C1004AC4h
dd 0D1FABE9Fh, 0C1004AC4h
dw 13 dup(0)
library_data label word
; =================================================================
; Library List:
rel_base = $
LIBRARY_OBJECT_PTR library_start_0000, 0D1FABE9Fh, 0C1004AC4h, 0A55C8B9Dh, 0020586BEh
dd (offset library_end_0000)
; =================================================================
library_start_0000 label word
BGL_LIBRARY_OBJECT 0D1FABE9Fh, 0C1004AC4h, 0A55C8B9Dh, 0020586BEh, 100, 0, 1024, 2, 0, library_end_0000, 'Dyn_Shadow'
Draw_ShadowSetup0 label word
SHADOW_VPOSITION 0
SUPER_SCALE Return_ShadowSetUp0, 10000, 82, 15 ;; V1, V2, SCALE
SHADOW_VICALL32 Draw_Shadow0, 18h
Return_ShadowSetUp0 label word
Draw_ObjectSetup0 label word
VPOSITION Return_ObjectSetUp0, 0, 0, 0
SUPER_SCALE Return_ObjectSetUp0, 10000, 82, 15 ;; V1, V2, SCALE
VINSTANCE_CALL Draw_Object0, 18h
SETWRD 2Ch, 41 ;; SIZE
Return_ObjectSetUp0 label word
BGL_RETURN
Draw_Object0 label word
include Dynamic_Shadow_Test_0.asm
Draw_Shadow0 label word
include Dynamic_Shadow_Test_1.asm
library_end_0000 label word
; =================================================================
EOF
Dick