|
@@ -626,7 +626,7 @@ PAL_BattleWon(
|
|
|
--*/
|
|
|
{
|
|
|
const SDL_Rect rect = {0, 60, 320, 100};
|
|
|
- const SDL_Rect rect1 = {80, 0, 180, 200};
|
|
|
+ SDL_Rect rect1 = {80, 0, 180, 200};
|
|
|
|
|
|
int i, j, iTotalCount;
|
|
|
DWORD dwExp;
|
|
@@ -707,95 +707,112 @@ PAL_BattleWon(
|
|
|
|
|
|
gpGlobals->Exp.rgPrimaryExp[w].wExp = (WORD)dwExp;
|
|
|
|
|
|
+ const MENUITEM rgFakeMenuItem[] =
|
|
|
+ {
|
|
|
+
|
|
|
+ { 1, STATUS_LABEL_LEVEL, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 2, STATUS_LABEL_HP, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 3, STATUS_LABEL_MP, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 4, STATUS_LABEL_ATTACKPOWER, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 5, STATUS_LABEL_MAGICPOWER, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 6, STATUS_LABEL_RESISTANCE, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 7, STATUS_LABEL_DEXTERITY, TRUE, PAL_XY(0, 0) },
|
|
|
+ { 8, STATUS_LABEL_FLEERATE, TRUE, PAL_XY(0, 0) },
|
|
|
+ };
|
|
|
+ int maxTextWidth = PAL_MenuTextMaxWidth(rgFakeMenuItem, sizeof(rgFakeMenuItem) / sizeof(MENUITEM)) - 1;
|
|
|
+ int chars = maxTextWidth - 1;
|
|
|
+ int offsetX = -8*chars;
|
|
|
+ rect1.x += offsetX;
|
|
|
+ rect1.w -= 2*offsetX;
|
|
|
if (fLevelUp)
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
- PAL_CreateSingleLineBox(PAL_XY(80, 0), 10, FALSE);
|
|
|
- PAL_CreateBox(PAL_XY(82, 32), 7, 8, 1, FALSE);
|
|
|
+ PAL_CreateSingleLineBox(PAL_XY(offsetX+80, 0), chars+10, FALSE);
|
|
|
+ PAL_CreateBox(PAL_XY(offsetX+82, 32), 7, chars+8, 1, FALSE);
|
|
|
|
|
|
PAL_DrawText(PAL_GetWord(gpGlobals->g.PlayerRoles.rgwName[w]), PAL_XY(110, 10), 0, FALSE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_LEVEL), PAL_XY(110 + 16 * 3, 10), 0, FALSE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(BATTLEWIN_LEVELUP_LABEL), PAL_XY(110 + 16 * 5, 10), 0, FALSE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_LEVEL), PAL_XY(110+PAL_TextWidth(PAL_GetWord(gpGlobals->g.PlayerRoles.rgwName[w])), 10), 0, FALSE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(BATTLEWIN_LEVELUP_LABEL), PAL_XY(110+PAL_TextWidth(PAL_GetWord(gpGlobals->g.PlayerRoles.rgwName[w]))+PAL_TextWidth(PAL_GetWord(STATUS_LABEL_LEVEL)), 10), 0, FALSE, FALSE, FALSE);
|
|
|
|
|
|
for (j = 0; j < 8; j++)
|
|
|
{
|
|
|
PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_ARROW),
|
|
|
- gpScreen, PAL_XY(183, 48 + 18 * j));
|
|
|
+ gpScreen, PAL_XY(-offsetX+180, 48 + 18 * j));
|
|
|
}
|
|
|
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_LEVEL), PAL_XY(100, 44), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_HP), PAL_XY(100, 62), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_MP), PAL_XY(100, 80), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_ATTACKPOWER), PAL_XY(100, 98), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_MAGICPOWER), PAL_XY(100, 116), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_RESISTANCE), PAL_XY(100, 134), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_DEXTERITY), PAL_XY(100, 152), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
- PAL_DrawText(PAL_GetWord(STATUS_LABEL_FLEERATE), PAL_XY(100, 170), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_LEVEL), PAL_XY(offsetX+100, 44), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_HP), PAL_XY(offsetX+100, 62), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_MP), PAL_XY(offsetX+100, 80), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_ATTACKPOWER), PAL_XY(offsetX+100, 98), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_MAGICPOWER), PAL_XY(offsetX+100, 116), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_RESISTANCE), PAL_XY(offsetX+100, 134), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_DEXTERITY), PAL_XY(offsetX+100, 152), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
+ PAL_DrawText(PAL_GetWord(STATUS_LABEL_FLEERATE), PAL_XY(offsetX+100, 170), BATTLEWIN_LEVELUP_LABEL_COLOR, TRUE, FALSE, FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- PAL_DrawNumber(OrigPlayerRoles.rgwLevel[w], 4, PAL_XY(133, 47),
|
|
|
+ PAL_DrawNumber(OrigPlayerRoles.rgwLevel[w], 4, PAL_XY(-offsetX+133, 47),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwLevel[w], 4, PAL_XY(195, 47),
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwLevel[w], 4, PAL_XY(-offsetX+195, 47),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
|
|
|
- PAL_DrawNumber(OrigPlayerRoles.rgwHP[w], 4, PAL_XY(133, 64),
|
|
|
+ PAL_DrawNumber(OrigPlayerRoles.rgwHP[w], 4, PAL_XY(-offsetX+133, 64),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(OrigPlayerRoles.rgwMaxHP[w], 4, PAL_XY(154, 68),
|
|
|
+ PAL_DrawNumber(OrigPlayerRoles.rgwMaxHP[w], 4, PAL_XY(-offsetX+154, 68),
|
|
|
kNumColorBlue, kNumAlignRight);
|
|
|
PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(156, 66));
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwHP[w], 4, PAL_XY(195, 64),
|
|
|
+ PAL_XY(-offsetX+156, 66));
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwHP[w], 4, PAL_XY(-offsetX+195, 64),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxHP[w], 4, PAL_XY(216, 68),
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxHP[w], 4, PAL_XY(-offsetX+216, 68),
|
|
|
kNumColorBlue, kNumAlignRight);
|
|
|
PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(218, 66));
|
|
|
+ PAL_XY(-offsetX+218, 66));
|
|
|
|
|
|
- PAL_DrawNumber(OrigPlayerRoles.rgwMP[w], 4, PAL_XY(133, 82),
|
|
|
+ PAL_DrawNumber(OrigPlayerRoles.rgwMP[w], 4, PAL_XY(-offsetX+133, 82),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(OrigPlayerRoles.rgwMaxMP[w], 4, PAL_XY(154, 86),
|
|
|
+ PAL_DrawNumber(OrigPlayerRoles.rgwMaxMP[w], 4, PAL_XY(-offsetX+154, 86),
|
|
|
kNumColorBlue, kNumAlignRight);
|
|
|
PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(156, 84));
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMP[w], 4, PAL_XY(195, 82),
|
|
|
+ PAL_XY(-offsetX+156, 84));
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMP[w], 4, PAL_XY(-offsetX+195, 82),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxMP[w], 4, PAL_XY(216, 86),
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxMP[w], 4, PAL_XY(-offsetX+216, 86),
|
|
|
kNumColorBlue, kNumAlignRight);
|
|
|
PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(218, 84));
|
|
|
+ PAL_XY(-offsetX+218, 84));
|
|
|
|
|
|
PAL_DrawNumber(OrigPlayerRoles.rgwAttackStrength[w] + PAL_GetPlayerAttackStrength(w) -
|
|
|
gpGlobals->g.PlayerRoles.rgwAttackStrength[w],
|
|
|
- 4, PAL_XY(133, 101), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(PAL_GetPlayerAttackStrength(w), 4, PAL_XY(195, 101),
|
|
|
+ 4, PAL_XY(-offsetX+133, 101), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(PAL_GetPlayerAttackStrength(w), 4, PAL_XY(-offsetX+195, 101),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
|
|
|
PAL_DrawNumber(OrigPlayerRoles.rgwMagicStrength[w] + PAL_GetPlayerMagicStrength(w) -
|
|
|
gpGlobals->g.PlayerRoles.rgwMagicStrength[w],
|
|
|
- 4, PAL_XY(133, 119), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(PAL_GetPlayerMagicStrength(w), 4, PAL_XY(195, 119),
|
|
|
+ 4, PAL_XY(-offsetX+133, 119), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(PAL_GetPlayerMagicStrength(w), 4, PAL_XY(-offsetX+195, 119),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
|
|
|
PAL_DrawNumber(OrigPlayerRoles.rgwDefense[w] + PAL_GetPlayerDefense(w) -
|
|
|
gpGlobals->g.PlayerRoles.rgwDefense[w],
|
|
|
- 4, PAL_XY(133, 137), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(PAL_GetPlayerDefense(w), 4, PAL_XY(195, 137),
|
|
|
+ 4, PAL_XY(-offsetX+133, 137), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(PAL_GetPlayerDefense(w), 4, PAL_XY(-offsetX+195, 137),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
|
|
|
PAL_DrawNumber(OrigPlayerRoles.rgwDexterity[w] + PAL_GetPlayerDexterity(w) -
|
|
|
gpGlobals->g.PlayerRoles.rgwDexterity[w],
|
|
|
- 4, PAL_XY(133, 155), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(PAL_GetPlayerDexterity(w), 4, PAL_XY(195, 155),
|
|
|
+ 4, PAL_XY(-offsetX+133, 155), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(PAL_GetPlayerDexterity(w), 4, PAL_XY(-offsetX+195, 155),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
|
|
|
PAL_DrawNumber(OrigPlayerRoles.rgwFleeRate[w] + PAL_GetPlayerFleeRate(w) -
|
|
|
gpGlobals->g.PlayerRoles.rgwFleeRate[w],
|
|
|
- 4, PAL_XY(133, 173), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(PAL_GetPlayerFleeRate(w), 4, PAL_XY(195, 173),
|
|
|
+ 4, PAL_XY(-offsetX+133, 173), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(PAL_GetPlayerFleeRate(w), 4, PAL_XY(-offsetX+195, 173),
|
|
|
kNumColorYellow, kNumAlignRight);
|
|
|
|
|
|
|