diff --git a/applications/PoP/roomtest/pop_bg.c b/applications/PoP/roomtest/pop_bg.c index 8b8d737..e98743d 100644 --- a/applications/PoP/roomtest/pop_bg.c +++ b/applications/PoP/roomtest/pop_bg.c @@ -414,13 +414,17 @@ static int8_t y_to_row(int y) /* y_to_row_mod4 (TILE_SIZEY=63) */ return (int8_t)((y + 60) / 63 % 4 - 1); } -static void fore_tile(int row, int col) /* fore одного тайла, если fore_id≠0 */ +static void fore_tile(int row, int col) /* передний слой одного тайла */ { uint8_t code = tile_code(row, col); const piece *t = &tile_table[code]; - if (t->fore_id) { - int x = COL_XH[col] * 8; - int dmy = 63 * row + 62; + int x = COL_XH[col] * 8; + int dmy = 63 * row + 62; + if (code == 20) { /* стена: основная грань (foretable, */ + uint8_t wmod = wall_modifier(row, col); /* draw_tile_fore seg008:690) — */ + wall_b(WALL_FRAM_MAIN[wmod], x, dmy); /* перекрывает Kid как передний */ + wall_pattern(row, col, 1); + } else if (t->fore_id) { fore_b(t->fore_id, t->fore_x * 8 + x, t->fore_y + dmy); } }