merge branch master
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "evolution_scene.h"
|
||||
#include "roamer.h"
|
||||
#include "safari_zone.h"
|
||||
#include "battle_string_ids.h"
|
||||
|
||||
struct UnknownStruct6
|
||||
{
|
||||
@@ -245,7 +246,7 @@ static void sub_8038F34(void);
|
||||
static void sub_80392A8(void);
|
||||
static void sub_803937C(void);
|
||||
static void sub_803939C(void);
|
||||
static void oac_poke_opponent(struct Sprite *sprite);
|
||||
void oac_poke_opponent(struct Sprite *sprite);
|
||||
static void sub_803980C(struct Sprite *sprite);
|
||||
static void sub_8039838(struct Sprite *sprite);
|
||||
static void sub_8039894(struct Sprite *sprite);
|
||||
@@ -343,7 +344,7 @@ const u8 gStatusConditionString_IceJpn[8] = _("こおり$$$$");
|
||||
const u8 gStatusConditionString_ConfusionJpn[8] = _("こんらん$$$");
|
||||
const u8 gStatusConditionString_LoveJpn[8] = _("メロメロ$$$");
|
||||
|
||||
const u8 * const gStatusConditionStringsTable[][2] =
|
||||
const u8 * const gStatusConditionStringsTable[7][2] =
|
||||
{
|
||||
{gStatusConditionString_PoisonJpn, gText_Poison},
|
||||
{gStatusConditionString_SleepJpn, gText_Sleep},
|
||||
@@ -1650,7 +1651,7 @@ void CB2_QuitRecordedBattle(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8038528(struct Sprite* sprite)
|
||||
void sub_8038528(struct Sprite* sprite)
|
||||
{
|
||||
sprite->data0 = 0;
|
||||
sprite->callback = sub_8038538;
|
||||
@@ -2417,7 +2418,7 @@ u32 sub_80397C4(u32 setId, u32 tableId)
|
||||
#define tBank data0
|
||||
#define tSpeciesId data2
|
||||
|
||||
static void oac_poke_opponent(struct Sprite *sprite)
|
||||
void oac_poke_opponent(struct Sprite *sprite)
|
||||
{
|
||||
sprite->callback = sub_803980C;
|
||||
StartSpriteAnimIfDifferent(sprite, 0);
|
||||
@@ -3299,7 +3300,7 @@ static void BattleIntroPrintTrainerWantsToBattle(void)
|
||||
if (gBattleExecBuffer == 0)
|
||||
{
|
||||
gActiveBank = GetBankByIdentity(IDENTITY_OPPONENT_MON1);
|
||||
PrepareStringBattle(0, gActiveBank);
|
||||
PrepareStringBattle(STRINGID_INTROMSG, gActiveBank);
|
||||
gBattleMainFunc = BattleIntroPrintOpponentSendsOut;
|
||||
}
|
||||
}
|
||||
@@ -3309,7 +3310,7 @@ static void BattleIntroPrintWildMonAttacked(void)
|
||||
if (gBattleExecBuffer == 0)
|
||||
{
|
||||
gBattleMainFunc = BattleIntroPrintPlayerSendsOut;
|
||||
PrepareStringBattle(0, 0);
|
||||
PrepareStringBattle(STRINGID_INTROMSG, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3332,7 +3333,7 @@ static void BattleIntroPrintOpponentSendsOut(void)
|
||||
else
|
||||
identity = IDENTITY_OPPONENT_MON1;
|
||||
|
||||
PrepareStringBattle(1, GetBankByIdentity(identity));
|
||||
PrepareStringBattle(STRINGID_INTROSENDOUT, GetBankByIdentity(identity));
|
||||
gBattleMainFunc = BattleIntroOpponent1SendsOutMonAnimation;
|
||||
}
|
||||
|
||||
@@ -3535,7 +3536,7 @@ static void BattleIntroPrintPlayerSendsOut(void)
|
||||
identity = IDENTITY_PLAYER_MON1;
|
||||
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI))
|
||||
PrepareStringBattle(1, GetBankByIdentity(identity));
|
||||
PrepareStringBattle(STRINGID_INTROSENDOUT, GetBankByIdentity(identity));
|
||||
|
||||
gBattleMainFunc = BattleIntroPlayer1SendsOutMonAnimation;
|
||||
}
|
||||
@@ -4006,8 +4007,8 @@ static void HandleTurnActionSelectionState(void)
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
moveInfo.moves[i] = gBattleMons[gActiveBank].moves[i];
|
||||
moveInfo.ppNumbers[i] = gBattleMons[gActiveBank].pp[i];
|
||||
moveInfo.ppWithBonusNumbers[i] = CalculatePPWithBonus(
|
||||
moveInfo.currentPp[i] = gBattleMons[gActiveBank].pp[i];
|
||||
moveInfo.maxPp[i] = CalculatePPWithBonus(
|
||||
gBattleMons[gActiveBank].moves[i],
|
||||
gBattleMons[gActiveBank].ppBonuses,
|
||||
i);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2333
src/battle_message.c
Normal file
2333
src/battle_message.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -34,6 +34,7 @@
|
||||
#include "pokemon_storage_system.h"
|
||||
#include "task.h"
|
||||
#include "naming_screen.h"
|
||||
#include "battle_string_ids.h"
|
||||
|
||||
// variables
|
||||
|
||||
@@ -1375,7 +1376,7 @@ static void atk02_attackstring(void)
|
||||
return;
|
||||
if (!(gHitMarker & (HITMARKER_NO_ATTACKSTRING | HITMARKER_ATTACKSTRING_PRINTED)))
|
||||
{
|
||||
PrepareStringBattle(4, gBankAttacker);
|
||||
PrepareStringBattle(STRINGID_USEDMOVE, gBankAttacker);
|
||||
gHitMarker |= HITMARKER_ATTACKSTRING_PRINTED;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
@@ -2000,7 +2001,7 @@ static void atk0B_healthbarupdate(void)
|
||||
|
||||
if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE))
|
||||
{
|
||||
PrepareStringBattle(0x80, gActiveBank);
|
||||
PrepareStringBattle(STRINGID_SUBSTITUTEDAMAGED, gActiveBank);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2157,7 +2158,7 @@ static void atk0D_critmessage(void)
|
||||
{
|
||||
if (gCritMultiplier == 2 && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT))
|
||||
{
|
||||
PrepareStringBattle(0xD9, gBankAttacker);
|
||||
PrepareStringBattle(STRINGID_CRITICALHIT, gBankAttacker);
|
||||
gBattleCommunication[MSG_DISPLAY] = 1;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
@@ -2229,22 +2230,22 @@ static void atk0F_resultmessage(void)
|
||||
switch (gBattleMoveFlags & (u8)(~(MOVESTATUS_MISSED)))
|
||||
{
|
||||
case MOVESTATUS_SUPEREFFECTIVE:
|
||||
stringId = 0xDE;
|
||||
stringId = STRINGID_SUPEREFFECTIVE;
|
||||
break;
|
||||
case MOVESTATUS_NOTVERYEFFECTIVE:
|
||||
stringId = 0xDD;
|
||||
stringId = STRINGID_NOTVERYEFFECTIVE;
|
||||
break;
|
||||
case MOVESTATUS_ONEHITKO:
|
||||
stringId = 0xDA;
|
||||
stringId = STRINGID_ONEHITKO;
|
||||
break;
|
||||
case MOVESTATUS_ENDURED:
|
||||
stringId = 0x99;
|
||||
stringId = STRINGID_PKMNENDUREDHIT;
|
||||
break;
|
||||
case MOVESTATUS_FAILED:
|
||||
stringId = 0xE5;
|
||||
stringId = STRINGID_BUTITFAILED;
|
||||
break;
|
||||
case MOVESTATUS_NOTAFFECTED:
|
||||
stringId = 0x1B;
|
||||
stringId = STRINGID_ITDOESNTAFFECT;
|
||||
break;
|
||||
case MOVESTATUS_HUNGON:
|
||||
gLastUsedItem = gBattleMons[gBankTarget].item;
|
||||
@@ -2256,7 +2257,7 @@ static void atk0F_resultmessage(void)
|
||||
default:
|
||||
if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED)
|
||||
{
|
||||
stringId = 0x1B;
|
||||
stringId = STRINGID_ITDOESNTAFFECT;
|
||||
}
|
||||
else if (gBattleMoveFlags & MOVESTATUS_ONEHITKO)
|
||||
{
|
||||
@@ -2285,7 +2286,7 @@ static void atk0F_resultmessage(void)
|
||||
}
|
||||
else if (gBattleMoveFlags & MOVESTATUS_FAILED)
|
||||
{
|
||||
stringId = 0xE5;
|
||||
stringId = STRINGID_BUTITFAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3592,7 +3593,7 @@ static void atk23_getexp(void)
|
||||
|
||||
PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff3, 5, gBattleMoveDamage)
|
||||
|
||||
PrepareStringBattle(0xD, gBattleStruct->expGetterBank);
|
||||
PrepareStringBattle(STRINGID_PKMNGAINEDEXP, gBattleStruct->expGetterBank);
|
||||
MonGainEVs(&gPlayerParty[gBattleStruct->expGetterId], gBattleMons[gBank1].species);
|
||||
}
|
||||
gBattleStruct->sentInPokes >>= 1;
|
||||
@@ -6181,7 +6182,7 @@ static void atk5A_yesnoboxlearnmove(void)
|
||||
u16 moveId = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_MOVE1 + movePosition);
|
||||
if (IsHMMove2(moveId))
|
||||
{
|
||||
PrepareStringBattle(0x13F, gActiveBank);
|
||||
PrepareStringBattle(STRINGID_HMMOVESCANTBEFORGOTTEN, gActiveBank);
|
||||
gBattleScripting.learnMoveState = 6;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "save_location.h"
|
||||
#include "map_constants.h"
|
||||
|
||||
// used to make the list defines a little less ugly.
|
||||
@@ -26,7 +27,7 @@ static bool32 IsCurMapInLocationList(const u16 *list)
|
||||
}
|
||||
|
||||
// TODO: Not require a packed u16 array for these lists
|
||||
static const u16 gSaveLocationPokeCenterList[] =
|
||||
static const u16 sSaveLocationPokeCenterList[] =
|
||||
{
|
||||
MAP(OLDALE_TOWN_POKEMON_CENTER_1F),
|
||||
MAP(OLDALE_TOWN_POKEMON_CENTER_2F),
|
||||
@@ -71,10 +72,10 @@ static const u16 gSaveLocationPokeCenterList[] =
|
||||
|
||||
static bool32 IsCurMapPokeCenter(void)
|
||||
{
|
||||
return IsCurMapInLocationList(gSaveLocationPokeCenterList);
|
||||
return IsCurMapInLocationList(sSaveLocationPokeCenterList);
|
||||
}
|
||||
|
||||
static const u16 gSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower
|
||||
static const u16 sSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower
|
||||
{
|
||||
MAP(BATTLE_TOWER_LOBBY),
|
||||
0xFFFF,
|
||||
@@ -82,18 +83,18 @@ static const u16 gSaveLocationReloadLocList[] = // there's only 1 location, and
|
||||
|
||||
static bool32 IsCurMapReloadLocation(void)
|
||||
{
|
||||
return IsCurMapInLocationList(gSaveLocationReloadLocList);
|
||||
return IsCurMapInLocationList(sSaveLocationReloadLocList);
|
||||
}
|
||||
|
||||
// nulled out list. unknown what this would have been
|
||||
static const u16 gUnknown_0861440E[] =
|
||||
static const u16 sUnknown_0861440E[] =
|
||||
{
|
||||
0xFFFF,
|
||||
};
|
||||
|
||||
bool32 sub_81AFCEC(void)
|
||||
{
|
||||
return IsCurMapInLocationList(gUnknown_0861440E);
|
||||
return IsCurMapInLocationList(sUnknown_0861440E);
|
||||
}
|
||||
|
||||
static void TrySetPokeCenterWarpStatus(void)
|
||||
|
||||
@@ -112,7 +112,7 @@ static const u16 sCrc16Table[] =
|
||||
0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78,
|
||||
};
|
||||
|
||||
const u8 gMiscBlank_Gfx[] = INCBIN_U8("graphics/interface/blank.4bpp"); // unused in Emerald
|
||||
const u8 gMiscBlank_Gfx[] = INCBIN_U8("graphics/interface/blank.4bpp");
|
||||
|
||||
u8 CreateInvisibleSpriteWithCallback(void (*callback)(struct Sprite *))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user