Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
5320 lines (4648 sloc) 150 KB
BGLOP_EOF EQU 000000000h
BGLOP_LOGOL EQU 000000001h
BGLOP_NOOP EQU 000000002h
BGLOP_CASE EQU 000000003h
BGLOP_DEBUG EQU 000000004h
BGLOP_SURFACE EQU 000000005h
BGLOP_SPNT EQU 000000006h
BGLOP_CPNT EQU 000000007h
BGLOP_CLOSURE EQU 000000008h
BGLOP_GSURF EQU 000000009h
BGLOP_GSPNT EQU 00000000ah
BGLOP_GCPNT EQU 00000000bh
BGLOP_GCLOSURE EQU 00000000ch
BGLOP_JUMP EQU 00000000dh
BGLOP_DEFRES EQU 00000000eh
BGLOP_STRRES EQU 00000000fh
BGLOP_CNTRES EQU 000000010h
BGLOP_GDEFRES EQU 000000011h
BGLOP_GSTRRES EQU 000000012h
BGLOP_GCNTRES EQU 000000013h
BGLOP_SETCOLOR EQU 000000014h
BGLOP_ELEVATION_MAP EQU 000000015h
BGLOP_DBG_DEBUG EQU 000000016h
BGLOP_TEXTURE_ENABLE EQU 000000017h
BGLOP_TEXTURE EQU 000000018h
BGLOP_PALETTE EQU 000000019h
BGLOP_RESLIST EQU 00000001ah
BGLOP_IFIN_BOX_PLANE EQU 00000001bh
BGLOP_IFIN2 EQU 00000001ch
BGLOP_FACE EQU 00000001dh
BGLOP_HAZE EQU 00000001eh
BGLOP_HORIZON EQU 00000001fh
BGLOP_TAXI_MARKINGS EQU 00000001fh
BGLOP_FACET_TMAP EQU 000000020h
BGLOP_FACET4_TMAP EQU 000000020h
BGLOP_IFIN3 EQU 000000021h
BGLOP_RETURN EQU 000000022h
BGLOP_CALL EQU 000000023h
BGLOP_IFIN1 EQU 000000024h
BGLOP_SEPARATION_PLANE EQU 000000025h
BGLOP_SETWRD EQU 000000026h
BGLOP_TEXTURED_FACET EQU 000000027h
BGLOP_BALL EQU 000000028h
BGLOP_GRESLIST EQU 000000029h
BGLOP_GFACETN EQU 00000002ah
BGLOP_ADDOBJ_32 EQU 00000002bh
BGLOP_REJECT EQU 00000002ch
BGLOP_SCOLOR24 EQU 00000002dh
BGLOP_LCOLOR24 EQU 00000002eh
BGLOP_NEW_SCALE EQU 00000002fh
BGLOP_BRIGHTNESS EQU 000000030h
BGLOP_RESROW EQU 000000031h
BGLOP_ADDOBJ EQU 000000032h
BGLOP_INSTANCE_CALL EQU 000000033h
BGLOP_SUPER_SCALE EQU 000000034h
BGLOP_PNTROW EQU 000000035h
BGLOP_PNTROWM EQU 000000036h
BGLOP_PNT EQU 000000037h
BGLOP_CONCAVE EQU 000000038h
BGLOP_IFMASK EQU 000000039h
BGLOP_VPOSITION EQU 00000003ah
BGLOP_VINSTANCE_CALL EQU 00000003bh
BGLOP_POSITION EQU 00000003ch
BGLOP_SEED EQU 00000003dh
BGLOP_FACET EQU 00000003eh
BGLOP_SHADOW_CALL EQU 00000003fh
BGLOP_SHADOW_VPOSITION EQU 000000040h
BGLOP_SHADOW_VICALL EQU 000000041h
BGLOP_POLYGON_RUNWAY EQU 000000042h
BGLOP_NEW_TEXTURE EQU 000000043h
BGLOP_TEXTURE_RUNWAY EQU 000000044h
BGLOP_STROBEROW EQU 000000045h
BGLOP_POINT_VICALL EQU 000000046h
BGLOP_MAP_SCALE EQU 000000047h
BGLOP_VAR_SEG EQU 000000048h
BGLOP_BUILDING EQU 000000049h
BGLOP_LANDING_LIGHTS EQU 00000004ah
BGLOP_BAO_LIBRARY EQU 00000004bh
BGLOP_VSCALE EQU 00000004ch
BGLOP_VAR2LOW64K EQU 00000004dh
BGLOP_LOW64K2VAR EQU 00000004eh
BGLOP_MOVWRD EQU 00000004fh
BGLOP_GCOLOR EQU 000000050h
BGLOP_LCOLOR EQU 000000051h
BGLOP_SCOLOR EQU 000000052h
BGLOP_GCOLOR_ABS EQU 000000053h
BGLOP_ASMCALL EQU 000000054h
BGLOP_SURFACE_TYPE EQU 000000055h
BGLOP_SET_WEATHER EQU 000000056h
BGLOP_WEATHER EQU 000000057h
BGLOP_TEXTURE_BOUNDS EQU 000000058h
BGLOP_VAR_SEG_ID EQU 000000059h
BGLOP_SEED_ADDOBJ EQU 00000005ah
BGLOP_INDIRECT_CALL EQU 00000005bh
BGLOP_FAR_CALL EQU 00000005ch
BGLOP_TEXTURE_REPEAT EQU 00000005dh
BGLOP_TEXTURE_ROTATE EQU 00000005eh
BGLOP_IFSIZEV EQU 00000005fh
BGLOP_FACE_TMAP EQU 000000060h
BGLOP_RESLIST_SCALE EQU 000000061h
BGLOP_IFVIS EQU 000000062h
BGLOP_LIBRARY EQU 000000063h
BGLOP_LIST EQU 000000064h
BGLOP_VSCOLOR EQU 000000065h
BGLOP_VGCOLOR EQU 000000066h
BGLOP_VLCOLOR EQU 000000067h
BGLOP_TMAP_LIGHT_SHADE EQU 000000068h
BGLOP_ROAD_START EQU 000000069h
BGLOP_ROAD_CONT EQU 00000006ah
BGLOP_RIVER_START EQU 00000006bh
BGLOP_RIVER_CONT EQU 00000006ch
BGLOP_IFSIZEH EQU 00000006dh
BGLOP_TAXIWAY_START EQU 00000006eh
BGLOP_TAXIWAY_CONT EQU 00000006fh
BGLOP_AREA_SENSE EQU 000000070h
BGLOP_ALTITUDE_SET EQU 000000071h
BGLOP_APPROACH_LIGHTS EQU 000000072h
BGLOP_IFINBOXP EQU 000000073h
BGLOP_ADD_CATEGORY EQU 000000074h
BGLOP_ADD_MOUNTAIN EQU 000000075h
BGLOP_BGL EQU 000000076h
BGLOP_SCALE_AGL EQU 000000077h
BGLOP_ROAD_CONTW EQU 000000078h
BGLOP_RIVER_CONTW EQU 000000079h
BGLOP_GFACET_TMAP EQU 00000007ah
BGLOP_GFACE_TMAP EQU 00000007bh
BGLOP_SELECT EQU 00000007ch
BGLOP_PERSPECTIVE EQU 00000007dh
BGLOP_SETWORD_LOW64K EQU 00000007eh
BGLOP_CITY EQU 00000007fh
BGLOP_RESPNT EQU 000000080h
BGLOP_ANTI_ALIAS EQU 000000081h
BGLOP_SHADOW_POSITION EQU 000000082h
BGLOP_RESCALE EQU 000000083h
BGLOP_SURFACE_NORMAL EQU 000000084h
BGLOP_ASD_NAME EQU 000000085h
BGLOP_NOOP3 EQU 000000086h
BGLOP_FIXED_COLORS EQU 000000087h
BGLOP_JUMP_32 EQU 000000088h
BGLOP_VAR_BASE_32 EQU 000000089h
BGLOP_CALL_32 EQU 00000008ah
BGLOP_ADDCAT_32 EQU 00000008bh
BGLOP_ASM_CALL_32 EQU 00000008ch
BGLOP_FILE_MARKER_32 EQU 00000008dh
BGLOP_VFILE_MARKER EQU 00000008eh
BGLOP_ALPHA EQU 00000008fh
BGLOP_TRIANGLE_FAN EQU 000000090h
BGLOP_TEXT EQU 000000091h
BGLOP_MIPMAP EQU 000000092h
BGLOP_SPECULAR EQU 000000093h
BGLOP_CRASH EQU 000000094h
BGLOP_CRASH_INDIRECT EQU 000000095h
BGLOP_CRASH_START EQU 000000096h
BGLOP_CRASH_SPHERE EQU 000000097h
BGLOP_CRASH_BOX EQU 000000098h
BGLOP_SET_CRASH EQU 000000099h
BGLOP_TILED_ELEVATION_MAP EQU 00000009ah
BGLOP_VRESLIST EQU 00000009bh
BGLOP_VLIBRARY_CALL EQU 00000009ch
BGLOP_VSCALEV EQU 00000009dh
BGLOP_INTERPOLATE EQU 00000009eh
BGLOP_OVERRIDE EQU 00000009fh
BGLOP_NEW_BUILDING EQU 0000000a0h
BGLOP_GENERIC_OBJECT EQU 0000000a0h
BGLOP_SET_CLASSIFICATION_LIST_ENTRY EQU 0000000a1h
BGLOP_SET_CURRENT_VARIATION_TEXTURE_LIST EQU 0000000a2h
BGLOP_TILED_CLASSIFICATION_ELEVATION_MAP EQU 0000000a3h
BGLOP_VALPHA EQU 0000000a4h
BGLOP_SET_CURRENT_VARIATION_FROM_CLASSIFICATION EQU 0000000a5h
BGLOP_TARGET_INDICATOR EQU 0000000a6h
BGLOP_SPRITE_VICALL EQU 0000000a7h
BGLOP_TEXTURED_ROAD EQU 0000000a8h
BGLOP_IFIN_INSTANCED_BOX_PLANE EQU 0000000a9h
BGLOP_NEW_RUNWAY EQU 0000000aah
BGLOP_OBJECT_MARKER EQU 0000000abh
BGLOP_ZBIAS EQU 0000000ach
BGLOP_ANIMATE EQU 0000000adh
BGLOP_TRANSFORM_END EQU 0000000aeh
BGLOP_TRANSFORM_MAT EQU 0000000afh
BGLOP_CRASH_OCTTREE EQU 0000000b0h
BGLOP_TAG EQU 0000000b1h
BGLOP_LIGHT EQU 0000000b2h
BGLOP_IFINF1 EQU 0000000b3h
BGLOP_TEXTURE_SIZE EQU 0000000b4h
BGLOP_VERTEX_LIST EQU 0000000b5h
BGLOP_MATERIAL_LIST EQU 0000000b6h
BGLOP_TEXTURE_LIST EQU 0000000b7h
BGLOP_SET_MATERIAL EQU 0000000b8h
BGLOP_DRAW_TRILIST EQU 0000000b9h
BGLOP_DRAW_LINELIST EQU 0000000bah
BGLOP_DRAW_POINTLIST EQU 0000000bbh
BGLOP_BEGIN EQU 0000000bch
BGLOP_END EQU 0000000bdh
BGLOP_TAXIWAY_SIGN_LIST EQU 0000000beh
BGLOP_MOUSERECT_LIST EQU 0000000bfh
BGLOP_SET_MOUSERECT EQU 0000000c0h
BGLOP_SET_MATERIAL_ANIMATE EQU 0000000c1h
BGLOP_MODWORD EQU 0000000c2h
BGLOP_ANIMATE_INDIRECT EQU 0000000c3h
BGLOP_SET_MATRIX_INDIRECT EQU 0000000c4h
BGLOP_POINTVI_INDIRECT EQU 0000000c5h
BGLOP_TRANSFORM_INDIRECT EQU 0000000c6h
BGLOP_MAX EQU 0000000c6h
BGLOP_MAC EQU 0000000c7h
BGL_DATA_CLASS_UNKNOWN EQU 0t
BGL_DATA_CLASS_DIRECT_QMID EQU 1t
BGL_DATA_CLASS_INDIRECT_QMID EQU 2t
BGL_DATA_CLASS_AIRPORT_NAME_INDEX EQU 3t
BGL_DATA_CLASS_ICAO_INDEX EQU 4t
BGL_DATA_CLASS_GUID_INDEX EQU 5t
BGL_DATA_CLASS_EXCLUSION EQU 6t
BGL_DATA_CLASS_TIME_ZONE EQU 7t
BGL_DATA_CLASS TYPEDEF SDWORD
PBGL_DATA_CLASS TYPEDEF PTR SDWORD
PPBGL_DATA_CLASS TYPEDEF PTR PTR SDWORD
BGL_DATA_TYPE_NONE EQU 0t
BGL_DATA_TYPE_COPYRIGHT EQU 1t
BGL_DATA_TYPE_GUID EQU 2t
BGL_DATA_TYPE_AIRPORT EQU 3t
BGL_DATA_TYPE_NAV EQU 19t
BGL_DATA_TYPE_NDB EQU 23t
BGL_DATA_TYPE_MARKER EQU 24t
BGL_DATA_TYPE_BOUNDARY EQU 32t
BGL_DATA_TYPE_WAYPOINT EQU 34t
BGL_DATA_TYPE_GEOPOL EQU 35t
BGL_DATA_TYPE_SCENERY_OBJECT EQU 37t
BGL_DATA_TYPE_AIRPORT_NAME_INDEX EQU 39t
BGL_DATA_TYPE_VOR_ICAO_INDEX EQU 40t
BGL_DATA_TYPE_NDB_ICAO_INDEX EQU 41t
BGL_DATA_TYPE_WAYPOINT_ICAO_INDEX EQU 42t
BGL_DATA_TYPE_MODEL_DATA EQU 43t
BGL_DATA_TYPE_AIRPORT_SUMMARY EQU 44t
BGL_DATA_TYPE_EXCLUSION EQU 46t
BGL_DATA_TYPE_TIME_ZONE EQU 47t
BGL_DATA_TYPE_FAKE_TYPES EQU 10000t
BGL_DATA_TYPE_ICAO_RUNWAY EQU 10001t
BGL_DATA_TYPE TYPEDEF SDWORD
PBGL_DATA_TYPE TYPEDEF PTR SDWORD
PPBGL_DATA_TYPE TYPEDEF PTR PTR SDWORD
RUNWAY_SUBOP_BASE EQU 000000001h
RUNWAY_SUBOP_BASE_THRESHOLD EQU 000000002h
RUNWAY_SUBOP_RECIP_THRESHOLD EQU 000000003h
RUNWAY_SUBOP_BASE_BLAST_PAD EQU 000000004h
RUNWAY_SUBOP_RECIP_BLAST_PAD EQU 000000005h
RUNWAY_SUBOP_BASE_APPROACH EQU 000000006h
RUNWAY_SUBOP_RECIP_APPROACH EQU 000000007h
RUNWAY_SUBOP_BASE_OVERRUN EQU 000000008h
RUNWAY_SUBOP_RECIP_OVERRUN EQU 000000009h
RUNWAY_SUBOP_BASE_DISTANCE EQU 00000000ah
RUNWAY_SUBOP_RECIP_DISTANCE EQU 00000000bh
RUNWAY_EDGES_BIT TEXTEQU <BIT0>
RUNWAY_THRESHOLD_BIT TEXTEQU <BIT1>
RUNWAY_TOUCHDOWN_BIT TEXTEQU <BIT2>
RUNWAY_FIXED_BIT TEXTEQU <BIT3>
RUNWAY_DASHES_BIT TEXTEQU <BIT4>
RUNWAY_IDENT_BIT TEXTEQU <BIT5>
RUNWAY_PRECISION_BIT TEXTEQU <BIT6>
RUNWAY_EDGE_PAVEMENT_BIT TEXTEQU <BIT7>
RUNWAY_EDGES_MASK TEXTEQU <~RUNWAY_EDGES_BIT>
RUNWAY_THRESHOLD_MASK TEXTEQU <~RUNWAY_THRESHOLD_BIT>
RUNWAY_TOUCHDOWN_MASK TEXTEQU <~RUNWAY_TOUCHDOWN_BIT>
RUNWAY_FIXED_MASK TEXTEQU <~RUNWAY_FIXED_BIT>
RUNWAY_DASHES_MASK TEXTEQU <~RUNWAY_DASHES_BIT>
RUNWAY_IDENT_MASK TEXTEQU <~RUNWAY_IDENT_BIT>
RUNWAY_PRECISION_MASK TEXTEQU <~RUNWAY_PRECISION_BIT>
RUNWAY_EDGE_PAVEMENT_MASK TEXTEQU <~RUNWAY_EDGE_PAVEMENT_BIT>
RUNWAY_APPROACH_END_BIT TEXTEQU <BIT0>
RUNWAY_APPROACH_UNK_BIT TEXTEQU <BIT1>
RUNWAY_APPROACH_REIL_BIT TEXTEQU <BIT2>
RUNWAY_APPROACH_VASI_BIT TEXTEQU <BIT3>
RUNWAY_APPROACH_LDIN_BIT TEXTEQU <BIT4>
RUNWAY_APPROACH_SYSTEM_BIT TEXTEQU <BIT5>
RUNWAY_APPROACH_TOUCHDOWN_BIT TEXTEQU <BIT6>
RUNWAY_APPROACH_END_MASK TEXTEQU <~RUNWAY_APPROACH_END_BIT>
RUNWAY_APPROACH_UNK_MASK TEXTEQU <~RUNWAY_APPROACH_UNK_BIT>
RUNWAY_APPROACH_REIL_MASK TEXTEQU <~RUNWAY_APPROACH_REIL_BIT>
RUNWAY_APPROACH_VASI_MASK TEXTEQU <~RUNWAY_APPROACH_VASI_BIT>
RUNWAY_APPROACH_LDIN_MASK TEXTEQU <~RUNWAY_APPROACH_LDIN_BIT>
RUNWAY_APPROACH_SYSTEM_MASK TEXTEQU <~RUNWAY_APPROACH_SYSTEM_BIT>
RUNWAY_APPROACH_TOUCHDOWN_MASK TEXTEQU <~RUNWAY_APPROACH_TOUCHDOWN_BIT>
VASI_TYPE_NONE EQU 0t
VASI_TYPE_2_1 EQU 1t
VASI_TYPE_3_1 EQU 2t
VASI_TYPE_2_2 EQU 3t
VASI_TYPE_3_2 EQU 4t
VASI_TYPE_2_3 EQU 5t
VASI_TYPE_3_3 EQU 6t
VASI_TYPE_PAPI_2 EQU 7t
VASI_TYPE_PAPI_4 EQU 8t
VASI_TYPE_TRI_COLOR EQU 9t
VASI_TYPE_PVASI EQU 10t
VASI_TYPE_TVASI EQU 11t
VASI_TYPE_BALL EQU 12t
VASI_TYPE_PANELS EQU 13t
VASI_TYPE_MAX EQU 14t
VASI_TYPE TYPEDEF SDWORD
PVASI_TYPE TYPEDEF PTR SDWORD
PPVASI_TYPE TYPEDEF PTR PTR SDWORD
TAXI_SUBOPF_BIT EQU 000000080h
TAXI_SUBOPF_MASK TEXTEQU <~TAXI_SUBOPF_BREAK>
TAXI_SUBOP_MOVE_BIT EQU 000000040h
TAXI_SUBOP_MOVE_MASK EQU 0ffffffbfh
TAXI_SUBOP_BREAK EQU 0t
TAXI_SUBOP_ILS_HOLD EQU 1t
TAXI_SUBOP_RUNWAY_HOLD EQU 2t
TAXI_SUBOP_TAXI_HOLD EQU 3t
TAXI_SUBOP_SOLID_SOLID_EDGE EQU 4t
TAXI_SUBOP_DASHED_DASHED_EDGE EQU 5t
TAXI_SUBOP_DASHED_SOLID_EDGE EQU 6t
TAXI_SUBOP_CENTER EQU 7t
TAXI_SUBOP_ARC EQU 8t
TAXI_SUBOP_SOLID_SOLID_EDGE_LIGHTED EQU 9t
TAXI_SUBOP_DASHED_DASHED_EDGE_LIGHTED EQU 10t
TAXI_SUBOP_DASHED_SOLID_EDGE_LIGHTED EQU 11t
TAXI_SUBOP_CENTER_LIGHTED EQU 12t
TAXI_SUBOP_ARC_LIGHTED EQU 13t
TAXI_SUBOPF_BREAK EQU 128t
TAXI_SUBOPF_ILS_HOLD EQU 129t
TAXI_SUBOPF_RUNWAY_HOLD EQU 130t
TAXI_SUBOPF_TAXI_HOLD EQU 131t
TAXI_SUBOPF_SOLID_SOLID_EDGE EQU 132t
TAXI_SUBOPF_DASHED_DASHED_EDGE EQU 133t
TAXI_SUBOPF_DASHED_SOLID_EDGE EQU 134t
TAXI_SUBOPF_CENTER EQU 135t
TAXI_SUBOPF_ARC EQU 136t
TAXI_SUBOPF_SOLID_SOLID_EDGE_LIGHTED EQU 137t
TAXI_SUBOPF_DASHED_DASHED_EDGE_LIGHTED EQU 138t
TAXI_SUBOPF_DASHED_SOLID_EDGE_LIGHTED EQU 139t
TAXI_SUBOPF_CENTER_LIGHTED EQU 140t
TAXI_SUBOPF_ARC_LIGHTED EQU 141t
TAXI_SUBOPF_INVISIBLE_SOLID_SOLID_EDGE EQU 196t
TAXI_SUBOPF_INVISIBLE_DASHED_DASHED_EDGE EQU 197t
TAXI_SUBOPF_INVISIBLE_DASHED_SOLID_EDGE EQU 198t
TAXI_SUBOPF_INVISIBLE_CENTER EQU 199t
TAXI_SUBOP TYPEDEF SDWORD
PTAXI_SUBOP TYPEDEF PTR SDWORD
PPTAXI_SUBOP TYPEDEF PTR PTR SDWORD
BGL_LIGHT_TYPE_UNDEFINED EQU 0t
BGL_LIGHT_TYPE_POINT EQU 1t
BGL_LIGHT_TYPE_SPOT EQU 2t
BGL_LIGHT_TYPE_LARGE_HALO EQU 3t
BGL_LIGHT_TYPE_SMALL_HALO EQU 4t
BGL_LIGHT_TYPE TYPEDEF SDWORD
PBGL_LIGHT_TYPE TYPEDEF PTR SDWORD
PPBGL_LIGHT_TYPE TYPEDEF PTR PTR SDWORD
WEATHER_RIDGE_LIFT EQU 1t
WEATHER_UNI_TURBULENCE EQU 2t
WEATHER_DIR_TURBULENCE EQU 3t
WEATHER_THERMAL EQU 4t
WEATHERTYPE TYPEDEF SDWORD
PWEATHERTYPE TYPEDEF PTR SDWORD
PPWEATHERTYPE TYPEDEF PTR PTR SDWORD
BGLOP_INVALID EQU 00000ffffh
LIBRARY_TYPE_DYNAMIC EQU 000000002h
LIBRARY_PROPELLERS EQU 000000080h
LIBRARY_WEAPONRY EQU 000000090h
LIBRARY_ALL EQU 0ffffffffh
LIBRARY_BUILDINGS EQU 000000100h
LIBRARY_BLD_GENERIC EQU 000000101h
LIBRARY_BLD_ENGLISH EQU 000000102h
LIBRARY_BLD_FRENCH EQU 000000103h
LIBRARY_BLD_GERMAN EQU 000000104h
LIBRARY_BLD_HOUSES EQU 000000105h
LIBRARY_BLD_CHURCHES EQU 000000106h
LIBRARY_BLD_CASTLES EQU 000000107h
LIBRARY_BLD_FAST_FOOD EQU 000000108h
LIBRARY_BLD_BARNS EQU 000000109h
LIBRARY_BLD_STADIUMS EQU 000000110h
LIBRARY_BLD_INDUSTRIAL EQU 000000111h
LIBRARY_LANDMARKS EQU 000000200h
LIBRARY_LND_GENERIC EQU 000000201h
LIBRARY_LND_BERLIN EQU 000000202h
LIBRARY_LND_LONDON EQU 000000203h
LIBRARY_LND_PARIS EQU 000000204h
LIBRARY_LND_CHICAGO EQU 000000205h
LIBRARY_LND_NEW_YORK EQU 000000206h
LIBRARY_LND_BOSTON EQU 000000207h
LIBRARY_LND_DC EQU 000000208h
LIBRARY_LND_SEATTLE EQU 000000209h
LIBRARY_LND_ROME EQU 000000210h
LIBRARY_LND_LOS_ANGELES EQU 000000211h
LIBRARY_LND_TOYKO EQU 000000212h
LIBRARY_LND_SAN_FRANCISCO EQU 000000213h
LIBRARY_LND_EUROPEAN EQU 000000214h
LIBRARY_LND_ASIAN EQU 000000215h
LIBRARY_LND_NORTH_AMERICAN EQU 000000216h
LIBRARY_LND_OCEANIC EQU 000000217h
LIBRARY_LND_AFRICAN EQU 000000218h
LIBRARY_LND_SOUTH_AMERICAN EQU 000000219h
LIBRARY_VEHICLES EQU 000000400h
LIBRARY_VEH_TRUCKS EQU 000000401h
LIBRARY_VEH_CARS EQU 000000402h
LIBRARY_VEH_HEAVY_EQUIPMENT EQU 000000403h
LIBRARY_VEH_TRAINS EQU 000000404h
LIBRARY_VEH_MISC EQU 000000405h
LIBRARY_VEH_AIRPORT EQU 000000406h
LIBRARY_SHIPS_TRAINS EQU 000000800h
LIBRARY_AIRCRAFT EQU 000001000h
LIBRARY_VEGETATION EQU 000002000h
LIBRARY_WATER_OBJECTS EQU 000004000h
LIBRARY_WAT_CRUISE EQU 000004001h
LIBRARY_WAT_SAILBOATS EQU 000004002h
LIBRARY_WAT_CARGO EQU 000004003h
LIBRARY_WAT_MILITARY EQU 000004004h
LIBRARY_WAT_MISC EQU 000004005h
LIBRARY_WAT_MOTOR EQU 000004006h
LIBRARY_AIRPORT_OBJECTS EQU 000008000h
LIBRARY_AIR_TOWERS EQU 000008001h
LIBRARY_AIR_HANGERS EQU 000008002h
LIBRARY_AIR_MISC EQU 000008003h
LIBRARY_SPECIAL_INTEREST EQU 000010000h
LIBRARY_SPC_DAMS EQU 000010001h
LIBRARY_SPC_WORLD_WONDERS EQU 000010002h
LIBRARY_SPC_MISC EQU 000010003h
LIBRARY_BRIDGES EQU 000020000h
LIBRARY_BRG_SUSPENSION EQU 000020001h
LIBRARY_BRG_TRUSS EQU 000020002h
LIBRARY_BRG_SPAN EQU 000020003h
LIBRARY_BRG_DRAW EQU 000020004h
LINEAR_TILING EQU 000000000h
MIRROR_TILING EQU 000000001h
RESERVED_TILING1 EQU 000000002h
RESERVED_TILING2 EQU 000000003h
RESERVED_TILING3 EQU 000000004h
RESERVED_TILING4 EQU 000000005h
RESERVED_TILING5 EQU 000000006h
RESERVED_TILING6 EQU 000000007h
NO_TEXTURE_VARIATIONS EQU 000000000h
TEXTURE_VARIATIONS EQU 000000001h
TEXTURE_AIRCRAFT EQU 1t
TEXTURE_MAP EQU 2t
TEXTURE_WATER EQU 3t
TEXTURE_SKY EQU 4t
TEXTURE_GROUND EQU 5t
TEXTURE_BUILDING EQU 6t
TEXTURE_EFFECT EQU 7t
TEXTURE_DAMAGE EQU 8t
TEXTURE_NIGHTMAP EQU 000000080h
TEXTURE_SPRING TEXTEQU <(BIT3)>
TEXTURE_FALL TEXTEQU <(BIT4)>
TEXTURE_WINTER TEXTEQU <(BIT5)>
TEXTURE_HARDWINTER TEXTEQU <(BIT6)>
TEXTURE_SEASON TEXTEQU <(BIT5 | BIT4 | BIT3)>
TEXTURE2_MASK EQU 00000ff00h
TEXTURE2_NONE EQU 00000ff00h
TEXTURE2_NIGHT EQU 000000100h
TEXTURE2_REFLECT EQU 000000200h
TEXTURE2_LIGHTMAP EQU 000000300h
TEXTURE2_LIGHTMAP_A EQU 000000400h
TEXTURE2_DETAIL EQU 000000500h
TEXTURE2_SHADER EQU 000000f00h
CLASS_TEXTURE_WATER EQU 101t
CLASS_TEXTURE_OCEAN_BANK EQU 102t
CLASS_TEXTURE_HARBOR_CHANNEL EQU 103t
CLASS_TEXTURE_REEF EQU 104t
CLASS_TEXTURE_BLUE_WATER EQU 105t
CLASS_TEXTURE_BROWN_WATER EQU 106t
CLASS_TEXTURE_TAN_WATER EQU 107t
CLASS_TEXTURE_MARSH EQU 108t
CLASS_TEXTURE_SWAMP EQU 109t
BGL_TEXT_CENTERED_TEXT TEXTEQU <BIT0>
BGL_TEXT_CENTERED_TOP_TEXT TEXTEQU <BIT1>
BGL_TEXT_CENTERED_BOTTOM_TEXT TEXTEQU <BIT2>
BGL_TEXT_CENTERED_RIGHT_TEXT TEXTEQU <BIT3>
BGL_TEXT_CENTERED_LEFT_TEXT TEXTEQU <BIT4>
BGL_TEXT_UPPER_RIGHT_TEXT TEXTEQU <BIT5>
BGL_TEXT_LOWER_RIGHT_TEXT TEXTEQU <BIT6>
BGL_TEXT_UPPER_LEFT_TEXT TEXTEQU <BIT7>
BGL_TEXT_LOWER_LEFT_TEXT TEXTEQU <BIT8>
BGL_TEXT_DROP_SHADOW_TEXT TEXTEQU <BIT9>
BGL_TEXT_FONT_SMALL TEXTEQU <BIT10>
BGL_TEXT_FONT_CUSTOM_NORMAL TEXTEQU <BIT11>
BGL_TEXT_FONT_CUSTOM_BOLD TEXTEQU <(BIT10 | BIT11)>
BGL_TEXT_FONT_FIXED TEXTEQU <BIT12>
BGL_TEXT_ALIGN_MASK TEXTEQU <(BIT0 | BIT1 | BIT2 | BIT3 | BIT4 | BIT5 | BIT6 | BIT7 | BIT8)>
BGL_TEXT_FONT_MASK TEXTEQU <(BIT10 | BIT11 | BIT12)>
BGL_TEXT_VALID_MASK EQU 000003fffh
ROAD_TEXTURE_NONE EQU 0t
ROAD_TEXTURE_CURRENT EQU 1t
ROAD_TEXTURE_STYLE1 EQU 2t
ROAD_TEXTURE_STYLE2 EQU 3t
ROAD_TEXTURE_RAILROAD EQU 4t
ROAD_TEXTURE_RIVER EQU 5t
VAR_BASE_PARAMS EQU -1t
VAR_BASE_GLOBAL EQU 0t
VAR_BASE_LOCAL EQU 1t
CAT_SHIPS EQU 2t
CAT_MESH EQU 4t
CAT_POLY EQU 8t
CAT_RIVER EQU 12t
CAT_ROAD EQU 16t
CAT_LINE EQU 20t
CAT_RUNWAY EQU 24t
CAT_MOUNTAIN EQU 28t
CAT_CRATER EQU 32t
CAT_GROUND_ELEMENT EQU 40t
CAT_SHADOWS EQU 60t
OBJECTOP_BUILDING_RECT_FLAT_ROOF EQU 1t
OBJECTOP_BUILDING_RECT_RIDGE_ROOF EQU 2t
OBJECTOP_BUILDING_RECT_PEAK_ROOF EQU 3t
OBJECTOP_BUILD_RECT_FLAT_ROOF EQU 4t
OBJECTOP_BUILD_RECT_RIDGE_ROOF EQU 6t
OBJECTOP_BUILD_RECT_PEAK_ROOF EQU 7t
OBJECTOP_BUILD_RECT_SLANT_ROOF EQU 8t
OBJECTOP_BUILD_PYRAMID EQU 9t
OBJECTOP_BUILD_N_SIDED EQU 10t
OBJECTOP_BUILD_OCTAGANAL EQU 11t
OBJECTOP_BEACON_CIVILIAN_AIRPORT EQU 501t
OBJECTOP_BEACON_CIVILIAN_HELIPORT EQU 502t
OBJECTOP_BEACON_CIVILIAN_WATER EQU 503t
OBJECTOP_BEACON_MILITARY_AIRPORT EQU 504t
OBJECTOP_BEACON_MILITARY_HELIPORT EQU 505t
OBJECTOP_BEACON_MILITARY_WATER EQU 506t
OBJECTOP_WINDSOCK EQU 521t
OBJECTOP_CRASH EQU 600t
OBJECTOP_EFFECT EQU 620t
BUILDING_WALL_TEXTURE_MAX EQU 122t
BUILDING_WALL_TEXTURE_OLD EQU 86t
BUILDING_ROOF_TEXTURE_MAX EQU 38t
BUILDING_ROOF_TEXTURE_OLD EQU 34t
BUILDING_WINDOW_TEXTURE_MAX EQU 103t
BUILDING_WINDOW_TEXTURE_OLD EQU 85t
RUNWAY_SURFACE_DIRT EQU 0o
RUNWAY_SURFACE_CEMENT EQU 1t
RUNWAY_SURFACE_ASPHALT EQU 2t
RUNWAY_SURFACE_GRASS EQU 3t
RUNWAY_SURFACE_CORAL EQU 4t
RUNWAY_SURFACE_GRAVEL EQU 5t
RUNWAY_SURFACE_OIL_TREATED EQU 6t
RUNWAY_SURFACE_STEEL_MATS EQU 7t
RUNWAY_SURFACE_SNOW EQU 8t
RUNWAY_SURFACE_BITUMINUS EQU 11t
RUNWAY_SURFACE_BRICK EQU 12t
RUNWAY_SURFACE_CLAY EQU 13t
RUNWAY_SURFACE_MACADAM EQU 14t
RUNWAY_SURFACE_PLANKS EQU 15t
RUNWAY_SURFACE_SAND EQU 16t
RUNWAY_SURFACE_SHALE EQU 17t
RUNWAY_SURFACE_TARMAC EQU 18t
RUNWAY_SURFACE_ICE EQU 19t
RUNWAY_SURFACE_DIRT_FUZZY EQU 64t
RUNWAY_SURFACE_DIRT_ROUND EQU 65t
RUNWAY_SURFACE_STEEL_MATS_CFS EQU 66t
RUNWAY_SURFACE_CORAL_FUZZY EQU 67t
RUNWAY_SURFACE_CORAL_ROUND EQU 68t
C_BLACK EQU 00000f000h
C_DKGRAY EQU 00000f001h
C_GRAY EQU 00000f002h
C_LTGRAY EQU 00000f003h
C_WHITE EQU 00000f004h
C_RED EQU 00000f005h
C_GREEN EQU 00000f006h
C_BLUE EQU 00000f007h
C_ORANGE EQU 00000f008h
C_YELLOW EQU 00000f009h
C_BROWN EQU 00000f00ah
C_TAN EQU 00000f00bh
C_BRICK EQU 00000f00ch
C_OLIVE EQU 00000f00dh
C_WATER EQU 00000f00eh
C_BRIGHT_RED EQU 00000f00fh
C_BRIGHT_GREEN EQU 00000f010h
C_BRIGHT_BLUE EQU 00000f011h
C_BRIGHT_AQUA EQU 00000f012h
C_BRIGHT_ORANGE EQU 00000f013h
C_BRIGHT_YELLOW EQU 00000f014h
C_BRIGHT_WHITE EQU 00000f015h
C_CONST_WHITE EQU 00000f016h
C_DARK_RED EQU 00000f017h
C_DARK_GREEN EQU 00000f018h
C_DARK_BLUE EQU 00000f019h
C_DARK_ORANGE EQU 00000f01ah
C_DARK_YELLOW EQU 00000f01bh
C_DARK_BROWN EQU 00000f01ch
C_DARK_TAN EQU 00000f01dh
C_DARK_BRICK EQU 00000f01eh
C_DARK_OLIVE EQU 00000f01fh
C_MED_RED EQU 00000f020h
C_MED_GREEN EQU 00000f021h
C_MED_BLUE EQU 00000f022h
C_MED_ORANGE EQU 00000f023h
C_MED_YELLOW EQU 00000f024h
C_MED_BROWN EQU 00000f025h
C_MED_TAN EQU 00000f026h
C_MED_BRICK EQU 00000f027h
C_MED_OLIVE EQU 00000f028h
C_LIGHT_RED EQU 00000f029h
C_LIGHT_GREEN EQU 00000f02ah
C_LIGHT_BLUE EQU 00000f02bh
C_LIGHT_ORANGE EQU 00000f02ch
C_LIGHT_YELLOW EQU 00000f02dh
C_LIGHT_BROWN EQU 00000f02eh
C_LIGHT_TAN EQU 00000f02fh
C_LIGHT_BRICK EQU 00000f030h
C_LIGHT_OLIVE EQU 00000f031h
C_BRIGHT_DKGRAY EQU 00000f032h
C_BRIGHT_GRAY EQU 00000f033h
C_BRIGHT_LTGRAY EQU 00000f034h
G_DKGRAY EQU 00000f001h
G_GRAY EQU 00000f002h
G_LTGRAY EQU 00000f003h
G_WHITE EQU 00000f004h
G_RED EQU 00000f005h
G_GREEN EQU 00000f006h
G_BLUE EQU 00000f007h
G_ORANGE EQU 00000f008h
G_YELLOW EQU 00000f009h
G_BROWN EQU 00000f00ah
G_TAN EQU 00000f00bh
G_BRICK EQU 00000f00ch
G_OLIVE EQU 00000f00dh
C_FS5_VAL EQU 00000f000h
C_RGB_VAL EQU 00000e000h
C_BRIGHT_RGB_VAL EQU 00000b000h
MOUSERECT_TOOLTIP EQU 1t
MOUSERECT_PARMS EQU 2t
MOUSERECT_FUNCTION_LANGUAGE EQU 1t
MOUSERECT_FUNCTION_DRAG EQU 2t
MOUSERECT_FUNCTION_DRAG_STEPS EQU 3t
MOUSERECT_MAX_FUNCTION EQU 3t
BGL_SCENERY_OBJECT_UNKNOWN EQU 0t
BGL_SCENERY_OBJECT_GENERIC_BUILDING EQU 1t
BGL_SCENERY_OBJECT_LIBRARY_OBJECT EQU 2t
BGL_SCENERY_OBJECT_WINDSOCK EQU 3t
BGL_SCENERY_OBJECT_EFFECT EQU 4t
BGL_SCENERY_OBJECT_TAXIWAY_SIGNS EQU 5t
BGL_SCENERY_OBJECT_MODEL_DATA EQU 6t
BGL_SCENERY_OBJECT_TRIGGER EQU 7t
BGL_SCENERY_OBJECT_BEACON EQU 8t
BGL_SCENERY_OBJECT_PROXY_OBJECT EQU 9t
BGL_SCENERY_OBJECT_ATTACHED_OBJECT_START EQU 4096t
BGL_SCENERY_OBJECT_ATTACHED_OBJECT_END EQU 4097t
BGL_SCENERY_OBJECT_MAC EQU 4098t
BGL_SCENERY_OBJECT_TYPE TYPEDEF SDWORD
PBGL_SCENERY_OBJECT_TYPE TYPEDEF PTR SDWORD
PPBGL_SCENERY_OBJECT_TYPE TYPEDEF PTR PTR SDWORD
BGL_ATTACH_POINT_MAX_NAME_LENGTH EQU 128t
BGL_PLATFORM_MAX_NAME_LENGTH EQU 128t
BGL_PLATFORM_MAX_VERTEX_COUNT EQU 255t
TAXIWAY_SIGN_JUSTIFICATION_UNKNOWN EQU 0t
TAXIWAY_SIGN_JUSTIFICATION_LEFT EQU 1t
TAXIWAY_SIGN_JUSTIFICATION_RIGHT EQU 2t
TAXIWAY_SIGN_JUSTIFICATION TYPEDEF SDWORD
PTAXIWAY_SIGN_JUSTIFICATION TYPEDEF PTR SDWORD
PPTAXIWAY_SIGN_JUSTIFICATION TYPEDEF PTR PTR SDWORD
TAXIWAY_SIGN_SIZE_UNKNOWN EQU 0t
TAXIWAY_SIGN_SIZE_1 EQU 1t
TAXIWAY_SIGN_SIZE_2 EQU 2t
TAXIWAY_SIGN_SIZE_3 EQU 3t
TAXIWAY_SIGN_SIZE_4 EQU 4t
TAXIWAY_SIGN_SIZE_5 EQU 5t
TAXIWAY_SIGN_SIZE TYPEDEF SDWORD
PTAXIWAY_SIGN_SIZE TYPEDEF PTR SDWORD
PPTAXIWAY_SIGN_SIZE TYPEDEF PTR PTR SDWORD
DAYLIGHT_SAVINGS_NONE EQU 0t
DAYLIGHT_SAVINGS_US EQU 1t
DAYLIGHT_SAVINGS_CANADA EQU 2t
DAYLIGHT_SAVINGS_BRITIAN EQU 3t
DAYLIGHT_SAVINGS_CENTRAL_EUROPE EQU 4t
DAYLIGHT_SAVINGS_EASTERN_EUROPE EQU 5t
DAYLIGHT_SAVINGS_MAX EQU 6t
DAYLIGHT_SAVINGS_TYPE TYPEDEF SDWORD
PDAYLIGHT_SAVINGS_TYPE TYPEDEF PTR SDWORD
;-----------------------------------------------------------------------------
; NOTE: MACROS CAN HAVE A MAXIMUM OF 25 ARGUMENTS
;-----------------------------------------------------------------------------
BGL macro
dw 76h
endm
BGL_EVEN macro
db 76h
EVEN
endm
EOF macro
dw 00h
endm
LOGOL macro
dw 01h
endm
NOOP macro
dw 02h
endm
DEBUG macro
dw 04h
endm
SURFACE macro
dw 05h
endm
SPNT macro xx,yy,zz
dw 06h
dw xx
dw yy
dw zz
endm
CPNT macro xx,yy,zz
dw 07h
dw xx
dw yy
dw zz
endm
CLOSURE macro
dw 08h
endm
GSURF macro
dw 09h
endm
GSPNT macro ii,xx,yy,zz
dw 0ah
dw ii
dw xx
dw yy
dw zz
endm
GCPNT macro ii,xx,yy,zz
dw 0bh
dw ii
dw xx
dw yy
dw zz
endm
GCLOSURE macro
dw 0ch
endm
;
; ERRS16 generate a error if the passed offset
; cant fit in a signed 16bit WORD
;
ERRS16 macro x
.errnz (((x) + 32768) AND 0FFFF0000h)
endm
;
; ERRS8 generate a error if the passed offset
; cant fit in a signed 8bit BYTE
;
ERRS8 macro x
.errnz (((x) + 128) AND 0FFFFFF00h)
endm
JUMP macro dest
local start
start label word
dw 0dh
dw (offset dest)-(offset start)
ERRS16 (offset dest)-(offset start)
endm
BGL_JUMP_32 macro routine
local start
start label word
dw 088h
dd (offset routine)-(offset start)
endm
SETCOLOR macro color
dw 14h
dw color
endm
GDEFRES macro n,i,x,y,z
dw 11h,n,i,x,y,z
endm
GSTRRES macro n
dw 12h,n
endm
GCNTRES macro n
dw 13h,n
endm
DEFRES macro n,x,y,z
dw 0eh,n,x,y,z
endm
STRRES macro n
dw 0fh,n
endm
CNTRES macro n
dw 10h,n
endm
TEXTURE macro n,ix,iy,iz,name
local name_start, name_end
dw 18h
if n eq 1
dw 0C000h
else
if n eq 2
dw 08000h
else
if n eq 3
dw 04000h
else
dw 0
endif
endif
endif
dw ix,iy,iz
name_start label byte
db name,0,0
name_end label byte
if ((offset name_end) - (offset name_start)) le 13
%out texture name is too short!
rept 14 - ((offset name_end) - (offset name_start))
db 0
endm
rept 14 - ((offset name_end) - (offset name_start))
db 0
endm
.err ; comment this line out to 'save the users butt'
endif
if ((offset name_end) - (offset name_start)) ge 15
%out texture name is too long!
.err
endif
endm
TEXTURE_REPEAT macro ix,iy,iz
dw 05Dh
dw ix,iy,iz
endm
TEXTURE_ROTATE macro pitch,bank,heading
dw 05Eh
dw [(pitch/90)*256] + [(bank/90)*16] + [heading/90]
endm
TEXTURE_ENABLE macro parm
dw 017h,parm
endm
PALETTE macro name
dw 19h
db name,0,0
endm
;;
;; BGL_COLOR - omit a UNICOL
;;
;; BGL_COLOR x UNICOL
;; BGL_COLOR r,g,b 24 bit color
;; BGL_COLOR r,g,b,a 32 bit color with alpha
;; BGL_COLOR r,g,b,BRIGHT bright 24 bit color
;; BGL_COLOR r,g,b,a,BRIGHT bright 32 bit color with alpha
;;
;; 24 bit RGBA color are packed into a UNICOL32 like so
;; the second byte is the magic byte that flags this color
;; as a full RGB not a FS5 color.
;;
;; bbggEarr - RGBA UNICOL
;; bbggBarr - RGBA UNICOL (bright)
;;
BRIGHT = 0FFFFh ; special flag to use with this macro only
C_RGB = 0E0h ; magic value in UNICOL for 24bit RGB
C_BRIGHT_RGB = 0B0h ; magic value in UNICOL for 24bit bright RGB
BGL_COLOR macro r,g,b,a,f
ifnb <b> ; r,g,b case
db r ; output red
ifnb <f> ; r,g,b,a,f case
if f eq BRIGHT ; r,g,b,a,BRIGHT case
db C_BRIGHT_RGB + (a / 16) ; output bright RGB flag + alpha
else
db C_RGB + (a / 16) ; output RGB flag + alpha
endif
else
ifnb <a> ; r,g,b,a case
if a eq BRIGHT ; r,g,b,BRIGHT case
db C_BRIGHT_RGB + 0Fh ; output bright RGB flag + alpha=255
else ; r,g,b,a case
db C_RGB + (a / 16) ; output RGB flag + alpha
endif
else ; r,g,b case
db C_RGB + 0Fh ; output RGB flag + alpha=255
endif
endif
db g ; output green
db b ; output blue
else ; x case
dd r ; output UNICOL
endif
endm
BGL_TEXTURE macro tclass,color,name
local texture_start,texture_end0,texture_end
texture_start label word
dw 043h
dw (offset texture_end-texture_start)
dw 0 ; priority/index
dw tclass
BGL_COLOR color ;; dd color
ifnb <name>
db name,0
else
db -1, 0 ; no name specified, disable texturing
endif
texture_end0 label word
IF (offset texture_end0 - offset texture_start) AND 1
db 0
ENDIF
texture_end label word
ERRS16 (offset texture_end - offset texture_start)
endm
BGL_LIST macro name,count
name label word
dw 064h
dw (offset &name&_end_list - offset name)
dw count
dw count dup(0);
ERRS16 (offset &name&_end_list - offset name)
endm
BGL_LIST_END macro name
&name&_end_list label word
endm
BGL_SELECT macro var,vmask,tlist
local start
start label word
dw 07Ch
dw var
dw vmask
dd (offset tlist - offset start)
endm
RESLIST macro start,number
dw 1ah
dw start,number
endm
VRESLIST macro list_ofs,start,number
dw 09Bh
dw list_ofs,start,number
endm
VERTEX macro x,y,z
dw x,y,z
endm
RESROW macro start,number,xs,ys,zs,xe,ye,ze
dw 031h
dw start,number
dw xs,ys,zs
dw xe,ye,ze
endm
FACE3 macro px,py,pz,nx,ny,nz,p1,p2,p3
dw 1dh,3
dw px,py,pz,nx,ny,nz
dw p1,p2,p3
endm
FACE4 macro px,py,pz,nx,ny,nz,p1,p2,p3,p4
dw 1dh,4
dw px,py,pz,nx,ny,nz
dw p1,p2,p3,p4
endm
FACE5 macro px,py,pz,nx,ny,nz,p1,p2,p3,p4,p5
dw 1dh,5
dw px,py,pz,nx,ny,nz
dw p1,p2,p3,p4,p5
endm
FACE6 macro px,py,pz,nx,ny,nz,p1,p2,p3,p4,p5,p6
dw 1dh,6
dw px,py,pz,nx,ny,nz
dw p1,p2,p3,p4,p5,p6
endm
FACE7 macro px,py,pz,nx,ny,nz,p1,p2,p3,p4,p5,p6,p7
dw 1dh,7
dw px,py,pz,nx,ny,nz
dw p1,p2,p3,p4,p5,p6,p7
endm
FACE8 macro px,py,pz,nx,ny,nz,p1,p2,p3,p4,p5,p6,p7,p8
dw 1dh,8
dw px,py,pz,nx,ny,nz
dw p1,p2,p3,p4,p5,p6,p7,p8
endm
FACE macro px,py,pz,nx,ny,nz,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32
local lb1,lb2
dw 01Dh
dw [(lb2-lb1)/2]
dw px,py,pz,nx,ny,nz
lb1 dw p1,p2,p3
ifnb <p4>
dw p4
endif
ifnb <p5>
dw p5
endif
ifnb <p6>
dw p6
endif
ifnb <p7>
dw p7
endif
ifnb <p8>
dw p8
endif
ifnb <p9>
dw p9
endif
ifnb <p10>
dw p10
endif
ifnb <p11>
dw p11
endif
ifnb <p12>
dw p12
endif
ifnb <p13>
dw p13
endif
ifnb <p14>
dw p14
endif
ifnb <p15>
dw p15
endif
ifnb <p16>
dw p16
endif
ifnb <p17>
dw p17
endif
ifnb <p18>
dw p18
endif
ifnb <p19>
dw p19
endif
ifnb <p20>
dw p20
endif
ifnb <p21>
dw p21
endif
ifnb <p22>
dw p22
endif
ifnb <p23>
dw p23
endif
ifnb <p24>
dw p24
endif
ifnb <p25>
dw p25
endif
ifnb <p26>
dw p26
endif
ifnb <p27>
dw p27
endif
ifnb <p28>
dw p28
endif
ifnb <p29>
dw p29
endif
ifnb <p30>
dw p30
endif
ifnb <p31>
dw p31
endif
ifnb <p32>
dw p32
endif
lb2 label word
endm
BGL_DEBUG macro
__debug_ = $
dw 04h
NOOP
endm
BGL_DEBUG_END macro
retf
EVEN
__debug_end_ = $
org __debug_
dw 016h
dw (__debug_end_ -__debug_)
org __debug_end_
endm
HAZE macro val
dw 1eh,val
endm
HORIZON macro val
dw 1fh,val
endm
FACET3_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z
dw 20h,3
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
endm
FACET4_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z
dw 20h,4
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
endm
FACET5_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z,p5,t5x,t5z
dw 20h,5
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
dw p5,t5x,t5z
endm
FACET6_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z,p5,t5x,t5z,p6,t6x,t6z
dw 20h,6
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
dw p5,t5x,t5z
dw p6,t6x,t6z
endm
FACET7_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z,p5,t5x,t5z,p6,t6x,t6z,p7,t7x,t7z
dw 20h,7
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
dw p5,t5x,t5z
dw p6,t6x,t6z
dw p7,t7x,t7z
endm
FACET8_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z,p5,t5x,t5z,p6,t6x,t6z,p7,t7x,t7z,p8,t8x,t8z
dw 20h,8
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
dw p5,t5x,t5z
dw p6,t6x,t6z
dw p7,t7x,t7z
dw p8,t8x,t8z
endm
FACET9_TMAP macro a,b,c,d,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z,p5,t5x,t5z,p6,t6x,t6z,p7,t7x,t7z,p8,t8x,t8z,p9,t9x,t9z
dw 20h,9
dw a,b,c
dd d
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
dw p5,t5x,t5z
dw p6,t6x,t6z
dw p7,t7x,t7z
dw p8,t8x,t8z
dw p9,t9x,t9z
endm
SUPERMESH macro x_grid,z_grid,x_patch,z_patch,x_disp,z_disp,x_view,z_view
local start
dw 21h,x_grid,z_grid,x_patch,z_patch,x_disp,z_disp,x_view,z_view
start label word
supermeshloc = offset start
endm
SMROUTINE macro dest
dw (offset dest)-(supermeshloc)
ERRS16 (offset dest)-(supermeshloc)
endm
BGL_CALL macro routine
local start
start label word
dw 23h
dw (offset routine)-(offset start)
ERRS16 (offset routine)-(offset start)
endm
BGL_CALL_32 macro routine
local start
start label word
dw 08Ah
dd (offset routine)-(offset start)
endm
BGL_FAR_CALL macro routine,segment
dw 05Ch
dw routine
dw segment
endm
BGL_LIBRARY_CALL macro id1,id2,id3,id4 ; calls a BGL library
dw 063h ; opcode
dw 0 ; quick index lookup
GUID128 <id1,id2,id3,id4> ; guid128 values
endm
BGL_VLIBRARY_CALL macro var,index ; calls a BGL library
dw 09Ch ; opcode
ifnb <index>
dw index ; quick index lookup
else
dw 0 ; quick index lookup
endif
dw var ; library id
endm
BGL_RETURN macro
dw 22h
endm
IFIN1 macro dest,v,low,high
local start
start label word
dw 24h
dw (offset dest)-(offset start)
dw v,low,high
ERRS16 (offset dest)-(offset start)
endm
IFNOTIN1 macro dest,v,low,high
local skip
IFIN1 skip,v,low,high
BGL_JUMP_32 dest
skip label word
endm
IFIN2 macro dest,v1,low1,high1,v2,low2,high2
local start
start label word
dw 1Ch
dw (offset dest)-(offset start)
dw v1,low1,high1
dw v2,low2,high2
ERRS16 (offset dest)-(offset start)
endm
IFIN3 macro dest,v1,low1,high1,v2,low2,high2,v3,low3,high3
local start
start label word
dw 21h
dw (offset dest)-(offset start)
dw v1,low1,high1
dw v2,low2,high2
dw v3,low3,high3
ERRS16 (offset dest)-(offset start)
endm
IFINBOXP macro dest,lowx,highx,lowy,highy,lowz,highz
local start
start label word
dw 73h
dw (offset dest)-(offset start)
dw lowx,highx
dw lowy,highy
dw lowz,highz
ERRS16 (offset dest)-(offset start)
endm
IFIN_BOX_PLANE macro dest,centerdx,centerdy,centerdz,sizex,sizey,sizez,pitch,bank,heading
local start
start label word
dw 1Bh
dw (offset dest)-(offset start)
dw centerdx,centerdy,centerdz ; box center offset from the scale command
dw sizex,sizey,sizez ; rotated size of the box
dw pitch,bank,heading ; box rotation
ERRS16 (offset dest)-(offset start)
endm
IFIN_INSTANCED_BOX_PLANE macro dest,centerdx,centerdy,centerdz,sizex,sizey,sizez,pitch,bank,heading
local start
start label word
dw 0A9h
dw (offset dest)-(offset start)
dw centerdx,centerdy,centerdz ; box center offset from the scale command
dw sizex,sizey,sizez ; rotated size of the box
dw pitch,bank,heading ; box rotation
ERRS16 (offset dest)-(offset start)
endm
SEPARATION_PLANE macro dest,a,b,c,d
local start
start label word
dw 25h
dw (offset dest)-(offset start)
dw a,b,c
dd d
ERRS16 (offset dest)-(offset start)
endm
SIDE macro xv,low,high,r1,r2
local jump1
IFIN1 xv,low,high,jump1
BGL_CALL r1
BGL_CALL r2
BGL_RETURN
jump1 label word
BGL_CALL r2
BGL_CALL r1
BGL_RETURN
endm
IFSIDE macro a,b,c,d,r1,r2
local jump1
SEPARATION_PLANE jump1,a,b,c,d
BGL_CALL r1
BGL_CALL r2
BGL_RETURN
jump1 label word
BGL_CALL r2
BGL_CALL r1
BGL_RETURN
endm
IFSIDE_32 macro a,b,c,d,r1,r2
local jump1
SEPARATION_PLANE jump1,a,b,c,d
BGL_CALL_32 r1
BGL_CALL_32 r2
BGL_RETURN
jump1 label word
BGL_CALL_32 r2
BGL_CALL_32 r1
BGL_RETURN
endm
IFSIDE_32_3 macro a,b,c,d,r1,r2,r3
local jump1
SEPARATION_PLANE jump1,a,b,c,d
BGL_CALL_32 r1
BGL_CALL_32 r2
BGL_CALL_32 r3
BGL_RETURN
jump1 label word
BGL_CALL_32 r3
BGL_CALL_32 r2
BGL_CALL_32 r1
BGL_RETURN
endm
IFSIDE_32_NO_RET macro a,b,c,d,r1,r2
local jump1
local jump2
SEPARATION_PLANE jump1,a,b,c,d
BGL_CALL_32 r1
BGL_CALL_32 r2
JUMP jump2
jump1 label word
BGL_CALL_32 r2
BGL_CALL_32 r1
jump2 label word
endm
IFSIDE_32_3_NO_RET macro a,b,c,d,r1,r2,r3
local jump1
local jump2
SEPARATION_PLANE jump1,a,b,c,d
BGL_CALL_32 r1
BGL_CALL_32 r2
BGL_CALL_32 r3
JUMP jump2
jump1 label word
BGL_CALL_32 r3
BGL_CALL_32 r2
BGL_CALL_32 r1
jump2 label word
endm
SETWRD macro v,n
dw 26h,v,n
endm
BGL_TEXTURED_FACET3 macro a,b,c,d,p1,p2,p3
dw 27h,3
dw a,b,c
dd d
dw p1,p2,p3
endm
BGL_TEXTURED_FACET4 macro a,b,c,d,p1,p2,p3,p4
dw 27h,4
dw a,b,c
dd d
dw p1,p2,p3,p4
endm
GRESLIST macro start,number
dw 29h
dw start,number
endm
GVERTEX macro x,y,z,nx,ny,nz
dw x,y,z,nx,ny,nz
endm
GFACET3 macro a,b,c,d,p1,p2,p3
dw 2ah,3
dw a,b,c
dd d
dw p1,p2,p3
endm
GFACET4 macro a,b,c,d,p1,p2,p3,p4
dw 2ah,4
dw a,b,c
dd d
dw p1,p2,p3,p4
endm
GFACET5 macro a,b,c,d,p1,p2,p3,p4,p5
dw 2ah,5
dw a,b,c
dd d
dw p1,p2,p3,p4,p5
endm
GFACET6 macro a,b,c,d,p1,p2,p3,p4,p5,p6
dw 2ah,6
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6
endm
GFACET7 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7
dw 2ah,7
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7
endm
GFACET8 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8
dw 2ah,8
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8
endm
GFACET9 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9
dw 2ah,9
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9
endm
GFACET10 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
dw 2ah,0ah
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
endm
GFACET macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32
local lb1,lb2
dw 02Ah
dw [(lb2-lb1)/2]
dw a,b,c
dd d
lb1 dw p1,p2,p3
ifnb <p4>
dw p4
endif
ifnb <p5>
dw p5
endif
ifnb <p6>
dw p6
endif
ifnb <p7>
dw p7
endif
ifnb <p8>
dw p8
endif
ifnb <p9>
dw p9
endif
ifnb <p10>
dw p10
endif
ifnb <p11>
dw p11
endif
ifnb <p12>
dw p12
endif
ifnb <p13>
dw p13
endif
ifnb <p14>
dw p14
endif
ifnb <p15>
dw p15
endif
ifnb <p16>
dw p16
endif
ifnb <p17>
dw p17
endif
ifnb <p18>
dw p18
endif
ifnb <p19>
dw p19
endif
ifnb <p20>
dw p20
endif
ifnb <p21>
dw p21
endif
ifnb <p22>
dw p22
endif
ifnb <p23>
dw p23
endif
ifnb <p24>
dw p24
endif
ifnb <p25>
dw p25
endif
ifnb <p26>
dw p26
endif
ifnb <p27>
dw p27
endif
ifnb <p28>
dw p28
endif
ifnb <p29>
dw p29
endif
ifnb <p30>
dw p30
endif
ifnb <p31>
dw p31
endif
ifnb <p32>
dw p32
endif
lb2 label word
endm
REJECT macro dest,x,y,z,radius
local start
start label word
dw 2ch
dw (offset dest)-(offset start)
dw x,y,z,radius
ERRS16 (offset dest)-(offset start)
endm
SCOLOR24 macro r,g,b,a,f
dw 2dh
BGL_COLOR r,g,b,a,f
endm
LCOLOR24 macro r,g,b,a,f
dw 2eh
BGL_COLOR r,g,b,a,f
endm
SET_BRIGHTNESS macro value
dw 030h
dw value
endm
LIBRARY_OBJECT_PTR macro lib_ptr,guid1,guid2,guid3,guid4
dd (lib_ptr - rel_base) ; 00 offset to library
dd guid1,guid2,guid3,guid4 ; 04 128-bit ID (byte reversed)
endm
LIBRARY_EOL macro
dd 0
endm
BGL_LIBRARY_OBJECT macro guid1,guid2,guid3,guid4,power,lsize,scale,ltype,prop,lend,ltitle
local op_base,start
op_base dd guid1,guid2,guid3,guid4 ; 00 128-bit ID (byte reversed)
db power ; 16 image power
dd (start-op_base) ; start of the real bglcode
dd (lend-start) ; length of the real bgl code
dd lsize ; size of the object in Meters
dd scale ; scale factor of this object
dd ltype ; library type (current undefined = 0)
dd prop ; library properties (current undefined = 0)
ifnb <ltitle> ; 0 or less than 47 chars
db ltitle,0 ; title (may be blank)
db ($-(offset op_base)) AND 1 dup (0)
endif
start label word
endm
ADDOBJ macro dest
local start
start label word
dw 32h
dw (offset dest)-(offset start)
ERRS16 (offset dest)-(offset start)
endm
ADDOBJ_32 macro dest
local start
start label word
dw 02Bh
dd (offset dest)-(offset start)
endm
INSTANCE_CALL macro dest,p,b,hh
local start
start label word
dw 033h
dw (offset dest)-(offset start)
dw p
dw b
dw hh
ERRS16 (offset dest)-(offset start)
endm
CONCAVE macro ; override the next polygon to be CONCAVE
dw 038h
endm
BALL macro size,x,y,z
dw 028h
dw size
dw x,y,z
endm
IFMSK macro dest,var,mask
local start
start label word
dw 039h
dw (offset dest)-(offset start)
dw offset var
dw mask
ERRS16 (offset dest)-(offset start)
endm
if_n = 0
if_flag = 0
GEN_LABEL macro name, n, s
&name&_&n label s
endm
OFF_LABEL macro name, n, rel, s
dw (offset &name&_&n - $ - rel) / (s)
endm
BGL_IF macro var,mask
.errnz if_flag ; BGL_IF cant nest
IFMSK if_%(if_n),var,mask
if_flag = 1
endm
BGL_ELSE macro
JUMP if_%(if_n + 1)
GEN_LABEL if, %(if_n), word
if_n = if_n + 1
endm
BGL_ENDIF macro
GEN_LABEL if, %(if_n), word
if_n = if_n + 1
if_flag = 0
endm
; CASE var_addr,num_cases,case_fall,case_addresses...
; if [var_address] < num_cases
; jmp [CASE + 4 + [var_address]*2]
; else fall through
CASE macro var_addr,case_fall,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24
local lbl
lbl dw 003h
dw [(lb3-lb2)/2]
dw var_addr
dw case_fall-lbl
lb2 label word
ifnb <c0>
dw c0-lbl
endif
ifnb <c1>
dw c1-lbl
endif
ifnb <c2>
dw c2-lbl
endif
ifnb <c3>
dw c3-lbl
endif
ifnb <c4>
dw c4-lbl
endif
ifnb <c5>
dw c5-lbl
endif
ifnb <c6>
dw c6-lbl
endif
ifnb <c7>
dw c7-lbl
endif
ifnb <c8>
dw c8-lbl
endif
ifnb <c9>
dw c9-lbl
endif
ifnb <c10>
dw c10-lbl
endif
ifnb <c11>
dw c11-lbl
endif
ifnb <c12>
dw c12-lbl
endif
ifnb <c13>
dw c13-lbl
endif
ifnb <c14>
dw c14-lbl
endif
ifnb <c15>
dw c15-lbl
endif
ifnb <c16>
dw c16-lbl
endif
ifnb <c17>
dw c17-lbl
endif
ifnb <c18>
dw c18-lbl
endif
ifnb <c19>
dw c19-lbl
endif
ifnb <c20>
dw c20-lbl
endif
ifnb <c21>
dw c21-lbl
endif
ifnb <c22>
dw c22-lbl
endif
ifnb <c23>
dw c23-lbl
endif
ifnb <c24>
dw c24-lbl
endif
lb3 label word
endm
SCALE macro dest,signal,size,scale,lat,latf,lon,lonf,alt,altf
local start
start label word
dw 02fh
dw (offset dest)-(offset start)
dw signal
dw size
dw 0 ; radsort ptr
dd scale
dw latf
dd lat
dw lonf
dd lon
dw altf
dd alt
ERRS16 (offset dest)-(offset start)
endm
SUPER_SCALE macro dest,signal,size,scale
local start
start label word
dw 34h
dw (offset dest)-(offset start)
dw signal
dw size
if (scale le 31)
dw scale
else
dw scale+32
endif
ERRS16 (offset dest)-(offset start)
endm
SUPER_SCALEV macro dest,signal,size,scale
local start
start label word
dw 34h
dw (offset dest)-(offset start)
dw signal
dw size
dw scale+32
ERRS16 (offset dest)-(offset start)
endm
POSITION macro dest,signal,size,lat,latf,lon,lonf,alt,altf
local start
start label word
dw 03Ch
dw (offset dest)-(offset start)
dw signal
dw size
dw 0 ; radsort ptr
dw latf
dd lat
dw lonf
dd lon
dw altf
dd alt
ERRS16 (offset dest)-(offset start)
endm
VPOSITION macro dest,signal,size,adrs
local start
start label word
dw 3Ah
dw (offset dest)-(offset start)
dw signal
dw size
dw 0 ; radsort ptr
dw adrs
ERRS16 (offset dest)-(offset start)
endm
VSCALE macro dest,signal,size,scale,var
local start
start label word
dw 04ch
dw (offset dest)-(offset start)
dw signal
dw size
dw 0 ; radsort ptr
dd scale
dw var
ERRS16 (offset dest)-(offset start)
endm
VSCALEV macro dest,psignal,psize,pscale,plla,pnormal
local start
start label word
dw 09Dh
dw (offset dest)-(offset start)
dw psignal ; relative ptr to the signal in params
dw psize ; relative ptr to the size in params
ifnb <pnormal>
dw pnormal ; relative ptr to surface normal
else
dw 0 ; no surface normal (was radsort_index)
endif
dw pscale ; relative ptr to the scale in params
dw plla ; relative ptr to the LATLONALT in params
ERRS16 (offset dest)-(offset start)
endm
VINSTANCE_CALL32 macro dest,var
local do_jump, done
VINSTANCE_CALL16 do_jump, var
JUMP done
do_jump label word
BGL_JUMP_32 dest
done label word
endm
VINSTANCE_CALL16 macro dest,var
local start
start label word
dw 03Bh
dw (offset dest)-(offset start)
dw offset var
ERRS16 (offset dest)-(offset start)
endm
VINSTANCE_CALL macro dest,var
VINSTANCE_CALL16 dest,var
endm
SEED macro type,xsize,zsize,realalt,latgrid,longrid,number
dw 3dh
dd type
dd xsize
dd zsize
dd realalt
dw latgrid
dw longrid
dw number
endm
FACET3 macro a,b,c,d,p1,p2,p3
dw 3eh,3
dw a,b,c
dd d
dw p1,p2,p3
endm
FACET4 macro a,b,c,d,p1,p2,p3,p4
dw 3eh,4
dw a,b,c
dd d
dw p1,p2,p3,p4
endm
FACET5 macro a,b,c,d,p1,p2,p3,p4,p5
dw 3eh,5
dw a,b,c
dd d
dw p1,p2,p3,p4,p5
endm
FACET6 macro a,b,c,d,p1,p2,p3,p4,p5,p6
dw 3eh,6
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6
endm
FACET7 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7
dw 3eh,7
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7
endm
FACET8 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8
dw 3eh,8
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8
endm
FACET9 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9
dw 3eh,9
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9
endm
FACET10 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
dw 3eh,10
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
endm
FACET11 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11
dw 3eh,11
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11
endm
FACET12 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12
dw 3eh,12
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12
endm
FACET13 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13
dw 3eh,13
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13
endm
FACET14 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14
dw 3eh,14
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14
endm
FACET15 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15
dw 3eh,15
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15
endm
FACET16 macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16
dw 3eh,16
dw a,b,c
dd d
dw p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16
endm
FACET macro a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35
local lb1,lb2
dw 03Eh
dw [(lb2-lb1)/2]
dw a,b,c
dd d
lb1 dw p1,p2,p3
ifnb <p4>
dw p4
endif
ifnb <p5>
dw p5
endif
ifnb <p6>
dw p6
endif
ifnb <p7>
dw p7
endif
ifnb <p8>
dw p8
endif
ifnb <p9>
dw p9
endif
ifnb <p10>
dw p10
endif
ifnb <p11>
dw p11
endif
ifnb <p12>
dw p12
endif
ifnb <p13>
dw p13
endif
ifnb <p14>
dw p14
endif
ifnb <p15>
dw p15
endif
ifnb <p16>
dw p16
endif
ifnb <p17>
dw p17
endif
ifnb <p18>
dw p18
endif
ifnb <p19>
dw p19
endif
ifnb <p20>
dw p20
endif
ifnb <p21>
dw p21
endif
ifnb <p22>
dw p22
endif
ifnb <p23>
dw p23
endif
ifnb <p24>
dw p24
endif
ifnb <p25>
dw p25
endif
ifnb <p26>
dw p26
endif
ifnb <p27>
dw p27
endif
ifnb <p28>
dw p28
endif
ifnb <p29>
dw p29
endif
ifnb <p30>
dw p30
endif
ifnb <p31>
dw p31
endif
ifnb <p32>
dw p32
endif
ifnb <p33>
dw p33
endif
ifnb <p34>
dw p34
endif
ifnb <p35>
dw p35
endif
lb2 label word
endm
FACETN macro a,b,c,d,n
local lb1,lb2
dw 03Eh
dw n
dw a,b,c
dd d
endm
ALPHA macro acolor
dw 08Fh
dd acolor
endm
VALPHA macro var
dw 0A4h
dw var
endm
ALPHA_FACET macro acolor,a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35
ALPHA acolor
FACET a,b,c,d,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35
ALPHA 0
endm
SHADOW_CALL macro routine
local start
start label word
dw 3Fh
dw (offset routine)-(offset start)
ERRS16 (offset routine)-(offset start)
endm
SHADOW_VPOSITION macro adrs
dw 40h
dw adrs
endm
SHADOW_VICALL32 macro dest,var
local do_jump, done
SHADOW_VICALL16 do_jump,var
JUMP done
do_jump label word
BGL_JUMP_32 dest
done label word
endm
SHADOW_VICALL16 macro dest,var
local start
start label word
dw 041h
dw (offset dest)-(offset start)
dw offset var
ERRS16 (offset dest)-(offset start)
endm
SHADOW_VICALL macro dest,var
SHADOW_VICALL16 dest,var
endm
POINT_VICALL_32 macro dest,xx,yy,zz,pp,pv,bb,bv,hh,hv
local do_jump, done
POINT_VICALL_16 do_jump,xx,yy,zz,pp,pv,bb,bv,hh,hv
JUMP done
do_jump label word
BGL_JUMP_32 dest
done label word
endm
POINT_VICALL_16 macro dest,xx,yy,zz,pp,pv,bb,bv,hh,hv
local start
start label word
dw 046h
dw (offset dest)-(offset start)
dw xx,yy,zz
dw pp,pv,bb,bv,hh,hv
ERRS16 (offset dest)-(offset start)
endm
POINT_VICALL macro dest,xx,yy,zz,pp,pv,bb,bv,hh,hv
POINT_VICALL_16 dest,xx,yy,zz,pp,pv,bb,bv,hh,hv
endm
; -----------------------------------------------------------------------------
; SPRITE_VICALL - This command will always rotate the object toward the eye. It
; works as follows:
; 1. xx,yy,zz are subtracted from current visual_position.x/y/z
; 2. object is rotated in heading if hh is non-zero and then
; hh is added to the new heading
; 3. hv is gotten if non-zero and added to new heading
; 4. object is rotated in bank if bb is non-zero and then
; bb is added to the new bank
; 5. bv is gotten if non-zero and added to new bank
; 6. object is rotated in pitch if pp is non-zero and then
; pp is added to the new pitch
; 7. pv is gotten if non-zero and added to new pitch
; 8. object is then instanced and displayed
;
; Entry: subroutine = relative offset to the BGL subroutine
; xx,yy,zz = offset for rotate at
; pp,bb,hh = fixed PBH to add to rotated object (each of
; these must be non-zero to rotated that axis
; toward the eye)
; pv,bv,hv = offset into current var block to get pbh to
; rotated. This is done even if the axis is not
; rotated to the eye.
; -----------------------------------------------------------------------------
SPRITE_VICALL macro subroutine,xx,yy,zz,pp,pv,bb,bv,hh,hv
local start
start label word
dw 0A7h
dw (offset subroutine)-(offset start)
dw xx,yy,zz
XYZ16 {pp,bb,hh}
XYZ16 {pv,bv,hv}
ERRS16 (offset subroutine)-(offset start)
endm
PNT macro x,y,z
dw 037h
dw x,y,z
endm
MAP_SCALE macro scale
dw 47h
dw scale
endm
VAR_SEG macro tseg
dw 48h
dw tseg
endm
BLDING macro n,c,dx,dy,dz,s,x,z
dw 49h
dw n,c,dx,dy,dz,s,x,z
endm
BGL_BUILDING macro cat,texture_bottom,texture_window,texture_top,texture_roof,sx,syb,sym,syt,sz,txb,tzb,txm,tym,tzm,txt,tzt
dw 0A0h ; opcode
dw 38 ; total length of this opcode
dw cat ; type of building (square with flat roof, round with flat roof, square with slant roof, ...)
dw texture_bottom ; texture maps to use
dw texture_window ; texture maps to use
dw texture_top ; texture maps to use
dw texture_roof ; texture maps to use
dw sx ; size of build in the X axis
dw syb ; size of build in the Y axis of the bottom section
dw sym ; size of build in the Y axis of the middle section
dw syt ; size of build in the Y axis of the top section
dw sz ; size of build in the Z axis
dw txb ; texture index for the bottom section in the X axis
dw tzb ; texture index for the bottom section in the Z axis
dw txm ; texture index for the middle section in the X axis
dw tym ; texture index for the middle section in the Y axis
dw tzm ; texture index for the middle section in the Z axis
dw txt ; texture index for the top section in the X axis
dw tzt ; texture index for the top section in the Z axis
endm
BUILDING_RECT_FLAT macro sx,sz
dw 0A0h ; opcode
dw 42 ; total length of this opcode
dw OBJECTOP_BUILD_RECT_FLAT_ROOF ; type of building
dw sx ; size of build in the X axis
dw sz ; size of build in the Z axis
endm
BUILDING_FLAT_ROOF macro texroof,txr,tzr
dw texroof ; texture maps to use
dw txr ; texture index for the roof section in the X axis
dw tzr ; texture index for the roof section in the Z axis
endm
BUILDING_RECT_PEAK macro sx,sz
dw 0A0h ; opcode
dw 46 ; total length of this opcode
dw OBJECTOP_BUILD_RECT_PEAK_ROOF ; type of building
dw sx ; size of build in the X axis
dw sz ; size of build in the Z axis
endm
BUILDING_RECT_PEAK_ROOF macro texroof,syr,txr,tyr,tzr
dw texroof ; texture maps to use
dw txr ; texture index for the roof section in the X axis
dw tzr ; texture index for the roof section in the Z axis
dw syr ; size of build in the Y axis of the roof section
dw tyr ; texture index for the roof section in the Y axis
endm
BUILDING_RECT_RIDGE macro sx,sz
dw 0A0h ; opcode
dw 50 ; total length of this opcode
dw OBJECTOP_BUILD_RECT_RIDGE_ROOF ; type of building
dw sx ; size of build in the X axis
dw sz ; size of build in the Z axis
endm
BUILDING_RECT_RIDGE_ROOF macro texroof,syr,txr,tzr, texgab,txg,tyg
dw texroof ; texture maps to use
dw txr ; texture index for the roof section in the X axis
dw tzr ; texture index for the roof section in the Z axis
dw syr ; size of build in the Y axis of the top section
dw tyg ; texture index for the gable section in the Y axis
dw texgab ; texture maps to use
dw txg ; texture index for the gable section in the X axis
endm
BUILDING_RECT_SLANT macro sx,sz
dw 0A0h ; opcode
dw 56 ; total length of this opcode
dw OBJECTOP_BUILD_RECT_SLANT_ROOF ; type of building
dw sx ; size of build in the X axis
dw sz ; size of build in the Z axis
endm
BUILDING_RECT_SLANT_ROOF macro texroof,syr,txr,tzr, texgab,txg,tyg, texface,tzf,tyf
dw texroof ; texture maps to use
dw txr ; texture index for the roof section in the X axis
dw tzr ; texture index for the roof section in the Z axis
dw syr ; size of build in the Y axis of the top section
dw tyg ; texture index for the gable section in the Y axis
dw texgab ; texture maps to use
dw txg ; texture index for the gable section in the X axis
dw texface ; texture maps to use
dw tzf ; texture index for the face section in the Z axis
dw tyf ; texture index for the face section in the Y axis
endm
BUILDING_PYRAMID macro sbx,sbz,stx,stz
dw 0A0h ; opcode
dw 46 ; total length of this opcode
dw OBJECTOP_BUILD_PYRAMID ; type of building
dw sbx ; size of build base in the X axis
dw sbz ; size of build base in the Z axis
dw stx ; size of build top in the X axis
dw stz ; size of build top in the Z axis
endm
BUILDING_RECT_BOTTOM macro texbot,syb,txb,tzb
dw texbot ; texture maps to use
dw syb ; size of build in the Y axis of the bottom section
dw txb ; texture index for the bottom section in the X axis
dw tzb ; texture index for the bottom section in the Z axis
endm
BUILDING_RECT_WINDOW macro texwin,syw,txw,tyw,tzw
dw texwin ; texture maps to use
dw syw ; size of build in the Y axis of the middle section
dw txw ; texture index for the middle section in the X axis
dw tyw ; texture index for the middle section in the Y axis
dw tzw ; texture index for the middle section in the Z axis
endm
BUILDING_RECT_TOP macro textop,syt,txt,tzt
dw textop ; texture maps to use
dw syt ; size of build in the Y axis of the top section
dw txt ; texture index for the top section in the X axis
dw tzt ; texture index for the top section in the Z axis
endm
BUILDING_OCTAGAN macro sx,sz,sides,smoothing
dw 0A0h ; opcode
dw 40 ; total length of this opcode
dw OBJECTOP_BUILD_OCTAGANAL ; type of building
db sides ; number of sides
db smoothing ; smoothed shading
dw sx ; size of build in the X axis
dw sz ; size of build in the Z axis
endm
BUILDING_MULTI_SIDED macro sx,sz,sides,smoothing
dw 0A0h ; opcode
dw 40 ; total length of this opcode
dw OBJECTOP_BUILD_N_SIDED ; type of building
db sides ; number of sides
db smoothing ; smoothed shading
dw sx ; size of build in the X axis
dw sz ; size of build in the Z axis
endm
BUILDING_MULTI_SIDED_WALLS macro texbot,syb,txb, texwin,syw,txw,tyw, textop,syt,txt
dw texbot ; texture maps to use
dw syb ; size of build in the Y axis of the bottom section
dw txb ; texture index for the bottom section in the X axis
dw texwin ; texture maps to use
dw syw ; size of build in the Y axis of the middle section
dw txw ; texture index for the middle section in the X axis
dw tyw ; texture index for the middle section in the Y axis
dw textop ; texture maps to use
dw syt ; size of build in the Y axis of the top section
dw txt ; texture index for the top section in the X axis
endm
BUILDING_MULTI_SIDED_ROOF macro texroof,syr,txr,tzr
dw texroof ; texture maps to use
dw syr ; size of build in the Y axis of the roof section
dw txr ; texture index for the roof section in the X axis
dw tzr ; texture index for the roof section in the Z axis
endm
BGL_WINDSOCK macro biasx,biasy,biasz,height,sock_length,pole_color,sock_color,flags
dw 0A0h ; opcode
dw 36 ; total length of this opcode
dw OBJECTOP_WINDSOCK ; type of object (521)
real4 biasx,biasy,biasz ; bias from the current scale command (in scale units)
real4 height ; height of the support pole (in scale units)
real4 sock_length ; length of the sock (in scale units)
dd pole_color ; RGBA color of the pole
dd sock_color ; RGBA color of the sock
dw flags ; general flags, all 0, bit 0 is lighted
endm
BGL_EFFECT macro effect_name, effect_params
local effect_beg
local effect_end
local name_beg
effect_beg label word
dw 0A0h ; opcode
dw (offset effect_end) - (offset effect_beg)
dw OBJECTOP_EFFECT ; type of object
dd 0
name_beg label word
db effect_name
db (80 - ($-(offset name_beg))) dup (0)
ifnb <effect_params>
ifdif <effect_params>,<"">
db effect_params
endif
endif
db 0
db ($-(offset name_beg)) AND 1 dup (0)
effect_end label word
endm
LANDING_LIGHTS_VICALL macro dest,var,lx,ly,lz
local start
start label word
dw 04ah
dw (offset dest)-(offset start)
dw offset var
dw lx
dw ly
dw lz
ERRS16 (offset dest)-(offset start)
endm
BGL_OVERLAY macro id,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24
local lbl,lbl2
lbl dw 4Bh
dw (lbl2-lbl)
dw id
ifnb <c0>
dw c0
endif
ifnb <c1>
dw c1
endif
ifnb <c2>
dw c2
endif
ifnb <c3>
dw c3
endif
ifnb <c4>
dw c4
endif
ifnb <c5>
dw c5
endif
ifnb <c6>
dw c6
endif
ifnb <c7>
dw c7
endif
ifnb <c8>
dw c8
endif
ifnb <c9>
dw c9
endif
ifnb <c10>
dw c10
endif
ifnb <c11>
dw c11
endif
ifnb <c12>
dw c12
endif
ifnb <c13>
dw c13
endif
ifnb <c14>
dw c14
endif
ifnb <c15>
dw c15
endif
ifnb <c16>
dw c16
endif
ifnb <c17>
dw c17
endif
ifnb <c18>
dw c18
endif
ifnb <c19>
dw c19
endif
ifnb <c20>
dw c20
endif
ifnb <c21>
dw c21
endif
ifnb <c22>
dw c22
endif
ifnb <c23>
dw c23
endif
ifnb <c24>
dw c24
endif
lbl2 label word
endm
VAR2LOW64K macro d,s
dw 04dh
dw d,s
endm
LOW64K2VAR macro d,s
dw 04eh
dw d,s
endm
MOVWRD macro d,s
dw 04fh
dw d,s
endm
GCOLOR macro color
dw 50h
dw color
endm
LCOLOR macro color
dw 51h
dw color
endm
SCOLOR macro color
dw 52h
dw color
endm
GCOLOR_ABS macro color
dw 53h
dw color
endm
ASMCALL_32 macro asm_offset
dw 08Ch
dd offset asm_offset
endm
SET_SURFACE_TYPE macro t,x,z,alt
dw 055h
dw t,x,z,alt
endm
SET_WEATHER macro skip
local start
start label word
dw 056h
dw (offset skip)-(offset start)
ERRS16 (offset skip)-(offset start)
endm
BGL_WEATHER macro type,angle,factor,extra
dw 057h
dw 04ch+type*256
dw angle
dw factor
dw extra
endm
TEXTURE_BOUNDS macro lx,lz,ux,uz
dw 058h
dd lx,lz,ux,uz
endm
VAR_SEG_ID macro
dw 059h
endm
SEED_ADDOBJ macro dest
local start
start label word
dw 5Ah
dw (offset dest)-(offset start)
ERRS16 (offset dest)-(offset start)
endm
INDIRECT_CALL macro var
dw 5bh
dw var
endm
IFSIZEV macro dest,radius,pixels
local start
start label word
dw 5Fh
dw (offset dest)-(offset start)
dw radius,pixels
ERRS16 (offset dest)-(offset start)
endm
FACE3_TMAP macro px,py,pz,nx,ny,nz,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z
dw 60h,3
dw px,py,pz,nx,ny,nz
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
endm
FACE4_TMAP macro px,py,pz,nx,ny,nz,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z
dw 60h,4
dw px,py,pz,nx,ny,nz
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
endm
FACE7_TMAP macro px,py,pz,nx,ny,nz,p1,t1x,t1z,p2,t2x,t2z,p3,t3x,t3z,p4,t4x,t4z,p5,t5x,t5z,p6,t6x,t6z,p7,t7x,t7z
dw 60h,7
dw px,py,pz,nx,ny,nz
dw p1,t1x,t1z
dw p2,t2x,t2z
dw p3,t3x,t3z
dw p4,t4x,t4z
dw p5,t5x,t5z
dw p6,t6x,t6z
dw p7,t7x,t7z
endm
RESLIST_SCALE macro start,cnt
dw 61h
dw start,cnt
endm
IFVIS4 macro dest,p1,p2,p3,p4
local start
start label word
dw 62h
dw (offset dest)-(offset start)
dw 4
dw p1,p2,p3,p4
ERRS16 (offset dest)-(offset start)
endm
IFVIS8 macro dest,p1,p2,p3,p4,p5,p6,p7,p8
local start
start label word
dw 62h
dw (offset dest)-(offset start)
dw 8
dw p1,p2,p3,p4,p5,p6,p7,p8
ERRS16 (offset dest)-(offset start)
endm
IFGT macro dest,var,num
IFIN1 dest,var,num,32767
endm
IFLT macro dest,var,num
IFIN1 dest,var,-32768,num
endm
IFEQ macro dest,var,num
IFIN1 dest,var,num,num
endm
PNTROW macro x1,y1,z1,x2,y2,z2,n
dw 35h
dw x1,y1,z1,x2,y2,z2,n
endm
BGL_NEW_RUNWAY macro name
name label word
dw 0AAh
dw (offset &name&_end_list - offset name)
ERRS16 (offset &name&_end_list - offset name)
endm
BGL_NEW_RUNWAY_END macro name
&name&_end_list label word
endm
; RUNWAY_SURFACE must tbe the first subop
RUNWAY_SURFACE macro lat,latf,lon,lonf,alt,altf,length,width,heading,flags,ident,lights,surface
db 01 ; sub-opcode
dw latf ; \ runway center latitude (48-bit meters*65536)
dd lat ; /
dw lonf ; \ runway cneter longitude (48-bit pseudodegrees)
dd lon ; /
dw altf ; \ runway alitude (feet MSL) (48-bit meters*65536)
dd alt ; /
dw heading ; runway true heading (16-bit pseudodegrees)
dw length ; runway length (feet)
dw width ; runway width (feet)
dw flags ; flags
db surface ; surface type
db lights ; edge lights, center lights
db ident ; runway number of designation
endm
RUNWAY_BASE_THRESHOLD macro length
db 02 ; sub-opcode
db 0 ; extra spare byte, MUST BE 0
dw length ; length of the threshold (already include in main runway length)
endm
RUNWAY_RECIP_THRESHOLD macro length
db 03 ; sub-opcode
db 0 ; extra spare byte, MUST BE 0
dw length ; length of the threshold (already include in main runway length)
endm
RUNWAY_BASE_BLAST_PAD macro length
db 04 ; sub-opcode
db 0 ; extra spare byte, MUST BE 0
dw length ; length of the blast pad (NOT include in main runway length)
endm
RUNWAY_RECIP_BLAST_PAD macro length
db 05 ; sub-opcode
db 0 ; extra spare byte, MUST BE 0
dw length ; length of the blast pad (NOT include in main runway length)
endm
RUNWAY_BASE_APPROACH macro flags,approach_type,strobes,vasi_type,vasi_angle,vasi_x,vasi_z,vasi_space
db 06 ; sub-opcode
db 0 ; extra spare byte, MUST BE 0
RUNWAY_LIGHTS flags,approach_type,strobes,vasi_type,vasi_angle,vasi_x,vasi_z,vasi_space
endm
RUNWAY_RECIP_APPROACH macro flags,approach_type,strobes,vasi_type,vasi_angle,vasi_x,vasi_z,vasi_space
db 07 ; sub-opcode
db 0 ; extra spare byte, MUST BE 0
RUNWAY_LIGHTS flags,approach_type,strobes,vasi_type,vasi_angle,vasi_x,vasi_z,vasi_space
endm
RUNWAY_BASE_OVERRUN macro length,width,surface
db 08 ; sub-opcode
db surface ; surface type (does NOT have to be the same as the main runway)
dw length ; length of the threshold (already include in main runway length)
dw width ; width (does NOT have to be the same as the main runway)
endm
RUNWAY_RECIP_OVERRUN macro length,width,surface
db 09 ; sub-opcode
db surface ; surface type (does NOT have to be the same as the main runway)
dw length ; length of the threshold (already include in main runway length)
dw width ; width (does NOT have to be the same as the main runway)
endm
RUNWAY_BASE_DISTANCE macro x_offset,flags
db 10 ; sub-opcode
db flags ; flags to tell the type the distance left numbers
dw x_offset ; offset from the center of the runway
endm
RUNWAY_RECIP_DISTANCE macro x_offset,flags
db 11 ; sub-opcode
db flags ; flags to tell the type the distance left numbers
dw x_offset ; offset from the center of the runway
endm
TEXTURE_RUNWAY macro lat,latf,lon,lonf,alt,altf,length,width,heading,flags,ident,surface
dw 044h
dw latf
dd lat
dw lonf
dd lon
dw altf
dd alt
dw heading
dw length
dw width
db flags
db ident
db 0,0
db surface
db 0 ; rw_threshold_flags
dw 0 ; rw_threshold_south1
dw 0 ; rw_threshold_south2
dw 0 ; rw_threshold_north1
dw 0 ; rw_threshold_north2
db 0 ; rw_s_light_flags
db 0 ; rw_s_light_system
db 0 ; rw_s_light_strobes
db 0 ; rw_s_light_vasi_type
dw 0 ; rw_s_light_vasi_angle
dw 0 ; rw_s_light_vasi_x
dw 0 ; rw_s_light_vasi_z
dw 0 ; rw_s_light_vasi_space
db 0 ; rw_n_light_flags
db 0 ; rw_n_light_system
db 0 ; rw_n_light_strobes
db 0 ; rw_n_light_vasi_type
dw 0 ; rw_n_light_vasi_angle
dw 0 ; rw_n_light_vasi_x
dw 0 ; rw_n_light_vasi_z
dw 0 ; rw_n_light_vasi_space
endm
RUNWAY_COLORS macro surf,edge,dash,number,touch,fixed,threshold,blast
dw surf
dw edge
dw dash
dw number
dw touch
dw fixed
dw threshold
dw blast
endm
RUNWAY_MAIN macro lat,latf,lon,lonf,alt,altf,length,width,heading,flags,ident,lights,surface
dw 044h
dw latf ; \ runway center latitude (48-bit meters*65536)
dd lat ; /
dw lonf ; \ runway cneter longitude (48-bit pseudodegrees)
dd lon ; /
dw altf ; \ runway alitude (feet MSL) (48-bit meters*65536)
dd alt ; /
dw heading ; runway true heading (16-bit pseudodegrees)
dw length ; runway length (feet)
dw width ; runway width (feet)
db flags ;
db ident ;
db lights ; edge lights, center lights
db 0 ; reserved for expansion
db surface ;
endm
BGL_RUNWAY macro lat,latf,lon,lonf,alt,altf,length,width,heading,flags,ident,lights,surface,custom
dw 044h
dw latf ; \ runway center latitude (48-bit meters*65536)
dd lat ; /
dw lonf ; \ runway cneter longitude (48-bit pseudodegrees)
dd lon ; /
dw altf ; \ runway alitude (feet MSL) (48-bit meters*65536)
dd alt ; /
dw heading ; runway true heading (16-bit pseudodegrees)
dw length ; runway length (feet)
dw width ; runway width (feet)
db flags ; flags
db ident ;
db lights ; edge lights, center lights
db custom ; custom flags
db surface ; surface type
endm
RUNWAY_THRESHOLD macro flags,s_thr_ofs,s_blast_pad,n_thr_ofs,n_blast_pad
db flags ; threshold_flags
dw s_thr_ofs ; south threshold offset (feet)
dw s_blast_pad ; south blast pad size (feet)
dw n_thr_ofs ; north threshold offset (feet)
dw n_blast_pad ; north blast pas size (feet)
endm
RUNWAY_LIGHTS macro flags,approach_type,strobes,vasi_type,vasi_angle,vasi_x,vasi_z,vasi_space
db flags ; light flags
db approach_type ; approach system type
db strobes ; number of strobes
db vasi_type ; VASI type
dw vasi_angle ; VASI angle (16-bit pseudodegrees)
dw vasi_x ; VASI X offset (feet)
dw vasi_z ; VASI Z offset (feet)
dw vasi_space ; VASI spacing between bars (feet)
endm
POLYGON_RUNWAY macro lat,latf,lon,lonf,alt,altf,length,width,heading,flags,ident,surface
dw 044h
dw latf
dd lat
dw lonf
dd lon
dw altf
dd alt
dw heading
dw length
dw width
db flags
db ident
db 0,0
db surface
db 0 ; rw_threshold_flags
dw 0 ; rw_threshold_south1
dw 0 ; rw_threshold_south2
dw 0 ; rw_threshold_north1
dw 0 ; rw_threshold_north2
db 0 ; rw_s_light_flags
db 0 ; rw_s_light_system
db 0 ; rw_s_light_strobes
db 0 ; rw_s_light_vasi_type
dw 0 ; rw_s_light_vasi_angle
dw 0 ; rw_s_light_vasi_x
dw 0 ; rw_s_light_vasi_z
dw 0 ; rw_s_light_vasi_space
db 0 ; rw_n_light_flags
db 0 ; rw_n_light_system
db 0 ; rw_n_light_strobes
db 0 ; rw_n_light_vasi_type
dw 0 ; rw_n_light_vasi_angle
dw 0 ; rw_n_light_vasi_x
dw 0 ; rw_n_light_vasi_z
dw 0 ; rw_n_light_vasi_space
endm
APPROACH_LIGHTS macro delta_z,width,heading,flags,system,strobes,vasi,vasi_angle,vasi_dx,vasi_dz,vasi_space
dw 072h
dw heading
dw width
dw delta_z
db flags
db system
db strobes
db vasi
dw vasi_angle
dw vasi_dx
dw vasi_dz
dw vasi_space
endm
VSCOLOR macro var
dw 65h
dw var
endm
VGCOLOR macro var
dw 66h
dw var
endm
VLCOLOR macro var
dw 67h
dw var
endm
TMAP_LIGHT_SHADE macro nx,ny,nz
dw 68h,nx,ny,nz
endm
ROAD_START macro width,x,y,z
dw 69h
dw width
dw x,y,z
endm
ROAD_CONT macro x,y,z
dw 6ah
dw x,y,z
endm
RIVER_START macro width,x,y,z
dw 6bh
dw width
dw x,y,z
endm
RIVER_CONT macro x,y,z
dw 6ch
dw x,y,z
endm
IFSIZEH macro dest,radius,pixels
local start
start label word
dw 6Dh
dw (offset dest)-(offset start)
dw radius,pixels
ERRS16 (offset dest)-(offset start)
endm
TAXIWAY_START macro width,x,y,z
dw 6eh
dw width
dw x,y,z
endm
TAXIWAY_CONT macro x,y,z
dw 6fh
dw x,y,z
endm
BGL_TAXI_MARKINGS macro name
name label word
dw 01Fh
dw (offset &name&_end_list - offset name)
ERRS16 (offset &name&_end_list - offset name)
endm
BGL_TAXI_MARKINGS_END macro name
&name&_end_list label word
endm
BGL_TAXI_ILS_HOLD macro x1,z1,x2,z2
dw TAXI_SUBOPF_ILS_HOLD
real4 x1,z1
real4 x2,z2
endm
BGL_TAXI_RUNWAY_HOLD macro x1,z1,x2,z2
dw TAXI_SUBOPF_RUNWAY_HOLD
real4 x1,z1
real4 x2,z2
endm
BGL_TAXI_HOLD macro x1,z1,x2,z2
dw TAXI_SUBOPF_TAXI_HOLD
real4 x1,z1
real4 x2,z2
endm
BGL_TAXI_SOLID_EDGE macro x1,z1
dw TAXI_SUBOPF_SOLID_SOLID_EDGE
real4 x1,z1
endm
BGL_TAXI_SPLIT_EDGE macro x1,z1
dw TAXI_SUBOPF_DASHED_SOLID_EDGE
real4 x1,z1
endm
BGL_TAXI_DASHED_EDGE macro x1,z1
dw TAXI_SUBOPF_DASHED_DASHED_EDGE
REAL4 x1,z1
endm
BGL_TAXI_ARC macro
dw TAXI_SUBOP_ARC
endm
BGL_TAXI_BREAK macro
dw TAXI_SUBOP_BREAK;
endm
BGL_TAXI_CENTER macro x1,z1
dw TAXI_SUBOPF_CENTER
REAL4 x1,z1
endm
BGL_TAXI_SOLID_EDGE_LIGHTED macro x1,z1
dw TAXI_SUBOPF_SOLID_SOLID_EDGE_LIGHTED
REAL4 x1,z1
endm
BGL_TAXI_SPLIT_EDGE_LIGHTED macro x1,z1
dw TAXI_SUBOPF_DASHED_SOLID_EDGE_LIGHTED
REAL4 x1,z1
endm
BGL_TAXI_DASHED_EDGE_LIGHTED macro x1,z1
dw TAXI_SUBOPF_DASHED_DASHED_EDGE_LIGHTED
REAL4 x1,z1
endm
BGL_TAXI_CENTER_LIGHTED macro x1,z1
dw TAXI_SUBOPF_CENTER_LIGHTED
REAL4 x1,z1
endm
</