August 18, 200223 yr Hi all.Mesh-clinging decal polys are possible in CFS2, coded as a CFS2 line... It also can be used in FS2002, and may be able to replace flat non-meshing ground polys. I'm tired of the old FS98 polys, aren't you?Here's the BGLC ASM code: include TMFmacros.incinclude CFS2TMFmacros.inc; Seg test; ===================================================================; DATA_BASEdata_base label word dw 1 ; world set number dd 2556002 ; North Bound dd 2333741 ; South Bound dd -1873082960 ; East Bound dd -1896943890 ; West Bound dd 0 ; VOR data dw 0 ; lowest VOR freq dw 0 ; highest VOR freq dd 0 ; seeds level 8 data dd 0 ; seeds level 9 data dd 0 ; seeds level 10 data dd 0 ; seeds level 11 data dd 0 ; seeds level 12 data dd 0 ; traffic data dd 0 ; minimum safe altitude data dd terrain_data - data_base; terrain mesh data dd 0 ; object data dd 0 ; library data dd 0 ; facilities data dd 0 ; anchor point data dd 0 ; ATIS data dd 0 ; NDB data dd 0 ; dynamic object paths data dd 0h,0h ; minimum library id dd 0h,0h ; maximum library id dd 0 ; miscellaneous data dd 0 ; title and description data dd 0 ; magnetic variation data dd 0 ; exception and exclusion data dd 87654321h ; magic number dd 0 ; compression switch dw 0 ; spare dd 0h,0h,0h,0h ; GUID dd 0 ; product id dd 0 ; product build number dd 0 ; new facility data pointers dd 0 ; new facility name list data dd 0 ; new facility band list data dd 0 ; new facility data; ===================================================================; TERRAIN_DATAterrain_data label word dd terrain_header_end - terrain_data ; end of terrain header dd 514 ; version dd 0 ; unknown entry dd 0 ; unknown entry dd 0 ; elevation header dd 0 ; land class header dd 0 ; unknown header dd 0 ; class lookup header dd 0 ; season header dd 0 ; class lookup list dd 0 ; water class header dd 0 ; elevation index dd 0 ; land cover index dd 0 ; unknown index dd 0 ; flatten polygon header dd decal_header - terrain_data ; decal header dd 0 ; reserved dd 0 ; reserved dd 0 ; main terrain data dd 0 ; reserved dd 0 ; reserved dd 0 ; reserved dd 0 ; regions header dd 0 ; reserved dd 0 ; reservedterrain_header_end label word; ===================================================================; DECAL_HEADERdecal_header label word DECAL_HEADER 256, decal_list, decal_textures, decal_end; DECAL_DATAdecal_data label word; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - data_start_0 label word DECAL_DATA 1, 1, 3, 22, 0, 0, 0 DECAL_GEOMETRY 1, 7, 1, 0 ; 1st set of points ----------------------------------------------------------- DECAL_POINTS 4 +0c0h CFS2LINE_RIB 0, 0, 0, 0 CFS2LINE_RIB 255, 0, 255, 0 CFS2LINE_RIB 0, 255, 0, 255 CFS2LINE_RIB 255, 255, 255, 255 data_end_0 label word; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -; ===================================================================; DECAL_ LIST decal_list label word DECAL_LIST 1, decal_groups, decal_data decal_groups label word DECAL_GROUP 194, 47, decal_data, data_start_0, data_end_0; ===================================================================; TERRAIN DECALS TEXTURESdecal_textures label word TEXTURE_HEADER 1, texture_groups, texture_data, texture_endtexture_groups label word TEXTURE_GROUP texture_data, texture_start_0, texture_end_0texture_data label wordtexture_start_0 label word CFS2TEXTURE_DATA "Smiley.bmp", 0texture_end_0 label wordtexture_end label word; ===================================================================; DECAL_ENDdecal_end label word; =================================================================== The "Smiley" was created as 24-bit with transparent alpha background, then converted to 8-bit, mipped with imagetool. It exists in a local ( twin ) texture folder.:-)
Create an account or sign in to comment