Further removed trailing whitespaces

This commit is contained in:
Eduardo Quezada 2022-09-13 16:26:36 -03:00
parent 1d7e8bd730
commit de32940fdf
43 changed files with 472 additions and 472 deletions

View File

@ -283,7 +283,7 @@
.macro jumpretfalse ptr:req
jumpreteq FALSE, \ptr
.endm
.macro jumpifdoublebattle ptr:req
createvisualtask AnimTask_IsDoubleBattle, 0
jumprettrue \ptr
@ -305,7 +305,7 @@
.hword \launchtemplatearg7
.hword \launchtemplatearg8
.endm
.macro launchtask launchtaskPtr launchtaskPriority launchtaskArgsNo launchtaskarg0 launchtaskarg1 launchtaskarg2 launchtaskarg3 launchtaskarg4 launchtaskarg5 launchtaskarg6 launchtaskarg7 launchtaskarg8
.byte 0x3
.word \launchtaskPtr
@ -321,7 +321,7 @@
.hword \launchtaskarg7
.hword \launchtaskarg8
.endm
.macro setblends setblends_value
.byte 0xC
.hword \setblends_value

View File

@ -89,15 +89,15 @@
setvar VAR_0x8004, BATTLE_TOWER_FUNC_SET_INTERVIEW_DATA
special CallBattleTowerFunc
.endm
@Custom multi-battle commands
.macro choose_mons
fadescreen 1
special ChooseHalfPartyForBattle @ choose 3 mons for battle
waitstate
.endm
.macro multi_do type:req, partnerId:req, partnerPicId:req
special ReducePlayerPartyToSelectedMons
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_SET_DATA
@ -113,26 +113,26 @@
special CallFrontierUtilFunc
special LoadPlayerParty
.endm
.macro multi_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
special SavePlayerParty
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
multi_do MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
.endm
.macro multi_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
special SavePlayerParty
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
multi_do MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
.endm
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
.macro multi_wild partnerId:req, partnerPicId:req
special SavePlayerParty
multi_do MULTI_BATTLE_2_VS_WILD, \partnerId, \partnerPicId
.endm
.macro multi_do_fixed type:req, partnerId:req, partnerPicId:req
setvar VAR_0x8004, SPECIAL_BATTLE_MULTI
setvar VAR_0x8005, \type
@ -144,20 +144,20 @@
special CallFrontierUtilFunc
special LoadPlayerParty
.endm
.macro multi_fixed_2_vs_2 trainer1Id:req, trainer1LoseText:req, trainer2Id:req, trainer2LoseText:req, partnerId:req, partnerPicId:req
special SavePlayerParty
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
trainerbattle TRAINER_BATTLE_SET_TRAINER_B, \trainer2Id, 0, NULL, \trainer2LoseText @ set second trainer mons
multi_do_fixed MULTI_BATTLE_2_VS_2, \partnerId, \partnerPicId
.endm
.macro multi_fixed_2_vs_1 trainer1Id:req, trainer1LoseText:req, partnerId:req, partnerPicId:req
special SavePlayerParty
trainerbattle TRAINER_BATTLE_SET_TRAINER_A, \trainer1Id, 0, NULL, \trainer1LoseText @ set first trainer mons
multi_do_fixed MULTI_BATTLE_2_VS_1, \partnerId, \partnerPicId
.endm
@ Wild mons need to be assigned to gEnemyParty 0 and 3 slots, other slots need to be cleared out.
.macro multi_fixed_wild partnerId:req, partnerPicId:req
special SavePlayerParty

View File

@ -150,13 +150,13 @@
.4byte \sample
.byte 0xff, 0, 0xff, 0
.endm
.macro cry_uncomp sample @ not compressed
.byte 0x0, 60, 0, 0
.4byte \sample
.byte 0xff, 0, 0xff, 0
.endm
.macro cry_reverse_uncomp sample @ not compressed
.byte 0x10, 60, 0, 0
.4byte \sample

View File

@ -14196,7 +14196,7 @@ TerrainPulseElectric:
createvisualtask AnimTask_SwayMon, 5, 0, 4, 51200, 24, ANIM_TARGET
createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(27, 27, 0)
goto TerrainPulseEnd
TerrainPulseGrass:
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_DRAGON_PULSE, 0, 12, 12, RGB(11, 26, 11)
waitforvisualfinish
@ -14218,7 +14218,7 @@ TerrainPulseFairy:
createvisualtask AnimTask_SwayMon, 5, 0, 4, 51200, 24, ANIM_TARGET
createvisualtask AnimTask_BlendColorCycle, 2, 4, 2, 2, 0, 12, RGB(31, 24, 31)
goto TerrainPulseEnd
TerrainPulsePsychic:
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_DRAGON_PULSE, 0, 12, 12, RGB(27, 0, 13)
waitforvisualfinish
@ -24740,7 +24740,7 @@ General_RestoreBg:
restorebg
waitbgfadein
end
end
General_ZMoveActivate:
@ -25263,8 +25263,8 @@ FinishSupersonicSkystrike:
call UnsetPsychicBg
waitforvisualfinish
end
Move_ACID_DOWNPOUR:
loadspritegfx ANIM_TAG_BLUE_ORB @ reversal
loadspritegfx ANIM_TAG_POISON_JAB @ poison jab
@ -25951,7 +25951,7 @@ NeverendingNightmareGeyser:
createsprite gNeverEndingNightmareGeyserHexSpriteTemplate ANIM_TARGET, 2, ANIM_TARGET, 0xfff0, 0x10
return
Move_CORKSCREW_CRASH::
loadspritegfx ANIM_TAG_SPIKES @metal bits
loadspritegfx ANIM_TAG_CIRCLE_OF_LIGHT @charge
@ -26669,7 +26669,7 @@ HavocSpearSparkTarget:
@ launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x20 0xc SOUND_PAN_ATTACKER 0x14 0x2 0x8000
launchtemplate gSparkElectricityFlashingSpriteTemplate 0x4 0x8 0x0 0x0 0x10 0xc SOUND_PAN_ATTACKER 0x14 0x2 0x8000
return
Move_SHATTERED_PSYCHE::
loadspritegfx ANIM_TAG_IMPACT @hit
@ -29127,7 +29127,7 @@ OceanicOperettaExplosion:
launchtemplate gOceanOperaExplosionSpriteTemplate 0x33 0x4 0x10 0x10 ANIM_TARGET 0x1
delay 0x6
return
Move_SPLINTERED_STORMSHARDS::
loadspritegfx ANIM_TAG_ROCKS @rock
@ -29388,7 +29388,7 @@ SplinteredStormshardsFinishFadeReturn:
return
Move_LETS_SNUGGLE_FOREVER::
Move_LETS_SNUGGLE_FOREVER::
loadspritegfx ANIM_TAG_MAGENTA_HEART @sharm
loadspritegfx ANIM_TAG_MUSIC_NOTES @music note
loadspritegfx ANIM_TAG_SMALL_BUBBLES @fake tears

View File

@ -511,7 +511,7 @@ BattleScript_BeakBlastSetUp::
setbeakblast BS_ATTACKER
printstring STRINGID_EMPTYSTRING3
waitmessage 1
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
printstring STRINGID_HEATUPBEAK
waitmessage B_WAIT_TIME_LONG
end2
@ -601,7 +601,7 @@ BattleScript_ScaleShotEnd::
moveendcase MOVEEND_SYNCHRONIZE_TARGET
moveendfrom MOVEEND_STATUS_IMMUNITY_ABILITIES
end
BattleScript_EffectSkyDrop:
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_SkyDropTurn2
attackcanceler
@ -5648,7 +5648,7 @@ BattleScript_EffectRolePlay::
pause 20
destroyabilitypopup
pause 40
.endif
.endif
printstring STRINGID_PKMNCOPIEDFOE
waitmessage B_WAIT_TIME_LONG
switchinabilities BS_ATTACKER
@ -9625,7 +9625,7 @@ BattleScript_StatUpZMove::
waitmessage B_WAIT_TIME_LONG
BattleScript_StatUpZMoveEnd:
return
BattleScript_HealReplacementZMove::
playanimation BS_SCRIPTING B_ANIM_WISH_HEAL 0x0
printfromtable gZEffectStringIds
@ -9836,7 +9836,7 @@ BattleScript_NeutralizingGasExitsLoop:
jumpifbytenotequal gBattlerTarget, sByteFour, BattleScript_NeutralizingGasExitsLoop @ SOMEHOW, comparing to gBattlersCount is problematic.
restoretarget
return
BattleScript_MagicianActivates::
call BattleScript_AbilityPopUp
call BattleScript_ItemSteal

View File

@ -461,7 +461,7 @@
#define BG_WATER_2 41
#define BG_POISON 42
#define BG_AEROBLAST 43
#define BG_HURRICANE 44
#define BG_HURRICANE 44
#define BG_ELECTRIC_TERRAIN 45
#define BG_GRASSY_TERRAIN 46
#define BG_MISTY_TERRAIN 47

View File

@ -379,7 +379,7 @@
#define STRINGID_PKMNBOXLANETTESPCFULL 378
#define STRINGID_TRAINER1WINTEXT 379
#define STRINGID_TRAINER2WINTEXT 380
#define STRINGID_ENDUREDSTURDY 381
#define STRINGID_POWERHERB 382
#define STRINGID_HURTBYITEM 383

View File

@ -3978,7 +3978,7 @@ Cry_Spectrier::
.align 2
Cry_Calyrex::
.incbin "sound/direct_sound_samples/cries/calyrex.bin"
/*
/*
.align 2
Cry_Wyrdeer::
.incbin "sound/direct_sound_samples/cries/wyrdeer.bin"

View File

@ -793,17 +793,17 @@ static bool32 AiExpectsToFaintPlayer(void)
bool32 canFaintPlayer;
u32 i;
u8 target = gBattleStruct->aiChosenTarget[gActiveBattler];
if (gBattleStruct->aiMoveOrAction[gActiveBattler] > 3)
return FALSE; // AI not planning to use move
if (GetBattlerSide(target) != GetBattlerSide(gActiveBattler)
&& CanIndexMoveFaintTarget(gActiveBattler, target, gBattleStruct->aiMoveOrAction[gActiveBattler], 0)
&& AI_WhoStrikesFirst(gActiveBattler, target, GetAIChosenMove(gActiveBattler)) == AI_IS_FASTER) {
// We expect to faint the target and move first -> dont use an item
return TRUE;
}
return FALSE;
}
@ -818,10 +818,10 @@ static bool8 ShouldUseItem(void)
if ((gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gActiveBattler) == B_POSITION_PLAYER_RIGHT)
|| gStatuses3[gActiveBattler] & STATUS3_SKY_DROPPED)
return FALSE;
if (gStatuses3[gActiveBattler] & STATUS3_EMBARGO)
return FALSE;
if (AiExpectsToFaintPlayer())
return FALSE;
@ -948,14 +948,14 @@ static bool8 ShouldUseItem(void)
static bool32 AI_ShouldHeal(u32 healAmount)
{
bool32 shouldHeal = FALSE;
if (gBattleMons[gActiveBattler].hp < gBattleMons[gActiveBattler].maxHP / 4
|| gBattleMons[gActiveBattler].hp == 0
|| (healAmount != 0 && gBattleMons[gActiveBattler].maxHP - gBattleMons[gActiveBattler].hp > healAmount)) {
// We have low enough HP to consider healing
shouldHeal = !AI_OpponentCanFaintAiWithMod(healAmount); // if target can kill us even after we heal, why bother
}
return shouldHeal;
}

View File

@ -793,7 +793,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
dmg *= 2;
else if (move == MOVE_SURGING_STRIKES || (move == MOVE_WATER_SHURIKEN && gBattleMons[battlerAtk].species == SPECIES_GRENINJA_ASH))
dmg *= 3;
if (dmg == 0)
dmg = 1;
}
@ -804,7 +804,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
RestoreBattlerData(battlerAtk);
RestoreBattlerData(battlerDef);
// convert multiper to AI_EFFECTIVENESS_xX
*typeEffectiveness = AI_GetEffectiveness(effectivenessMultiplier);
@ -1159,11 +1159,11 @@ bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability)
s32 AI_GetAbility(u32 battlerId)
{
u32 knownAbility = GetBattlerAbility(battlerId);
// The AI knows its own ability.
if (IsBattlerAIControlled(battlerId))
return knownAbility;
// Check neutralizing gas, gastro acid
if (knownAbility == ABILITY_NONE)
return knownAbility;
@ -1183,10 +1183,10 @@ s32 AI_GetAbility(u32 battlerId)
{
abilityGuess = gBaseStats[gBattleMons[battlerId].species].abilities[Random() % NUM_ABILITY_SLOTS];
}
return abilityGuess;
}
return ABILITY_NONE; // Unknown.
}
@ -2691,7 +2691,7 @@ static bool32 AI_CanPoisonType(u8 battlerAttacker, u8 battlerTarget)
static bool32 AI_CanBePoisoned(u8 battlerAtk, u8 battlerDef)
{
u16 ability = AI_DATA->abilities[battlerDef];
if (!(AI_CanPoisonType(battlerAtk, battlerDef))
|| gSideStatuses[GetBattlerSide(battlerDef)] & SIDE_STATUS_SAFEGUARD
|| gBattleMons[battlerDef].status1 & STATUS1_ANY
@ -3042,7 +3042,7 @@ bool32 IsValidDoubleBattle(u8 battlerAtk)
u16 GetAllyChosenMove(u8 battlerId)
{
u8 partnerBattler = BATTLE_PARTNER(battlerId);
if (!IsBattlerAlive(partnerBattler) || !IsBattlerAIControlled(partnerBattler))
return MOVE_NONE;
else if (partnerBattler > battlerId) // Battler with the lower id chooses the move first.
@ -3444,7 +3444,7 @@ void IncreaseStatUpScore(u8 battlerAtk, u8 battlerDef, u8 statId, s16 *score)
if (AI_DATA->hpPercents[battlerAtk] < 80 && AI_RandLessThan(128))
return;
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
return; // Damaging moves would get a score boost from AI_TryToFaint or PreferStrongestMove so we don't consider them here
@ -3563,7 +3563,7 @@ void IncreaseParalyzeScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score)
{
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
return;
if (AI_CanParalyze(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], move, AI_DATA->partnerMove))
{
u8 atkSpeed = GetBattlerTotalSpeedStat(battlerAtk);
@ -3584,7 +3584,7 @@ void IncreaseSleepScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score)
{
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
return;
if (AI_CanPutToSleep(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], move, AI_DATA->partnerMove))
*score += 2;
else
@ -3602,7 +3602,7 @@ void IncreaseConfusionScore(u8 battlerAtk, u8 battlerDef, u16 move, s16 *score)
{
if ((AI_THINKING_STRUCT->aiFlags & AI_FLAG_TRY_TO_FAINT) && CanAIFaintTarget(battlerAtk, battlerDef, 0))
return;
if (AI_CanConfuse(battlerAtk, battlerDef, AI_DATA->abilities[battlerDef], BATTLE_PARTNER(battlerAtk), move, AI_DATA->partnerMove)
&& AI_DATA->holdEffects[battlerDef] != HOLD_EFFECT_CURE_CONFUSION
&& AI_DATA->holdEffects[battlerDef] != HOLD_EFFECT_CURE_STATUS)
@ -3633,26 +3633,26 @@ bool32 ShouldUseZMove(u8 battlerAtk, u8 battlerDef, u16 chosenMove)
return FALSE; //don't use z move on partner
if (gBattleStruct->zmove.used[battlerAtk])
return FALSE; //cant use z move twice
if (IsViableZMove(battlerAtk, chosenMove))
{
u8 effectiveness;
if (gBattleMons[battlerDef].ability == ABILITY_DISGUISE && gBattleMons[battlerDef].species == SPECIES_MIMIKYU)
return FALSE; // Don't waste a Z-Move busting disguise
if (gBattleMons[battlerDef].ability == ABILITY_ICE_FACE && gBattleMons[battlerDef].species == SPECIES_EISCUE && IS_MOVE_PHYSICAL(chosenMove))
return FALSE; // Don't waste a Z-Move busting Ice Face
if (IS_MOVE_STATUS(chosenMove) && !IS_MOVE_STATUS(gBattleStruct->zmove.chosenZMove))
return FALSE;
else if (!IS_MOVE_STATUS(chosenMove) && IS_MOVE_STATUS(gBattleStruct->zmove.chosenZMove))
return FALSE;
if (!IS_MOVE_STATUS(chosenMove) && AI_CalcDamage(chosenMove, battlerAtk, battlerDef, &effectiveness, FALSE) >= gBattleMons[battlerDef].hp)
return FALSE; // don't waste damaging z move if can otherwise faint target
return TRUE;
}
return FALSE;
}

View File

@ -219,7 +219,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo
{
s32 i;
bool32 hideHpBoxes = (tableId == MOVE_TRANSFORM) ? FALSE : TRUE;
if (!isMoveAnim)
{
switch (tableId)

View File

@ -6798,7 +6798,7 @@ static const union AffineAnimCmd sCompressTargetHorizontallyAffineAnimCmds[] =
static void AnimTask_CompressTargetStep(u8 taskId)
{
struct Task* task = &gTasks[taskId];
if (!RunAffineAnimFromTaskData(task))
DestroyAnimVisualTask(taskId);
}

View File

@ -888,7 +888,7 @@ void AnimTask_DestinyBondWhiteShadow(u8 taskId)
spriteId = CreateSprite(&gDarkVoidBlackHoleTemplate, baseX, baseY, 55); //dark void
else
spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); //destiny bond
if (spriteId != MAX_SPRITES)
{
x = GetBattlerSpriteCoord(battler, BATTLER_COORD_X_2);
@ -914,7 +914,7 @@ void AnimTask_DestinyBondWhiteShadow(u8 taskId)
spriteId = CreateSprite(&gDarkVoidBlackHoleTemplate, baseX, baseY, 55); //dark void
else
spriteId = CreateSprite(&gDestinyBondWhiteShadowSpriteTemplate, baseX, baseY, 55); //destiny bond
if (spriteId != MAX_SPRITES)
{
x = 48;

File diff suppressed because it is too large Load Diff

View File

@ -817,7 +817,7 @@ static void SwitchToAiPointsView(u8 taskId)
GetStructPtr(taskId)->aiViewState = 0;
}
static const u8 *const sAiInfoItemNames[] =
static const u8 *const sAiInfoItemNames[] =
{
sText_Ability,
sText_HeldItem,
@ -829,13 +829,13 @@ static void PutAiInfoText(struct BattleDebugMenu *data)
u8 *text = malloc(0x50);
FillWindowPixelBuffer(data->aiMovesWindowId, 0x11);
// item names
for (i = 0; i < ARRAY_COUNT(sAiInfoItemNames); i++)
{
AddTextPrinterParameterized(data->aiMovesWindowId, 1, sAiInfoItemNames[i], 3, i * 15, 0, NULL);
}
// items info
for (i = 0; i < gBattlersCount; i++)
{
@ -2004,7 +2004,7 @@ static const u8 sText_HoldEffectRoomService[] = _("Room Service");
static const u8 sText_HoldEffectBlunderPolicy[] = _("Blunder Policy");
static const u8 sText_HoldEffectHeavyDutyBoots[] = _("Heavy Duty Boots");
static const u8 sText_HoldEffectThroatSpray[] = _("Throat Spray");
static const u8 *const sHoldEffectNames[] =
static const u8 *const sHoldEffectNames[] =
{
[HOLD_EFFECT_NONE] = sText_HoldEffectNone,
[HOLD_EFFECT_RESTORE_HP] = sText_HoldEffectRestoreHp,

View File

@ -3123,7 +3123,7 @@ void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle)
const s16 (*coords)[2];
u8 spriteId1, spriteId2, battlerPosition, taskId;
return;
if (gBattleScripting.abilityPopupOverwrite != 0)

View File

@ -1383,7 +1383,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_TARGETTOOHEAVY - BATTLESTRINGS_TABLE_START] = sText_TargetTooHeavy,
};
const u16 gZEffectStringIds[] =
const u16 gZEffectStringIds[] =
{
[B_MSG_Z_RESET_STATS] = STRINGID_ZMOVERESETSSTATS,
[B_MSG_Z_ALL_STATS_UP]= STRINGID_ZMOVEALLSTATSUP,
@ -1394,7 +1394,7 @@ const u16 gZEffectStringIds[] =
[B_MSG_Z_HP_TRAP] = STRINGID_ZMOVEHPTRAP,
};
const u16 gMentalHerbCureStringIds[] =
const u16 gMentalHerbCureStringIds[] =
{
[B_MSG_MENTALHERBCURE_INFATUATION] = STRINGID_ATKGOTOVERINFATUATION,
[B_MSG_MENTALHERBCURE_TAUNT] = STRINGID_BUFFERENDS,
@ -1409,7 +1409,7 @@ const u16 gTerrainStringIds[] =
STRINGID_TERRAINBECOMESMISTY, STRINGID_TERRAINBECOMESGRASSY, STRINGID_TERRAINBECOMESELECTRIC, STRINGID_TERRAINBECOMESPSYCHIC, STRINGID_TERRAINREMOVED,
};
const u16 gTerrainEndingStringIds[] =
const u16 gTerrainEndingStringIds[] =
{
STRINGID_MISTYTERRAINENDS, STRINGID_GRASSYTERRAINENDS, STRINGID_ELECTRICTERRAINENDS, STRINGID_PSYCHICTERRAINENDS
};

View File

@ -165,23 +165,23 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
u32 item;
u16 holdEffect;
u16 species;
if (gBattleStruct->zmove.used[battlerId])
return FALSE;
species = gBattleMons[battlerId].species;
item = gBattleMons[battlerId].item;
if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FRONTIER))
return FALSE;
#ifdef ITEM_Z_RING
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT)) && !CheckBagHasItem(ITEM_Z_RING, 1))
return FALSE;
#endif
if (mega->alreadyEvolved[battlerPosition])
return FALSE; // Trainer has mega evolved
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
if (IsPartnerMonFromSameTrainer(battlerId) && (mega->alreadyEvolved[partnerPosition] || (mega->toEvolve & gBitTable[BATTLE_PARTNER(battlerId)])))
@ -194,10 +194,10 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
else
#endif
if (item == ITEM_ENIGMA_BERRY)
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(item);
#ifdef ITEM_ULTRANECROZIUM_Z
if (holdEffect == HOLD_EFFECT_Z_CRYSTAL || item == ITEM_ULTRANECROZIUM_Z)
#else
@ -210,18 +210,18 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
gBattleStruct->zmove.chosenZMove = zMove; // Signature z move exists
return TRUE;
}
if (move != MOVE_NONE && zMove != MOVE_Z_STATUS && gBattleMoves[move].type == ItemId_GetSecondaryId(item))
{
if (IS_MOVE_STATUS(move))
gBattleStruct->zmove.chosenZMove = move;
else
gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);
return TRUE;
}
}
return FALSE;
}
@ -248,7 +248,7 @@ bool32 IsZMoveUsable(u8 battlerId, u16 moveIndex)
bool32 TryChangeZIndicator(u8 battlerId, u8 moveIndex)
{
bool32 viableZMove = IsZMoveUsable(battlerId, moveIndex);
if (gBattleStruct->zmove.viable && !viableZMove)
HideZMoveTriggerSprite(); // Was a viable z move, now is not -> slide out
else if (!gBattleStruct->zmove.viable && viableZMove)
@ -271,11 +271,11 @@ bool32 TryChangeZIndicator(u8 battlerId, u8 moveIndex)
void CreateZMoveTriggerSprite(u8 battlerId, bool8 viable)
{
s16 x, y;
LoadSpritePalette(&sSpritePalette_ZMoveTrigger);
if (GetSpriteTileStartByTag(TAG_ZMOVE_TRIGGER_TILE) == 0xFFFF)
LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_ZMoveTrigger);
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
x = gSprites[gHealthboxSpriteIds[battlerId]].x - DOUBLES_Z_TRIGGER_POS_X_SLIDE;
@ -286,10 +286,10 @@ void CreateZMoveTriggerSprite(u8 battlerId, bool8 viable)
x = gSprites[gHealthboxSpriteIds[battlerId]].x - SINGLES_Z_TRIGGER_POS_X_SLIDE;
y = gSprites[gHealthboxSpriteIds[battlerId]].y - SINGLES_Z_TRIGGER_POS_Y_DIFF, 0;
}
if (gBattleStruct->zmove.triggerSpriteId == 0xFF)
gBattleStruct->zmove.triggerSpriteId = CreateSprite(&sSpriteTemplate_ZMoveTrigger, x, y, 0);
gSprites[gBattleStruct->zmove.triggerSpriteId].tBattler = battlerId;
gSprites[gBattleStruct->zmove.triggerSpriteId].tHide = (viable == TRUE) ? FALSE : TRUE;
}
@ -375,14 +375,14 @@ void DestroyZMoveTriggerSprite(void)
FreeSpriteTilesByTag(TAG_ZMOVE_TRIGGER_TILE);
if (gBattleStruct->zmove.triggerSpriteId != 0xFF)
DestroySprite(&gSprites[gBattleStruct->zmove.triggerSpriteId]);
gBattleStruct->zmove.triggerSpriteId = 0xFF;
}
static u16 GetSignatureZMove(u16 move, u16 species, u16 item)
{
u32 i;
// Check signature z move
for (i = 0; i < ARRAY_COUNT(sSignatureZMoves); ++i)
{
@ -396,7 +396,7 @@ static u16 GetSignatureZMove(u16 move, u16 species, u16 item)
static u16 GetTypeBasedZMove(u16 move, u8 battler)
{
u8 moveType = gBattleMoves[move].type;
// Get z move from type
if (moveType < TYPE_FIRE)
return MOVE_BREAKNECK_BLITZ + moveType;
@ -411,7 +411,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
u32 i;
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]);
u16 move = moveInfo->moves[gMoveSelectionCursor[gActiveBattler]];
PlaySE(SE_SELECT);
gBattleStruct->zmove.viewing = TRUE;
if (zmove != MOVE_NONE)
@ -421,15 +421,15 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
{
MoveSelectionDestroyCursorAt(i);
StringCopy(gDisplayedStringBattle, gText_EmptyString2);
BattlePutTextOnWindow(gDisplayedStringBattle, i + 3);
BattlePutTextOnWindow(gDisplayedStringBattle, i + 3);
}
if (IS_MOVE_STATUS(move))
{
u8 zEffect = gBattleMoves[move].zMoveEffect;
gDisplayedStringBattle[0] = EOS;
if (zEffect == Z_EFFECT_CURSE)
{
if (moveInfo->monType1 == TYPE_GHOST || moveInfo->monType2 == TYPE_GHOST || moveInfo->monType3 == TYPE_GHOST)
@ -437,7 +437,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
else
zEffect = Z_EFFECT_ATK_UP_1;
}
switch (zEffect)
{
case Z_EFFECT_RESET_STATS:
@ -501,7 +501,7 @@ bool32 MoveSelectionDisplayZMove(u16 zmove)
ExpandBattleTextBuffPlaceholders(gBattleTextBuff1, gDisplayedStringBattle + 4);
break;
}
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MOVE_NAME_3);
gDisplayedStringBattle[0] = CHAR_Z;
gDisplayedStringBattle[1] = CHAR_HYPHEN;
@ -584,11 +584,11 @@ void SetZEffect(void)
else
gBattleStruct->zmove.effect = Z_EFFECT_ATK_UP_1;
}
gBattleScripting.savedStatChanger = gBattleScripting.statChanger; // Save used move's stat changer (e.g. for Z-Growl)
gBattleScripting.battler = gBattlerAttacker;
switch (gBattleStruct->zmove.effect)
switch (gBattleStruct->zmove.effect)
{
case Z_EFFECT_RESET_STATS:
for (i = 0; i < NUM_BATTLE_STATS - 1; i++)
@ -645,7 +645,7 @@ void SetZEffect(void)
gBattlescriptCurrInstr = BattleScript_ZEffectPrintString;
break;
case Z_EFFECT_ATK_UP_1 ... Z_EFFECT_EVSN_UP_1:
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_1 + 1, 1, FALSE);
SET_STATCHANGER(gBattleStruct->zmove.effect - Z_EFFECT_ATK_UP_1 + 1, 1, FALSE);
BattleScriptPush(gBattlescriptCurrInstr + Z_EFFECT_BS_LENGTH);
gBattlescriptCurrInstr = BattleScript_StatUpZMove;
break;
@ -663,7 +663,7 @@ void SetZEffect(void)
gBattlescriptCurrInstr += 3;
break;
}
gBattleStruct->zmove.zStatusActive = FALSE;
}

View File

@ -11881,7 +11881,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.zMovePower = 180,
.zMoveEffect = Z_EFFECT_NONE,
},
[MOVE_ZIPPY_ZAP] =
{
#if B_UPDATED_MOVE_DATA >= GEN_8
@ -12193,7 +12193,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.zMovePower = 120,
.zMoveEffect = Z_EFFECT_NONE,
},
[MOVE_DYNAMAX_CANNON] =
{
.effect = EFFECT_DYNAMAX_DOUBLE_DMG,
@ -13105,7 +13105,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
.zMovePower = 100,
.zMoveEffect = Z_EFFECT_NONE,
},
[MOVE_THUNDER_CAGE] =
{
.effect = EFFECT_TRAP,

View File

@ -859,7 +859,7 @@
.bodyColor = color, \
.noFlip = FALSE, \
}
#define MORPEKO_BASE_STATS \
{ \
.baseHP = 58, \
@ -883,7 +883,7 @@
.bodyColor = BODY_COLOR_YELLOW, \
.noFlip = FALSE, \
}
#define ZARUDE_BASE_STATS \
{ \
.baseHP = 105, \
@ -22755,7 +22755,7 @@ const struct BaseStats gBaseStats[] =
.bodyColor = BODY_COLOR_BROWN,
.noFlip = FALSE,
},
[SPECIES_BASCULEGION] =
{
.baseHP = 120,
@ -26464,7 +26464,7 @@ const struct BaseStats gBaseStats[] =
[SPECIES_MINIOR_CORE_BLUE] = MINIOR_CORE_BASE_STATS(BODY_COLOR_BLUE),
[SPECIES_MINIOR_CORE_INDIGO] = MINIOR_CORE_BASE_STATS(BODY_COLOR_BLUE),
[SPECIES_MINIOR_CORE_VIOLET] = MINIOR_CORE_BASE_STATS(BODY_COLOR_PURPLE),
[SPECIES_MIMIKYU_BUSTED] = MIMIKYU_BASE_STATS,
[SPECIES_NECROZMA_DUSK_MANE] =
@ -26563,7 +26563,7 @@ const struct BaseStats gBaseStats[] =
[SPECIES_ALCREMIE_RUBY_SWIRL] = ALCREMIE_BASE_STATS(BODY_COLOR_YELLOW),
[SPECIES_ALCREMIE_CARAMEL_SWIRL] = ALCREMIE_BASE_STATS(BODY_COLOR_BROWN),
[SPECIES_ALCREMIE_RAINBOW_SWIRL] = ALCREMIE_BASE_STATS(BODY_COLOR_YELLOW),
[SPECIES_EISCUE_NOICE_FACE] =
{
.baseHP = 75,

View File

@ -1,4 +1,4 @@
const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] =
const struct FormChange *const gFormChangeTablePointers[NUM_SPECIES] =
{
#if P_NEW_POKEMON == TRUE
[SPECIES_GIRATINA] = sGiratinaFormChangeTable,

View File

@ -19,8 +19,8 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] =
[SPECIES_MEOWTH] = sMeowthFormSpeciesIdTable,
[SPECIES_PERSIAN] = sPersianFormSpeciesIdTable,
[SPECIES_ALAKAZAM] = sAlakazamFormSpeciesIdTable,
[SPECIES_GROWLITHE] = sGrowlitheFormSpeciesIdTable,
[SPECIES_ARCANINE] = sArcanineFormSpeciesIdTable,
[SPECIES_GROWLITHE] = sGrowlitheFormSpeciesIdTable,
[SPECIES_ARCANINE] = sArcanineFormSpeciesIdTable,
[SPECIES_GEODUDE] = sGeodudeFormSpeciesIdTable,
[SPECIES_GRAVELER] = sGravelerFormSpeciesIdTable,
[SPECIES_GOLEM] = sGolemFormSpeciesIdTable,
@ -113,7 +113,7 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] =
[SPECIES_LILLIGANT] = sLilligantFormSpeciesIdTable,
[SPECIES_DARUMAKA] = sDarumakaFormSpeciesIdTable,
[SPECIES_DARMANITAN] = sDarmanitanFormSpeciesIdTable,
[SPECIES_YAMASK] = sYamaskFormSpeciesIdTable,
[SPECIES_YAMASK] = sYamaskFormSpeciesIdTable,
[SPECIES_ZORUA] = sZoruaFormSpeciesIdTable,
[SPECIES_ZOROARK] = sZoroarkFormSpeciesIdTable,
[SPECIES_DEERLING] = sDeerlingFormSpeciesIdTable,
@ -139,7 +139,7 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] =
[SPECIES_GOODRA] = sGoodraFormSpeciesIdTable,
[SPECIES_PUMPKABOO] = sPumpkabooFormSpeciesIdTable,
[SPECIES_GOURGEIST] = sGourgeistFormSpeciesIdTable,
[SPECIES_AVALUGG] = sAvaluggFormSpeciesIdTable,
[SPECIES_AVALUGG] = sAvaluggFormSpeciesIdTable,
[SPECIES_XERNEAS] = sXerneasFormSpeciesIdTable,
[SPECIES_ZYGARDE] = sZygardeFormSpeciesIdTable,
[SPECIES_DIANCIE] = sDiancieFormSpeciesIdTable,
@ -394,7 +394,7 @@ const u16 *const gFormSpeciesIdTables[NUM_SPECIES] =
[SPECIES_TORNADUS_THERIAN] = sTornadusFormSpeciesIdTable,
[SPECIES_THUNDURUS_THERIAN] = sThundurusFormSpeciesIdTable,
[SPECIES_LANDORUS_THERIAN] = sLandorusFormSpeciesIdTable,
[SPECIES_ENAMORUS_THERIAN] = sEnamorusFormSpeciesIdTable,
[SPECIES_ENAMORUS_THERIAN] = sEnamorusFormSpeciesIdTable,
// Kyurem
[SPECIES_KYUREM_WHITE] = sKyuremFormSpeciesIdTable,
[SPECIES_KYUREM_BLACK] = sKyuremFormSpeciesIdTable,

View File

@ -18095,8 +18095,8 @@ static const struct LevelUpMove sWyrdeerLevelUpLearnset[] = {
LEVEL_UP_MOVE(15, MOVE_CALM_MIND),
//LEVEL_UP_MOVE(21, MOVE_PSYSHIELD_BASH),
LEVEL_UP_MOVE(29, MOVE_EXTRASENSORY),
//LEVEL_UP_MOVE(37, MOVE_ZEN_HEADBUTT),
LEVEL_UP_MOVE(47, MOVE_DOUBLE_EDGE),
//LEVEL_UP_MOVE(37, MOVE_ZEN_HEADBUTT),
LEVEL_UP_MOVE(47, MOVE_DOUBLE_EDGE),
LEVEL_UP_END
};
@ -18105,7 +18105,7 @@ static const struct LevelUpMove sKleavorLevelUpLearnset[] = {
LEVEL_UP_MOVE( 6, MOVE_SILVER_WIND),
LEVEL_UP_MOVE(11, MOVE_AERIAL_ACE),
LEVEL_UP_MOVE(14, MOVE_DOUBLE_HIT),
//LEVEL_UP_MOVE(14, MOVE_STEALTH_ROCK),
//LEVEL_UP_MOVE(14, MOVE_STEALTH_ROCK),
//LEVEL_UP_MOVE(18, MOVE_AIR_SLASH),
LEVEL_UP_MOVE(25, MOVE_SWORDS_DANCE),
//LEVEL_UP_MOVE(29, MOVE_STONE_AXE),
@ -18121,8 +18121,8 @@ static const struct LevelUpMove sUrsalunaLevelUpLearnset[] = {
LEVEL_UP_MOVE(18, MOVE_SLASH),
//LEVEL_UP_MOVE(25, MOVE_PLAY_ROUGH),
//LEVEL_UP_MOVE(34, MOVE_HIGH_HORSEPOWER),
LEVEL_UP_MOVE(43, MOVE_DOUBLE_EDGE),
//LEVEL_UP_MOVE(47, MOVE_HEADLONG_RUSH),
LEVEL_UP_MOVE(43, MOVE_DOUBLE_EDGE),
//LEVEL_UP_MOVE(47, MOVE_HEADLONG_RUSH),
LEVEL_UP_END
};
@ -18135,7 +18135,7 @@ static const struct LevelUpMove sBasculegionLevelUpLearnset[] = {
LEVEL_UP_MOVE(25, MOVE_CRUNCH),
LEVEL_UP_MOVE(25, MOVE_SHADOW_BALL),
//LEVEL_UP_MOVE(34, MOVE_WAVE_CRASH),
LEVEL_UP_MOVE(43, MOVE_DOUBLE_EDGE),
LEVEL_UP_MOVE(43, MOVE_DOUBLE_EDGE),
LEVEL_UP_END
};
@ -18145,9 +18145,9 @@ static const struct LevelUpMove sSneaslerLevelUpLearnset[] = {
//LEVEL_UP_MOVE(11, MOVE_DIRE_CLAW),
LEVEL_UP_MOVE(11, MOVE_SWIFT),
LEVEL_UP_MOVE(18, MOVE_SLASH),
//LEVEL_UP_MOVE(25, MOVE_POISON_JAB),
LEVEL_UP_MOVE(34, MOVE_SWORDS_DANCE),
//LEVEL_UP_MOVE(43, MOVE_CLOSE_COMBAT),
//LEVEL_UP_MOVE(25, MOVE_POISON_JAB),
LEVEL_UP_MOVE(34, MOVE_SWORDS_DANCE),
//LEVEL_UP_MOVE(43, MOVE_CLOSE_COMBAT),
LEVEL_UP_END
};
@ -18938,7 +18938,7 @@ static const struct LevelUpMove sGrowlitheHisuianLevelUpLearnset[] = {
LEVEL_UP_MOVE( 9, MOVE_BITE),
//LEVEL_UP_MOVE(15, MOVE_FIRE_FANG),
LEVEL_UP_MOVE(21, MOVE_ROCK_SLIDE),
LEVEL_UP_MOVE(29, MOVE_CRUNCH),
LEVEL_UP_MOVE(29, MOVE_CRUNCH),
LEVEL_UP_MOVE(37, MOVE_DOUBLE_EDGE),
//LEVEL_UP_MOVE(47, MOVE_FLARE_BLITZ),
LEVEL_UP_END
@ -18951,7 +18951,7 @@ static const struct LevelUpMove sArcanineHisuianLevelUpLearnset[] = {
//LEVEL_UP_MOVE(15, MOVE_FIRE_FANG),
LEVEL_UP_MOVE(21, MOVE_ROCK_SLIDE),
LEVEL_UP_MOVE(29, MOVE_CRUNCH),
//LEVEL_UP_MOVE(29, MOVE_RAGING_FURY),
//LEVEL_UP_MOVE(29, MOVE_RAGING_FURY),
LEVEL_UP_MOVE(37, MOVE_DOUBLE_EDGE),
//LEVEL_UP_MOVE(47, MOVE_FLARE_BLITZ),
LEVEL_UP_END
@ -19015,9 +19015,9 @@ static const struct LevelUpMove sSneaselHisuianLevelUpLearnset[] = {
LEVEL_UP_MOVE( 6, MOVE_ROCK_SMASH),
LEVEL_UP_MOVE(11, MOVE_SWIFT),
LEVEL_UP_MOVE(18, MOVE_SLASH),
//LEVEL_UP_MOVE(25, MOVE_POISON_JAB),
LEVEL_UP_MOVE(34, MOVE_SWORDS_DANCE),
//LEVEL_UP_MOVE(43, MOVE_CLOSE_COMBAT),
//LEVEL_UP_MOVE(25, MOVE_POISON_JAB),
LEVEL_UP_MOVE(34, MOVE_SWORDS_DANCE),
//LEVEL_UP_MOVE(43, MOVE_CLOSE_COMBAT),
LEVEL_UP_END
};
@ -19116,7 +19116,7 @@ static const struct LevelUpMove sGoodraHisuianLevelUpLearnset[] = {
};
static const struct LevelUpMove sAvaluggHisuianLevelUpLearnset[] = {
//LEVEL_UP_MOVE( 0, MOVE_ROCK_SLIDE),
//LEVEL_UP_MOVE( 0, MOVE_ROCK_SLIDE),
LEVEL_UP_MOVE( 1, MOVE_TACKLE),
LEVEL_UP_MOVE( 5, MOVE_POWDER_SNOW),
//LEVEL_UP_MOVE( 9, MOVE_ICE_SHARD),

View File

@ -1423,7 +1423,7 @@ const u16 gPokedexOrder_Weight[] =
NATIONAL_DEX_ESPEON,
NATIONAL_DEX_FROSLASS,
NATIONAL_DEX_UMBREON,
//NATIONAL_DEX_SNEASEL, //Hisuian Form
//NATIONAL_DEX_SNEASEL, //Hisuian Form
NATIONAL_DEX_HUNTAIL,
NATIONAL_DEX_CARNIVINE,
NATIONAL_DEX_WATCHOG,
@ -1577,7 +1577,7 @@ const u16 gPokedexOrder_Weight[] =
NATIONAL_DEX_GLISCOR,
NATIONAL_DEX_DUBWOOL,
NATIONAL_DEX_SNEASLER,
//NATIONAL_DEX_BRAVIARY, //Hisuian Form
//NATIONAL_DEX_BRAVIARY, //Hisuian Form
NATIONAL_DEX_PURUGLY,
//NATIONAL_DEX_MANECTRIC, // Mega
NATIONAL_DEX_GOTHITELLE,
@ -1600,7 +1600,7 @@ const u16 gPokedexOrder_Weight[] =
NATIONAL_DEX_HAKAMO_O,
NATIONAL_DEX_ALAKAZAM,
NATIONAL_DEX_HITMONTOP,
NATIONAL_DEX_ENAMORUS,
NATIONAL_DEX_ENAMORUS,
NATIONAL_DEX_GARDEVOIR,
NATIONAL_DEX_KELDEO,
NATIONAL_DEX_GRANBULL,
@ -1660,7 +1660,7 @@ const u16 gPokedexOrder_Weight[] =
NATIONAL_DEX_HEATMOR,
//NATIONAL_DEX_LURANTIS, // Totem-sized
//NATIONAL_DEX_ZAPDOS, // Galarian Form
//NATIONAL_DEX_SAMUROTT, // Hisuian Form
//NATIONAL_DEX_SAMUROTT, // Hisuian Form
NATIONAL_DEX_MR_RIME,
NATIONAL_DEX_WHIRLIPEDE,
//NATIONAL_DEX_PINSIR, // Mega
@ -1823,7 +1823,7 @@ const u16 gPokedexOrder_Weight[] =
NATIONAL_DEX_FERROTHORN,
NATIONAL_DEX_MUDBRAY,
NATIONAL_DEX_ZACIAN, // Hero of Many Battles
NATIONAL_DEX_BASCULEGION,
NATIONAL_DEX_BASCULEGION,
//NATIONAL_DEX_CHARIZARD, // Mega X
NATIONAL_DEX_SHELGON,
//NATIONAL_DEX_SALAMENCE, // Mega
@ -1933,7 +1933,7 @@ const u16 gPokedexOrder_Weight[] =
//NATIONAL_DEX_AVALUGG, //Hisuian Form
NATIONAL_DEX_TYRANTRUM,
NATIONAL_DEX_RHYPERIOR,
NATIONAL_DEX_URSALUNA,
NATIONAL_DEX_URSALUNA,
NATIONAL_DEX_MAMOSWINE,
// 661.4 - 667.0 lbs / 300.0 - 307.1 kg
NATIONAL_DEX_GOLEM,
@ -2642,7 +2642,7 @@ const u16 gPokedexOrder_Height[] =
NATIONAL_DEX_GURDURR,
NATIONAL_DEX_LEAVANNY,
NATIONAL_DEX_WHIRLIPEDE,
//NATIONAL_DEX_LILLIGANT, //Hisuian Form
//NATIONAL_DEX_LILLIGANT, //Hisuian Form
NATIONAL_DEX_CARRACOSTA,
NATIONAL_DEX_FRILLISH,
NATIONAL_DEX_ALOMOMOLA,
@ -2697,7 +2697,7 @@ const u16 gPokedexOrder_Height[] =
NATIONAL_DEX_DUBWOOL,
NATIONAL_DEX_BARRASKEWDA,
NATIONAL_DEX_FROSMOTH,
NATIONAL_DEX_SNEASLER,
NATIONAL_DEX_SNEASLER,
// 4'07" / 1.4m
//NATIONAL_DEX_BEEDRILL, // Mega
//NATIONAL_DEX_RATICATE, // Alolan Form, Totem-sized
@ -2734,7 +2734,7 @@ const u16 gPokedexOrder_Height[] =
NATIONAL_DEX_ZWEILOUS,
//NATIONAL_DEX_TORNADUS, // Therian Forme
NATIONAL_DEX_KELDEO,
//NATIONAL_DEX_AVALUGG, // Hisuian Form
//NATIONAL_DEX_AVALUGG, // Hisuian Form
//NATIONAL_DEX_GUMSHOOS, // Totem-sized
NATIONAL_DEX_CINDERACE,
NATIONAL_DEX_EISCUE,
@ -2805,7 +2805,7 @@ const u16 gPokedexOrder_Height[] =
NATIONAL_DEX_HYPNO,
NATIONAL_DEX_ZAPDOS,
//NATIONAL_DEX_ZAPDOS, // Galarian Form
//NATIONAL_DEX_TYPHLOSION, // Hisuian Form
//NATIONAL_DEX_TYPHLOSION, // Hisuian Form
NATIONAL_DEX_NOCTOWL,
NATIONAL_DEX_GARDEVOIR,
//NATIONAL_DEX_GARDEVOIR, // Mega
@ -2818,15 +2818,15 @@ const u16 gPokedexOrder_Height[] =
NATIONAL_DEX_EMBOAR,
NATIONAL_DEX_ZEBSTRIKA,
NATIONAL_DEX_ZOROARK,
//NATIONAL_DEX_ZOROARK, // Hisuian Form
//NATIONAL_DEX_ZOROARK, // Hisuian Form
NATIONAL_DEX_DRUDDIGON,
NATIONAL_DEX_BISHARP,
NATIONAL_DEX_BOUFFALANT,
//NATIONAL_DEX_BRAVIARY, // Hisuian Form
//NATIONAL_DEX_BRAVIARY, // Hisuian Form
NATIONAL_DEX_VOLCARONA,
NATIONAL_DEX_CHESNAUGHT,
NATIONAL_DEX_DECIDUEYE,
//NATIONAL_DEX_DECIDUEYE, // Hisuian Form
//NATIONAL_DEX_DECIDUEYE, // Hisuian Form
NATIONAL_DEX_KOMMO_O,
NATIONAL_DEX_TOXTRICITY,
NATIONAL_DEX_GRAPPLOCT,
@ -3010,7 +3010,7 @@ const u16 gPokedexOrder_Height[] =
NATIONAL_DEX_MUDSDALE,
NATIONAL_DEX_MELMETAL,
NATIONAL_DEX_STONJOURNER,
NATIONAL_DEX_OVERQWIL,
NATIONAL_DEX_OVERQWIL,
// 8'06" / 2.6m
NATIONAL_DEX_BEARTIC,
//NATIONAL_DEX_VIKAVOLT, // Totem-sized

View File

@ -2691,144 +2691,144 @@ static const u8 sVeeveeVolleyDescription[] = _(
static const u8 sDoubleIronBashDescription[] = _(
"The user spins and hits with\n"
"its arms. May cause flinch.");
// GEN 8
static const u8 sDynamaxCannonDescription[] = _(
"Fires a strong beam. Deals\n"
"2x damage to Dynamaxed foes.");
static const u8 sSnipeShotDescription[] = _(
"The user ignores effects\n"
"that draw in moves.");
static const u8 sJawLockDescription[] = _(
"Prevents the user and\n"
"the target from escaping.");
static const u8 sStuffCheeksDescription[] = _(
"Consumes the user's Berry,\n"
"then sharply raises Def.");
static const u8 sNoRetreatDescription[] = _(
"Raises all of the user's\n"
"stats but prevents escape.");
static const u8 sTarShotDescription[] = _(
"Lowers the foe's Speed and\n"
"makes it weak to Fire.");
static const u8 sMagicPowderDescription[] = _(
"Magic powder changes the\n"
"target into a Psychic-type.");
static const u8 sDragonDartsDescription[] = _(
"The user attacks twice. Two\n"
"targets are hit once each.");
static const u8 sTeatimeDescription[] = _(
"All Pokémon have teatime\n"
"and eat their Berries.");
static const u8 sOctolockDescription[] = _(
"Traps the foe to lower Def\n"
"and Sp. Def fall each turn.");
static const u8 sBoltBeakDescription[] = _(
"Double power if the user\n"
"moves before the target.");
static const u8 sFishiousRendDescription[] = _(
"Double power if the user\n"
"moves before the target.");
static const u8 sCourtChangeDescription[] = _(
"The user swaps effects on\n"
"either side of the field.");
static const u8 sClangorousSoulDescription[] = _(
"The user uses some of its\n"
"HP to raise all its stats.");
static const u8 sBodyPressDescription[] = _(
"Does more damage the\n"
"higher the user's Def.");
static const u8 sDecorateDescription[] = _(
"The user sharply raises\n"
"the target's Atk and Sp.Atk");
static const u8 sDrumBeatingDescription[] = _(
"Plays a drum to attack.\n"
"The foe's Speed is lowered.");
static const u8 sSnapTrapDescription[] = _(
"Snares the target in a snap\n"
"trap for four to five turns.");
static const u8 sPyroBallDescription[] = _(
"Launches a fiery ball at the\n"
"target. It may cause a burn.");
static const u8 sBehemothBladeDescription[] = _(
"Strikes as a sword. Deals 2x\n"
"damage to Dynamaxed foes.");
static const u8 sBehemothBashDescription[] = _(
"Attacks as a shield. Deals 2x\n"
"damage to Dynamaxed foes.");
static const u8 sAuraWheelDescription[] = _(
"Raises Speed to attack. The\n"
"Type is based on its form.");
static const u8 sBreakingSwipeDescription[] = _(
"Swings its tail to attack.\n"
"Lowers the Atk of those hit.");
static const u8 sBranchPokeDescription[] = _(
"The user pokes the target\n"
"with a pointed branch.");
static const u8 sOverdriveDescription[] = _(
"The user twangs its guitar,\n"
"causing strong vibrations.");
static const u8 sAppleAcidDescription[] = _(
"Attacks with tart apple acid\n"
"to lower the foe's Sp. Def.");
static const u8 sGravAppleDescription[] = _(
"Drops an apple from above.\n"
"Lowers the foe's Defense.");
static const u8 sSpiritBreakDescription[] = _(
"Attacks with spirit-breaking\n"
"force. Lowers Sp. Atk.");
static const u8 sStrangeSteamDescription[] = _(
"Emits a strange steam to\n"
"potentially confuse the foe.");
static const u8 sLifeDewDescription[] = _(
"Scatters water to restore\n"
"the HP of itself and allies.");
static const u8 sObstructDescription[] = _(
"Protects itself, harshly\n"
"lowering Def on contact.");
static const u8 sFalseSurrenderDescription[] = _(
"Bows to stab the foe\n"
"with hair. It never misses.");
static const u8 sMeteorAssaultDescription[] = _(
"Attacks with a thick leek.\n"
"The user must then rest.");
static const u8 sEternabeamDescription[] = _(
"Eternatus' strongest move.\n"
"The user rests next turn.");
static const u8 sSteelBeamDescription[] = _(
"Fires a beam of steel from\n"
"its body. It hurts the user.");

View File

@ -1604,7 +1604,7 @@ static const u8 sText_Menacing_Moonraze_Maelstrom[] = _("Menacing Moonraze Maels
static const u8 sText_Light_That_Burns_The_Sky[] = _("Light That Burns The Sky");
static const u8 sText_Soul_Stealing_7_Star_Strike[] = _("Soul Stealing 7 Star Strike");
const u8 *const gZMoveNames[] =
const u8 *const gZMoveNames[] =
{
[MOVE_BREAKNECK_BLITZ - FIRST_Z_MOVE] = sText_Breakneck_Blitz,
[MOVE_ALL_OUT_PUMMELING - FIRST_Z_MOVE] = sText_All_Out_Pummeling,

View File

@ -261,7 +261,7 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
CalculateMonStats(&pokemon);
species = newSpecies;
}
if (GetMonData(&pokemon, MON_DATA_LEVEL) != MAX_LEVEL)
{
experience = GetMonData(&pokemon, MON_DATA_EXP) + daycareMon->steps;
@ -1359,7 +1359,7 @@ static u8 ModifyBreedingScoreForOvalCharm(u8 score)
return 88;
}
}
return score;
}

View File

@ -1493,7 +1493,7 @@ static void DebugAction_Flags_CatchingOnOff(u8 taskId)
FlagToggle(B_FLAG_NO_CATCHING);
#endif
}
// *******************************
// Actions Variables
static void DebugAction_Vars_Vars(u8 taskId)
@ -2589,7 +2589,7 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu
}
//Pokedex entry
nationalDexNum = SpeciesToNationalPokedexNum(species);
nationalDexNum = SpeciesToNationalPokedexNum(species);
switch(sentToPc)
{
case MON_GIVEN_TO_PARTY:

View File

@ -565,7 +565,7 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon)
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, &data);
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, &data);
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, &data);
#if P_SHEDINJA_BALL >= GEN_4
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_POKEBALL, &ball);
RemoveBagItem(ball, 1);

View File

@ -1188,7 +1188,7 @@ void ItemUseInBattle_EnigmaBerry(u8 taskId)
}
}
void ItemUseOutOfBattle_FormChange(u8 taskId)
void ItemUseOutOfBattle_FormChange(u8 taskId)
{
gItemUseCB = ItemUseCB_FormChange;
gTasks[taskId].data[0] = FALSE;

View File

@ -3307,7 +3307,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
| (gSaveBlock2Ptr->playerTrainerId[1] << 8)
| (gSaveBlock2Ptr->playerTrainerId[2] << 16)
| (gSaveBlock2Ptr->playerTrainerId[3] << 24);
if (CheckBagHasItem(ITEM_SHINY_CHARM, 1))
{
u32 shinyValue;
@ -3415,7 +3415,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
}
}
#endif
}
if (gBaseStats[species].abilities[1])
@ -5292,7 +5292,7 @@ u16 GetAbilityBySpecies(u16 species, u8 abilityNum)
gLastUsedAbility = gBaseStats[species].abilities[abilityNum];
else
gLastUsedAbility = ABILITY_NONE;
if (abilityNum >= NUM_NORMAL_ABILITY_SLOTS) // if abilityNum is empty hidden ability, look for other hidden abilities
{
for (i = NUM_NORMAL_ABILITY_SLOTS; i < NUM_ABILITY_SLOTS && gLastUsedAbility == ABILITY_NONE; i++)
@ -5300,12 +5300,12 @@ u16 GetAbilityBySpecies(u16 species, u8 abilityNum)
gLastUsedAbility = gBaseStats[species].abilities[i];
}
}
for (i = 0; i < NUM_ABILITY_SLOTS && gLastUsedAbility == ABILITY_NONE; i++) // look for any non-empty ability
{
gLastUsedAbility = gBaseStats[species].abilities[i];
}
return gLastUsedAbility;
}
@ -6346,7 +6346,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
{
partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0);
partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0);
if (partnerHeldItem == ITEM_ENIGMA_BERRY)
partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
else
@ -7717,7 +7717,7 @@ void SetWildMonHeldItem(void)
{
if (GetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, NULL) != ITEM_NONE)
continue; // prevent ovewriting previously set item
rnd = Random() % 100;
species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES, 0);
if (gMapHeader.mapLayoutId == LAYOUT_ALTERING_CAVE)

View File

@ -337,7 +337,7 @@ const u8 gFrontAnimNames[][34] =
[ANIM_SHAKE_GLOW_WHITE_SLOW] = _("SHAKE GLOW WHITE SLOW"),
[ANIM_SHAKE_GLOW_PURPLE_SLOW] = _("SHAKE GLOW PURPLE SLOW"),
};
const u8 gBattleBackgroundNames[][30] =
const u8 gBattleBackgroundNames[][30] =
{
[MAP_BATTLE_SCENE_NORMAL] = _("NORMAL "),
[MAP_BATTLE_SCENE_GYM] = _("GYM "),
@ -354,7 +354,7 @@ const u8 gBattleBackgroundNames[][30] =
[MAP_BATTLE_SCENE_KYOGRE] = _("KYOGRE "),
[MAP_BATTLE_SCENE_RAYQUAZA] = _("RAYQUAZA "),
};
const u8 gBattleBackgroundTerrainNames[][26] =
const u8 gBattleBackgroundTerrainNames[][26] =
{
[BATTLE_TERRAIN_GRASS] = _("NORMAL - GRASS "),
[BATTLE_TERRAIN_LONG_GRASS] = _("NORMAL - LONG GRASS "),
@ -403,13 +403,13 @@ static void PrintInstructionsOnWindow(struct PokemonDebugMenu *data)
u8 textInstructionsSubmenuOneGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back {A_BUTTON} Submenu 2$");
u8 textInstructionsSubmenuTwo[] = _("{START_BUTTON} Shiny\n{B_BUTTON} Back$");
u8 textInstructionsSubmenuTwoGender[] = _("{START_BUTTON} Shiny {SELECT_BUTTON} Gender\n{B_BUTTON} Back$");
u8 textBottom[] = _("BACK:\nFRONT:\nBG:$");
u8 textBottomForms[] = _("BACK:\nFRONT:\nBG:\nFORMS:$");
u8 textBottomSubmenuTwo[] = _("B coords:\nF coords:\nF elev:");
u16 species = data->modifyArrows.currValue;
u8 textL[] = _("{L_BUTTON}");
u8 textR[] = _("{R_BUTTON}");
@ -481,7 +481,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data)
for (i = 0; i < data->modifyArrows.maxDigits; i++)
text[i] = data->modifyArrows.charDigits[i];
text[i++] = CHAR_SPACE;
text[i++] = CHAR_HYPHEN;
@ -490,7 +490,7 @@ static void PrintDigitChars(struct PokemonDebugMenu *data)
if (data->isFemale)
text[i++] = CHAR_FEMALE;
else
text[i++] = CHAR_MALE;
text[i++] = CHAR_MALE;
text[i++] = CHAR_HYPHEN;
}
@ -641,7 +641,7 @@ static bool32 TryMoveDigit(struct PokemonDebugModifyArrows *modArrows, bool32 mo
if (charDigits[modArrows->currentDigit] == CHAR_0)
{
charDigits[modArrows->currentDigit] = CHAR_9;
for (i = modArrows->currentDigit - 1; i >= 0; i--)
{
if (charDigits[i] == CHAR_0)
@ -796,7 +796,7 @@ static u8 GetBattlerSpriteFinal_YCustom(u16 species, s8 offset_picCoords, s8 off
//FrontPicCoords
offset = gMonFrontPicCoords[species].y_offset + offset_picCoords;
//Elevation
offset -= GetElevationValue(species) + offset_elevation;
@ -805,7 +805,7 @@ static u8 GetBattlerSpriteFinal_YCustom(u16 species, s8 offset_picCoords, s8 off
if (y > DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8)
y = DISPLAY_HEIGHT - MON_PIC_HEIGHT + 8;
return y;
}
@ -839,7 +839,7 @@ static void LoadAndCreateEnemyShadowSpriteCustom(struct PokemonDebugMenu *data,
data->frontShadowSpriteId = CreateSprite(&gSpriteTemplate_EnemyShadow, x, y + 29, 0xC8);
gSprites[data->frontShadowSpriteId].data[0] = data->frontspriteId;
gSprites[data->frontShadowSpriteId].callback = SpriteCB_EnemyShadowCustom;
gSprites[data->frontShadowSpriteId].oam.priority = 0;
gSprites[data->frontShadowSpriteId].invisible = invisible;
@ -945,7 +945,7 @@ static void LoadBattleBg(u8 battleBgType, u8 battleTerrain)
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(26)));
LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60);
break;
break;
}
}
static void PrintBattleBgName(u8 taskId)
@ -1005,7 +1005,7 @@ static void UpdateBattleBg(u8 taskId, bool8 increment)
{
if (increment)
data->battleBgType += 1;
else
else
data->battleBgType -= 1;
}
@ -1148,7 +1148,7 @@ void CB2_Debug_Pokemon(void)
data->battleBgType = 0;
data->battleTerrain = 0;
LoadBattleBg(data->battleBgType , data->battleTerrain);
gMain.state++;
break;
case 2:
@ -1377,7 +1377,7 @@ static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment)
data->animIdFront = sMonFrontAnimIdsTable[modArrows->currValue - 1];
UpdateMonAnimNames(taskId);
ResetOffsetSpriteValues(data);
UpdateBattlerValue(data);
ReloadPokemonSprites(data);
while (!(gMain.intrCheck & INTR_FLAG_VBLANK));
@ -1486,7 +1486,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
if (JOY_NEW(START_BUTTON))
{
data->isShiny = !data->isShiny;
if(data->isShiny)
PlaySE(SE_SHINY);
@ -1641,7 +1641,7 @@ static void Handle_Input_Debug_Pokemon(u8 taskId)
data->submenuYpos[2] += 1;
if (data->submenuYpos[2] >= 3)
data->submenuYpos[2] = 0;
data->yPosModifyArrows.currentDigit = data->submenuYpos[2];
gSprites[data->yPosModifyArrows.arrowSpriteId[0]].y = OPTIONS_ARROW_Y + data->yPosModifyArrows.currentDigit * 12;
}
@ -1672,7 +1672,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
u16 species = data->currentmonId;
s16 offset_y;
u8 front_x = sBattlerCoords[0][1].x;
u8 front_y;
u8 front_y;
DestroySprite(&gSprites[data->frontspriteId]);
DestroySprite(&gSprites[data->backspriteId]);
@ -1706,7 +1706,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
gSprites[data->frontspriteId].oam.priority = 0;
//Front Shadow
LoadAndCreateEnemyShadowSpriteCustom(data, species);
//Back
HandleLoadSpecialPokePic(FALSE, gMonSpritesGfxPtr->sprites.ptr[2], species, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
BattleLoadOpponentMonSpriteGfxCustom(species, data->isFemale, data->isShiny, 5);
@ -1720,7 +1720,7 @@ static void ReloadPokemonSprites(struct PokemonDebugMenu *data)
//Icon Sprite
data->iconspriteId = CreateMonIcon(species, SpriteCB_MonIcon, DEBUG_ICON_X, DEBUG_ICON_Y, 4, (data->isFemale ? FEMALE_PERSONALITY : MALE_PERSONALITY));
gSprites[data->iconspriteId].oam.priority = 0;
//Modify Arrows
LoadSpritePalette(&gSpritePalette_Arrow);
data->modifyArrows.arrowSpriteId[0] = CreateSprite(&gSpriteTemplate_Arrow, MODIFY_DIGITS_ARROW_X + (data->modifyArrows.currentDigit * 6), MODIFY_DIGITS_ARROW1_Y, 0);

View File

@ -3742,7 +3742,7 @@ static void PrintMoveDetails(u16 move)
ShowSplitIcon(GetBattleMoveSplit(move));
#endif
PrintMovePowerAndAccuracy(move);
if (moveEffect != EFFECT_PLACEHOLDER)
PrintTextOnWindow(windowId, gMoveDescriptionPointers[move - 1], 6, 1, 0, 0);
else

View File

@ -1885,7 +1885,7 @@ bool8 ScrCmd_setwildbattle(struct ScriptContext *ctx)
gIsScriptedWildDouble = FALSE;
}
else
{
{
CreateScriptedDoubleWildMon(species, level, item, species2, level2, item2);
gIsScriptedWildDouble = TRUE;
}

View File

@ -324,7 +324,7 @@ static void BuildNormalStartMenu(void)
}
static void BuildDebugStartMenu(void)
{
{
AddStartMenuAction(MENU_ACTION_DEBUG);
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
AddStartMenuAction(MENU_ACTION_POKEDEX);

View File

@ -1006,7 +1006,7 @@ bool8 TryDoDoubleWildBattle(void)
{
if (GetSafariZoneFlag() || GetMonsStateToDoubles() != PLAYER_HAS_TWO_USABLE_MONS)
return FALSE;
#if B_FLAG_FORCE_DOUBLE_WILD != 0
#if B_FLAG_FORCE_DOUBLE_WILD != 0
else if (FlagGet(B_FLAG_FORCE_DOUBLE_WILD))
return TRUE;
#endif

View File

@ -238,7 +238,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
{
FATAL_ERROR("More than one MARK Chunk in file!\n");
}
markers = calloc(num_markers, sizeof(struct Marker));
// Read each marker.
@ -289,7 +289,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
// Skip NoLooping sustain loop.
pos += 4;
}
// Skip release loop, we don't need it.
pos += 6;
}
@ -303,7 +303,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
{
uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t));
memcpy(sample_data, &aif->data[pos], num_samples);
aif_data->samples8 = sample_data;
aif_data->real_num_samples = num_samples;
}
@ -316,7 +316,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
{
sample_data_swapped[i] = __builtin_bswap16(sample_data[i]);
}
aif_data->samples16 = sample_data_swapped;
aif_data->real_num_samples = num_samples;
free(sample_data);
@ -329,12 +329,12 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
pos += chunk_size;
}
}
if (markers)
{
// Resolve loop points.
struct Marker *cur_marker = markers;
// Grab loop start point.
for (int i = 0; i < num_markers; i++, cur_marker++)
{
@ -573,7 +573,7 @@ void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress)
struct Bytes *aif = read_bytearray(aif_filename);
AifData aif_data = {0};
read_aif(aif, &aif_data);
// Convert 16-bit to 8-bit if necessary
if (aif_data.sample_size == 16)
{

View File

@ -26,7 +26,7 @@ static void ConvertFromLatinFont(unsigned char *src, unsigned char *dest, unsign
unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
for (unsigned int i = 0; i < 8; i++) {
unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
unsigned int destPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
@ -75,7 +75,7 @@ static void ConvertFromHalfwidthJapaneseFont(unsigned char *src, unsigned char *
for (unsigned int i = 0; i < 8; i++) {
unsigned int pixelsY = (row * 16) + (glyphTile * 8) + i;
unsigned int destPixelsOffset = (pixelsY * 32) + (pixelsX / 4);
dest[destPixelsOffset] = src[srcPixelsOffset + 1];
dest[destPixelsOffset + 1] = src[srcPixelsOffset];
@ -233,7 +233,7 @@ void ReadHalfwidthJapaneseFont(char *path, struct Image *image)
FATAL_ERROR("The file size (%d) is not a multiple of %d.\n", fileSize, glyphSize);
int numGlyphs = fileSize / glyphSize;
if (numGlyphs % 16 != 0)
FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);

View File

@ -1675,7 +1675,7 @@ class FunctionStorage {
#include <limits>
#include <string>
#include <utility>
#include <utility>
#include <vector>
// #include "bytecode.hpp"

View File

@ -77,8 +77,8 @@ string generate_map_header_text(Json map_data, Json layouts_data, string version
ostringstream text;
text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/"
<< map_data["name"].string_value()
text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/"
<< map_data["name"].string_value()
<< "/map.json\n@\n\n";
text << map_data["name"].string_value() << ":\n"
@ -128,8 +128,8 @@ string generate_map_connections_text(Json map_data) {
ostringstream text;
text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/"
<< map_data["name"].string_value()
text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/"
<< map_data["name"].string_value()
<< "/map.json\n@\n\n";
text << map_data["name"].string_value() << "_MapConnectionsList:\n";
@ -154,8 +154,8 @@ string generate_map_events_text(Json map_data) {
ostringstream text;
text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/"
<< map_data["name"].string_value()
text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/"
<< map_data["name"].string_value()
<< "/map.json\n@\n\n";
string objects_label, warps_label, coords_label, bgs_label;
@ -399,7 +399,7 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) {
text << "// " << group.string_value() << "\n";
vector<Json> map_ids;
size_t max_length = 0;
int map_count = 0; //DEBUG
for (auto &map_name : groups_data[group.string_value()].array_items()) {

View File

@ -383,7 +383,7 @@ void CFile::TryConvertIncbin()
if (m_buffer[m_pos] == '\\')
RaiseError("unexpected escape in path string");
m_pos++;
}
@ -418,7 +418,7 @@ void CFile::TryConvertIncbin()
m_pos++;
}
if (m_buffer[m_pos] != ')')
RaiseError("expected ')'");

View File

@ -119,7 +119,7 @@ Lhs CharmapReader::ReadLhs()
break;
}
}
if (m_buffer[m_pos] == '\'')
{
m_pos++;

View File

@ -41,7 +41,7 @@ SourceFileType GetFileType(std::string& path)
return SourceFileType::Inc;
else
FATAL_ERROR("Unrecognized extension \"%s\"\n", extension.c_str());
// Unreachable
return SourceFileType::Cpp;
}
@ -84,7 +84,7 @@ SourceFile::SourceFile(std::string path)
else
incbins.insert(outputPath);
}
new (&m_source_file.asm_wrapper) SourceFile::InnerUnion::AsmWrapper{incbins, includes};
}
}