git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 97319281688058ac7eab494ed5f4e3190aa70d0f
parent 4c8518e3982839fe94dd6169aa96a3d95c160404
Author: Toxa <untoxa@mail.ru>
Date:   Mon, 15 Mar 2021 13:10:38 +0300

fix limiting for the large_map example

Diffstat:
Mgbdk-lib/examples/gb/large_map/large_map.c4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gbdk-lib/examples/gb/large_map/large_map.c b/gbdk-lib/examples/gb/large_map/large_map.c @@ -26,7 +26,7 @@ void set_camera() { if (camera_y < old_camera_y) { set_bkg_submap(map_pos_x, map_pos_y, MIN(21u, bigmap_mapWidth-map_pos_x), 1, bigmap_map, bigmap_mapWidth); } else { - if ((bigmap_mapHeight - 17u) > map_pos_y) set_bkg_submap(map_pos_x, map_pos_y + 18u, MIN(21u, bigmap_mapWidth-map_pos_x), 1, bigmap_map, bigmap_mapWidth); + if ((bigmap_mapHeight - 18u) > map_pos_y) set_bkg_submap(map_pos_x, map_pos_y + 18u, MIN(21u, bigmap_mapWidth-map_pos_x), 1, bigmap_map, bigmap_mapWidth); } old_map_pos_y = map_pos_y; } @@ -36,7 +36,7 @@ void set_camera() { if (camera_x < old_camera_x) { set_bkg_submap(map_pos_x, map_pos_y, 1, MIN(19u, bigmap_mapHeight - map_pos_y), bigmap_map, bigmap_mapWidth); } else { - if ((bigmap_mapWidth - 19u) > map_pos_x) set_bkg_submap(map_pos_x + 20u, map_pos_y, 1, MIN(19u, bigmap_mapHeight - map_pos_y), bigmap_map, bigmap_mapWidth); + if ((bigmap_mapWidth - 20u) > map_pos_x) set_bkg_submap(map_pos_x + 20u, map_pos_y, 1, MIN(19u, bigmap_mapHeight - map_pos_y), bigmap_map, bigmap_mapWidth); } old_map_pos_x = map_pos_x; }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.