mirror of
https://github.com/pret/pokeemerald.git
synced 2026-03-21 17:54:57 -05:00
Name CompareMonSize return values
This commit is contained in:
parent
25ffb2c12c
commit
d14734d5bf
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
12
include/constants/pokemon_size_record.h
Normal file
12
include/constants/pokemon_size_record.h
Normal 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
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
#include "pokemon_size_record.h"
|
||||
#include "string_util.h"
|
||||
#include "text.h"
|
||||
#include "constants/pokemon_size_record.h"
|
||||
|
||||
#define DEFAULT_MAX_SIZE 0x8000 // was 0x8100 in Ruby/Sapphire
|
||||
|
||||
|
|
@ -109,7 +110,7 @@ static u8 CompareMonSize(u16 species, u16 *sizeRecord)
|
|||
{
|
||||
if (gSpecialVar_Result == 0xFF)
|
||||
{
|
||||
return 0;
|
||||
return COMPARE_SIZE_NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -117,7 +118,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 +132,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user