• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Dynamic Library Objects and Shadows

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
6,554
Country
us-wisconsin
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.

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
 
Back
Top