diff --git a/Source/inv.cpp b/Source/inv.cpp index e0bc3dea5..ae91ae1a8 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -718,7 +718,7 @@ void CheckInvPaste(int pnum, int mx, int my) sx = icursW28; sy = icursH28; done = FALSE; - for (r = 0; r < NUM_XY_SLOTS && !done; r++) { + for (r = 0; (DWORD)r < NUM_XY_SLOTS && !done; r++) { if (i >= InvRect[r].X && i < InvRect[r].X + INV_SLOT_SIZE_PX) { if (j >= InvRect[r].Y - INV_SLOT_SIZE_PX - 1 && j < InvRect[r].Y) { done = TRUE; @@ -1961,7 +1961,7 @@ char CheckInvHLight() } } - if ((DWORD)r >= 73) + if ((DWORD)r >= NUM_XY_SLOTS) return -1; rv = -1; diff --git a/Source/plrmsg.cpp b/Source/plrmsg.cpp index dfb69e728..a88f9b343 100644 --- a/Source/plrmsg.cpp +++ b/Source/plrmsg.cpp @@ -89,16 +89,16 @@ void DrawPlrMsg() int i; DWORD x = 10 + SCREEN_X; DWORD y = 70 + SCREEN_Y; - DWORD width = 620; + DWORD width = SCREEN_WIDTH - 20; _plrmsg *pMsg; if (chrflag || questlog) { if (invflag || sbookflag) return; - x = 330 + SCREEN_X; - width = 300; + x += SPANEL_WIDTH; + width -= SPANEL_WIDTH; } else if (invflag || sbookflag) - width = 300; + width -= SPANEL_WIDTH; pMsg = plr_msgs; for (i = 0; i < 8; i++) { diff --git a/Source/render.cpp b/Source/render.cpp index b87c0416c..eab646500 100644 --- a/Source/render.cpp +++ b/Source/render.cpp @@ -14,7 +14,7 @@ DWORD *gpDrawMask = NULL; // char world_4B326D[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /** Specifies the draw masks used to render transparency of the right side of tiles. */ -DWORD RightMask[32] = { +DWORD RightMask[TILE_WIDTH] = { 0xEAAAAAAA, 0xF5555555, 0xFEAAAAAA, 0xFF555555, 0xFFEAAAAA, 0xFFF55555, @@ -33,7 +33,7 @@ DWORD RightMask[32] = { 0xFFFFFFFF, 0xFFFFFFFF }; /** Specifies the draw masks used to render transparency of the left side of tiles. */ -DWORD LeftMask[32] = { +DWORD LeftMask[TILE_WIDTH] = { 0xAAAAAAAB, 0x5555555F, 0xAAAAAABF, 0x555555FF, 0xAAAAABFF, 0x55555FFF, @@ -52,7 +52,7 @@ DWORD LeftMask[32] = { 0xFFFFFFFF, 0xFFFFFFFF }; /** Specifies the draw masks used to render transparency of wall tiles. */ -DWORD WallMask[32] = { +DWORD WallMask[TILE_WIDTH] = { 0xAAAAAAAA, 0x55555555, 0xAAAAAAAA, 0x55555555, 0xAAAAAAAA, 0x55555555, diff --git a/Source/render.h b/Source/render.h index 541e2c326..64a238231 100644 --- a/Source/render.h +++ b/Source/render.h @@ -22,9 +22,9 @@ extern DWORD gdwCurrentMask; extern BYTE *gpCelFrame; extern DWORD *gpDrawMask; // extern char world_4B326D[16]; -extern DWORD RightMask[32]; -extern DWORD LeftMask[32]; -extern DWORD WallMask[32]; +extern DWORD RightMask[TILE_WIDTH]; +extern DWORD LeftMask[TILE_WIDTH]; +extern DWORD WallMask[TILE_WIDTH]; extern int WorldTbl3x16[48]; extern int WorldTbl17_1[17]; extern int WorldTbl17_2[17];