spaces over tabs please don't eat my ass
This commit is contained in:
parent
fed7fc4f0a
commit
287f6baaa9
3 changed files with 65 additions and 65 deletions
|
@ -87,13 +87,13 @@
|
|||
#define DEOXYS_ROCK_COMPLETE 3
|
||||
|
||||
enum {
|
||||
OPEN_PARTY_SCREEN,
|
||||
NO_PARTY_SCREEN
|
||||
OPEN_PARTY_SCREEN,
|
||||
NO_PARTY_SCREEN
|
||||
};
|
||||
|
||||
enum {
|
||||
CURRENT_POSITION,
|
||||
TEMPLATE_POSITION
|
||||
CURRENT_POSITION,
|
||||
TEMPLATE_POSITION
|
||||
};
|
||||
|
||||
#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H
|
||||
|
|
|
@ -9494,30 +9494,30 @@ static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent *objEvent, st
|
|||
|
||||
static void DoTracksGroundEffect_SlitherTracks(struct ObjectEvent *objEvent, struct Sprite *sprite, u8 a)
|
||||
{
|
||||
// Specifies which bike track shape to show next.
|
||||
// For example, when the bike turns from up to right, it will show
|
||||
// a track that curves to the right.
|
||||
// Each 4-byte row corresponds to the initial direction of the bike, and
|
||||
// each byte in that row is for the next direction of the bike in the order
|
||||
// of down, up, left, right.
|
||||
static const u8 slitherTracks_Transitions[4][4] = {
|
||||
{1, 2, 7, 8},
|
||||
{1, 2, 6, 5},
|
||||
{5, 8, 3, 4},
|
||||
{6, 7, 3, 4},
|
||||
};
|
||||
// Specifies which bike track shape to show next.
|
||||
// For example, when the bike turns from up to right, it will show
|
||||
// a track that curves to the right.
|
||||
// Each 4-byte row corresponds to the initial direction of the bike, and
|
||||
// each byte in that row is for the next direction of the bike in the order
|
||||
// of down, up, left, right.
|
||||
static const u8 slitherTracks_Transitions[4][4] = {
|
||||
{1, 2, 7, 8},
|
||||
{1, 2, 6, 5},
|
||||
{5, 8, 3, 4},
|
||||
{6, 7, 3, 4},
|
||||
};
|
||||
|
||||
if (objEvent->currentCoords.x != objEvent->previousCoords.x || objEvent->currentCoords.y != objEvent->previousCoords.y)
|
||||
{
|
||||
gFieldEffectArguments[0] = objEvent->previousCoords.x;
|
||||
gFieldEffectArguments[1] = objEvent->previousCoords.y;
|
||||
gFieldEffectArguments[2] = 149;
|
||||
gFieldEffectArguments[3] = 2;
|
||||
gFieldEffectArguments[4] =
|
||||
slitherTracks_Transitions[objEvent->previousMovementDirection][objEvent->facingDirection - 5];
|
||||
if (objEvent->currentCoords.x != objEvent->previousCoords.x || objEvent->currentCoords.y != objEvent->previousCoords.y)
|
||||
{
|
||||
gFieldEffectArguments[0] = objEvent->previousCoords.x;
|
||||
gFieldEffectArguments[1] = objEvent->previousCoords.y;
|
||||
gFieldEffectArguments[2] = 149;
|
||||
gFieldEffectArguments[3] = 2;
|
||||
gFieldEffectArguments[4] =
|
||||
slitherTracks_Transitions[objEvent->previousMovementDirection][objEvent->facingDirection - 5];
|
||||
gFieldEffectArguments[5] = objEvent->previousMetatileBehavior;
|
||||
FieldEffectStart(FLDEFF_TRACKS_SLITHER);
|
||||
}
|
||||
FieldEffectStart(FLDEFF_TRACKS_SLITHER);
|
||||
}
|
||||
}
|
||||
|
||||
void GroundEffect_Ripple(struct ObjectEvent *objEvent, struct Sprite *sprite)
|
||||
|
|
|
@ -4270,58 +4270,58 @@ void PreparePartyForSkyBattle(void)
|
|||
|
||||
void GetObjectPosition(void)
|
||||
{
|
||||
u32 localId = gSpecialVar_0x8000;
|
||||
u32 useTemplate = gSpecialVar_0x8001;
|
||||
u32 objectId;
|
||||
struct ObjectEvent* objEvent;
|
||||
u32 localId = gSpecialVar_0x8000;
|
||||
u32 useTemplate = gSpecialVar_0x8001;
|
||||
u32 objectId;
|
||||
struct ObjectEvent* objEvent;
|
||||
|
||||
u16 *x = &gSpecialVar_0x8007;
|
||||
u16 *y = &gSpecialVar_0x8008;
|
||||
u16 *x = &gSpecialVar_0x8007;
|
||||
u16 *y = &gSpecialVar_0x8008;
|
||||
|
||||
if (useTemplate)
|
||||
{
|
||||
const struct ObjectEventTemplate *objTemplate = FindObjectEventTemplateByLocalId(localId, gSaveBlock1Ptr->objectEventTemplates, gMapHeader.events->objectEventCount);
|
||||
*x = objTemplate->x;
|
||||
*y = objTemplate->y;
|
||||
return;
|
||||
}
|
||||
if (useTemplate)
|
||||
{
|
||||
const struct ObjectEventTemplate *objTemplate = FindObjectEventTemplateByLocalId(localId, gSaveBlock1Ptr->objectEventTemplates, gMapHeader.events->objectEventCount);
|
||||
*x = objTemplate->x;
|
||||
*y = objTemplate->y;
|
||||
return;
|
||||
}
|
||||
|
||||
objectId = GetObjectEventIdByLocalId(localId);
|
||||
objEvent = &gObjectEvents[objectId];
|
||||
*x = objEvent->currentCoords.x - 7;
|
||||
*y = objEvent->currentCoords.y - 7;
|
||||
objectId = GetObjectEventIdByLocalId(localId);
|
||||
objEvent = &gObjectEvents[objectId];
|
||||
*x = objEvent->currentCoords.x - 7;
|
||||
*y = objEvent->currentCoords.y - 7;
|
||||
}
|
||||
|
||||
bool32 CheckObjectAtXY(void)
|
||||
{
|
||||
u32 x = gSpecialVar_0x8005 + 7;
|
||||
u32 y = gSpecialVar_0x8006 + 7;
|
||||
u32 i;
|
||||
u32 x = gSpecialVar_0x8005 + 7;
|
||||
u32 y = gSpecialVar_0x8006 + 7;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < OBJECT_EVENTS_COUNT; i++)
|
||||
{
|
||||
if (!gObjectEvents[i].active)
|
||||
continue;
|
||||
for (i = 0; i < OBJECT_EVENTS_COUNT; i++)
|
||||
{
|
||||
if (!gObjectEvents[i].active)
|
||||
continue;
|
||||
|
||||
if (gObjectEvents[i].currentCoords.x != x)
|
||||
continue;
|
||||
if (gObjectEvents[i].currentCoords.x != x)
|
||||
continue;
|
||||
|
||||
if (gObjectEvents[i].currentCoords.y != y)
|
||||
continue;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (gObjectEvents[i].currentCoords.y != y)
|
||||
continue;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 Script_GetSetPokedexFlag(void)
|
||||
{
|
||||
u32 speciesId = SpeciesToNationalPokedexNum(gSpecialVar_0x8005);
|
||||
bool32 desiredFlag = gSpecialVar_0x8006;
|
||||
u32 speciesId = SpeciesToNationalPokedexNum(gSpecialVar_0x8005);
|
||||
bool32 desiredFlag = gSpecialVar_0x8006;
|
||||
|
||||
if (desiredFlag == FLAG_SET_CAUGHT)
|
||||
GetSetPokedexFlag(speciesId,FLAG_SET_SEEN);
|
||||
if (desiredFlag == FLAG_SET_CAUGHT)
|
||||
GetSetPokedexFlag(speciesId,FLAG_SET_SEEN);
|
||||
|
||||
return GetSetPokedexFlag(speciesId,desiredFlag);
|
||||
return GetSetPokedexFlag(speciesId,desiredFlag);
|
||||
}
|
||||
|
||||
void SetMonBall(void)
|
||||
|
@ -4332,9 +4332,9 @@ void SetMonBall(void)
|
|||
|
||||
bool32 CheckPartyHasSpecie(void)
|
||||
{
|
||||
u32 partyIndex;
|
||||
u32 partyIndex;
|
||||
|
||||
for (partyIndex = 0; partyIndex < CalculatePlayerPartyCount(); partyIndex++)
|
||||
for (partyIndex = 0; partyIndex < CalculatePlayerPartyCount(); partyIndex++)
|
||||
if (GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES) == gSpecialVar_0x8005)
|
||||
return TRUE;
|
||||
|
||||
|
@ -4343,6 +4343,6 @@ bool32 CheckPartyHasSpecie(void)
|
|||
|
||||
bool32 CheckChosenMonMatchDesiredSpecie(void)
|
||||
{
|
||||
return (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES) == gSpecialVar_0x8005);
|
||||
return (GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES) == gSpecialVar_0x8005);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue