From cf9c7ef305b20b94a0a8ddb59046dce1c340590f Mon Sep 17 00:00:00 2001 From: TELK Date: Sat, 8 Jun 2024 15:29:10 +0900 Subject: [PATCH] Cleanup: codes --- ko_signal_set.pnml | 42 +++++++++++---- src/electric.pnml | 84 ++++++++++++++--------------- src/electric/combo/code.pnml | 10 ++-- src/electric/entry/code.pnml | 10 ++-- src/electric/exit/code.pnml | 10 ++-- src/electric/noentry/code.pnml | 2 +- src/electric/oneway_path/code.pnml | 12 ++--- src/electric/path/code.pnml | 12 ++--- src/electric/programmable/code.pnml | 10 ++-- 9 files changed, 106 insertions(+), 86 deletions(-) diff --git a/ko_signal_set.pnml b/ko_signal_set.pnml index 6aaaea7..80a5502 100644 --- a/ko_signal_set.pnml +++ b/ko_signal_set.pnml @@ -40,7 +40,7 @@ grf { def_value: 1; } - // Use caution signals(Y and YG) together + // Recolouring signals as blue poles if they have a route restriction program use_routing_restriction { type: bool; name: string(STR_PARAM_USE_ROUTING_RESTRICTION_NAME); @@ -151,6 +151,14 @@ if (!extended_feature_test("action3_signals_custom_signal_sprites")) { param[10] = reserve_sprites(1); replace (param[10]) { + // No recolouring + recolour_sprite { + 0x84: 0x84; + 0x85: 0x85; + 0x86: 0x86; + } + + // Recolouring for blue poles recolour_sprite { 0x84: 0xC8; 0x85: 0xCA; @@ -160,17 +168,29 @@ replace (param[10]) { // General signal switches switch (FEAT_SIGNALS, SELF, sw_signal_types, [ - STORE_TEMP(param[10] + (hasbit(extra_callback_info2, 24) ? 0 : 1), 0x100), - ((extra_callback_info2 & 0x00FFFF00) >> 8) + STORE_TEMP(param[10] + (hasbit(extra_callback_info2, 24) ? 1 : 0), 0x100), + ((extra_callback_info2 & 0x00FFFF00) | signal_style) ]) { - 0x000: sw_signal_block; // Block - 0x100: sw_signal_entry; // Entry - 0x200: sw_signal_exit; // Exit - 0x300: sw_signal_combo; // Combo - 0x400: sw_signal_path; // Path - 0x500: sw_signal_oneway_path; // Oneway path - 0x600: sw_signal_programmable; // Programmable - 0x700: sw_signal_noentry; // No-entry + // Signals + 0x00000: sw_signal_block; // Block + 0x10000: sw_signal_entry; // Entry + 0x20000: sw_signal_exit; // Exit + 0x30000: sw_signal_combo; // Combo + 0x40000: sw_signal_path; // Path + 0x50000: sw_signal_oneway_path; // Oneway path + 0x60000: sw_signal_programmable; // Programmable + 0x70000: sw_signal_noentry; // No-entry +/* + // (Reserved) Shunt + 0x00001: sw_shunt_block; // Block + 0x10001: sw_shunt_entry; // Entry + 0x20001: sw_shunt_exit; // Exit + 0x30001: sw_shunt_combo; // Combo + 0x40001: sw_shunt_path; // Path + 0x50001: sw_shunt_oneway_path; // Oneway path + 0x60001: sw_shunt_programmable; // Programmable + 0x70001: sw_shunt_noentry; // No-entry +*/ CB_FAILED; } diff --git a/src/electric.pnml b/src/electric.pnml index 6036965..327f377 100644 --- a/src/electric.pnml +++ b/src/electric.pnml @@ -74,29 +74,29 @@ template electric_signals_for_stable(file_red, file_green) { } // Block -if(use_caution_signal) { - if(is_realistic) { - if(use_blue_block) { +if (use_caution_signal) { + if (is_realistic) { + if (use_blue_block) { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.real.png", "./src/electric/block/B.real.png") } } else { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.real.png", "./src/electric/block/G.real.png") } } } else { - if(use_blue_block) { + if (use_blue_block) { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.nonreal.png", "./src/electric/block/B.nonreal.png") } } else { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.nonreal.png", "./src/electric/block/G.nonreal.png") } } } } else { - if(is_realistic) { - if(use_blue_block) { + if (is_realistic) { + if (use_blue_block) { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.real.png", "./src/electric/block/B.real.png") } } else { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.real.png", "./src/electric/block/G.real.png") } } } else { - if(use_blue_block) { + if (use_blue_block) { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.nonreal.png", "./src/electric/block/B.nonreal.png") } } else { replace(1275, "") { electric_signals_for_stable("./src/electric/block/R.nonreal.png", "./src/electric/block/G.nonreal.png") } @@ -105,29 +105,29 @@ if(use_caution_signal) { } // Entry (offset 0) -if(use_caution_signal) { - if(is_realistic) { - if(use_blue_entry) { +if (use_caution_signal) { + if (is_realistic) { + if (use_blue_entry) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.real.png", "./src/electric/entry/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.real.png", "./src/electric/entry/G.real.png") } } } else { - if(use_blue_entry) { + if (use_blue_entry) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.nonreal.png", "./src/electric/entry/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.nonreal.png", "./src/electric/entry/G.nonreal.png") } } } } else { - if(is_realistic) { - if(use_blue_entry) { + if (is_realistic) { + if (use_blue_entry) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.real.png", "./src/electric/entry/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.real.png", "./src/electric/entry/G.real.png") } } } else { - if(use_blue_entry) { + if (use_blue_entry) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.nonreal.png", "./src/electric/entry/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 0) { electric_signals_for_stable("./src/electric/entry/R.nonreal.png", "./src/electric/entry/G.nonreal.png") } @@ -136,29 +136,29 @@ if(use_caution_signal) { } // Exit (offset 16) -if(use_caution_signal) { - if(is_realistic) { - if(use_blue_exit) { +if (use_caution_signal) { + if (is_realistic) { + if (use_blue_exit) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.real.png", "./src/electric/exit/Y.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.real.png", "./src/electric/exit/Y.real.png") } } } else { - if(use_blue_exit) { + if (use_blue_exit) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.nonreal.png", "./src/electric/exit/Y.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.nonreal.png", "./src/electric/exit/Y.nonreal.png") } } } } else { - if(is_realistic) { - if(use_blue_exit) { + if (is_realistic) { + if (use_blue_exit) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.real.png", "./src/electric/exit/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.real.png", "./src/electric/exit/G.real.png") } } } else { - if(use_blue_exit) { + if (use_blue_exit) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.nonreal.png", "./src/electric/exit/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 16) { electric_signals_for_stable("./src/electric/exit/R.nonreal.png", "./src/electric/exit/G.nonreal.png") } @@ -167,29 +167,29 @@ if(use_caution_signal) { } // Combo (offset 32) -if(use_caution_signal) { - if(is_realistic) { - if(use_blue_combo) { +if (use_caution_signal) { + if (is_realistic) { + if (use_blue_combo) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.real.png", "./src/electric/combo/YB.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.real.png", "./src/electric/combo/YG.real.png") } } } else { - if(use_blue_combo) { + if (use_blue_combo) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.nonreal.png", "./src/electric/combo/YB.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.nonreal.png", "./src/electric/combo/YG.nonreal.png") } } } } else { - if(is_realistic) { - if(use_blue_combo) { + if (is_realistic) { + if (use_blue_combo) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.real.png", "./src/electric/combo/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.real.png", "./src/electric/combo/G.real.png") } } } else { - if(use_blue_combo) { + if (use_blue_combo) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.nonreal.png", "./src/electric/combo/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 32) { electric_signals_for_stable("./src/electric/combo/R.nonreal.png", "./src/electric/combo/G.nonreal.png") } @@ -198,29 +198,29 @@ if(use_caution_signal) { } // Path (offset 112) -if(use_caution_signal) { - if(is_realistic) { - if(use_blue_path) { +if (use_caution_signal) { + if (is_realistic) { + if (use_blue_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.real.png", "./src/electric/path/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.real.png", "./src/electric/path/G.real.png") } } } else { - if(use_blue_path) { + if (use_blue_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.nonreal.png", "./src/electric/path/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.nonreal.png", "./src/electric/path/G.nonreal.png") } } } } else { - if(is_realistic) { - if(use_blue_path) { + if (is_realistic) { + if (use_blue_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.real.png", "./src/electric/path/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.real.png", "./src/electric/path/G.real.png") } } } else { - if(use_blue_path) { + if (use_blue_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.nonreal.png", "./src/electric/path/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 112) { electric_signals_for_stable("./src/electric/path/R.nonreal.png", "./src/electric/path/G.nonreal.png") } @@ -229,29 +229,29 @@ if(use_caution_signal) { } // Oneway-path (offset 128) -if(use_caution_signal) { - if(is_realistic) { - if(use_blue_oneway_path) { +if (use_caution_signal) { + if (is_realistic) { + if (use_blue_oneway_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.real.png", "./src/electric/oneway_path/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.real.png", "./src/electric/oneway_path/G.real.png") } } } else { - if(use_blue_oneway_path) { + if (use_blue_oneway_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.nonreal.png", "./src/electric/oneway_path/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.nonreal.png", "./src/electric/oneway_path/G.nonreal.png") } } } } else { - if(is_realistic) { - if(use_blue_oneway_path) { + if (is_realistic) { + if (use_blue_oneway_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.real.png", "./src/electric/oneway_path/B.real.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.real.png", "./src/electric/oneway_path/G.real.png") } } } else { - if(use_blue_oneway_path) { + if (use_blue_oneway_path) { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.nonreal.png", "./src/electric/oneway_path/B.nonreal.png") } } else { replacenew(PRE_SIGNAL_SEMAPHORE_PBS, "", 128) { electric_signals_for_stable("./src/electric/oneway_path/R.nonreal.png", "./src/electric/oneway_path/G.nonreal.png") } diff --git a/src/electric/combo/code.pnml b/src/electric/combo/code.pnml index 8e957ba..44d0bfb 100644 --- a/src/electric/combo/code.pnml +++ b/src/electric/combo/code.pnml @@ -17,32 +17,32 @@ spriteset(set_signal_combo_YB_nonreal) { electric_signals("./src/electric/combo/ spriteset(set_signal_combo_YG_real) { electric_signals("./src/electric/combo/YG.real.png") } spriteset(set_signal_combo_YG_nonreal) { electric_signals("./src/electric/combo/YG.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_combo_R, (is_realistic << 1) + (use_blue_combo << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_combo_R, (is_realistic << 1) + (use_blue_combo << 0)) { 1: set_signal_combo_R_nonreal; // non realistic && blue 2: set_signal_combo_R_real; // realistic && green 3: set_signal_combo_R_real; // realistic && blue set_signal_combo_R_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_combo_G, (is_realistic << 1) + (use_blue_combo << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_combo_G, (is_realistic << 1) + (use_blue_combo << 0)) { 1: set_signal_combo_B_nonreal; // non realistic && blue 2: set_signal_combo_G_real; // realistic && green 3: set_signal_combo_B_real; // realistic && blue set_signal_combo_G_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_combo_Y, (is_realistic << 1) + (use_blue_combo << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_combo_Y, (is_realistic << 1) + (use_blue_combo << 0)) { 1: set_signal_combo_Y_nonreal; // non realistic && blue 2: set_signal_combo_Y_real; // realistic && green 3: set_signal_combo_Y_real; // realistic && blue set_signal_combo_Y_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_combo_YG, (is_realistic << 1) + (use_blue_combo << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_combo_YG, (is_realistic << 1) + (use_blue_combo << 0)) { 1: set_signal_combo_YB_nonreal; // non realistic && blue 2: set_signal_combo_YG_real; // realistic && green 3: set_signal_combo_YB_real; // realistic && blue set_signal_combo_YG_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_combo, extra_callback_info2 & 0x000000FF) { +switch (FEAT_SIGNALS, SELF, sw_signal_combo, extra_callback_info2 & 0x000000FF) { 0: sw_signal_combo_R; 1: sw_signal_combo_G; 2: sw_signal_combo_Y; diff --git a/src/electric/entry/code.pnml b/src/electric/entry/code.pnml index e82232e..c142bc9 100644 --- a/src/electric/entry/code.pnml +++ b/src/electric/entry/code.pnml @@ -17,32 +17,32 @@ spriteset(set_signal_entry_YB_nonreal) { electric_signals("./src/electric/entry/ spriteset(set_signal_entry_YG_real) { electric_signals("./src/electric/entry/YG.real.png") } spriteset(set_signal_entry_YG_nonreal) { electric_signals("./src/electric/entry/YG.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_entry_R, (is_realistic << 1) + (use_blue_entry << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_entry_R, (is_realistic << 1) + (use_blue_entry << 0)) { 1: set_signal_entry_R_nonreal; // non realistic && blue 2: set_signal_entry_R_real; // realistic && green 3: set_signal_entry_R_real; // realistic && blue set_signal_entry_R_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_entry_G, (is_realistic << 1) + (use_blue_entry << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_entry_G, (is_realistic << 1) + (use_blue_entry << 0)) { 1: set_signal_entry_B_nonreal; // non realistic && blue 2: set_signal_entry_G_real; // realistic && green 3: set_signal_entry_B_real; // realistic && blue set_signal_entry_G_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_entry_Y, (is_realistic << 1) + (use_blue_entry << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_entry_Y, (is_realistic << 1) + (use_blue_entry << 0)) { 1: set_signal_entry_Y_nonreal; // non realistic && blue 2: set_signal_entry_Y_real; // realistic && green 3: set_signal_entry_Y_real; // realistic && blue set_signal_entry_Y_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_entry_YG, (is_realistic << 1) + (use_blue_entry << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_entry_YG, (is_realistic << 1) + (use_blue_entry << 0)) { 1: set_signal_entry_YB_nonreal; // non realistic && blue 2: set_signal_entry_YG_real; // realistic && green 3: set_signal_entry_YB_real; // realistic && blue set_signal_entry_YG_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_entry, extra_callback_info2 & 0x000000FF) { +switch (FEAT_SIGNALS, SELF, sw_signal_entry, extra_callback_info2 & 0x000000FF) { 0: sw_signal_entry_R; 1: sw_signal_entry_G; 2: sw_signal_entry_Y; diff --git a/src/electric/exit/code.pnml b/src/electric/exit/code.pnml index 0ff3844..b8a8df1 100644 --- a/src/electric/exit/code.pnml +++ b/src/electric/exit/code.pnml @@ -17,32 +17,32 @@ spriteset(set_signal_exit_YB_nonreal) { electric_signals("./src/electric/exit/YB spriteset(set_signal_exit_YG_real) { electric_signals("./src/electric/exit/YG.real.png") } spriteset(set_signal_exit_YG_nonreal) { electric_signals("./src/electric/exit/YG.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_exit_R, (is_realistic << 1) + (use_blue_exit << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_exit_R, (is_realistic << 1) + (use_blue_exit << 0)) { 1: set_signal_exit_R_nonreal; // non realistic && blue 2: set_signal_exit_R_real; // realistic && green 3: set_signal_exit_R_real; // realistic && blue set_signal_exit_R_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_exit_G, (is_realistic << 1) + (use_blue_exit << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_exit_G, (is_realistic << 1) + (use_blue_exit << 0)) { 1: set_signal_exit_B_nonreal; // non realistic && blue 2: set_signal_exit_G_real; // realistic && green 3: set_signal_exit_B_real; // realistic && blue set_signal_exit_G_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_exit_Y, (is_realistic << 1) + (use_blue_exit << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_exit_Y, (is_realistic << 1) + (use_blue_exit << 0)) { 1: set_signal_exit_Y_nonreal; // non realistic && blue 2: set_signal_exit_Y_real; // realistic && green 3: set_signal_exit_Y_real; // realistic && blue set_signal_exit_Y_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_exit_YG, (is_realistic << 1) + (use_blue_exit << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_exit_YG, (is_realistic << 1) + (use_blue_exit << 0)) { 1: set_signal_exit_YB_nonreal; // non realistic && blue 2: set_signal_exit_YG_real; // realistic && green 3: set_signal_exit_YB_real; // realistic && blue set_signal_exit_YG_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_exit, extra_callback_info2 & 0x000000FF) { +switch (FEAT_SIGNALS, SELF, sw_signal_exit, extra_callback_info2 & 0x000000FF) { 0: sw_signal_exit_R; 1: sw_signal_exit_G; 2: sw_signal_exit_Y; diff --git a/src/electric/noentry/code.pnml b/src/electric/noentry/code.pnml index 2d563ad..8a4b23a 100644 --- a/src/electric/noentry/code.pnml +++ b/src/electric/noentry/code.pnml @@ -7,7 +7,7 @@ spriteset(set_signal_noentry_real) { electric_signals("./src/electric/noentry/N.nonreal.png") } // We don't have real graphic yet spriteset(set_signal_noentry_nonreal) { electric_signals("./src/electric/noentry/N.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_noentry, is_realistic) { +switch (FEAT_SIGNALS, SELF, sw_signal_noentry, is_realistic) { 1: set_signal_noentry_real; // realistic set_signal_noentry_nonreal; // non realistic } diff --git a/src/electric/oneway_path/code.pnml b/src/electric/oneway_path/code.pnml index d908be4..b2aa017 100644 --- a/src/electric/oneway_path/code.pnml +++ b/src/electric/oneway_path/code.pnml @@ -19,38 +19,38 @@ spriteset(set_signal_oneway_path_YG_nonreal) { electric_signals("./src/electric/ spriteset(set_signal_oneway_path_YY_real) { electric_signals("./src/electric/oneway_path/YY.real.png") } spriteset(set_signal_oneway_path_YY_nonreal) { electric_signals("./src/electric/oneway_path/YY.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_oneway_path_R, (is_realistic << 1) + (use_blue_oneway_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_oneway_path_R, (is_realistic << 1) + (use_blue_oneway_path << 0)) { 1: set_signal_oneway_path_R_nonreal; // non realistic && blue 2: set_signal_oneway_path_R_real; // realistic && green 3: set_signal_oneway_path_R_real; // realistic && blue set_signal_oneway_path_R_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_oneway_path_G, (is_realistic << 1) + (use_blue_oneway_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_oneway_path_G, (is_realistic << 1) + (use_blue_oneway_path << 0)) { 1: set_signal_oneway_path_B_nonreal; // non realistic && blue 2: set_signal_oneway_path_G_real; // realistic && green 3: set_signal_oneway_path_B_real; // realistic && blue set_signal_oneway_path_G_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_oneway_path_Y, (is_realistic << 1) + (use_blue_oneway_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_oneway_path_Y, (is_realistic << 1) + (use_blue_oneway_path << 0)) { 1: set_signal_oneway_path_Y_nonreal; // non realistic && blue 2: set_signal_oneway_path_Y_real; // realistic && green 3: set_signal_oneway_path_Y_real; // realistic && blue set_signal_oneway_path_Y_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_oneway_path_YY, (is_realistic << 1) + (use_blue_oneway_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_oneway_path_YY, (is_realistic << 1) + (use_blue_oneway_path << 0)) { 1: set_signal_oneway_path_YY_nonreal; // non realistic && blue 2: set_signal_oneway_path_YY_real; // realistic && green 3: set_signal_oneway_path_YY_real; // realistic && blue set_signal_oneway_path_YY_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_oneway_path_YG, (is_realistic << 1) + (use_blue_oneway_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_oneway_path_YG, (is_realistic << 1) + (use_blue_oneway_path << 0)) { 1: set_signal_oneway_path_YB_nonreal; // non realistic && blue 2: set_signal_oneway_path_YG_real; // realistic && green 3: set_signal_oneway_path_YB_real; // realistic && blue set_signal_oneway_path_YG_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_oneway_path, extra_callback_info2 & 0x000000FF) { +switch (FEAT_SIGNALS, SELF, sw_signal_oneway_path, extra_callback_info2 & 0x000000FF) { 0: sw_signal_oneway_path_R; 1: sw_signal_oneway_path_G; 2: sw_signal_oneway_path_YY; diff --git a/src/electric/path/code.pnml b/src/electric/path/code.pnml index befa29f..54be48e 100644 --- a/src/electric/path/code.pnml +++ b/src/electric/path/code.pnml @@ -19,38 +19,38 @@ spriteset(set_signal_path_YG_nonreal) { electric_signals("./src/electric/path/YG spriteset(set_signal_path_YY_real) { electric_signals("./src/electric/path/YY.real.png") } spriteset(set_signal_path_YY_nonreal) { electric_signals("./src/electric/path/YY.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_path_R, (is_realistic << 1) + (use_blue_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_path_R, (is_realistic << 1) + (use_blue_path << 0)) { 1: set_signal_path_R_nonreal; // non realistic && blue 2: set_signal_path_R_real; // realistic && green 3: set_signal_path_R_real; // realistic && blue set_signal_path_R_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_path_G, (is_realistic << 1) + (use_blue_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_path_G, (is_realistic << 1) + (use_blue_path << 0)) { 1: set_signal_path_B_nonreal; // non realistic && blue 2: set_signal_path_G_real; // realistic && green 3: set_signal_path_B_real; // realistic && blue set_signal_path_G_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_path_Y, (is_realistic << 1) + (use_blue_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_path_Y, (is_realistic << 1) + (use_blue_path << 0)) { 1: set_signal_path_Y_nonreal; // non realistic && blue 2: set_signal_path_Y_real; // realistic && green 3: set_signal_path_Y_real; // realistic && blue set_signal_path_Y_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_path_YY, (is_realistic << 1) + (use_blue_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_path_YY, (is_realistic << 1) + (use_blue_path << 0)) { 1: set_signal_path_YY_nonreal; // non realistic && blue 2: set_signal_path_YY_real; // realistic && green 3: set_signal_path_YY_real; // realistic && blue set_signal_path_YY_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_path_YG, (is_realistic << 1) + (use_blue_path << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_path_YG, (is_realistic << 1) + (use_blue_path << 0)) { 1: set_signal_path_YB_nonreal; // non realistic && blue 2: set_signal_path_YG_real; // realistic && green 3: set_signal_path_YB_real; // realistic && blue set_signal_path_YG_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_path, extra_callback_info2 & 0x000000FF) { +switch (FEAT_SIGNALS, SELF, sw_signal_path, extra_callback_info2 & 0x000000FF) { 0: sw_signal_path_R; 1: sw_signal_path_G; 2: sw_signal_path_YY; diff --git a/src/electric/programmable/code.pnml b/src/electric/programmable/code.pnml index c2145d7..a89f479 100644 --- a/src/electric/programmable/code.pnml +++ b/src/electric/programmable/code.pnml @@ -17,32 +17,32 @@ spriteset(set_signal_programmable_YB_nonreal) { electric_signals("./src/electric spriteset(set_signal_programmable_YG_real) { electric_signals("./src/electric/programmable/YG.real.png") } spriteset(set_signal_programmable_YG_nonreal) { electric_signals("./src/electric/programmable/YG.nonreal.png") } -switch(FEAT_SIGNALS, SELF, sw_signal_programmable_R, (is_realistic << 1) + (use_blue_programmable << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_programmable_R, (is_realistic << 1) + (use_blue_programmable << 0)) { 1: set_signal_programmable_R_nonreal; // non realistic && blue 2: set_signal_programmable_R_real; // realistic && green 3: set_signal_programmable_R_real; // realistic && blue set_signal_programmable_R_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_programmable_G, (is_realistic << 1) + (use_blue_programmable << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_programmable_G, (is_realistic << 1) + (use_blue_programmable << 0)) { 1: set_signal_programmable_B_nonreal; // non realistic && blue 2: set_signal_programmable_G_real; // realistic && green 3: set_signal_programmable_B_real; // realistic && blue set_signal_programmable_G_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_programmable_Y, (is_realistic << 1) + (use_blue_programmable << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_programmable_Y, (is_realistic << 1) + (use_blue_programmable << 0)) { 1: set_signal_programmable_Y_nonreal; // non realistic && blue 2: set_signal_programmable_Y_real; // realistic && green 3: set_signal_programmable_Y_real; // realistic && blue set_signal_programmable_Y_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_programmable_YG, (is_realistic << 1) + (use_blue_programmable << 0)) { +switch (FEAT_SIGNALS, SELF, sw_signal_programmable_YG, (is_realistic << 1) + (use_blue_programmable << 0)) { 1: set_signal_programmable_YB_nonreal; // non realistic && blue 2: set_signal_programmable_YG_real; // realistic && green 3: set_signal_programmable_YB_real; // realistic && blue set_signal_programmable_YG_nonreal; // non realistic && green } -switch(FEAT_SIGNALS, SELF, sw_signal_programmable, extra_callback_info2 & 0x000000FF) { +switch (FEAT_SIGNALS, SELF, sw_signal_programmable, extra_callback_info2 & 0x000000FF) { 0: sw_signal_programmable_R; 1: sw_signal_programmable_G; 2: sw_signal_programmable_Y;