This commit is contained in:
Raymond Dodge 2026-03-16 20:26:31 +00:00 committed by GitHub
commit 6157a5eb24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 11 deletions

View File

@ -41,6 +41,7 @@
#include "constants/moves.h"
#include "constants/party_menu.h"
#include "constants/pokemon.h"
#include "constants/pokemon_size_record.h"
#include "constants/roulette.h"
#include "constants/script_menu.h"
#include "constants/secret_bases.h"

View File

@ -11,9 +11,9 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother::
copyvar VAR_RESULT, VAR_0x8004
goto_if_eq VAR_RESULT, PARTY_NOTHING_CHOSEN, SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot
special CompareSeedotSize
goto_if_eq VAR_RESULT, 1, SootopolisCity_LotadAndSeedotHouse_EventScript_NotSeedot
goto_if_eq VAR_RESULT, 2, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot
goto_if_eq VAR_RESULT, 3, SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot
goto_if_eq VAR_RESULT, COMPARE_SIZE_INCORRECT_SPECIES, SootopolisCity_LotadAndSeedotHouse_EventScript_NotSeedot
goto_if_eq VAR_RESULT, COMPARE_SIZE_SMALLER, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallSeedot
goto_if_eq VAR_RESULT, COMPARE_SIZE_LARGER, SootopolisCity_LotadAndSeedotHouse_EventScript_BigSeedot
release
end
@ -55,9 +55,9 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother::
copyvar VAR_RESULT, VAR_0x8004
goto_if_eq VAR_RESULT, PARTY_NOTHING_CHOSEN, SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad
special CompareLotadSize
goto_if_eq VAR_RESULT, 1, SootopolisCity_LotadAndSeedotHouse_EventScript_NotLotad
goto_if_eq VAR_RESULT, 2, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad
goto_if_eq VAR_RESULT, 3, SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad
goto_if_eq VAR_RESULT, COMPARE_SIZE_INCORRECT_SPECIES, SootopolisCity_LotadAndSeedotHouse_EventScript_NotLotad
goto_if_eq VAR_RESULT, COMPARE_SIZE_SMALLER, SootopolisCity_LotadAndSeedotHouse_EventScript_SmallLotad
goto_if_eq VAR_RESULT, COMPARE_SIZE_LARGER, SootopolisCity_LotadAndSeedotHouse_EventScript_BigLotad
release
end

View File

@ -0,0 +1,12 @@
#ifndef GUARD_CONSTANTS_POKEMON_SIZE_RECORD_H
#define GUARD_CONSTANTS_POKEMON_SIZE_RECORD_H
enum
{
COMPARE_SIZE_NONE,
COMPARE_SIZE_INCORRECT_SPECIES,
COMPARE_SIZE_SMALLER,
COMPARE_SIZE_LARGER,
};
#endif // GUARD_CONSTANTS_POKEMON_SIZE_RECORD_H

View File

@ -6,6 +6,8 @@
#include "pokemon_size_record.h"
#include "string_util.h"
#include "text.h"
#include "constants/party_menu.h"
#include "constants/pokemon_size_record.h"
#define DEFAULT_MAX_SIZE 0x8000 // was 0x8100 in Ruby/Sapphire
@ -107,9 +109,9 @@ static void FormatMonSizeRecord(u8 *string, u32 size)
static u8 CompareMonSize(u16 species, u16 *sizeRecord)
{
if (gSpecialVar_Result == 0xFF)
if (gSpecialVar_Result == PARTY_NOTHING_CHOSEN)
{
return 0;
return COMPARE_SIZE_NONE;
}
else
{
@ -117,7 +119,7 @@ static u8 CompareMonSize(u16 species, u16 *sizeRecord)
if (GetMonData(pkmn, MON_DATA_IS_EGG) == TRUE || GetMonData(pkmn, MON_DATA_SPECIES) != species)
{
return 1;
return COMPARE_SIZE_INCORRECT_SPECIES;
}
else
{
@ -131,12 +133,12 @@ static u8 CompareMonSize(u16 species, u16 *sizeRecord)
FormatMonSizeRecord(gStringVar2, newSize);
if (newSize <= oldSize)
{
return 2;
return COMPARE_SIZE_SMALLER;
}
else
{
*sizeRecord = sizeParams;
return 3;
return COMPARE_SIZE_LARGER;
}
}
}