Fix pinned actors getting flagged as offscreen
@@ -112,11 +112,10 @@ void actors_update() NONBANKED {
actor = actors_active_tail;
while (actor) {
- if (actor->pinned)
+ if (actor->pinned) {
screen_x = (actor->pos.x >> 4) + 8, screen_y = (actor->pos.y >> 4) + 8;
- else
+ } else {
screen_x = (actor->pos.x >> 4) - draw_scroll_x + 8, screen_y = (actor->pos.y >> 4) - draw_scroll_y + 8;
-
// Bottom right coordinate of actor in 16px tile coordinates
// Subtract bounding box estimate width/height
// and offset by 64 to allow signed comparisons with screen tiles
@@ -142,7 +141,9 @@ void actors_update() NONBANKED {
deactivate_actor(actor);
actor = prev;
continue;
- } else if (NO_OVERLAY_PRIORITY && (!show_actors_on_overlay) && (WX_REG != MINWNDPOSX) && (WX_REG < (UINT8)screen_x + 8) && (WY_REG < (UINT8)(screen_y) - 8)) {
+ }
+ }
+ if (NO_OVERLAY_PRIORITY && (!show_actors_on_overlay) && (WX_REG != MINWNDPOSX) && (WX_REG < (UINT8)screen_x + 8) && (WY_REG < (UINT8)(screen_y) - 8)) {
// Hide if under window (don't deactivate)
actor = actor->prev;
continue;
