diff --git a/applications/SprPoP/Makefile b/applications/SprPoP/Makefile index 5726396..6b23b2f 100644 --- a/applications/SprPoP/Makefile +++ b/applications/SprPoP/Makefile @@ -47,7 +47,7 @@ MEMORY ?= huge # # ВАЖНО: сравнивать занятость банков можно только при ОДНОМ ALLOCS — иначе # сравниваются не правки, а уровни оптимизации. -ALLOCS ?= 6000 +ALLOCS ?= 10000 # Build info не хранится в C: ID и дата извлекаются из текущего commit. BUILD_ID ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo dev) BUILD_DATE ?= $(shell git log -1 --format=%cs 2>/dev/null || echo unknown) diff --git a/applications/SprPoP/src/pop_map.c b/applications/SprPoP/src/pop_map.c index f8412da..714eb24 100644 --- a/applications/SprPoP/src/pop_map.c +++ b/applications/SprPoP/src/pop_map.c @@ -555,11 +555,6 @@ void pop_determine_col(void) __banked { determine_col(); } * Обе давно работают от Char, а не от Kid; не хватало только объявлений * (docs/sdlpop_audit.md, находка 12). */ uint8_t pop_tile_behind_char(void) __banked { return get_tile_behind_char(); } -int8_t pop_dist_to_edge_weight(void) __banked -{ - int d = distance_to_edge_weight(); - return (int8_t)(d > 127 ? 127 : (d < -128 ? -128 : d)); -} /* расстояние до края тайла (для in_wall). */ static int distance_to_edge(int xpos) @@ -570,8 +565,15 @@ static int distance_to_edge(int xpos) if (Char.direction == 0) d = TILE_RIGHTX - d; /* dir_0_right */ return d; } + static int distance_to_edge_weight(void) { return distance_to_edge(dx_weight()); } +int8_t pop_dist_to_edge_weight(void) __banked +{ + int d = distance_to_edge_weight(); + return (int8_t)(d > 127 ? 127 : (d < -128 ? -128 : d)); +} + /* ---- ТОЧНАЯ коллизия со стеной (seg004) --------------------------- * * Передний край персонажа = char_x_right (взгляд вправо) / char_x_left * (влево) из set_char_collision (seg006:0723): obj_x/2 + 58, где obj_x =