- Messages
- 6,561
- Country

Hi all.
Just fooling around with some simple FS9 RIFF structuring. If you can convert SCASM to ASM, then you can turn your old API's, or preFS9 library objects , to the new RIFF structure:
Have fun.
Dick
Just fooling around with some simple FS9 RIFF structuring. If you can convert SCASM to ASM, then you can turn your old API's, or preFS9 library objects , to the new RIFF structure:
Code:
; MyBldg.asm
db 'R','I','F','F'
dd bgl_data_end - $ - 4
db 'M','D','L','9'
db 'M','D','L','H'
dd visual_model_header_end - $ - 4
dd visual_model_header_end - $ - 4
dd 0
dd 0
dd 28
dd 0
dd 0
dd 152
db 'F','S','8','0'
dd 2304
visual_model_header_end label dword
db 'I','S','F','T'
dd ver_end - $ - 4
db "MakeMDL - FS90 (9.00.030612.02)",0
ver_end label word
bounding_box_riff_start label word
db 'B','B','O','X'
dd bounding_box_riff_end - $ - 4
real4 -40.0, 0.000, -40.0
real4 40.0, 40.0, 40.0
bounding_box_riff_end label word
model_outside label BGLCODE
model_shadow label BGLCODE
model_inside label BGLCODE
exterior_riff_start_0 label BGLCODE
db 'E','X','T','E'
dd exterior_riff_end_0 - $ - 4
LOD_0L label BGLCODE
; ------------ Start of MyBLDG_0.asm ------------------
bgl_riff_start_BLDG label BGLCODE
db 'B','G','L',' '
dd bgl_riff_end_BLDG - $ - 4
RESLIST 0, 8
VERTEX -40, 0, -40 ; 0
VERTEX 40, 0, -40 ; 1
VERTEX 40, 0, 40 ; 2
VERTEX -40, 0, 40 ; 3
VERTEX -40, 80, -40 ; 4
VERTEX 40, 80, -40 ; 5
VERTEX 40, 80, 40 ; 6
VERTEX -40, 80, 40 ; 7
BGL_TEXTURE TEXTURE_BUILDING + TEXTURE_NIGHTMAP, 0EF00h, "br_apt1_2.bmp"
FACET4_TMAP 0, 0, -( 1 * 32767 ), ( 40 * 32767 ), 0, 46, 124, 4, 46, 255, 5, 155, 255, 1, 155, 124
FACET4_TMAP 0, 0, ( 1 * 32767 ), ( 40 * 32767 ), 2, 46, 124, 6, 46, 255, 7, 155, 255, 3, 155, 124
FACET4_TMAP -( 1 * 32767 ), 0, 0, ( 40 * 32767 ), 3, 46, 124, 7, 46, 255, 4, 155, 255, 0, 155, 124
FACET4_TMAP ( 1 * 32767 ), 0, 0, ( 40 * 32767 ), 1, 46, 124, 5, 46, 255, 6, 155, 255, 2, 155, 124
BGL_TEXTURE TEXTURE_BUILDING, 0EF00h, "flatroof_6.bmp"
FACET4_TMAP 0, ( 1 * 32767 ), 0, ( 80 * 32767 ), 4, 2, 0, 7, 2, 253, 6, 254, 253, 5, 254, 0
BGL_END
BGL_RETURN
bgl_riff_end_BLDG label BGLCODE
; ------------- Ripped from API SCASM CODE
; Points( 0
; -40 0 -40 ; 0
; 40 0 -40 ; 1
; 40 0 40 ; 2
; -40 0 40 ; 3
; -40 80 -40 ; 4
; 40 80 -40 ; 5
; 40 80 40 ; 6
; -40 80 40 ; 7
; )
; LoadBitmap( 0 L6 EF 0 0 0 "br_apt1_2.bmp" )
; TexPoly( 0 0 -32767 40 0 46 124 4 46 255 5 155 255 1 155 124 ) ;Front
; TexPoly( 0 0 32767 40 2 46 124 6 46 255 7 155 255 3 155 124 ) ;Back
; TexPoly( -32767 0 0 40 3 46 124 7 46 255 4 155 255 0 155 124 ) ;Left
; TexPoly( 32767 0 0 40 1 46 124 5 46 255 6 155 255 2 155 124 ) ;Right
; LoadBitmap( 0 6 EF 0 0 0 "flatroof_6.bmp" )
; TexPoly( 0 32767 0 80 4 2 0 7 2 253 6 254 253 5 254 0 ) ;Top
; Return
; ------------ End of MyBLDG_0.asm ------------------
exterior_riff_end_0 label BGLCODE
bgl_data_end label BGLCODE
Have fun.
Dick

It might not be a bad idea to stick to BGLC tweaking, and let the rest go.