mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Simplify GetBattleTransitionTypeByMap
This commit is contained in:
parent
8231ea2b68
commit
c9958e3087
@ -699,10 +699,13 @@ static u8 GetBattleTransitionTypeByMap(void)
|
|||||||
|
|
||||||
PlayerGetDestCoords(&x, &y);
|
PlayerGetDestCoords(&x, &y);
|
||||||
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
|
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
|
||||||
|
|
||||||
if (GetFlashLevel())
|
if (GetFlashLevel())
|
||||||
return TRANSITION_TYPE_FLASH;
|
return TRANSITION_TYPE_FLASH;
|
||||||
if (!MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior))
|
|
||||||
{
|
if (MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior))
|
||||||
|
return TRANSITION_TYPE_WATER;
|
||||||
|
|
||||||
switch (gMapHeader.mapType)
|
switch (gMapHeader.mapType)
|
||||||
{
|
{
|
||||||
case MAP_TYPE_UNDERGROUND:
|
case MAP_TYPE_UNDERGROUND:
|
||||||
@ -712,8 +715,6 @@ static u8 GetBattleTransitionTypeByMap(void)
|
|||||||
default:
|
default:
|
||||||
return TRANSITION_TYPE_NORMAL;
|
return TRANSITION_TYPE_NORMAL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return TRANSITION_TYPE_WATER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u16 GetSumOfPlayerPartyLevel(u8 numMons)
|
static u16 GetSumOfPlayerPartyLevel(u8 numMons)
|
||||||
|
Loading…
Reference in New Issue
Block a user