Clarify MB_SEMI_DEEP_WATER name
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
#define MB_MOUNTAIN_TOP 0x0C
|
#define MB_MOUNTAIN_TOP 0x0C
|
||||||
//
|
//
|
||||||
#define MB_POND_WATER 0x10
|
#define MB_POND_WATER 0x10
|
||||||
#define MB_SEMI_DEEP_WATER 0x11
|
#define MB_FAST_WATER 0x11
|
||||||
#define MB_DEEP_WATER 0x12
|
#define MB_DEEP_WATER 0x12
|
||||||
#define MB_WATERFALL 0x13
|
#define MB_WATERFALL 0x13
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ bool8 MetatileBehavior_IsLadder(u8 metatileBehavior);
|
|||||||
bool8 MetatileBehavior_IsNonAnimDoor(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsNonAnimDoor(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsDeepSouthWarp(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsDeepSouthWarp(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsSurfable(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsSurfable(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsSemiDeepWater(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsFastWater(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsEastArrowWarp(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsEastArrowWarp(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsWestArrowWarp(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsWestArrowWarp(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsNorthArrowWarp(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsNorthArrowWarp(u8 metatileBehavior);
|
||||||
@@ -64,7 +64,7 @@ bool8 MetatileBehavior_IsUnableToEmerge(u8 metatileBehavior);
|
|||||||
bool8 MetatileBehavior_IsShallowFlowingWater(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsShallowFlowingWater(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsThinIce(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsThinIce(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsCrackedIce(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsCrackedIce(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsDeepSemiDeepOrSplashingWater(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsDeepWaterTerrain(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsSurfableAndNotWaterfall(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsSurfableAndNotWaterfall(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsEastBlocked(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsEastBlocked(u8 metatileBehavior);
|
||||||
bool8 MetatileBehavior_IsWestBlocked(u8 metatileBehavior);
|
bool8 MetatileBehavior_IsWestBlocked(u8 metatileBehavior);
|
||||||
|
|||||||
+1
-1
@@ -497,7 +497,7 @@ u8 BattleSetup_GetTerrainId(void)
|
|||||||
return BATTLE_TERRAIN_WATER;
|
return BATTLE_TERRAIN_WATER;
|
||||||
return BATTLE_TERRAIN_PLAIN;
|
return BATTLE_TERRAIN_PLAIN;
|
||||||
}
|
}
|
||||||
if (MetatileBehavior_IsDeepSemiDeepOrSplashingWater(tileBehavior))
|
if (MetatileBehavior_IsDeepWaterTerrain(tileBehavior))
|
||||||
return BATTLE_TERRAIN_WATER;
|
return BATTLE_TERRAIN_WATER;
|
||||||
if (MetatileBehavior_IsSurfable(tileBehavior))
|
if (MetatileBehavior_IsSurfable(tileBehavior))
|
||||||
return BATTLE_TERRAIN_POND;
|
return BATTLE_TERRAIN_POND;
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me
|
|||||||
|
|
||||||
static const u8 *GetInteractedWaterScript(struct MapPosition *unused1, u8 metatileBehavior, u8 direction)
|
static const u8 *GetInteractedWaterScript(struct MapPosition *unused1, u8 metatileBehavior, u8 direction)
|
||||||
{
|
{
|
||||||
if (MetatileBehavior_IsSemiDeepWater(metatileBehavior) == TRUE &&PartyHasMonWithSurf() == TRUE)
|
if (MetatileBehavior_IsFastWater(metatileBehavior) == TRUE && PartyHasMonWithSurf() == TRUE)
|
||||||
return EventScript_CurrentTooFast;
|
return EventScript_CurrentTooFast;
|
||||||
if (FlagGet(FLAG_BADGE05_GET) == TRUE && PartyHasMonWithSurf() == TRUE && IsPlayerFacingSurfableFishableWater() == TRUE)
|
if (FlagGet(FLAG_BADGE05_GET) == TRUE && PartyHasMonWithSurf() == TRUE && IsPlayerFacingSurfableFishableWater() == TRUE)
|
||||||
return EventScript_UseSurf;
|
return EventScript_UseSurf;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
static const bool8 sBehaviorSurfable[NUM_METATILE_BEHAVIORS] = {
|
static const bool8 sBehaviorSurfable[NUM_METATILE_BEHAVIORS] = {
|
||||||
[MB_POND_WATER] = TRUE,
|
[MB_POND_WATER] = TRUE,
|
||||||
[MB_SEMI_DEEP_WATER] = TRUE,
|
[MB_FAST_WATER] = TRUE,
|
||||||
[MB_DEEP_WATER] = TRUE,
|
[MB_DEEP_WATER] = TRUE,
|
||||||
[MB_WATERFALL] = TRUE,
|
[MB_WATERFALL] = TRUE,
|
||||||
[MB_OCEAN_WATER] = TRUE,
|
[MB_OCEAN_WATER] = TRUE,
|
||||||
@@ -209,9 +209,10 @@ bool8 MetatileBehavior_IsSurfable(u8 metatileBehavior)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MetatileBehavior_IsSemiDeepWater(u8 metatileBehavior)
|
// Water that's too fast to surf on
|
||||||
|
bool8 MetatileBehavior_IsFastWater(u8 metatileBehavior)
|
||||||
{
|
{
|
||||||
if (metatileBehavior == MB_SEMI_DEEP_WATER)
|
if (metatileBehavior == MB_FAST_WATER)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -476,7 +477,7 @@ bool8 MetatileBehavior_IsMountain(u8 metatileBehavior)
|
|||||||
|
|
||||||
bool8 MetatileBehavior_IsDiveable(u8 metatileBehavior)
|
bool8 MetatileBehavior_IsDiveable(u8 metatileBehavior)
|
||||||
{
|
{
|
||||||
if (metatileBehavior >= MB_SEMI_DEEP_WATER && metatileBehavior <= MB_DEEP_WATER)
|
if (metatileBehavior >= MB_FAST_WATER && metatileBehavior <= MB_DEEP_WATER)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -514,9 +515,9 @@ bool8 MetatileBehavior_IsCrackedIce(u8 metatileBehavior)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 MetatileBehavior_IsDeepSemiDeepOrSplashingWater(u8 metatileBehavior)
|
bool8 MetatileBehavior_IsDeepWaterTerrain(u8 metatileBehavior)
|
||||||
{
|
{
|
||||||
if ((metatileBehavior >= MB_SEMI_DEEP_WATER && metatileBehavior <= MB_DEEP_WATER)
|
if ((metatileBehavior >= MB_FAST_WATER && metatileBehavior <= MB_DEEP_WATER)
|
||||||
|| metatileBehavior == MB_OCEAN_WATER)
|
|| metatileBehavior == MB_OCEAN_WATER)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
|
|||||||
+2
-2
@@ -4063,7 +4063,7 @@ static bool8 SetUpFieldMove_Surf(void)
|
|||||||
s16 x, y;
|
s16 x, y;
|
||||||
|
|
||||||
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
||||||
if (MetatileBehavior_IsSemiDeepWater(MapGridGetMetatileBehaviorAt(x, y)) != TRUE
|
if (MetatileBehavior_IsFastWater(MapGridGetMetatileBehaviorAt(x, y)) != TRUE
|
||||||
&& PartyHasMonWithSurf() == TRUE
|
&& PartyHasMonWithSurf() == TRUE
|
||||||
&& IsPlayerFacingSurfableFishableWater() == TRUE)
|
&& IsPlayerFacingSurfableFishableWater() == TRUE)
|
||||||
{
|
{
|
||||||
@@ -4085,7 +4085,7 @@ static void DisplayCantUseSurfMessage(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
||||||
if (MetatileBehavior_IsSemiDeepWater(MapGridGetMetatileBehaviorAt(x, y)) == TRUE)
|
if (MetatileBehavior_IsFastWater(MapGridGetMetatileBehaviorAt(x, y)) == TRUE)
|
||||||
DisplayPartyMenuStdMessage(PARTY_MSG_CURRENT_TOO_FAST);
|
DisplayPartyMenuStdMessage(PARTY_MSG_CURRENT_TOO_FAST);
|
||||||
else if ((gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE17))
|
else if ((gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE17))
|
||||||
&& ((gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE17))
|
&& ((gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE17))
|
||||||
|
|||||||
Reference in New Issue
Block a user