#ifndef PSXRECOMP_MOD_VISIBLE_PLACEMENTS_H #define PSXRECOMP_MOD_VISIBLE_PLACEMENTS_H #include /* Authored placement visibility, independent of a title's actor allocator. * Rectangles use the strict bounds of the original Capcom placement scan. * Caller stores its visited bitmap/previous rectangle in snapshotted mod RAM. */ typedef struct PSXPlacementRect { int32_t left,right,top,bottom; } PSXPlacementRect; static inline int psx_placement_contains(PSXPlacementRect r,int32_t x,int32_t y) { return x>r.left && xr.top && y=old.right || now.right<=old.left || now.top>=old.bottom || now.bottom<=old.top) { out[0]=now;return 1; } unsigned n=0; if(now.leftold.right)out[n++]=(PSXPlacementRect){old.right-1,now.right,now.top,now.bottom}; int32_t left=now.left>old.left?now.left:old.left,right=now.rightold.bottom)out[n++]=(PSXPlacementRect){left,right,old.bottom-1,now.bottom}; return n; } #endif