switch (FEAT_ROADVEHS, SELF, switch_e0, position_in_consist > 0 ? 16 : 0) + getbits(random_bits, 4, 1) * 4 + getbits(extra_callback_info1, 8, 8) ) { 0: spriteset_e0_front_style0_stack0; 1: spriteset_e0_front_style0_stack1; 4: spriteset_e0_front_style1_stack0; 5: spriteset_e0_front_style1_stack1; 16: spriteset_e0_middle_style0_stack0; 17: spriteset_e0_middle_style0_stack1; 20: spriteset_e0_middle_style1_stack0; 21: spriteset_e0_middle_style1_stack1; } // 1CC+2CC switch (FEAT_ROADVEHS, SELF, switch_e0_color0, STORE_TEMP((getbits(extra_callback_info1, 8, 8) < 1 ? CB_FLAG_MORE_SPRITES : 0) | PALETTE_USE_DEFAULT, 0x100) ) { default: switch_e0; } // 1CC only switch (FEAT_ROADVEHS, SELF, switch_e0_color1, STORE_TEMP((getbits(extra_callback_info1, 8, 8) < 1 ? CB_FLAG_MORE_SPRITES : 0) | PALETTE_CC_FIRST + company_colour1, 0x100) ) { default: switch_e0; } // 2CC only switch (FEAT_ROADVEHS, SELF, switch_e0_color2, STORE_TEMP((getbits(extra_callback_info1, 8, 8) < 1 ? CB_FLAG_MORE_SPRITES : 0) | PALETTE_CC_FIRST + company_colour2, 0x100) ) { default: switch_e0; } // grey switch (FEAT_ROADVEHS, SELF, switch_e0_color2, STORE_TEMP((getbits(extra_callback_info1, 8, 8) < 1 ? CB_FLAG_MORE_SPRITES : 0) | PALETTE_CC_FIRST + COLOUR_GREY, 0x100) ) { default: switch_e0; } switch (FEAT_ROADVEHS, SELF, switch_spriteset_e0_tram, getbits(random_bits, 4, 2) ) { 0: switch_e0_color0; 1: switch_e0_color1; 2: switch_e0_color2; 3: switch_e0_color3; }