diff options
author | SphericalIce <sphericalice@outlook.com> | 2021-01-19 23:35:57 +0000 |
---|---|---|
committer | SphericalIce <sphericalice@outlook.com> | 2021-01-19 23:35:57 +0000 |
commit | 2746fd1f95b13f6cade1a7499917cc377d7b93be (patch) | |
tree | ee8ea38487da2337fe5ef5411321df926aa4ae11 | |
parent | 6dd973012bce48295e14fcb1c203c4ca72a36cd4 (diff) |
Name object event ID arguments properly
-rw-r--r-- | include/event_object_movement.h | 10 | ||||
-rw-r--r-- | src/event_object_movement.c | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/event_object_movement.h b/include/event_object_movement.h index 919c75399..6abb4416f 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -422,10 +422,10 @@ u8 MovementType_RunInPlace_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step0(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step1(struct ObjectEvent *, struct Sprite *); u8 MovementType_Invisible_Step2(struct ObjectEvent *, struct Sprite *); -void SetObjectEventSpriteInvisibility(u8 var, bool32 var2); -bool32 IsObjectEventSpriteInvisible(u8 var); -void SetObjectEventSpriteGraphics(u8 var1, u8 graphicsId); -void SetObjectEventSpriteAnim(u8 var1, u8 var2); -bool32 IsObjectEventSpriteAnimating(u8 var); +void SetObjectEventSpriteInvisibility(u8 objectEventId, bool32 invisible); +bool32 IsObjectEventSpriteInvisible(u8 objectEventId); +void SetObjectEventSpriteGraphics(u8 objectEventId, u8 graphicsId); +void SetObjectEventSpriteAnim(u8 objectEventId, u8 animNum); +bool32 IsObjectEventSpriteAnimating(u8 objectEventId); #endif //GUARD_EVENT_OBJECT_MOVEMENT_H diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 2ea3275a0..afbeaa593 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -7947,12 +7947,12 @@ void GroundEffect_StepOnLongGrass(struct ObjectEvent *objEvent, struct Sprite *s void GroundEffect_WaterReflection(struct ObjectEvent *objEvent, struct Sprite *sprite) { - SetUpReflection(objEvent, sprite, 0); + SetUpReflection(objEvent, sprite, FALSE); } void GroundEffect_IceReflection(struct ObjectEvent *objEvent, struct Sprite *sprite) { - SetUpReflection(objEvent, sprite, 1); + SetUpReflection(objEvent, sprite, TRUE); } void GroundEffect_FlowingWater(struct ObjectEvent *objEvent, struct Sprite *sprite) @@ -8651,14 +8651,14 @@ static void DestroyObjectEventSprites(void) } } -static int GetObjectEventSpriteId(u8 var) // this should return a u8, because all that call this shifts to u8, but it wont match because it doesnt shift u8 at the end. +static int GetObjectEventSpriteId(u8 objectEventId) // this should return a u8, because all that call this shifts to u8, but it wont match because it doesnt shift u8 at the end. { int i; for (i = 0; i < MAX_SPRITES; i++) { struct Sprite *sprite = &gSprites[i]; - if(sprite->inUse && sprite->callback == UpdateObjectEventSprite && (u8)sprite->data[0] == var) + if (sprite->inUse && sprite->callback == UpdateObjectEventSprite && (u8)sprite->data[0] == objectEventId) return i; } return MAX_SPRITES; @@ -8790,9 +8790,9 @@ static void UpdateObjectEventSpritePosition(struct Sprite *sprite) } } -bool32 IsObjectEventSpriteAnimating(u8 var) +bool32 IsObjectEventSpriteAnimating(u8 objectEventId) { - u8 spriteId = GetObjectEventSpriteId(var); + u8 spriteId = GetObjectEventSpriteId(objectEventId); if (spriteId == MAX_SPRITES) return FALSE; |