MACRO FACE normal_x, normal_y, normal_z, visibility IF normal_x < 0 s_x = 1 << 7 ELSE s_x = 0 ENDIF IF normal_y < 0 s_y = 1 << 6 ELSE s_y = 0 ENDIF IF normal_z < 0 s_z = 1 << 5 ELSE s_z = 0 ENDIF s = s_x + s_y + s_z + visibility ax = ABS(normal_x) ay = ABS(normal_y) az = ABS(normal_z) EQUB s, ax, ay, az ENDMACROName: FACE [Show more] Type: Macro Category: Drawing ships Summary: Macro definition for adding faces to ship blueprints Deep dive: Ship blueprintsContext: See this macro in context in the source code References: This macro is used as follows: * SHIP_ADDER uses FACE * SHIP_ANACONDA uses FACE * SHIP_ASP_MK_2 uses FACE * SHIP_ASTEROID uses FACE * SHIP_BOA uses FACE * SHIP_BOULDER uses FACE * SHIP_CANISTER uses FACE * SHIP_COBRA_MK_1 uses FACE * SHIP_COBRA_MK_3 uses FACE * SHIP_COBRA_MK_3_P uses FACE * SHIP_CONSTRICTOR uses FACE * SHIP_CORIOLIS uses FACE * SHIP_COUGAR uses FACE * SHIP_DODO uses FACE * SHIP_ESCAPE_POD uses FACE * SHIP_FER_DE_LANCE uses FACE * SHIP_GECKO uses FACE * SHIP_KRAIT uses FACE * SHIP_MAMBA uses FACE * SHIP_MISSILE uses FACE * SHIP_MORAY uses FACE * SHIP_PLATE uses FACE * SHIP_PYTHON uses FACE * SHIP_PYTHON_P uses FACE * SHIP_ROCK_HERMIT uses FACE * SHIP_SHUTTLE uses FACE * SHIP_SIDEWINDER uses FACE * SHIP_SPLINTER uses FACE * SHIP_THARGOID uses FACE * SHIP_THARGON uses FACE * SHIP_TRANSPORTER uses FACE * SHIP_VIPER uses FACE * SHIP_WORM uses FACE
The following macro is used to build the ship blueprints: FACE normal_x, normal_y, normal_z, visibility See the deep dive on "Ship blueprints" for details of how faces are stored in the ship blueprints, and the deep dive on "Drawing ships" for information on how faces are used to draw 3D wireframe ships.
Arguments: normal_x The face normal's x-coordinate normal_y The face normal's y-coordinate normal_z The face normal's z-coordinate visibility The visibility distance, beyond which the edge is always shown