- fixed Exhumed menu by adding a proper layout mode to the drawer instead of hacking the broken tile offsets.

This commit is contained in:
Christoph Oelckers 2020-05-27 23:30:36 +02:00
parent 4ebe67ba3d
commit a3e6829817
3 changed files with 3 additions and 2 deletions

View file

@ -206,6 +206,7 @@ enum {
// ROTATESPRITE_MAX-1 is the mask of all externally available orientation bits // ROTATESPRITE_MAX-1 is the mask of all externally available orientation bits
ROTATESPRITE_MAX = 4096, ROTATESPRITE_MAX = 4096,
RS_CENTER = (1<<29), // proper center align.
RS_CENTERORIGIN = (1<<30), RS_CENTERORIGIN = (1<<30),
}; };

View file

@ -3106,7 +3106,7 @@ void twod_rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t pic
if (!(dastat & RS_TOPLEFT)) if (!(dastat & RS_TOPLEFT))
{ {
if (!pic) if (!pic && !(dastat & RS_CENTER))
{ {
ofs = { int16_t(tileLeftOffset(picnum) + (siz.x >> 1)), ofs = { int16_t(tileLeftOffset(picnum) + (siz.x >> 1)),
int16_t(tileTopOffset(picnum) + (siz.y >> 1)) }; int16_t(tileTopOffset(picnum) + (siz.y >> 1)) };

View file

@ -142,7 +142,7 @@ void GameInterface::DrawNativeMenuText(int fontnum, int state, double xpos, doub
shade = 25; shade = 25;
} }
rotatesprite(160 << 16, int((y + tilesiz[tilenum].y) *65536), zoomsize, 0, tilenum, shade, 0, 2|RS_TOPLEFT, 0, 0, xdim, ydim); rotatesprite(160 << 16, int((y + tilesiz[tilenum].y) *65536), zoomsize, 0, tilenum, shade, 0, RS_AUTO|RS_CENTER, 0, 0, xdim, ydim);
// tilesizx is 51 // tilesizx is 51
// tilesizy is 33 // tilesizy is 33