|
@@ -162,81 +162,85 @@ PAL_PlayerInfoBox(
|
|
|
gpScreen, PAL_XY(PAL_X(pos) - 2, PAL_Y(pos) - 4), bPoisonColor, 0);
|
|
|
}
|
|
|
|
|
|
-#ifndef PAL_CLASSIC
|
|
|
- //
|
|
|
- // Draw a border for the Time Meter
|
|
|
- //
|
|
|
- rect.x = PAL_X(pos) + 31;
|
|
|
- rect.y = PAL_Y(pos) + 4;
|
|
|
- rect.w = 1;
|
|
|
- rect.h = 6;
|
|
|
- SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
-
|
|
|
- rect.x += 39;
|
|
|
- SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
-
|
|
|
- rect.x = PAL_X(pos) + 32;
|
|
|
- rect.y = PAL_Y(pos) + 3;
|
|
|
- rect.w = 38;
|
|
|
- rect.h = 1;
|
|
|
- SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
-
|
|
|
- rect.y += 7;
|
|
|
- SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
+ if (!PAL_IsClassicBattle())
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // Draw a border for the Time Meter
|
|
|
+ //
|
|
|
+ rect.x = PAL_X(pos) + 31;
|
|
|
+ rect.y = PAL_Y(pos) + 4;
|
|
|
+ rect.w = 1;
|
|
|
+ rect.h = 6;
|
|
|
+ SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
+
|
|
|
+ rect.x += 39;
|
|
|
+ SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
+
|
|
|
+ rect.x = PAL_X(pos) + 32;
|
|
|
+ rect.y = PAL_Y(pos) + 3;
|
|
|
+ rect.w = 38;
|
|
|
+ rect.h = 1;
|
|
|
+ SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
+
|
|
|
+ rect.y += 7;
|
|
|
+ SDL_FillRect(gpScreen, &rect, 0xBD);
|
|
|
+
|
|
|
+ //
|
|
|
+ // Draw the Time meter bar
|
|
|
+ //
|
|
|
+ if (iTimeMeter >= 100)
|
|
|
+ {
|
|
|
+ rect.x = PAL_X(pos) + 33;
|
|
|
+ rect.y = PAL_Y(pos) + 6;
|
|
|
+ rect.w = 36;
|
|
|
+ rect.h = 2;
|
|
|
+ SDL_FillRect(gpScreen, &rect, 0x2C);
|
|
|
+ }
|
|
|
+ else if (iTimeMeter > 0)
|
|
|
+ {
|
|
|
+ rect.x = PAL_X(pos) + 33;
|
|
|
+ rect.y = PAL_Y(pos) + 5;
|
|
|
+ rect.w = iTimeMeter * 36 / 100;
|
|
|
+ rect.h = 4;
|
|
|
+ SDL_FillRect(gpScreen, &rect, bTimeMeterColor);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//
|
|
|
- // Draw the Time meter bar
|
|
|
+ // Draw the HP and MP value
|
|
|
//
|
|
|
- if (iTimeMeter >= 100)
|
|
|
+ if (PAL_IsClassicBattle())
|
|
|
{
|
|
|
- rect.x = PAL_X(pos) + 33;
|
|
|
- rect.y = PAL_Y(pos) + 6;
|
|
|
- rect.w = 36;
|
|
|
- rect.h = 2;
|
|
|
- SDL_FillRect(gpScreen, &rect, 0x2C);
|
|
|
+ PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
+ PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 6));
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxHP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 8), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwHP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 5), kNumColorYellow, kNumAlignRight);
|
|
|
+
|
|
|
+ PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
+ PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 22));
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxMP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 24), kNumColorCyan, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 21), kNumColorCyan, kNumAlignRight);
|
|
|
}
|
|
|
- else if (iTimeMeter > 0)
|
|
|
+ else
|
|
|
{
|
|
|
- rect.x = PAL_X(pos) + 33;
|
|
|
- rect.y = PAL_Y(pos) + 5;
|
|
|
- rect.w = iTimeMeter * 36 / 100;
|
|
|
- rect.h = 4;
|
|
|
- SDL_FillRect(gpScreen, &rect, bTimeMeterColor);
|
|
|
+ PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
+ PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 14));
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxHP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 16), kNumColorYellow, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwHP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 13), kNumColorYellow, kNumAlignRight);
|
|
|
+
|
|
|
+ PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
+ PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 24));
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxMP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 26), kNumColorCyan, kNumAlignRight);
|
|
|
+ PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMP[wPlayerRole], 4,
|
|
|
+ PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 23), kNumColorCyan, kNumAlignRight);
|
|
|
}
|
|
|
-#endif
|
|
|
-
|
|
|
- //
|
|
|
- // Draw the HP and MP value
|
|
|
- //
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 6));
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxHP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 8), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwHP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 5), kNumColorYellow, kNumAlignRight);
|
|
|
-
|
|
|
- PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 22));
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxMP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 24), kNumColorCyan, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 21), kNumColorCyan, kNumAlignRight);
|
|
|
-#else
|
|
|
- PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 14));
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxHP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 16), kNumColorYellow, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwHP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 13), kNumColorYellow, kNumAlignRight);
|
|
|
-
|
|
|
- PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, SPRITENUM_SLASH), gpScreen,
|
|
|
- PAL_XY(PAL_X(pos) + 49, PAL_Y(pos) + 24));
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMaxMP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 47, PAL_Y(pos) + 26), kNumColorCyan, kNumAlignRight);
|
|
|
- PAL_DrawNumber(gpGlobals->g.PlayerRoles.rgwMP[wPlayerRole], 4,
|
|
|
- PAL_XY(PAL_X(pos) + 26, PAL_Y(pos) + 23), kNumColorCyan, kNumAlignRight);
|
|
|
-#endif
|
|
|
|
|
|
//
|
|
|
// Draw Statuses
|
|
@@ -315,19 +319,12 @@ PAL_BattleUIIsActionValid(
|
|
|
{
|
|
|
w = gpGlobals->rgParty[i].wPlayerRole;
|
|
|
|
|
|
-#ifndef PAL_CLASSIC
|
|
|
if (gpGlobals->g.PlayerRoles.rgwHP[w] < gpGlobals->g.PlayerRoles.rgwMaxHP[w] / 5 ||
|
|
|
gpGlobals->rgPlayerStatus[w][kStatusSleep] != 0 ||
|
|
|
gpGlobals->rgPlayerStatus[w][kStatusConfused] != 0 ||
|
|
|
gpGlobals->rgPlayerStatus[w][kStatusSilence] != 0 ||
|
|
|
- g_Battle.rgPlayer[i].flTimeMeter < 100 ||
|
|
|
- g_Battle.rgPlayer[i].state == kFighterAct)
|
|
|
-#else
|
|
|
- if (gpGlobals->g.PlayerRoles.rgwHP[w] < gpGlobals->g.PlayerRoles.rgwMaxHP[w] / 5 ||
|
|
|
- gpGlobals->rgPlayerStatus[w][kStatusSleep] != 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[w][kStatusConfused] != 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[w][kStatusSilence] != 0)
|
|
|
-#endif
|
|
|
+ (!PAL_IsClassicBattle() && g_Battle.rgPlayer[i].flTimeMeter < 100) ||
|
|
|
+ (!PAL_IsClassicBattle() && g_Battle.rgPlayer[i].state == kFighterAct))
|
|
|
{
|
|
|
return FALSE;
|
|
|
}
|
|
@@ -363,7 +360,6 @@ PAL_BattleUIDrawMiscMenu(
|
|
|
int i;
|
|
|
BYTE bColor;
|
|
|
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
MENUITEM rgMenuItem[] = {
|
|
|
// value label enabled position
|
|
|
{ 0, BATTLEUI_LABEL_AUTO, TRUE, PAL_XY(16, 32) },
|
|
@@ -372,16 +368,6 @@ PAL_BattleUIDrawMiscMenu(
|
|
|
{ 3, BATTLEUI_LABEL_FLEE, TRUE, PAL_XY(16, 86) },
|
|
|
{ 4, BATTLEUI_LABEL_STATUS, TRUE, PAL_XY(16, 104) }
|
|
|
};
|
|
|
-#else
|
|
|
- MENUITEM rgMenuItem[] = {
|
|
|
- // value label enabled position
|
|
|
- { 0, BATTLEUI_LABEL_ITEM, TRUE, PAL_XY(16, 32) },
|
|
|
- { 1, BATTLEUI_LABEL_DEFEND, TRUE, PAL_XY(16, 50) },
|
|
|
- { 2, BATTLEUI_LABEL_AUTO, TRUE, PAL_XY(16, 68) },
|
|
|
- { 3, BATTLEUI_LABEL_FLEE, TRUE, PAL_XY(16, 86) },
|
|
|
- { 4, BATTLEUI_LABEL_STATUS, TRUE, PAL_XY(16, 104) }
|
|
|
- };
|
|
|
-#endif
|
|
|
|
|
|
//
|
|
|
// Draw the box
|
|
@@ -497,11 +483,7 @@ PAL_BattleUIMiscItemSubMenuUpdate(
|
|
|
//
|
|
|
// Draw the menu
|
|
|
//
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- PAL_BattleUIDrawMiscMenu(1, TRUE);
|
|
|
-#else
|
|
|
- PAL_BattleUIDrawMiscMenu(0, TRUE);
|
|
|
-#endif
|
|
|
+ PAL_BattleUIDrawMiscMenu(PAL_IsClassicBattle() ? 1 : 0, TRUE);
|
|
|
PAL_CreateBox(PAL_XY(30, 50), 1, PAL_MenuTextMaxWidth(rgMenuItem, 2) - 1, 0, FALSE);
|
|
|
|
|
|
//
|
|
@@ -595,27 +577,25 @@ PAL_BattleUIPlayerReady(
|
|
|
|
|
|
--*/
|
|
|
{
|
|
|
-#ifndef PAL_CLASSIC
|
|
|
- WORD w = gpGlobals->rgParty[wPlayerIndex].wPlayerRole;
|
|
|
-#endif
|
|
|
-
|
|
|
g_Battle.UI.wCurPlayerIndex = wPlayerIndex;
|
|
|
g_Battle.UI.state = kBattleUISelectMove;
|
|
|
g_Battle.UI.wSelectedAction = 0;
|
|
|
g_Battle.UI.MenuState = kBattleMenuMain;
|
|
|
|
|
|
-#ifndef PAL_CLASSIC
|
|
|
- //
|
|
|
- // Play a sound which indicates the player is ready
|
|
|
- //
|
|
|
- if (gpGlobals->rgPlayerStatus[w][kStatusPuppet] == 0 &&
|
|
|
- gpGlobals->rgPlayerStatus[w][kStatusSleep] == 0 &&
|
|
|
- gpGlobals->rgPlayerStatus[w][kStatusConfused] == 0 &&
|
|
|
- !g_Battle.UI.fAutoAttack && !gpGlobals->fAutoBattle)
|
|
|
+ if (!PAL_IsClassicBattle())
|
|
|
{
|
|
|
- AUDIO_PlaySound(78);
|
|
|
+ WORD w = gpGlobals->rgParty[wPlayerIndex].wPlayerRole;
|
|
|
+ //
|
|
|
+ // Play a sound which indicates the player is ready
|
|
|
+ //
|
|
|
+ if (gpGlobals->rgPlayerStatus[w][kStatusPuppet] == 0 &&
|
|
|
+ gpGlobals->rgPlayerStatus[w][kStatusSleep] == 0 &&
|
|
|
+ gpGlobals->rgPlayerStatus[w][kStatusConfused] == 0 &&
|
|
|
+ !g_Battle.UI.fAutoAttack && !gpGlobals->fAutoBattle)
|
|
|
+ {
|
|
|
+ AUDIO_PlaySound(78);
|
|
|
+ }
|
|
|
}
|
|
|
-#endif
|
|
|
}
|
|
|
|
|
|
static VOID
|
|
@@ -654,11 +634,7 @@ PAL_BattleUIUseItem(
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- g_Battle.UI.wSelectedIndex = 0;
|
|
|
-#else
|
|
|
- g_Battle.UI.wSelectedIndex = g_Battle.UI.wCurPlayerIndex;
|
|
|
-#endif
|
|
|
+ g_Battle.UI.wSelectedIndex = PAL_IsClassicBattle() ? 0 : g_Battle.UI.wCurPlayerIndex;
|
|
|
g_Battle.UI.state = kBattleUISelectTargetPlayer;
|
|
|
}
|
|
|
}
|
|
@@ -868,14 +844,12 @@ PAL_BattleUIUpdate(
|
|
|
g_Battle.UI.MenuState = kBattleMenuMain;
|
|
|
}
|
|
|
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- if (g_Battle.Phase == kBattlePhasePerformAction)
|
|
|
+ if (PAL_IsClassicBattle() && g_Battle.Phase == kBattlePhasePerformAction)
|
|
|
{
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
|
- if (!g_Battle.UI.fAutoAttack)
|
|
|
-#endif
|
|
|
+ if (!PAL_IsClassicBattle() || !g_Battle.UI.fAutoAttack)
|
|
|
{
|
|
|
//
|
|
|
// Draw the player info boxes.
|
|
@@ -887,16 +861,17 @@ PAL_BattleUIUpdate(
|
|
|
|
|
|
j = TIMEMETER_COLOR_DEFAULT;
|
|
|
|
|
|
-#ifndef PAL_CLASSIC
|
|
|
- if (gpGlobals->rgPlayerStatus[wPlayerRole][kStatusHaste] > 0)
|
|
|
- {
|
|
|
- j = TIMEMETER_COLOR_HASTE;
|
|
|
- }
|
|
|
- else if (gpGlobals->rgPlayerStatus[wPlayerRole][kStatusSlow] > 0)
|
|
|
- {
|
|
|
- j = TIMEMETER_COLOR_SLOW;
|
|
|
- }
|
|
|
-#endif
|
|
|
+ if (!PAL_IsClassicBattle())
|
|
|
+ {
|
|
|
+ if (gpGlobals->rgPlayerStatus[wPlayerRole][kStatusHaste] > 0)
|
|
|
+ {
|
|
|
+ j = TIMEMETER_COLOR_HASTE;
|
|
|
+ }
|
|
|
+ else if (gpGlobals->rgPlayerStatus[wPlayerRole][kStatusParalyzedOrSlow] > 0)
|
|
|
+ {
|
|
|
+ j = TIMEMETER_COLOR_SLOW;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (gpGlobals->rgPlayerStatus[wPlayerRole][kStatusSleep] != 0 ||
|
|
|
gpGlobals->rgPlayerStatus[wPlayerRole][kStatusConfused] != 0 ||
|
|
@@ -941,9 +916,9 @@ PAL_BattleUIUpdate(
|
|
|
//
|
|
|
// Cancel any actions if player is dead or sleeping.
|
|
|
//
|
|
|
- if (gpGlobals->g.PlayerRoles.rgwHP[wPlayerRole] == 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[wPlayerRole][kStatusSleep] != 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[wPlayerRole][kStatusParalyzed] != 0)
|
|
|
+ if (gpGlobals->g.PlayerRoles.rgwHP[wPlayerRole] == 0 || PAL_CheckRoleStatus(
|
|
|
+ gpGlobals->rgPlayerStatus[wPlayerRole], 2, FALSE, TRUE,
|
|
|
+ kStatusSleep, TRUE, kStatusParalyzedOrSlow, TRUE))
|
|
|
{
|
|
|
g_Battle.UI.wActionType = kBattleActionPass;
|
|
|
PAL_BattleCommitAction(FALSE);
|
|
@@ -1135,11 +1110,7 @@ PAL_BattleUIUpdate(
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- g_Battle.UI.wSelectedIndex = 0;
|
|
|
-#else
|
|
|
- g_Battle.UI.wSelectedIndex = g_Battle.UI.wCurPlayerIndex;
|
|
|
-#endif
|
|
|
+ g_Battle.UI.wSelectedIndex = PAL_IsClassicBattle() ? 0 : g_Battle.UI.wCurPlayerIndex;
|
|
|
g_Battle.UI.state = kBattleUISelectTargetPlayer;
|
|
|
}
|
|
|
}
|
|
@@ -1212,85 +1183,84 @@ PAL_BattleUIUpdate(
|
|
|
{
|
|
|
PAL_BattleCommitAction(TRUE);
|
|
|
}
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
else if (g_InputState.dwKeyPress & kKeyMenu)
|
|
|
{
|
|
|
- g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].state = kFighterWait;
|
|
|
- g_Battle.UI.state = kBattleUIWait;
|
|
|
-
|
|
|
- if (g_Battle.UI.wCurPlayerIndex > 0)
|
|
|
- {
|
|
|
- //
|
|
|
- // Revert to the previous player
|
|
|
- //
|
|
|
- do
|
|
|
- {
|
|
|
- g_Battle.rgPlayer[--g_Battle.UI.wCurPlayerIndex].state = kFighterWait;
|
|
|
-
|
|
|
- if (g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.ActionType == kBattleActionThrowItem)
|
|
|
- {
|
|
|
- for (i = 0; i < MAX_INVENTORY; i++)
|
|
|
- {
|
|
|
- if (gpGlobals->rgInventory[i].wItem ==
|
|
|
- g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.wActionID)
|
|
|
- {
|
|
|
- gpGlobals->rgInventory[i].nAmountInUse--;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else if (g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.ActionType == kBattleActionUseItem)
|
|
|
- {
|
|
|
- if (gpGlobals->g.rgObject[g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.wActionID].item.wFlags & kItemFlagConsuming)
|
|
|
- {
|
|
|
- for (i = 0; i < MAX_INVENTORY; i++)
|
|
|
- {
|
|
|
- if (gpGlobals->rgInventory[i].wItem ==
|
|
|
- g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.wActionID)
|
|
|
- {
|
|
|
- gpGlobals->rgInventory[i].nAmountInUse--;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } while (g_Battle.UI.wCurPlayerIndex > 0 &&
|
|
|
- (gpGlobals->g.PlayerRoles.rgwHP[gpGlobals->rgParty[g_Battle.UI.wCurPlayerIndex].wPlayerRole] == 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[gpGlobals->rgParty[g_Battle.UI.wCurPlayerIndex].wPlayerRole][kStatusConfused] > 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[gpGlobals->rgParty[g_Battle.UI.wCurPlayerIndex].wPlayerRole][kStatusSleep] > 0 ||
|
|
|
- gpGlobals->rgPlayerStatus[gpGlobals->rgParty[g_Battle.UI.wCurPlayerIndex].wPlayerRole][kStatusParalyzed] > 0));
|
|
|
- }
|
|
|
- }
|
|
|
-#else
|
|
|
- else if (g_InputState.dwKeyPress & kKeyMenu)
|
|
|
- {
|
|
|
- float flMin = -1;
|
|
|
- j = -1;
|
|
|
-
|
|
|
- for (i = 0; i <= gpGlobals->wMaxPartyMemberIndex; i++)
|
|
|
- {
|
|
|
- if (g_Battle.rgPlayer[i].flTimeMeter >= 100)
|
|
|
- {
|
|
|
- g_Battle.rgPlayer[i].flTimeMeter += 100; // HACKHACK: Prevent the time meter from going below 100
|
|
|
-
|
|
|
- if ((g_Battle.rgPlayer[i].flTimeMeter < flMin || flMin < 0) &&
|
|
|
- i != (int)g_Battle.UI.wCurPlayerIndex &&
|
|
|
- g_Battle.rgPlayer[i].state == kFighterWait)
|
|
|
- {
|
|
|
- flMin = g_Battle.rgPlayer[i].flTimeMeter;
|
|
|
- j = i;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (j != -1)
|
|
|
- {
|
|
|
- g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].flTimeMeter = flMin - 99;
|
|
|
- g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].state = kFighterWait;
|
|
|
- g_Battle.UI.state = kBattleUIWait;
|
|
|
- }
|
|
|
+ if (PAL_IsClassicBattle())
|
|
|
+ {
|
|
|
+ g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].state = kFighterWait;
|
|
|
+ g_Battle.UI.state = kBattleUIWait;
|
|
|
+
|
|
|
+ if (g_Battle.UI.wCurPlayerIndex > 0)
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // Revert to the previous player
|
|
|
+ //
|
|
|
+ do
|
|
|
+ {
|
|
|
+ g_Battle.rgPlayer[--g_Battle.UI.wCurPlayerIndex].state = kFighterWait;
|
|
|
+
|
|
|
+ if (g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.ActionType == kBattleActionThrowItem)
|
|
|
+ {
|
|
|
+ for (i = 0; i < MAX_INVENTORY; i++)
|
|
|
+ {
|
|
|
+ if (gpGlobals->rgInventory[i].wItem ==
|
|
|
+ g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.wActionID)
|
|
|
+ {
|
|
|
+ gpGlobals->rgInventory[i].nAmountInUse--;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.ActionType == kBattleActionUseItem)
|
|
|
+ {
|
|
|
+ if (gpGlobals->g.rgObject[g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.wActionID].item.wFlags & kItemFlagConsuming)
|
|
|
+ {
|
|
|
+ for (i = 0; i < MAX_INVENTORY; i++)
|
|
|
+ {
|
|
|
+ if (gpGlobals->rgInventory[i].wItem ==
|
|
|
+ g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].action.wActionID)
|
|
|
+ {
|
|
|
+ gpGlobals->rgInventory[i].nAmountInUse--;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } while (g_Battle.UI.wCurPlayerIndex > 0 &&
|
|
|
+ (gpGlobals->g.PlayerRoles.rgwHP[gpGlobals->rgParty[g_Battle.UI.wCurPlayerIndex].wPlayerRole] == 0 || PAL_CheckRoleStatus(
|
|
|
+ gpGlobals->rgPlayerStatus[gpGlobals->rgParty[g_Battle.UI.wCurPlayerIndex].wPlayerRole], 3, FALSE, TRUE,
|
|
|
+ kStatusConfused, TRUE, kStatusSleep, TRUE, kStatusParalyzedOrSlow, TRUE)));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ float flMin = -1;
|
|
|
+ j = -1;
|
|
|
+
|
|
|
+ for (i = 0; i <= gpGlobals->wMaxPartyMemberIndex; i++)
|
|
|
+ {
|
|
|
+ if (g_Battle.rgPlayer[i].flTimeMeter >= 100)
|
|
|
+ {
|
|
|
+ g_Battle.rgPlayer[i].flTimeMeter += 100; // HACKHACK: Prevent the time meter from going below 100
|
|
|
+
|
|
|
+ if ((g_Battle.rgPlayer[i].flTimeMeter < flMin || flMin < 0) &&
|
|
|
+ i != (int)g_Battle.UI.wCurPlayerIndex &&
|
|
|
+ g_Battle.rgPlayer[i].state == kFighterWait)
|
|
|
+ {
|
|
|
+ flMin = g_Battle.rgPlayer[i].flTimeMeter;
|
|
|
+ j = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (j != -1)
|
|
|
+ {
|
|
|
+ g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].flTimeMeter = flMin - 99;
|
|
|
+ g_Battle.rgPlayer[g_Battle.UI.wCurPlayerIndex].state = kFighterWait;
|
|
|
+ g_Battle.UI.state = kBattleUIWait;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-#endif
|
|
|
break;
|
|
|
|
|
|
case kBattleMenuMagicSelect:
|
|
@@ -1325,11 +1295,7 @@ PAL_BattleUIUpdate(
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- g_Battle.UI.wSelectedIndex = 0;
|
|
|
-#else
|
|
|
- g_Battle.UI.wSelectedIndex = g_Battle.UI.wCurPlayerIndex;
|
|
|
-#endif
|
|
|
+ g_Battle.UI.wSelectedIndex = PAL_IsClassicBattle() ? 0 : g_Battle.UI.wCurPlayerIndex;
|
|
|
g_Battle.UI.state = kBattleUISelectTargetPlayer;
|
|
|
}
|
|
|
}
|
|
@@ -1354,32 +1320,20 @@ PAL_BattleUIUpdate(
|
|
|
|
|
|
switch (w)
|
|
|
{
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
+ case 1: // auto
|
|
|
+ g_Battle.UI.fAutoAttack = TRUE;
|
|
|
+ break;
|
|
|
+
|
|
|
case 2: // item
|
|
|
-#else
|
|
|
- case 1: // item
|
|
|
-#endif
|
|
|
g_Battle.UI.MenuState = kBattleMenuMiscItemSubMenu;
|
|
|
g_iCurSubMenuItem = 0;
|
|
|
break;
|
|
|
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
case 3: // defend
|
|
|
-#else
|
|
|
- case 2: // defend
|
|
|
-#endif
|
|
|
g_Battle.UI.wActionType = kBattleActionDefend;
|
|
|
PAL_BattleCommitAction(FALSE);
|
|
|
break;
|
|
|
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- case 1: // auto
|
|
|
-#else
|
|
|
- case 3: // auto
|
|
|
-#endif
|
|
|
- g_Battle.UI.fAutoAttack = TRUE;
|
|
|
- break;
|
|
|
-
|
|
|
case 4: // flee
|
|
|
g_Battle.UI.wActionType = kBattleActionFlee;
|
|
|
PAL_BattleCommitAction(FALSE);
|
|
@@ -1445,17 +1399,16 @@ PAL_BattleUIUpdate(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
//
|
|
|
// Don't bother selecting when only 1 enemy left
|
|
|
//
|
|
|
- if (y == 1)
|
|
|
+ if (PAL_IsClassicBattle() && y == 1)
|
|
|
{
|
|
|
g_Battle.UI.wPrevEnemyTarget = (WORD)x;
|
|
|
PAL_BattleCommitAction(FALSE);
|
|
|
break;
|
|
|
}
|
|
|
-#endif
|
|
|
+
|
|
|
if (g_Battle.UI.wSelectedIndex > x)
|
|
|
{
|
|
|
g_Battle.UI.wSelectedIndex = x;
|
|
@@ -1524,16 +1477,17 @@ PAL_BattleUIUpdate(
|
|
|
break;
|
|
|
|
|
|
case kBattleUISelectTargetPlayer:
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- //
|
|
|
- // Don't bother selecting when only 1 player is in the party
|
|
|
- //
|
|
|
- if (gpGlobals->wMaxPartyMemberIndex == 0)
|
|
|
- {
|
|
|
- g_Battle.UI.wSelectedIndex = 0;
|
|
|
- PAL_BattleCommitAction(FALSE);
|
|
|
- }
|
|
|
-#endif
|
|
|
+ if (PAL_IsClassicBattle())
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // Don't bother selecting when only 1 player is in the party
|
|
|
+ //
|
|
|
+ if (gpGlobals->wMaxPartyMemberIndex == 0)
|
|
|
+ {
|
|
|
+ g_Battle.UI.wSelectedIndex = 0;
|
|
|
+ PAL_BattleCommitAction(FALSE);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
j = SPRITENUM_BATTLE_ARROW_SELECTEDPLAYER;
|
|
|
if (s_iFrame & 1)
|
|
@@ -1583,101 +1537,107 @@ PAL_BattleUIUpdate(
|
|
|
break;
|
|
|
|
|
|
case kBattleUISelectTargetEnemyAll:
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- //
|
|
|
- // Don't bother selecting
|
|
|
- //
|
|
|
- g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
- PAL_BattleCommitAction(FALSE);
|
|
|
-#else
|
|
|
- if (g_Battle.UI.wActionType == kBattleActionCoopMagic)
|
|
|
- {
|
|
|
- if (!PAL_BattleUIIsActionValid(kBattleActionCoopMagic))
|
|
|
- {
|
|
|
- g_Battle.UI.state = kBattleUISelectMove;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (s_iFrame & 1)
|
|
|
- {
|
|
|
- //
|
|
|
- // Highlight all enemies
|
|
|
- //
|
|
|
- for (i = g_Battle.wMaxEnemyIndex; i >= 0; i--)
|
|
|
- {
|
|
|
- if (g_Battle.rgEnemy[i].wObjectID == 0)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- x = PAL_X(g_Battle.rgEnemy[i].pos);
|
|
|
- y = PAL_Y(g_Battle.rgEnemy[i].pos);
|
|
|
-
|
|
|
- x -= PAL_RLEGetWidth(PAL_SpriteGetFrame(g_Battle.rgEnemy[i].lpSprite, g_Battle.rgEnemy[i].wCurrentFrame)) / 2;
|
|
|
- y -= PAL_RLEGetHeight(PAL_SpriteGetFrame(g_Battle.rgEnemy[i].lpSprite, g_Battle.rgEnemy[i].wCurrentFrame));
|
|
|
-
|
|
|
- PAL_RLEBlitWithColorShift(PAL_SpriteGetFrame(g_Battle.rgEnemy[i].lpSprite, g_Battle.rgEnemy[i].wCurrentFrame),
|
|
|
- gpScreen, PAL_XY(x, y), 7);
|
|
|
- }
|
|
|
- }
|
|
|
- if (g_InputState.dwKeyPress & kKeyMenu)
|
|
|
- {
|
|
|
- g_Battle.UI.state = kBattleUISelectMove;
|
|
|
- }
|
|
|
- else if (g_InputState.dwKeyPress & kKeySearch)
|
|
|
- {
|
|
|
- g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
- PAL_BattleCommitAction(FALSE);
|
|
|
- }
|
|
|
-#endif
|
|
|
+ if (PAL_IsClassicBattle())
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // Don't bother selecting
|
|
|
+ //
|
|
|
+ g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
+ PAL_BattleCommitAction(FALSE);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (g_Battle.UI.wActionType == kBattleActionCoopMagic)
|
|
|
+ {
|
|
|
+ if (!PAL_BattleUIIsActionValid(kBattleActionCoopMagic))
|
|
|
+ {
|
|
|
+ g_Battle.UI.state = kBattleUISelectMove;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (s_iFrame & 1)
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // Highlight all enemies
|
|
|
+ //
|
|
|
+ for (i = g_Battle.wMaxEnemyIndex; i >= 0; i--)
|
|
|
+ {
|
|
|
+ if (g_Battle.rgEnemy[i].wObjectID == 0)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ x = PAL_X(g_Battle.rgEnemy[i].pos);
|
|
|
+ y = PAL_Y(g_Battle.rgEnemy[i].pos);
|
|
|
+
|
|
|
+ x -= PAL_RLEGetWidth(PAL_SpriteGetFrame(g_Battle.rgEnemy[i].lpSprite, g_Battle.rgEnemy[i].wCurrentFrame)) / 2;
|
|
|
+ y -= PAL_RLEGetHeight(PAL_SpriteGetFrame(g_Battle.rgEnemy[i].lpSprite, g_Battle.rgEnemy[i].wCurrentFrame));
|
|
|
+
|
|
|
+ PAL_RLEBlitWithColorShift(PAL_SpriteGetFrame(g_Battle.rgEnemy[i].lpSprite, g_Battle.rgEnemy[i].wCurrentFrame),
|
|
|
+ gpScreen, PAL_XY(x, y), 7);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (g_InputState.dwKeyPress & kKeyMenu)
|
|
|
+ {
|
|
|
+ g_Battle.UI.state = kBattleUISelectMove;
|
|
|
+ }
|
|
|
+ else if (g_InputState.dwKeyPress & kKeySearch)
|
|
|
+ {
|
|
|
+ g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
+ PAL_BattleCommitAction(FALSE);
|
|
|
+ }
|
|
|
+ }
|
|
|
break;
|
|
|
|
|
|
case kBattleUISelectTargetPlayerAll:
|
|
|
-#ifdef PAL_CLASSIC
|
|
|
- //
|
|
|
- // Don't bother selecting
|
|
|
- //
|
|
|
- g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
- PAL_BattleCommitAction(FALSE);
|
|
|
-#else
|
|
|
- j = SPRITENUM_BATTLE_ARROW_SELECTEDPLAYER;
|
|
|
- if (s_iFrame & 1)
|
|
|
- {
|
|
|
- j = SPRITENUM_BATTLE_ARROW_SELECTEDPLAYER_RED;
|
|
|
- }
|
|
|
- for (i = 0; i <= gpGlobals->wMaxPartyMemberIndex; i++)
|
|
|
- {
|
|
|
- if (g_Battle.UI.wActionType == kBattleActionMagic)
|
|
|
- {
|
|
|
- w = gpGlobals->g.rgObject[g_Battle.UI.wObjectID].magic.wMagicNumber;
|
|
|
-
|
|
|
- if (gpGlobals->g.lprgMagic[w].wType == kMagicTypeTrance)
|
|
|
- {
|
|
|
- if (i != g_Battle.UI.wCurPlayerIndex)
|
|
|
- continue;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //
|
|
|
- // Draw arrows on all players, despite of dead or not
|
|
|
- //
|
|
|
- x = g_rgPlayerPos[gpGlobals->wMaxPartyMemberIndex][i][0] - 8;
|
|
|
- y = g_rgPlayerPos[gpGlobals->wMaxPartyMemberIndex][i][1] - 67;
|
|
|
-
|
|
|
- PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, j), gpScreen, PAL_XY(x, y));
|
|
|
- }
|
|
|
-
|
|
|
- if (g_InputState.dwKeyPress & kKeyMenu)
|
|
|
- {
|
|
|
- g_Battle.UI.state = kBattleUISelectMove;
|
|
|
- }
|
|
|
- else if (g_InputState.dwKeyPress & kKeySearch)
|
|
|
- {
|
|
|
- g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
- PAL_BattleCommitAction(FALSE);
|
|
|
- }
|
|
|
-#endif
|
|
|
+ if (PAL_IsClassicBattle())
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // Don't bother selecting
|
|
|
+ //
|
|
|
+ g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
+ PAL_BattleCommitAction(FALSE);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ j = SPRITENUM_BATTLE_ARROW_SELECTEDPLAYER;
|
|
|
+ if (s_iFrame & 1)
|
|
|
+ {
|
|
|
+ j = SPRITENUM_BATTLE_ARROW_SELECTEDPLAYER_RED;
|
|
|
+ }
|
|
|
+ for (i = 0; i <= gpGlobals->wMaxPartyMemberIndex; i++)
|
|
|
+ {
|
|
|
+ if (g_Battle.UI.wActionType == kBattleActionMagic)
|
|
|
+ {
|
|
|
+ w = gpGlobals->g.rgObject[g_Battle.UI.wObjectID].magic.wMagicNumber;
|
|
|
+
|
|
|
+ if (gpGlobals->g.lprgMagic[w].wType == kMagicTypeTrance)
|
|
|
+ {
|
|
|
+ if (i != g_Battle.UI.wCurPlayerIndex)
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
+ // Draw arrows on all players, despite of dead or not
|
|
|
+ //
|
|
|
+ x = g_rgPlayerPos[gpGlobals->wMaxPartyMemberIndex][i][0] - 8;
|
|
|
+ y = g_rgPlayerPos[gpGlobals->wMaxPartyMemberIndex][i][1] - 67;
|
|
|
+
|
|
|
+ PAL_RLEBlitToSurface(PAL_SpriteGetFrame(gpSpriteUI, j), gpScreen, PAL_XY(x, y));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (g_InputState.dwKeyPress & kKeyMenu)
|
|
|
+ {
|
|
|
+ g_Battle.UI.state = kBattleUISelectMove;
|
|
|
+ }
|
|
|
+ else if (g_InputState.dwKeyPress & kKeySearch)
|
|
|
+ {
|
|
|
+ g_Battle.UI.wSelectedIndex = (WORD)-1;
|
|
|
+ PAL_BattleCommitAction(FALSE);
|
|
|
+ }
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -1685,37 +1645,38 @@ end:
|
|
|
//
|
|
|
// Show the text message if there is one.
|
|
|
//
|
|
|
-#ifndef PAL_CLASSIC
|
|
|
- if (!SDL_TICKS_PASSED(SDL_GetTicks(), g_Battle.UI.dwMsgShowTime))
|
|
|
- {
|
|
|
- //
|
|
|
- // The text should be shown in a small window at the center of the screen
|
|
|
- //
|
|
|
- PAL_POS pos;
|
|
|
- int i, w = wcslen(g_Battle.UI.szMsg), len = 0;
|
|
|
-
|
|
|
- for (i = 0; i < w; i++)
|
|
|
- len += PAL_CharWidth(g_Battle.UI.szMsg[i]) >> 3;
|
|
|
-
|
|
|
- //
|
|
|
- // Create the window box
|
|
|
- //
|
|
|
- pos = PAL_XY(160 - len * 4, 40);
|
|
|
- PAL_CreateSingleLineBox(pos, (len + 1) / 2, FALSE);
|
|
|
-
|
|
|
- //
|
|
|
- // Show the text on the screen
|
|
|
- //
|
|
|
- pos = PAL_XY(PAL_X(pos) + 8 + ((len & 1) << 2), PAL_Y(pos) + 10);
|
|
|
- PAL_DrawText(g_Battle.UI.szMsg, pos, 0, FALSE, FALSE, FALSE);
|
|
|
- }
|
|
|
- else if (g_Battle.UI.szNextMsg[0] != '\0')
|
|
|
+ if (!PAL_IsClassicBattle())
|
|
|
{
|
|
|
- wcscpy(g_Battle.UI.szMsg, g_Battle.UI.szNextMsg);
|
|
|
- g_Battle.UI.dwMsgShowTime = SDL_GetTicks() + g_Battle.UI.wNextMsgDuration;
|
|
|
- g_Battle.UI.szNextMsg[0] = '\0';
|
|
|
+ if (!SDL_TICKS_PASSED(SDL_GetTicks(), g_Battle.UI.dwMsgShowTime))
|
|
|
+ {
|
|
|
+ //
|
|
|
+ // The text should be shown in a small window at the center of the screen
|
|
|
+ //
|
|
|
+ PAL_POS pos;
|
|
|
+ int i, w = wcslen(g_Battle.UI.szMsg), len = 0;
|
|
|
+
|
|
|
+ for (i = 0; i < w; i++)
|
|
|
+ len += PAL_CharWidth(g_Battle.UI.szMsg[i]) >> 3;
|
|
|
+
|
|
|
+ //
|
|
|
+ // Create the window box
|
|
|
+ //
|
|
|
+ pos = PAL_XY(160 - len * 4, 40);
|
|
|
+ PAL_CreateSingleLineBox(pos, (len + 1) / 2, FALSE);
|
|
|
+
|
|
|
+ //
|
|
|
+ // Show the text on the screen
|
|
|
+ //
|
|
|
+ pos = PAL_XY(PAL_X(pos) + 8 + ((len & 1) << 2), PAL_Y(pos) + 10);
|
|
|
+ PAL_DrawText(g_Battle.UI.szMsg, pos, 0, FALSE, FALSE, FALSE);
|
|
|
+ }
|
|
|
+ else if (g_Battle.UI.szNextMsg[0] != '\0')
|
|
|
+ {
|
|
|
+ wcscpy(g_Battle.UI.szMsg, g_Battle.UI.szNextMsg);
|
|
|
+ g_Battle.UI.dwMsgShowTime = SDL_GetTicks() + g_Battle.UI.wNextMsgDuration;
|
|
|
+ g_Battle.UI.szNextMsg[0] = '\0';
|
|
|
+ }
|
|
|
}
|
|
|
-#endif
|
|
|
|
|
|
//
|
|
|
// Draw the numbers
|