From 65b8bff6f0c497710ce8f2b4c90d5569319c52ca Mon Sep 17 00:00:00 2001 From: "Yi Yang @ Anteros" Date: Sun, 19 May 2024 01:57:25 +0800 Subject: [PATCH] Fix platform switch --- src/testing.pnml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/testing.pnml b/src/testing.pnml index abb9fff..3e31835 100644 --- a/src/testing.pnml +++ b/src/testing.pnml @@ -86,12 +86,12 @@ spriteset (s_test_fence, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) { }*/ #define GET_NPLAT_FORMATION \ - ((getbits(LOAD_TEMP(TILE_X_SW), NPLAT_BIT, 1) ^ getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_SW, 1)) << 0|\ - (getbits(LOAD_TEMP(TILE_X_NE), NPLAT_BIT, 1) ^ getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_NE, 1)) << 1) + ((!getbits(LOAD_TEMP(TEMP_NEARBY_TILE_STATION), TILE_X_SW, 1) | getbits(LOAD_TEMP(TILE_X_SW), NPLAT_BIT, 1) & getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_SW, 1)) << 0|\ + (!getbits(LOAD_TEMP(TEMP_NEARBY_TILE_STATION), TILE_X_NE, 1) | getbits(LOAD_TEMP(TILE_X_NE), NPLAT_BIT, 1) & getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_NE, 1)) << 1) #define GET_SPLAT_FORMATION \ - ((getbits(LOAD_TEMP(TILE_X_SW), SPLAT_BIT, 1) ^ getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_SW, 1)) << 0|\ - (getbits(LOAD_TEMP(TILE_X_NE), SPLAT_BIT, 1) ^ getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_NE, 1)) << 1) + ((!getbits(LOAD_TEMP(TEMP_NEARBY_TILE_STATION), TILE_X_SW, 1) | getbits(LOAD_TEMP(TILE_X_SW), SPLAT_BIT, 1) & getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_SW, 1)) << 0|\ + (!getbits(LOAD_TEMP(TEMP_NEARBY_TILE_STATION), TILE_X_NE, 1) | getbits(LOAD_TEMP(TILE_X_NE), SPLAT_BIT, 1) & getbits(LOAD_TEMP(TEMP_NEARBY_TILE_GRF), TILE_X_NE, 1)) << 1) spritelayout sp_test_x(hide_platform_nw, hide_platform_se, hide_shelter) { ground {sprite: GROUNDSPRITE_RAIL_X;} @@ -185,14 +185,14 @@ switch (FEAT_STATIONS, SELF, sw_check_rail_continuation, switch (FEAT_STATIONS, SELF, sw_check_nearby_tile_station, - (nearby_tile_is_station(-1, 0) == 1) << TILE_X_NE| - (nearby_tile_is_station( 1, 0) == 1) << TILE_X_SW| - (nearby_tile_is_station( 0,-1) == 1) << TILE_X_NW| - (nearby_tile_is_station( 0, 1) == 1) << TILE_X_SE| - (nearby_tile_is_station(-1,-1) == 1) << TILE_X_N| - (nearby_tile_is_station( 1, 1) == 1) << TILE_X_S| - (nearby_tile_is_station( 1,-1) == 1) << TILE_X_W| - (nearby_tile_is_station(-1, 1) == 1) << TILE_X_E) {return;} + nearby_tile_is_station(-1, 0) << TILE_X_NE| + nearby_tile_is_station( 1, 0) << TILE_X_SW| + nearby_tile_is_station( 0,-1) << TILE_X_NW| + nearby_tile_is_station( 0, 1) << TILE_X_SE| + nearby_tile_is_station(-1,-1) << TILE_X_N| + nearby_tile_is_station( 1, 1) << TILE_X_S| + nearby_tile_is_station( 1,-1) << TILE_X_W| + nearby_tile_is_station(-1, 1) << TILE_X_E) {return;} switch (FEAT_STATIONS, SELF, sw_check_nearby_tile_perpendicular, (nearby_tile_perpendicular(-1, 0) == 1) << TILE_X_NE| @@ -205,14 +205,14 @@ switch (FEAT_STATIONS, SELF, sw_check_nearby_tile_perpendicular, (nearby_tile_perpendicular(-1, 1) == 1) << TILE_X_E) {return;} switch (FEAT_STATIONS, SELF, sw_check_nearby_tile_grf, - (nearby_tile_same_grf(-1, 0) == 1) << TILE_X_NE| - (nearby_tile_same_grf( 1, 0) == 1) << TILE_X_SW| - (nearby_tile_same_grf( 0,-1) == 1) << TILE_X_NW| - (nearby_tile_same_grf( 0, 1) == 1) << TILE_X_SE| - (nearby_tile_same_grf(-1,-1) == 1) << TILE_X_N| - (nearby_tile_same_grf( 1, 1) == 1) << TILE_X_S| - (nearby_tile_same_grf( 1,-1) == 1) << TILE_X_W| - (nearby_tile_same_grf(-1, 1) == 1) << TILE_X_E) {return;} + nearby_tile_other_grf(-1, 0) << TILE_X_NE| + nearby_tile_other_grf( 1, 0) << TILE_X_SW| + nearby_tile_other_grf( 0,-1) << TILE_X_NW| + nearby_tile_other_grf( 0, 1) << TILE_X_SE| + nearby_tile_other_grf(-1,-1) << TILE_X_N| + nearby_tile_other_grf( 1, 1) << TILE_X_S| + nearby_tile_other_grf( 1,-1) << TILE_X_W| + nearby_tile_other_grf(-1, 1) << TILE_X_E) {return;} switch (FEAT_STATIONS, SELF, sw_test, [ STORE_TEMP(sw_check_rail_continuation(), TEMP_RAIL_CONTINUATION),