Loading

Paste #purcr82x9

  1. // default graphics chain
  2.         spriteset(athena_ss_doors_closed_livery_1_0_unflipped, "generated/graphics/athena.png") {
  3.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 0)
  4.         }
  5.         spriteset(athena_ss_doors_open_livery_1_0_unflipped, "generated/graphics/athena.png") {
  6.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 0 + 30)
  7.         }
  8.         spriteset(athena_ss_doors_closed_livery_2_0_unflipped, "generated/graphics/athena.png") {
  9.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 0 + 60)
  10.         }
  11.         spriteset(athena_ss_doors_open_livery_2_0_unflipped, "generated/graphics/athena.png") {
  12.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 0 + 90)
  13.         }
  14.             spritegroup athena_sg_part_load_or_empty_livery_1_0_unflipped {
  15.                 loaded:  [
  16.                     athena_ss_doors_closed_livery_1_0_unflipped,
  17.                 ];
  18.                 loading: [
  19.                     athena_ss_doors_open_livery_1_0_unflipped,
  20.                 ];
  21.             }
  22.             spritegroup athena_sg_full_load_livery_1_0_unflipped {
  23.                 loaded:  [
  24.                     athena_ss_doors_closed_livery_1_0_unflipped,
  25.                 ];
  26.                 loading: [
  27.                     athena_ss_doors_closed_livery_1_0_unflipped,
  28.                 ];
  29.             }
  30.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_0_unflipped, cargo_count*100/cargo_capacity) {
  31.                     0..99: return athena_sg_part_load_or_empty_livery_1_0_unflipped;
  32.                 return athena_sg_full_load_livery_1_0_unflipped;
  33.             }
  34.             spritegroup athena_sg_part_load_or_empty_livery_2_0_unflipped {
  35.                 loaded:  [
  36.                     athena_ss_doors_closed_livery_2_0_unflipped,
  37.                 ];
  38.                 loading: [
  39.                     athena_ss_doors_open_livery_2_0_unflipped,
  40.                 ];
  41.             }
  42.             spritegroup athena_sg_full_load_livery_2_0_unflipped {
  43.                 loaded:  [
  44.                     athena_ss_doors_closed_livery_2_0_unflipped,
  45.                 ];
  46.                 loading: [
  47.                     athena_ss_doors_closed_livery_2_0_unflipped,
  48.                 ];
  49.             }
  50.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_0_unflipped, cargo_count*100/cargo_capacity) {
  51.                     0..99: return athena_sg_part_load_or_empty_livery_2_0_unflipped;
  52.                 return athena_sg_full_load_livery_2_0_unflipped;
  53.             }
  54.                 spriteset(athena_ss_pantographs_down_0_unflipped, "generated/graphics/athena_pantographs_down.png") {
  55.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 0)
  56.                 }
  57.                 spriteset(athena_ss_pantographs_up_0_unflipped, "generated/graphics/athena_pantographs_up.png") {
  58.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 0)
  59.                 }
  60.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_0_unflipped, current_railtype) {
  61.                 ELRL: return athena_ss_pantographs_up_0_unflipped;
  62.                 return athena_ss_pantographs_down_0_unflipped;
  63.             }
  64.         spriteset(athena_ss_doors_closed_livery_1_0_flipped, "generated/graphics/athena.png") {
  65.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 0)
  66.         }
  67.         spriteset(athena_ss_doors_open_livery_1_0_flipped, "generated/graphics/athena.png") {
  68.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 0 + 30)
  69.         }
  70.         spriteset(athena_ss_doors_closed_livery_2_0_flipped, "generated/graphics/athena.png") {
  71.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 0 + 60)
  72.         }
  73.         spriteset(athena_ss_doors_open_livery_2_0_flipped, "generated/graphics/athena.png") {
  74.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 0 + 90)
  75.         }
  76.             spritegroup athena_sg_part_load_or_empty_livery_1_0_flipped {
  77.                 loaded:  [
  78.                     athena_ss_doors_closed_livery_1_0_flipped,
  79.                 ];
  80.                 loading: [
  81.                     athena_ss_doors_open_livery_1_0_flipped,
  82.                 ];
  83.             }
  84.             spritegroup athena_sg_full_load_livery_1_0_flipped {
  85.                 loaded:  [
  86.                     athena_ss_doors_closed_livery_1_0_flipped,
  87.                 ];
  88.                 loading: [
  89.                     athena_ss_doors_closed_livery_1_0_flipped,
  90.                 ];
  91.             }
  92.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_0_flipped, cargo_count*100/cargo_capacity) {
  93.                     0..99: return athena_sg_part_load_or_empty_livery_1_0_flipped;
  94.                 return athena_sg_full_load_livery_1_0_flipped;
  95.             }
  96.             spritegroup athena_sg_part_load_or_empty_livery_2_0_flipped {
  97.                 loaded:  [
  98.                     athena_ss_doors_closed_livery_2_0_flipped,
  99.                 ];
  100.                 loading: [
  101.                     athena_ss_doors_open_livery_2_0_flipped,
  102.                 ];
  103.             }
  104.             spritegroup athena_sg_full_load_livery_2_0_flipped {
  105.                 loaded:  [
  106.                     athena_ss_doors_closed_livery_2_0_flipped,
  107.                 ];
  108.                 loading: [
  109.                     athena_ss_doors_closed_livery_2_0_flipped,
  110.                 ];
  111.             }
  112.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_0_flipped, cargo_count*100/cargo_capacity) {
  113.                     0..99: return athena_sg_part_load_or_empty_livery_2_0_flipped;
  114.                 return athena_sg_full_load_livery_2_0_flipped;
  115.             }
  116.                 spriteset(athena_ss_pantographs_down_0_flipped, "generated/graphics/athena_pantographs_down.png") {
  117.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 0)
  118.                 }
  119.                 spriteset(athena_ss_pantographs_up_0_flipped, "generated/graphics/athena_pantographs_up.png") {
  120.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 0)
  121.                 }
  122.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_0_flipped, current_railtype) {
  123.                 ELRL: return athena_ss_pantographs_up_0_flipped;
  124.                 return athena_ss_pantographs_down_0_flipped;
  125.             }
  126.     // handle user flipped state
  127.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_1_0, vehicle_is_flipped) {
  128.         1: return athena_switch_graphics_percent_loaded_livery_2_0_flipped;
  129.         return athena_switch_graphics_percent_loaded_livery_1_0_unflipped;
  130.     }
  131.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_2_0, vehicle_is_flipped) {
  132.         1: return athena_switch_graphics_percent_loaded_livery_1_0_flipped;
  133.         return athena_switch_graphics_percent_loaded_livery_2_0_unflipped;
  134.     }
  135.     switch (FEAT_TRAINS, PARENT, athena_switch_graphics_engine_id_0, vehicle_type_id) {
  136.             lark: return athena_switch_graphics_livery_2_0;
  137.             merrylegs: return athena_switch_graphics_livery_2_0;
  138.             proper_job: return athena_switch_graphics_livery_2_0;
  139.             shoebox: return athena_switch_graphics_livery_2_0;
  140.             super_shoebox: return athena_switch_graphics_livery_2_0;
  141.             ultra_shoebox: return athena_switch_graphics_livery_2_0;
  142.             hurly_burly: return athena_switch_graphics_livery_2_0;
  143.             moor_gallop: return athena_switch_graphics_livery_2_0;
  144.             roarer: return athena_switch_graphics_livery_2_0;
  145.             screamer: return athena_switch_graphics_livery_2_0;
  146.             sizzler: return athena_switch_graphics_livery_2_0;
  147.         return athena_switch_graphics_livery_1_0;
  148.     }
  149.         switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_0, vehicle_is_flipped) {
  150.             1: return athena_switch_graphics_pantographs_0_flipped;
  151.             return athena_switch_graphics_pantographs_0_unflipped;
  152.         }
  153.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_vehicle_layers_0, getbits(extra_callback_info1, 8, 8)) {
  154.         0: return athena_switch_graphics_engine_id_0;
  155.             1: return athena_switch_graphics_pantographs_0;
  156.     }
  157.         spriteset(athena_ss_doors_closed_livery_1_1_unflipped, "generated/graphics/athena.png") {
  158.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 120)
  159.         }
  160.         spriteset(athena_ss_doors_open_livery_1_1_unflipped, "generated/graphics/athena.png") {
  161.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 120 + 30)
  162.         }
  163.         spriteset(athena_ss_doors_closed_livery_2_1_unflipped, "generated/graphics/athena.png") {
  164.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 120 + 60)
  165.         }
  166.         spriteset(athena_ss_doors_open_livery_2_1_unflipped, "generated/graphics/athena.png") {
  167.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 120 + 90)
  168.         }
  169.             spritegroup athena_sg_part_load_or_empty_livery_1_1_unflipped {
  170.                 loaded:  [
  171.                     athena_ss_doors_closed_livery_1_1_unflipped,
  172.                 ];
  173.                 loading: [
  174.                     athena_ss_doors_open_livery_1_1_unflipped,
  175.                 ];
  176.             }
  177.             spritegroup athena_sg_full_load_livery_1_1_unflipped {
  178.                 loaded:  [
  179.                     athena_ss_doors_closed_livery_1_1_unflipped,
  180.                 ];
  181.                 loading: [
  182.                     athena_ss_doors_closed_livery_1_1_unflipped,
  183.                 ];
  184.             }
  185.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_1_unflipped, cargo_count*100/cargo_capacity) {
  186.                     0..99: return athena_sg_part_load_or_empty_livery_1_1_unflipped;
  187.                 return athena_sg_full_load_livery_1_1_unflipped;
  188.             }
  189.             spritegroup athena_sg_part_load_or_empty_livery_2_1_unflipped {
  190.                 loaded:  [
  191.                     athena_ss_doors_closed_livery_2_1_unflipped,
  192.                 ];
  193.                 loading: [
  194.                     athena_ss_doors_open_livery_2_1_unflipped,
  195.                 ];
  196.             }
  197.             spritegroup athena_sg_full_load_livery_2_1_unflipped {
  198.                 loaded:  [
  199.                     athena_ss_doors_closed_livery_2_1_unflipped,
  200.                 ];
  201.                 loading: [
  202.                     athena_ss_doors_closed_livery_2_1_unflipped,
  203.                 ];
  204.             }
  205.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_1_unflipped, cargo_count*100/cargo_capacity) {
  206.                     0..99: return athena_sg_part_load_or_empty_livery_2_1_unflipped;
  207.                 return athena_sg_full_load_livery_2_1_unflipped;
  208.             }
  209.                 spriteset(athena_ss_pantographs_down_1_unflipped, "generated/graphics/athena_pantographs_down.png") {
  210.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 60)
  211.                 }
  212.                 spriteset(athena_ss_pantographs_up_1_unflipped, "generated/graphics/athena_pantographs_up.png") {
  213.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 60)
  214.                 }
  215.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_1_unflipped, current_railtype) {
  216.                 ELRL: return athena_ss_pantographs_up_1_unflipped;
  217.                 return athena_ss_pantographs_down_1_unflipped;
  218.             }
  219.         spriteset(athena_ss_doors_closed_livery_1_1_flipped, "generated/graphics/athena.png") {
  220.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 120)
  221.         }
  222.         spriteset(athena_ss_doors_open_livery_1_1_flipped, "generated/graphics/athena.png") {
  223.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 120 + 30)
  224.         }
  225.         spriteset(athena_ss_doors_closed_livery_2_1_flipped, "generated/graphics/athena.png") {
  226.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 120 + 60)
  227.         }
  228.         spriteset(athena_ss_doors_open_livery_2_1_flipped, "generated/graphics/athena.png") {
  229.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 120 + 90)
  230.         }
  231.             spritegroup athena_sg_part_load_or_empty_livery_1_1_flipped {
  232.                 loaded:  [
  233.                     athena_ss_doors_closed_livery_1_1_flipped,
  234.                 ];
  235.                 loading: [
  236.                     athena_ss_doors_open_livery_1_1_flipped,
  237.                 ];
  238.             }
  239.             spritegroup athena_sg_full_load_livery_1_1_flipped {
  240.                 loaded:  [
  241.                     athena_ss_doors_closed_livery_1_1_flipped,
  242.                 ];
  243.                 loading: [
  244.                     athena_ss_doors_closed_livery_1_1_flipped,
  245.                 ];
  246.             }
  247.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_1_flipped, cargo_count*100/cargo_capacity) {
  248.                     0..99: return athena_sg_part_load_or_empty_livery_1_1_flipped;
  249.                 return athena_sg_full_load_livery_1_1_flipped;
  250.             }
  251.             spritegroup athena_sg_part_load_or_empty_livery_2_1_flipped {
  252.                 loaded:  [
  253.                     athena_ss_doors_closed_livery_2_1_flipped,
  254.                 ];
  255.                 loading: [
  256.                     athena_ss_doors_open_livery_2_1_flipped,
  257.                 ];
  258.             }
  259.             spritegroup athena_sg_full_load_livery_2_1_flipped {
  260.                 loaded:  [
  261.                     athena_ss_doors_closed_livery_2_1_flipped,
  262.                 ];
  263.                 loading: [
  264.                     athena_ss_doors_closed_livery_2_1_flipped,
  265.                 ];
  266.             }
  267.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_1_flipped, cargo_count*100/cargo_capacity) {
  268.                     0..99: return athena_sg_part_load_or_empty_livery_2_1_flipped;
  269.                 return athena_sg_full_load_livery_2_1_flipped;
  270.             }
  271.                 spriteset(athena_ss_pantographs_down_1_flipped, "generated/graphics/athena_pantographs_down.png") {
  272.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 60)
  273.                 }
  274.                 spriteset(athena_ss_pantographs_up_1_flipped, "generated/graphics/athena_pantographs_up.png") {
  275.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 60)
  276.                 }
  277.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_1_flipped, current_railtype) {
  278.                 ELRL: return athena_ss_pantographs_up_1_flipped;
  279.                 return athena_ss_pantographs_down_1_flipped;
  280.             }
  281.     // handle user flipped state
  282.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_1_1, vehicle_is_flipped) {
  283.         1: return athena_switch_graphics_percent_loaded_livery_2_1_flipped;
  284.         return athena_switch_graphics_percent_loaded_livery_1_1_unflipped;
  285.     }
  286.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_2_1, vehicle_is_flipped) {
  287.         1: return athena_switch_graphics_percent_loaded_livery_1_1_flipped;
  288.         return athena_switch_graphics_percent_loaded_livery_2_1_unflipped;
  289.     }
  290.     switch (FEAT_TRAINS, PARENT, athena_switch_graphics_engine_id_1, vehicle_type_id) {
  291.             lark: return athena_switch_graphics_livery_2_1;
  292.             merrylegs: return athena_switch_graphics_livery_2_1;
  293.             proper_job: return athena_switch_graphics_livery_2_1;
  294.             shoebox: return athena_switch_graphics_livery_2_1;
  295.             super_shoebox: return athena_switch_graphics_livery_2_1;
  296.             ultra_shoebox: return athena_switch_graphics_livery_2_1;
  297.             hurly_burly: return athena_switch_graphics_livery_2_1;
  298.             moor_gallop: return athena_switch_graphics_livery_2_1;
  299.             roarer: return athena_switch_graphics_livery_2_1;
  300.             screamer: return athena_switch_graphics_livery_2_1;
  301.             sizzler: return athena_switch_graphics_livery_2_1;
  302.         return athena_switch_graphics_livery_1_1;
  303.     }
  304.         switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_1, vehicle_is_flipped) {
  305.             1: return athena_switch_graphics_pantographs_1_flipped;
  306.             return athena_switch_graphics_pantographs_1_unflipped;
  307.         }
  308.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_vehicle_layers_1, getbits(extra_callback_info1, 8, 8)) {
  309.         0: return athena_switch_graphics_engine_id_1;
  310.             1: return athena_switch_graphics_pantographs_1;
  311.     }
  312.         spriteset(athena_ss_doors_closed_livery_1_2_unflipped, "generated/graphics/athena.png") {
  313.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 240)
  314.         }
  315.         spriteset(athena_ss_doors_open_livery_1_2_unflipped, "generated/graphics/athena.png") {
  316.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 240 + 30)
  317.         }
  318.         spriteset(athena_ss_doors_closed_livery_2_2_unflipped, "generated/graphics/athena.png") {
  319.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 240 + 60)
  320.         }
  321.         spriteset(athena_ss_doors_open_livery_2_2_unflipped, "generated/graphics/athena.png") {
  322.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 240 + 90)
  323.         }
  324.             spritegroup athena_sg_part_load_or_empty_livery_1_2_unflipped {
  325.                 loaded:  [
  326.                     athena_ss_doors_closed_livery_1_2_unflipped,
  327.                 ];
  328.                 loading: [
  329.                     athena_ss_doors_open_livery_1_2_unflipped,
  330.                 ];
  331.             }
  332.             spritegroup athena_sg_full_load_livery_1_2_unflipped {
  333.                 loaded:  [
  334.                     athena_ss_doors_closed_livery_1_2_unflipped,
  335.                 ];
  336.                 loading: [
  337.                     athena_ss_doors_closed_livery_1_2_unflipped,
  338.                 ];
  339.             }
  340.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_2_unflipped, cargo_count*100/cargo_capacity) {
  341.                     0..99: return athena_sg_part_load_or_empty_livery_1_2_unflipped;
  342.                 return athena_sg_full_load_livery_1_2_unflipped;
  343.             }
  344.             spritegroup athena_sg_part_load_or_empty_livery_2_2_unflipped {
  345.                 loaded:  [
  346.                     athena_ss_doors_closed_livery_2_2_unflipped,
  347.                 ];
  348.                 loading: [
  349.                     athena_ss_doors_open_livery_2_2_unflipped,
  350.                 ];
  351.             }
  352.             spritegroup athena_sg_full_load_livery_2_2_unflipped {
  353.                 loaded:  [
  354.                     athena_ss_doors_closed_livery_2_2_unflipped,
  355.                 ];
  356.                 loading: [
  357.                     athena_ss_doors_closed_livery_2_2_unflipped,
  358.                 ];
  359.             }
  360.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_2_unflipped, cargo_count*100/cargo_capacity) {
  361.                     0..99: return athena_sg_part_load_or_empty_livery_2_2_unflipped;
  362.                 return athena_sg_full_load_livery_2_2_unflipped;
  363.             }
  364.                 spriteset(athena_ss_pantographs_down_2_unflipped, "generated/graphics/athena_pantographs_down.png") {
  365.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 120)
  366.                 }
  367.                 spriteset(athena_ss_pantographs_up_2_unflipped, "generated/graphics/athena_pantographs_up.png") {
  368.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 120)
  369.                 }
  370.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_2_unflipped, current_railtype) {
  371.                 ELRL: return athena_ss_pantographs_up_2_unflipped;
  372.                 return athena_ss_pantographs_down_2_unflipped;
  373.             }
  374.         spriteset(athena_ss_doors_closed_livery_1_2_flipped, "generated/graphics/athena.png") {
  375.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 240)
  376.         }
  377.         spriteset(athena_ss_doors_open_livery_1_2_flipped, "generated/graphics/athena.png") {
  378.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 240 + 30)
  379.         }
  380.         spriteset(athena_ss_doors_closed_livery_2_2_flipped, "generated/graphics/athena.png") {
  381.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 240 + 60)
  382.         }
  383.         spriteset(athena_ss_doors_open_livery_2_2_flipped, "generated/graphics/athena.png") {
  384.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 240 + 90)
  385.         }
  386.             spritegroup athena_sg_part_load_or_empty_livery_1_2_flipped {
  387.                 loaded:  [
  388.                     athena_ss_doors_closed_livery_1_2_flipped,
  389.                 ];
  390.                 loading: [
  391.                     athena_ss_doors_open_livery_1_2_flipped,
  392.                 ];
  393.             }
  394.             spritegroup athena_sg_full_load_livery_1_2_flipped {
  395.                 loaded:  [
  396.                     athena_ss_doors_closed_livery_1_2_flipped,
  397.                 ];
  398.                 loading: [
  399.                     athena_ss_doors_closed_livery_1_2_flipped,
  400.                 ];
  401.             }
  402.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_2_flipped, cargo_count*100/cargo_capacity) {
  403.                     0..99: return athena_sg_part_load_or_empty_livery_1_2_flipped;
  404.                 return athena_sg_full_load_livery_1_2_flipped;
  405.             }
  406.             spritegroup athena_sg_part_load_or_empty_livery_2_2_flipped {
  407.                 loaded:  [
  408.                     athena_ss_doors_closed_livery_2_2_flipped,
  409.                 ];
  410.                 loading: [
  411.                     athena_ss_doors_open_livery_2_2_flipped,
  412.                 ];
  413.             }
  414.             spritegroup athena_sg_full_load_livery_2_2_flipped {
  415.                 loaded:  [
  416.                     athena_ss_doors_closed_livery_2_2_flipped,
  417.                 ];
  418.                 loading: [
  419.                     athena_ss_doors_closed_livery_2_2_flipped,
  420.                 ];
  421.             }
  422.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_2_flipped, cargo_count*100/cargo_capacity) {
  423.                     0..99: return athena_sg_part_load_or_empty_livery_2_2_flipped;
  424.                 return athena_sg_full_load_livery_2_2_flipped;
  425.             }
  426.                 spriteset(athena_ss_pantographs_down_2_flipped, "generated/graphics/athena_pantographs_down.png") {
  427.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 120)
  428.                 }
  429.                 spriteset(athena_ss_pantographs_up_2_flipped, "generated/graphics/athena_pantographs_up.png") {
  430.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 120)
  431.                 }
  432.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_2_flipped, current_railtype) {
  433.                 ELRL: return athena_ss_pantographs_up_2_flipped;
  434.                 return athena_ss_pantographs_down_2_flipped;
  435.             }
  436.     // handle user flipped state
  437.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_1_2, vehicle_is_flipped) {
  438.         1: return athena_switch_graphics_percent_loaded_livery_2_2_flipped;
  439.         return athena_switch_graphics_percent_loaded_livery_1_2_unflipped;
  440.     }
  441.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_2_2, vehicle_is_flipped) {
  442.         1: return athena_switch_graphics_percent_loaded_livery_1_2_flipped;
  443.         return athena_switch_graphics_percent_loaded_livery_2_2_unflipped;
  444.     }
  445.     switch (FEAT_TRAINS, PARENT, athena_switch_graphics_engine_id_2, vehicle_type_id) {
  446.             lark: return athena_switch_graphics_livery_2_2;
  447.             merrylegs: return athena_switch_graphics_livery_2_2;
  448.             proper_job: return athena_switch_graphics_livery_2_2;
  449.             shoebox: return athena_switch_graphics_livery_2_2;
  450.             super_shoebox: return athena_switch_graphics_livery_2_2;
  451.             ultra_shoebox: return athena_switch_graphics_livery_2_2;
  452.             hurly_burly: return athena_switch_graphics_livery_2_2;
  453.             moor_gallop: return athena_switch_graphics_livery_2_2;
  454.             roarer: return athena_switch_graphics_livery_2_2;
  455.             screamer: return athena_switch_graphics_livery_2_2;
  456.             sizzler: return athena_switch_graphics_livery_2_2;
  457.         return athena_switch_graphics_livery_1_2;
  458.     }
  459.         switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_2, vehicle_is_flipped) {
  460.             1: return athena_switch_graphics_pantographs_2_flipped;
  461.             return athena_switch_graphics_pantographs_2_unflipped;
  462.         }
  463.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_vehicle_layers_2, getbits(extra_callback_info1, 8, 8)) {
  464.         0: return athena_switch_graphics_engine_id_2;
  465.             1: return athena_switch_graphics_pantographs_2;
  466.     }
  467.         spriteset(athena_ss_doors_closed_livery_1_3_unflipped, "generated/graphics/athena.png") {
  468.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 360)
  469.         }
  470.         spriteset(athena_ss_doors_open_livery_1_3_unflipped, "generated/graphics/athena.png") {
  471.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 360 + 30)
  472.         }
  473.         spriteset(athena_ss_doors_closed_livery_2_3_unflipped, "generated/graphics/athena.png") {
  474.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 360 + 60)
  475.         }
  476.         spriteset(athena_ss_doors_open_livery_2_3_unflipped, "generated/graphics/athena.png") {
  477.           spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 360 + 90)
  478.         }
  479.             spritegroup athena_sg_part_load_or_empty_livery_1_3_unflipped {
  480.                 loaded:  [
  481.                     athena_ss_doors_closed_livery_1_3_unflipped,
  482.                 ];
  483.                 loading: [
  484.                     athena_ss_doors_open_livery_1_3_unflipped,
  485.                 ];
  486.             }
  487.             spritegroup athena_sg_full_load_livery_1_3_unflipped {
  488.                 loaded:  [
  489.                     athena_ss_doors_closed_livery_1_3_unflipped,
  490.                 ];
  491.                 loading: [
  492.                     athena_ss_doors_closed_livery_1_3_unflipped,
  493.                 ];
  494.             }
  495.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_3_unflipped, cargo_count*100/cargo_capacity) {
  496.                     0..99: return athena_sg_part_load_or_empty_livery_1_3_unflipped;
  497.                 return athena_sg_full_load_livery_1_3_unflipped;
  498.             }
  499.             spritegroup athena_sg_part_load_or_empty_livery_2_3_unflipped {
  500.                 loaded:  [
  501.                     athena_ss_doors_closed_livery_2_3_unflipped,
  502.                 ];
  503.                 loading: [
  504.                     athena_ss_doors_open_livery_2_3_unflipped,
  505.                 ];
  506.             }
  507.             spritegroup athena_sg_full_load_livery_2_3_unflipped {
  508.                 loaded:  [
  509.                     athena_ss_doors_closed_livery_2_3_unflipped,
  510.                 ];
  511.                 loading: [
  512.                     athena_ss_doors_closed_livery_2_3_unflipped,
  513.                 ];
  514.             }
  515.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_3_unflipped, cargo_count*100/cargo_capacity) {
  516.                     0..99: return athena_sg_part_load_or_empty_livery_2_3_unflipped;
  517.                 return athena_sg_full_load_livery_2_3_unflipped;
  518.             }
  519.                 spriteset(athena_ss_pantographs_down_3_unflipped, "generated/graphics/athena_pantographs_down.png") {
  520.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 180)
  521.                 }
  522.                 spriteset(athena_ss_pantographs_up_3_unflipped, "generated/graphics/athena_pantographs_up.png") {
  523.                   spriteset_template_asymmetric_unreversed_athena_unflipped(10 + 180)
  524.                 }
  525.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_3_unflipped, current_railtype) {
  526.                 ELRL: return athena_ss_pantographs_up_3_unflipped;
  527.                 return athena_ss_pantographs_down_3_unflipped;
  528.             }
  529.         spriteset(athena_ss_doors_closed_livery_1_3_flipped, "generated/graphics/athena.png") {
  530.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 360)
  531.         }
  532.         spriteset(athena_ss_doors_open_livery_1_3_flipped, "generated/graphics/athena.png") {
  533.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 360 + 30)
  534.         }
  535.         spriteset(athena_ss_doors_closed_livery_2_3_flipped, "generated/graphics/athena.png") {
  536.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 360 + 60)
  537.         }
  538.         spriteset(athena_ss_doors_open_livery_2_3_flipped, "generated/graphics/athena.png") {
  539.           spriteset_template_asymmetric_reversed_athena_flipped(10 + 360 + 90)
  540.         }
  541.             spritegroup athena_sg_part_load_or_empty_livery_1_3_flipped {
  542.                 loaded:  [
  543.                     athena_ss_doors_closed_livery_1_3_flipped,
  544.                 ];
  545.                 loading: [
  546.                     athena_ss_doors_open_livery_1_3_flipped,
  547.                 ];
  548.             }
  549.             spritegroup athena_sg_full_load_livery_1_3_flipped {
  550.                 loaded:  [
  551.                     athena_ss_doors_closed_livery_1_3_flipped,
  552.                 ];
  553.                 loading: [
  554.                     athena_ss_doors_closed_livery_1_3_flipped,
  555.                 ];
  556.             }
  557.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_1_3_flipped, cargo_count*100/cargo_capacity) {
  558.                     0..99: return athena_sg_part_load_or_empty_livery_1_3_flipped;
  559.                 return athena_sg_full_load_livery_1_3_flipped;
  560.             }
  561.             spritegroup athena_sg_part_load_or_empty_livery_2_3_flipped {
  562.                 loaded:  [
  563.                     athena_ss_doors_closed_livery_2_3_flipped,
  564.                 ];
  565.                 loading: [
  566.                     athena_ss_doors_open_livery_2_3_flipped,
  567.                 ];
  568.             }
  569.             spritegroup athena_sg_full_load_livery_2_3_flipped {
  570.                 loaded:  [
  571.                     athena_ss_doors_closed_livery_2_3_flipped,
  572.                 ];
  573.                 loading: [
  574.                     athena_ss_doors_closed_livery_2_3_flipped,
  575.                 ];
  576.             }
  577.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_percent_loaded_livery_2_3_flipped, cargo_count*100/cargo_capacity) {
  578.                     0..99: return athena_sg_part_load_or_empty_livery_2_3_flipped;
  579.                 return athena_sg_full_load_livery_2_3_flipped;
  580.             }
  581.                 spriteset(athena_ss_pantographs_down_3_flipped, "generated/graphics/athena_pantographs_down.png") {
  582.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 180)
  583.                 }
  584.                 spriteset(athena_ss_pantographs_up_3_flipped, "generated/graphics/athena_pantographs_up.png") {
  585.                   spriteset_template_asymmetric_reversed_athena_flipped(10 + 180)
  586.                 }
  587.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_3_flipped, current_railtype) {
  588.                 ELRL: return athena_ss_pantographs_up_3_flipped;
  589.                 return athena_ss_pantographs_down_3_flipped;
  590.             }
  591.     // handle user flipped state
  592.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_1_3, vehicle_is_flipped) {
  593.         1: return athena_switch_graphics_percent_loaded_livery_2_3_flipped;
  594.         return athena_switch_graphics_percent_loaded_livery_1_3_unflipped;
  595.     }
  596.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_livery_2_3, vehicle_is_flipped) {
  597.         1: return athena_switch_graphics_percent_loaded_livery_1_3_flipped;
  598.         return athena_switch_graphics_percent_loaded_livery_2_3_unflipped;
  599.     }
  600.     switch (FEAT_TRAINS, PARENT, athena_switch_graphics_engine_id_3, vehicle_type_id) {
  601.             lark: return athena_switch_graphics_livery_2_3;
  602.             merrylegs: return athena_switch_graphics_livery_2_3;
  603.             proper_job: return athena_switch_graphics_livery_2_3;
  604.             shoebox: return athena_switch_graphics_livery_2_3;
  605.             super_shoebox: return athena_switch_graphics_livery_2_3;
  606.             ultra_shoebox: return athena_switch_graphics_livery_2_3;
  607.             hurly_burly: return athena_switch_graphics_livery_2_3;
  608.             moor_gallop: return athena_switch_graphics_livery_2_3;
  609.             roarer: return athena_switch_graphics_livery_2_3;
  610.             screamer: return athena_switch_graphics_livery_2_3;
  611.             sizzler: return athena_switch_graphics_livery_2_3;
  612.         return athena_switch_graphics_livery_1_3;
  613.     }
  614.         switch (FEAT_TRAINS, SELF, athena_switch_graphics_pantographs_3, vehicle_is_flipped) {
  615.             1: return athena_switch_graphics_pantographs_3_flipped;
  616.             return athena_switch_graphics_pantographs_3_unflipped;
  617.         }
  618.     switch (FEAT_TRAINS, SELF, athena_switch_graphics_vehicle_layers_3, getbits(extra_callback_info1, 8, 8)) {
  619.         0: return athena_switch_graphics_engine_id_3;
  620.             1: return athena_switch_graphics_pantographs_3;
  621.     }
  622.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_1_PASS, position_in_vehid_chain % 6) {
  623.                 0: return athena_switch_graphics_vehicle_layers_0;
  624.             }
  625.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_2_PASS, position_in_vehid_chain % 6) {
  626.                 0: return athena_switch_graphics_vehicle_layers_1;
  627.                 return athena_switch_graphics_vehicle_layers_2;
  628.             }
  629.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_3_PASS, position_in_vehid_chain % 6) {
  630.                 0: return athena_switch_graphics_vehicle_layers_1;
  631.                 1: return athena_switch_graphics_vehicle_layers_3;
  632.                 return athena_switch_graphics_vehicle_layers_2;
  633.             }
  634.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_4_PASS, position_in_vehid_chain % 6) {
  635.                 0: return athena_switch_graphics_vehicle_layers_1;
  636.                 1: return athena_switch_graphics_vehicle_layers_2;
  637.                 2: return athena_switch_graphics_vehicle_layers_1;
  638.                 return athena_switch_graphics_vehicle_layers_2;
  639.             }
  640.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_5_PASS, position_in_vehid_chain % 6) {
  641.                 0: return athena_switch_graphics_vehicle_layers_1;
  642.                 1: return athena_switch_graphics_vehicle_layers_3;
  643.                 2: return athena_switch_graphics_vehicle_layers_2;
  644.                 3: return athena_switch_graphics_vehicle_layers_1;
  645.                 return athena_switch_graphics_vehicle_layers_2;
  646.             }
  647.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_6_PASS, position_in_vehid_chain % 6) {
  648.                 0: return athena_switch_graphics_vehicle_layers_1;
  649.                 1: return athena_switch_graphics_vehicle_layers_3;
  650.                 2: return athena_switch_graphics_vehicle_layers_2;
  651.                 3: return athena_switch_graphics_vehicle_layers_1;
  652.                 4: return athena_switch_graphics_vehicle_layers_3;
  653.                 return athena_switch_graphics_vehicle_layers_2;
  654.             }
  655.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_less_than_6_remaining_PASS, num_vehs_in_vehid_chain % 6) {
  656.                 1: return athena_switch_graphics_modulo_num_units_in_consist_1_PASS;
  657.                 2: return athena_switch_graphics_modulo_num_units_in_consist_2_PASS;
  658.                 3: return athena_switch_graphics_modulo_num_units_in_consist_3_PASS;
  659.                 4: return athena_switch_graphics_modulo_num_units_in_consist_4_PASS;
  660.                 5: return athena_switch_graphics_modulo_num_units_in_consist_5_PASS;
  661.                 return athena_switch_graphics_modulo_num_units_in_consist_6_PASS;
  662.             }
  663.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_position_in_consist_entry_point_PASS, position_in_vehid_chain >= (num_vehs_in_vehid_chain - (num_vehs_in_vehid_chain  % 6))) {
  664.                 1: return athena_switch_graphics_less_than_6_remaining_PASS;
  665.                 return athena_switch_graphics_modulo_num_units_in_consist_6_PASS;
  666.             }
  667.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_1_DFLT, position_in_vehid_chain % 6) {
  668.                 0: return athena_switch_graphics_vehicle_layers_0;
  669.             }
  670.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_2_DFLT, position_in_vehid_chain % 6) {
  671.                 0: return athena_switch_graphics_vehicle_layers_1;
  672.                 return athena_switch_graphics_vehicle_layers_2;
  673.             }
  674.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_3_DFLT, position_in_vehid_chain % 6) {
  675.                 0: return athena_switch_graphics_vehicle_layers_1;
  676.                 1: return athena_switch_graphics_vehicle_layers_3;
  677.                 return athena_switch_graphics_vehicle_layers_2;
  678.             }
  679.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_4_DFLT, position_in_vehid_chain % 6) {
  680.                 0: return athena_switch_graphics_vehicle_layers_1;
  681.                 1: return athena_switch_graphics_vehicle_layers_2;
  682.                 2: return athena_switch_graphics_vehicle_layers_1;
  683.                 return athena_switch_graphics_vehicle_layers_2;
  684.             }
  685.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_5_DFLT, position_in_vehid_chain % 6) {
  686.                 0: return athena_switch_graphics_vehicle_layers_1;
  687.                 1: return athena_switch_graphics_vehicle_layers_3;
  688.                 2: return athena_switch_graphics_vehicle_layers_2;
  689.                 3: return athena_switch_graphics_vehicle_layers_1;
  690.                 return athena_switch_graphics_vehicle_layers_2;
  691.             }
  692.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_modulo_num_units_in_consist_6_DFLT, position_in_vehid_chain % 6) {
  693.                 0: return athena_switch_graphics_vehicle_layers_1;
  694.                 1: return athena_switch_graphics_vehicle_layers_3;
  695.                 2: return athena_switch_graphics_vehicle_layers_2;
  696.                 3: return athena_switch_graphics_vehicle_layers_1;
  697.                 4: return athena_switch_graphics_vehicle_layers_3;
  698.                 return athena_switch_graphics_vehicle_layers_2;
  699.             }
  700.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_less_than_6_remaining_DFLT, num_vehs_in_vehid_chain % 6) {
  701.                 1: return athena_switch_graphics_modulo_num_units_in_consist_1_DFLT;
  702.                 2: return athena_switch_graphics_modulo_num_units_in_consist_2_DFLT;
  703.                 3: return athena_switch_graphics_modulo_num_units_in_consist_3_DFLT;
  704.                 4: return athena_switch_graphics_modulo_num_units_in_consist_4_DFLT;
  705.                 5: return athena_switch_graphics_modulo_num_units_in_consist_5_DFLT;
  706.                 return athena_switch_graphics_modulo_num_units_in_consist_6_DFLT;
  707.             }
  708.             switch (FEAT_TRAINS, SELF, athena_switch_graphics_position_in_consist_entry_point_DFLT, position_in_vehid_chain >= (num_vehs_in_vehid_chain - (num_vehs_in_vehid_chain  % 6))) {
  709.                 1: return athena_switch_graphics_less_than_6_remaining_DFLT;
  710.                 return athena_switch_graphics_modulo_num_units_in_consist_6_DFLT;
  711.             }
  712. switch (FEAT_TRAINS, PARENT, athena_switch_graphics_vehicle, most_common_cargo_type) {
  713.             PASS: return athena_switch_graphics_position_in_consist_entry_point_PASS;
  714.     return athena_switch_graphics_position_in_consist_entry_point_DFLT;
  715. }
  716. // buy menu graphics chain
  717. spriteset(athena_ss_vehicle_purchase, "generated/graphics/athena.png") {
  718.   spriteset_template_purchase_athena(10)
  719. }
  720.         spriteset(athena_ss_pantograph_purchase, "generated/graphics/athena_pantographs_down.png") {
  721.           spriteset_template_purchase_athena(10)
  722.         }
  723.         switch (FEAT_TRAINS, SELF, athena_switch_set_layers_register_more_sprites_purchase, STORE_TEMP(CB_FLAG_MORE_SPRITES | PALETTE_USE_DEFAULT, 0x100)) {
  724.             return athena_ss_vehicle_purchase;
  725.         }
  726.         switch (FEAT_TRAINS, SELF, athena_switch_graphics_purchase, getbits(extra_callback_info1, 8, 8)) {
  727.             0: return athena_switch_set_layers_register_more_sprites_purchase;
  728.             1: return athena_ss_pantograph_purchase;
  729.         }
  730. switch (FEAT_TRAINS, SELF, athena_switch_set_layers_register_more_sprites, STORE_TEMP(CB_FLAG_MORE_SPRITES | PALETTE_USE_DEFAULT, 0x100)) {
  731.     return athena_switch_graphics_vehicle;
  732. }
  733. switch (FEAT_TRAINS, SELF, athena_switch_graphics_rear_light, position_in_consist_from_end) {
  734.     0: return ss_rear_light_32px;
  735.     return ss_rear_light_empty;
  736. }
  737. switch (FEAT_TRAINS, SELF, athena_switch_graphics_layer_rear_light, STORE_TEMP(PALETTE_USE_DEFAULT, 0x100)) {
  738.     return athena_switch_graphics_rear_light;
  739. }
  740. switch (FEAT_TRAINS, SELF, athena_switch_graphics, getbits(extra_callback_info1, 8, 8)) {
  741.     0: return athena_switch_set_layers_register_more_sprites;
  742.         1: return athena_switch_set_layers_register_more_sprites;
  743.     return athena_switch_graphics_layer_rear_light;
  744. }

Comments