Cleanup of projectile and projectile utils

This commit is contained in:
YohannDR 2024-08-29 17:52:36 +02:00
parent cd12fd2230
commit 9acfd9703f
61 changed files with 3403 additions and 3087 deletions

View File

@ -80,9 +80,9 @@ Note :
| SPRITE_STATUS_ROTATION_SCALING | 1 << 3 | Enables affine transformation when drawing the sprite.
| SPRITE_STATUS_UNKNOWN_10 | 1 << 4 | Unknown purpose, related to draw order.
| SPRITE_STATUS_MOSAIC | 1 << 5 | Whether mosaic is enabled, left over from fusion, doesn't seem to work properly.
| SPRITE_STATUS_XFLIP | 1 << 6 | Whether the sprite is X-flipped when drawn.
| SPRITE_STATUS_X_FLIP | 1 << 6 | Whether the sprite is X-flipped when drawn.
| SPRITE_STATUS_UNKNOWN_80 | 1 << 7 | Unknown purpose, related to obj affine.
| SPRITE_STATUS_YFLIP | 1 << 8 | Whether the sprite is Y-flipped when drawn.
| SPRITE_STATUS_Y_FLIP | 1 << 8 | Whether the sprite is Y-flipped when drawn.
| SPRITE_STATUS_FACING_RIGHT | 1 << 9 | Whether the sprite is facing right, purely informative and only used in the engine in the movement functions.
| SPRITE_STATUS_FACING_DOWN | 1 << 10 | Whether the sprite is facing down, purely informative and only used in the engine in the movement functions.
| SPRITE_STATUS_SAMUS_COLLIDING | 1 << 11 | Whether the sprite is colliding with Samus, only used on some [sprite/samus collision](#samus-collision).

View File

@ -120,11 +120,57 @@
#define SOUND_SUITLESS_GRABBING_LEDGE 0x9C
#define SOUND_SUITLESS_JUMP 0x9D
#define SOUND_SUITLESS_CRAWL 0x9E
#define SOUND_PISTOL_SHOT 0x9F
#define SOUND_CHARGED_PISTOL_SHOT 0xA0
#define SOUND_SUITLESS_FOOTSTEPS_WET_GROUND_1 0xA1
#define SOUND_SUITLESS_FOOTSTEPS_WET_GROUND_2 0xA2
#define SOUND_SUITLESS_LANDING_ON_WET_GROUND 0xA3
#define SOUND_BEAM_SHOT 0xC8
#define SOUND_BEAM_LONG_SHOT 0xC9
#define SOUND_BEAM_ICE_SHOT 0xCA
#define SOUND_BEAM_LONG_ICE_SHOT 0xCB
#define SOUND_BEAM_WAVE_SHOT 0xCC
#define SOUND_BEAM_WAVE_LONG_SHOT 0xCD
#define SOUND_BEAM_WAVE_ICE_SHOT 0xCE
#define SOUND_BEAM_WAVE_LONG_ICE_SHOT 0xCF
#define SOUND_BEAM_PLASMA_SHOT 0xD0
#define SOUND_BEAM_PLASMA_LONG_SHOT 0xD1
#define SOUND_BEAM_PLASMA_ICE_SHOT 0xD2
#define SOUND_BEAM_PLASMA_LONG_ICE_SHOT 0xD3
#define SOUND_BEAM_PLASMA_WAVE_SHOT 0xD4
#define SOUND_BEAM_PLASMA_WAVE_LONG_SHOT 0xD5
#define SOUND_BEAM_PLASMA_WAVE_ICE_SHOT 0xD6
#define SOUND_BEAM_PLASMA_WAVE_LONG_ICE_SHOT 0xD7
#define SOUND_CHARGED_BEAM_SHOT 0xE8
#define SOUND_CHARGED_BEAM_LONG_SHOT 0xE9
#define SOUND_CHARGED_BEAM_ICE_SHOT 0xEA
#define SOUND_CHARGED_BEAM_LONG_ICE_SHOT 0xEB
#define SOUND_CHARGED_BEAM_WAVE_SHOT 0xEC
#define SOUND_CHARGED_BEAM_WAVE_LONG_SHOT 0xED
#define SOUND_CHARGED_BEAM_WAVE_ICE_SHOT 0xEE
#define SOUND_CHARGED_BEAM_WAVE_LONG_ICE_SHOT 0xEF
#define SOUND_CHARGED_BEAM_PLASMA_SHOT 0xF0
#define SOUND_CHARGED_BEAM_PLASMA_LONG_SHOT 0xF1
#define SOUND_CHARGED_BEAM_PLASMA_ICE_SHOT 0xF2
#define SOUND_CHARGED_BEAM_PLASMA_LONG_ICE_SHOT 0xF3
#define SOUND_CHARGED_BEAM_PLASMA_WAVE_SHOT 0xF4
#define SOUND_CHARGED_BEAM_PLASMA_WAVE_LONG_SHOT 0xF5
#define SOUND_CHARGED_BEAM_PLASMA_WAVE_ICE_SHOT 0xF6
#define SOUND_CHARGED_BEAM_PLASMA_WAVE_LONG_ICE_SHOT 0xF7
#define SOUND_MISSILE_SHOT 0xF8
#define SOUND_MISSILE_THRUST 0xF9
#define SOUND_SUPER_MISSILE_SHOT 0xFB
#define SOUND_SUPER_MISSILE_THRUST 0xFC
#define SOUND_BOMB_SET 0xFE
#define SOUND_BOMB_EXPLOSION 0xFF
#define SOUND_POWER_BOMB_SET 0x100
#define SOUND_POWER_BOMB_EXPLOSION 0x101
#define SOUND_ELEVATOR 0x10E
#define SOUND_CHOZO_STATUE_REFILL 0x10F
@ -139,6 +185,7 @@
#define SOUND_SHINESPARK_DESTROYED 0x131
#define SOUND_SUDO_SCREW_DESTROYED 0x132
#define SOUND_SPEEDBOOSTER_DESTROYED 0x133
#define SOUND_FREEZING_SPRITE 0x140
#define SOUND_RIPPER_DAMAGED 0x149

View File

@ -1,71 +1,80 @@
#define PE_SPRITE_SPLASH_WATER_SMALL 0x0
#define PE_SPRITE_SPLASH_WATER_BIG 0x1
#define PE_SPRITE_SPLASH_WATER_HUGE 0x2
#define PE_SPRITE_SPLASH_LAVA_SMALL 0x3
#define PE_SPRITE_SPLASH_LAVA_BIG 0x4
#define PE_SPRITE_SPLASH_LAVA_HUGE 0x5
#define PE_SPRITE_SPLASH_ACID_SMALL 0x6
#define PE_SPRITE_SPLASH_ACID_BIG 0x7
#define PE_SPRITE_SPLASH_ACID_HUGE 0x8
#define PE_SHOOTING_BEAM_LEFT 0x9
#define PE_SHOOTING_BEAM_DIAG_UP_LEFT 0xA
#define PE_SHOOTING_BEAM_DIAG_DOWN_LEFT 0xB
#define PE_SHOOTING_BEAM_UP_LEFT 0xC
#define PE_SHOOTING_BEAM_DOWN_LEFT 0xD
#define PE_SHOOTING_BEAM_RIGHT 0xE
#define PE_SHOOTING_BEAM_DIAG_UP_RIGHT 0xF
#define PE_SHOOTING_BEAM_DIAG_DOWN_RIGHT 0x10
#define PE_SHOOTING_BEAM_UP_RIGHT 0x11
#define PE_SHOOTING_BEAM_DOWN_RIGHT 0x12
#define PE_BOMB 0x13
#define PE_MISSILE_TRAIL 0x14
#define PE_SUPER_MISSILE_TRAIL 0x15
#define PE_BEAM_TRAILING_RIGHT 0x16
#define PE_BEAM_TRAILING_LEFT 0x17
#define PE_CHARGED_LONG_BEAM_TRAIL 0x18
#define PE_CHARGED_ICE_BEAM_TRAIL 0x19
#define PE_CHARGED_WAVE_BEAM_TRAIL 0x1A
#define PE_CHARGED_PLASMA_BEAM_TRAIL 0x1B
#define PE_CHARGED_FULL_BEAM_TRAIL 0x1C
#define PE_CHARGED_PISTOL_TRAIL 0x1D
#define PE_SPRITE_EXPLOSION_HUGE 0x1E
#define PE_SPRITE_EXPLOSION_SMALL 0x1F
#define PE_SPRITE_EXPLOSION_MEDIUM 0x20
#define PE_SPRITE_EXPLOSION_BIG 0x21
#define PE_SPRITE_EXPLOSION_SINGLE_THEN_BIG 0x22
#define PE_SCREW_ATTACK_DESTROYED 0x23
#define PE_SHINESPARK_DESTROYED 0x24
#define PE_SUDO_SCREW_DESTROYED 0x25
#define PE_SPEEDBOOSTER_DESTROYED 0x26
#define PE_MAIN_BOSS_DEATH 0x27
#define PE_FREEZING_SPRITE_WITH_ICE 0x28
#define PE_FREEZING_SPRITE_WITH_CHARGED_ICE 0x29
#define PE_HITTING_SOMETHING_WITH_NORMAL_BEAM 0x2A
#define PE_HITTING_SOMETHING_WITH_LONG_BEAM 0x2B
#define PE_HITTING_SOMETHING_WITH_ICE_BEAM 0x2C
#define PE_HITTING_SOMETHING_WITH_WAVE_BEAM 0x2D
#define PE_HITTING_SOMETHING_WITH_PLASMA_BEAM 0x2E
#define PE_HITTING_SOMETHING_INVINCIBLE 0x2F
#define PE_HITTING_SOMETHING_WITH_MISSILE 0x30
#define PE_HITTING_SOMETHING_WITH_SUPER_MISSILE 0x31
#define PE_HITTING_SOMETHING_WITH_FULL_BEAM_NO_PLASMA 0x32
#define PE_HITTING_SOMETHING_WITH_FULL_BEAM 0x33
#define PE_SMALL_DUST 0x34
#define PE_MEDIUM_DUST 0x35
#define PE_TWO_MEDIUM_DUST 0x36
#define PE_SECOND_SMALL_DUST 0x37
#define PE_SECOND_MEDIUM_DUST 0x38
#define PE_SECOND_TWO_MEDIUM_DUST 0x39
#define PE_SAMUS_REFLECTION 0x3A
#define PE_CHARGING_BEAM 0x3B
#define PE_ESCAPE 0x3C
#ifndef PARTICLE_CONSTANTS_H
#define PARTICLE_CONSTANTS_H
#define PARTICLE_STATUS_NONE 0x0
#define PARTICLE_STATUS_EXISTS 0x1
#define PARTICLE_STATUS_ONSCREEN 0x2
#define PARTICLE_STATUS_EXPLOSION 0x4
#define PARTICLE_STATUS_NOT_DRAWN 0x8
#define PARTICLE_STATUS_LIVE_OFF_SCREEN 0x10
#define PARTICLE_STATUS_LOW_PRIORITY 0x20
#define PARTICLE_STATUS_ABSOLUTE_POSITION 0x40
#define PARTICLE_STATUS_XFLIP 0x80
enum ParticleEffectId {
PE_SPRITE_SPLASH_WATER_SMALL,
PE_SPRITE_SPLASH_WATER_BIG,
PE_SPRITE_SPLASH_WATER_HUGE,
PE_SPRITE_SPLASH_LAVA_SMALL,
PE_SPRITE_SPLASH_LAVA_BIG,
PE_SPRITE_SPLASH_LAVA_HUGE,
PE_SPRITE_SPLASH_ACID_SMALL,
PE_SPRITE_SPLASH_ACID_BIG,
PE_SPRITE_SPLASH_ACID_HUGE,
PE_SHOOTING_BEAM_LEFT,
PE_SHOOTING_BEAM_DIAG_UP_LEFT,
PE_SHOOTING_BEAM_DIAG_DOWN_LEFT,
PE_SHOOTING_BEAM_UP_LEFT,
PE_SHOOTING_BEAM_DOWN_LEFT,
PE_SHOOTING_BEAM_RIGHT,
PE_SHOOTING_BEAM_DIAG_UP_RIGHT,
PE_SHOOTING_BEAM_DIAG_DOWN_RIGHT,
PE_SHOOTING_BEAM_UP_RIGHT,
PE_SHOOTING_BEAM_DOWN_RIGHT,
PE_BOMB,
PE_MISSILE_TRAIL,
PE_SUPER_MISSILE_TRAIL,
PE_BEAM_TRAILING_RIGHT,
PE_BEAM_TRAILING_LEFT,
PE_CHARGED_LONG_BEAM_TRAIL,
PE_CHARGED_ICE_BEAM_TRAIL,
PE_CHARGED_WAVE_BEAM_TRAIL,
PE_CHARGED_PLASMA_BEAM_TRAIL,
PE_CHARGED_FULL_BEAM_TRAIL,
PE_CHARGED_PISTOL_TRAIL,
PE_SPRITE_EXPLOSION_HUGE,
PE_SPRITE_EXPLOSION_SMALL,
PE_SPRITE_EXPLOSION_MEDIUM,
PE_SPRITE_EXPLOSION_BIG,
PE_SPRITE_EXPLOSION_SINGLE_THEN_BIG,
PE_SCREW_ATTACK_DESTROYED,
PE_SHINESPARK_DESTROYED,
PE_SUDO_SCREW_DESTROYED,
PE_SPEEDBOOSTER_DESTROYED,
PE_MAIN_BOSS_DEATH,
PE_FREEZING_SPRITE_WITH_ICE,
PE_FREEZING_SPRITE_WITH_CHARGED_ICE,
PE_HITTING_SOMETHING_WITH_NORMAL_BEAM,
PE_HITTING_SOMETHING_WITH_LONG_BEAM,
PE_HITTING_SOMETHING_WITH_ICE_BEAM,
PE_HITTING_SOMETHING_WITH_WAVE_BEAM,
PE_HITTING_SOMETHING_WITH_PLASMA_BEAM,
PE_HITTING_SOMETHING_INVINCIBLE,
PE_HITTING_SOMETHING_WITH_MISSILE,
PE_HITTING_SOMETHING_WITH_SUPER_MISSILE,
PE_HITTING_SOMETHING_WITH_FULL_BEAM_NO_PLASMA,
PE_HITTING_SOMETHING_WITH_FULL_BEAM,
PE_SMALL_DUST,
PE_MEDIUM_DUST,
PE_TWO_MEDIUM_DUST,
PE_SECOND_SMALL_DUST,
PE_SECOND_MEDIUM_DUST,
PE_SECOND_TWO_MEDIUM_DUST,
PE_SAMUS_REFLECTION,
PE_CHARGING_BEAM,
PE_ESCAPE,
PE_END
};
#define PARTICLE_STATUS_NONE 0
#define PARTICLE_STATUS_EXISTS (1 << 0)
#define PARTICLE_STATUS_ONSCREEN (1 << 1)
#define PARTICLE_STATUS_EXPLOSION (1 << 2)
#define PARTICLE_STATUS_NOT_DRAWN (1 << 3)
#define PARTICLE_STATUS_LIVE_OFF_SCREEN (1 << 4)
#define PARTICLE_STATUS_LOW_PRIORITY (1 << 5)
#define PARTICLE_STATUS_ABSOLUTE_POSITION (1 << 6)
#define PARTICLE_STATUS_X_FLIP (1 << 7)
#endif /* PARTICLE_CONSTANTS_H */

View File

@ -1,37 +1,48 @@
#define PROJECTILE_CATEGORY_NONE 0x0
#define PROJECTILE_CATEGORY_BEAM 0x1
#define PROJECTILE_CATEGORY_MISSILE 0x2
#define PROJECTILE_CATEGORY_SUPER_MISSILE 0x3
#define PROJECTILE_CATEGORY_BOMB 0x4
#define PROJECTILE_CATEGORY_POWER_BOMB 0x5
#define PROJECTILE_CATEGORY_CHARGED_BEAM 0x6
#ifndef PROJECTILE_CONSTANTS_H
#define PROJECTILE_CONSTANTS_H
#define PROJ_STATUS_NONE 0x0
#define PROJ_STATUS_EXISTS 0x1
#define PROJ_STATUS_ON_SCREEN 0x2
#define PROJ_STATUS_NOT_DRAWN 0x4
#define PROJ_STATUS_HIGH_PRIORITY 0x8
#define PROJ_STATUS_CAN_AFFECT_ENVIRONMENT 0x10
#define PROJ_STATUS_YFLIP 0x20
#define PROJ_STATUS_XFLIP 0x40
#define PROJ_STATUS_UNKNOWN 0x80
#define PROJ_STATUS_NONE 0
#define PROJ_STATUS_EXISTS (1 << 0)
#define PROJ_STATUS_ON_SCREEN (1 << 1)
#define PROJ_STATUS_NOT_DRAWN (1 << 2)
#define PROJ_STATUS_HIGH_PRIORITY (1 << 3)
#define PROJ_STATUS_CAN_AFFECT_ENVIRONMENT (1 << 4)
#define PROJ_STATUS_Y_FLIP (1 << 5)
#define PROJ_STATUS_X_FLIP (1 << 6)
#define PROJ_STATUS_UNKNOWN_80 (1 << 7)
#define PROJ_TYPE_BEAM 0x0
#define PROJ_TYPE_LONG_BEAM 0x1
#define PROJ_TYPE_ICE_BEAM 0x2
#define PROJ_TYPE_WAVE_BEAM 0x3
#define PROJ_TYPE_PLASMA_BEAM 0x4
#define PROJ_TYPE_PISTOL 0x5
#define PROJ_TYPE_CHARGED_BEAM 0x6
#define PROJ_TYPE_CHARGED_LONG_BEAM 0x7
#define PROJ_TYPE_CHARGED_ICE_BEAM 0x8
#define PROJ_TYPE_CHARGED_WAVE_BEAM 0x9
#define PROJ_TYPE_CHARGED_PLASMA_BEAM 0xA
#define PROJ_TYPE_CHARGED_PISTOL 0xB
#define PROJ_TYPE_MISSILE 0xC
#define PROJ_TYPE_SUPER_MISSILE 0xD
#define PROJ_TYPE_BOMB 0xE
#define PROJ_TYPE_POWER_BOMB 0xF
enum ProjectileCategory {
PROJECTILE_CATEGORY_NONE,
PROJECTILE_CATEGORY_BEAM,
PROJECTILE_CATEGORY_MISSILE,
PROJECTILE_CATEGORY_SUPER_MISSILE,
PROJECTILE_CATEGORY_BOMB,
PROJECTILE_CATEGORY_POWER_BOMB,
PROJECTILE_CATEGORY_CHARGED_BEAM,
PROJECTILE_CATEGORY_END,
};
enum ProjectileType {
PROJ_TYPE_BEAM,
PROJ_TYPE_LONG_BEAM,
PROJ_TYPE_ICE_BEAM,
PROJ_TYPE_WAVE_BEAM,
PROJ_TYPE_PLASMA_BEAM,
PROJ_TYPE_PISTOL,
PROJ_TYPE_CHARGED_BEAM,
PROJ_TYPE_CHARGED_LONG_BEAM,
PROJ_TYPE_CHARGED_ICE_BEAM,
PROJ_TYPE_CHARGED_WAVE_BEAM,
PROJ_TYPE_CHARGED_PLASMA_BEAM,
PROJ_TYPE_CHARGED_PISTOL,
PROJ_TYPE_MISSILE,
PROJ_TYPE_SUPER_MISSILE,
PROJ_TYPE_BOMB,
PROJ_TYPE_POWER_BOMB,
PROJ_TYPE_END
};
// Normal beam
@ -101,19 +112,34 @@
#define BOMB_DAMAGE 8
#define BOMB_STAGE_INIT 0x0
#define BOMB_STAGE_FIRST_SPIN 0x1
#define BOMB_STAGE_FAST_SPIN 0x2
#define BOMB_STAGE_EXPLODING 0x3
#define BOMB_STAGE_PLACED_ON_LAUNCHER 0x4
#define BOMB_STAGE_FIRST_SPIN_ON_LAUNCHER 0x5
#define BOMB_STAGE_FAST_SPIN_ON_LAUNCHER 0x6
#define BOMB_STAGE_EXPLODING_ON_LAUNCHER 0x7
enum ProjectileBombStage {
BOMB_STAGE_INIT,
BOMB_STAGE_FIRST_SPIN,
BOMB_STAGE_FAST_SPIN,
BOMB_STAGE_EXPLODING,
BOMB_STAGE_PLACED_ON_LAUNCHER,
BOMB_STAGE_FIRST_SPIN_ON_LAUNCHER,
BOMB_STAGE_FAST_SPIN_ON_LAUNCHER,
BOMB_STAGE_EXPLODING_ON_LAUNCHER,
BOMB_STAGE_END
};
#define BOMB_EXPLOSION_TIMER (CONVERT_SECONDS(.25f + 1.f / 60))
// Power bomb
#define POWER_BOMB_DAMAGE 50
enum ProjectilePowerBombStage {
POWER_BOMB_STAGE_INIT,
POWER_BOMB_STAGE_FIRST_SPIN,
POWER_BOMB_STAGE_FAST_SPIN,
POWER_BOMB_STAGE_END
};
// Charge beam thresholds
#define CHARGE_BEAM_START_THRESHOLD 16
#define CHARGE_BEAM_UNCHARGED_THRESHOLD 25
@ -122,3 +148,38 @@
#define CHARGE_PISTOL_THRESHOLD 112
#define CHARGE_PISTOL_MAX_THRESHOLD (CHARGE_PISTOL_THRESHOLD + 15)
// Projectiles limit
#define PROJ_LIMIT_BEAM 6
#define PROJ_LIMIT_CHARGED_BEAM 2
#define PROJ_LIMIT_PISTOL 6
#define PROJ_LIMIT_CHARGED_PISTOL 2
#define PROJ_LIMIT_MISSILE 4
#define PROJ_LIMIT_SUPER_MISSILE 4
#define PROJ_LIMIT_BOMB 4
#define PROJ_LIMIT_POWER_BOMB 1
#define PROJ_SHORT_BEAM_LIFETIME (CONVERT_SECONDS(.2f))
enum ProjectileStage {
PROJECTILE_STAGE_INIT,
PROJECTILE_STAGE_SPAWNING,
PROJECTILE_STAGE_MOVING,
PROJECTILE_STAGE_TUMBLING = 7
};
#define WAVE_BEAM_HITBOX_TOP (BLOCK_SIZE)
#define WAVE_BEAM_HITBOX_BOTTOM (BLOCK_SIZE)
#define WAVE_BEAM_HITBOX_LEFT (QUARTER_BLOCK_SIZE + PIXEL_SIZE)
#define WAVE_BEAM_HITBOX_RIGHT (QUARTER_BLOCK_SIZE + PIXEL_SIZE)
#define CHARGED_WAVE_BEAM_HITBOX_TOP (BLOCK_SIZE + EIGHTH_BLOCK_SIZE)
#define CHARGED_WAVE_BEAM_HITBOX_BOTTOM (BLOCK_SIZE + EIGHTH_BLOCK_SIZE)
#define CHARGED_WAVE_BEAM_HITBOX_LEFT (QUARTER_BLOCK_SIZE + PIXEL_SIZE)
#define CHARGED_WAVE_BEAM_HITBOX_RIGHT (QUARTER_BLOCK_SIZE + PIXEL_SIZE)
#endif /* PROJECTILE_CONSTANTS_H */

View File

@ -7,9 +7,9 @@
#define SPRITE_STATUS_ROTATION_SCALING (1 << 3)
#define SPRITE_STATUS_UNKNOWN_10 (1 << 4)
#define SPRITE_STATUS_MOSAIC (1 << 5)
#define SPRITE_STATUS_XFLIP (1 << 6)
#define SPRITE_STATUS_X_FLIP (1 << 6)
#define SPRITE_STATUS_UNKNOWN_80 (1 << 7)
#define SPRITE_STATUS_YFLIP (1 << 8)
#define SPRITE_STATUS_Y_FLIP (1 << 8)
#define SPRITE_STATUS_FACING_RIGHT (1 << 9)
#define SPRITE_STATUS_FACING_DOWN (1 << 10)
#define SPRITE_STATUS_SAMUS_COLLIDING (1 << 11)
@ -393,4 +393,20 @@ enum SamusStandingOnSpriteStatus {
// Represents a 100% drop change for a sprite
#define SPRITE_DROP_MAX_PROB (1024)
#define SPRITE_ISFT_POWER_BOMB_STUNNED (1 << 7)
#define SPRITE_GET_ISFT(sprite) ((sprite).invincibilityStunFlashTimer & 0x7F)
#define SPRITE_CLEAR_ISFT(sprite) ((sprite).invincibilityStunFlashTimer &= 0x80)
#define SPRITE_SET_ISFT(sprite, value) ((sprite).invincibilityStunFlashTimer |= (value))
#define SPRITE_CLEAR_AND_SET_ISFT(sprite, value)\
{ \
SPRITE_CLEAR_ISFT(sprite); \
SPRITE_SET_ISFT(sprite, value); \
}
#define SPRITE_FREEZE_PALETTE_OFFSET 0
#define SPRITE_STUN_PALETTE_OFFSET 1
#define SPRITE_FREEZE_TIMER (CONVERT_SECONDS(4.f))
#endif /* SPRITE_CONSTANTS_H */

View File

@ -6,6 +6,8 @@
#include "data/demo_data.h"
#include "constants/connection.h"
#include "constants/particle.h"
#include "constants/projectile.h"
#include "structs/connection.h"
#include "structs/projectile.h"
@ -13,9 +15,9 @@
#include "structs/color_effects.h"
#include "structs/block.h"
extern const ProjFunc_T sProcessProjectileFunctionPointers[16];
extern const ProjFunc_T sProcessProjectileFunctionPointers[PROJ_TYPE_END];
extern const ParticleFunc_T sProcessParticleFunctionPointers[61];
extern const ParticleFunc_T sProcessParticleFunctionPointers[PE_END];
extern const struct Door* const sAreaDoorsPointers[MAX_AMOUNT_OF_AREAS - 1];

View File

@ -4,247 +4,81 @@
#include "types.h"
#include "oam.h"
// 326ca8
extern const s16 sTumblingMissileSpeed[16];
extern const u8 sProjectile_Array326cc8_Unused[64];
extern const u16 sBombOAM_Frame0[4];
extern const struct FrameData sBombOam_Slow[5];
extern const u16 sBombOAM_Frame1[4];
extern const struct FrameData sBombOam_Fast[5];
extern const u16 sBombOAM_Frame2[4];
extern const struct FrameData sPowerBombOam_Slow[4];
extern const u16 sBombOAM_Frame3[4];
extern const struct FrameData sPowerBombOam_Fast[4];
extern const u16 sPowerBombOAM_Frame0[4];
extern const struct FrameData sMissileOam_Horizontal[3];
extern const u16 sPowerBombOAM_Frame1[4];
extern const struct FrameData sMissileOam_Diagonal[3];
extern const u16 sPowerBombOAM_Frame2[4];
extern const struct FrameData sMissileOam_Vertical[3];
extern const struct FrameData sBombOAM_Slow[5];
extern const struct FrameData sSuperMissileOam_Horizontal[3];
extern const struct FrameData sBombOAM_Fast[5];
extern const struct FrameData sSuperMissileOam_Diagonal[3];
extern const struct FrameData sPowerBombOAM_Slow[4];
extern const struct FrameData sSuperMissileOam_Vertical[3];
extern const struct FrameData sPowerBombOAM_Fast[4];
extern const struct FrameData sMissileOam_Tumbling[9];
extern const u16 sMissileOAM_Horizontal_Frame0[7];
extern const u16 sMissileOAM_Horizontal_Frame1[7];
extern const u16 sMissileOAM_Diagonal_Frame0[7];
extern const u16 sMissileOAM_Diagonal_Frame1[7];
extern const u16 sMissileOAM_Vertical_Frame0[7];
extern const u16 sMissileOAM_Vertical_Frame1[7];
extern const u16 sSuperMissileOAM_Horizontal_Frame0[7];
extern const u16 sSuperMissileOAM_Horizontal_Frame1[7];
extern const u16 sSuperMissileOAM_Diagonal_Frame0[7];
extern const u16 sSuperMissileOAM_Diagonal_Frame1[7];
extern const u16 sSuperMissileOAM_Vertical_Frame0[7];
extern const u16 sSuperMissileOAM_Vertical_Frame1[7];
extern const u16 sMissileOAM_Tumbling_Frame0[4];
extern const u16 sMissileOAM_Tumbling_Frame1[4];
extern const u16 sMissileOAM_Tumbling_Frame2[4];
extern const u16 sMissileOAM_Tumbling_Frame3[4];
extern const u16 sMissileOAM_Tumbling_Frame4[4];
extern const u16 sMissileOAM_Tumbling_Frame5[4];
extern const u16 sMissileOAM_Tumbling_Frame6[4];
extern const u16 sMissileOAM_Tumbling_Frame7[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame0[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame1[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame2[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame3[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame4[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame5[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame6[4];
extern const u16 sSuperMissileOAM_Tumbling_Frame7[4];
extern const u16 sParticleMissileTrailOam_Frame0[4];
extern const u16 sParticleMissileTrailOam_Frame1[4];
extern const u16 sParticleMissileTrailOam_Frame2[4];
extern const u16 sParticleSuperMissileTrailOam_Frame3[4];
extern const u16 sParticleMissileTrailOam_Frame3[4];
extern const u16 sParticleMissileTrailOam_Frame4[4];
extern const u16 sParticleMissileTrailOam_Frame5[4];
extern const u16 sParticleMissileTrailOam_Frame6[4];
extern const u16 sParticleSuperMissileTrailOam_Frame0[4];
extern const struct FrameData sMissileOAM_Horizontal[3];
extern const struct FrameData sMissileOAM_Diagonal[3];
extern const struct FrameData sMissileOAM_Vertical[3];
extern const struct FrameData sSuperMissileOAM_Horizontal[3];
extern const struct FrameData sSuperMissileOAM_Diagonal[3];
extern const struct FrameData sSuperMissileOAM_Vertical[3];
extern const struct FrameData sMissileOAM_Tumbling[9];
extern const struct FrameData sSuperMissileOAM_Tumbling[9];
extern const struct FrameData sSuperMissileOam_Tumbling[9];
extern const struct FrameData sParticleMissileTrailOam[8];
extern const struct FrameData sParticleSuperMissileTrailOam[9];
extern const u16 sBeamPal[96];
extern const u16 sBeamPal[16 * 6];
extern const u8 sNormalBeamGfx_Top[512];
extern const u8 sNormalBeamGfx_Bottom[512];
extern const u8 sNormalBeamGfx_Charged_Top[512];
extern const u8 sNormalBeamGfx_Charged_Bottom[512];
extern const u16 sNormalBeamOAM_Horizontal_Frame0[4];
extern const struct FrameData sNormalBeamOam_Horizontal[3];
extern const u16 sNormalBeamOAM_Horizontal_Frame1[4];
extern const struct FrameData sNormalBeamOam_Diagonal[3];
extern const u16 sNormalBeamOAM_Diagonal_Frame0[4];
extern const struct FrameData sNormalBeamOam_Vertical[3];
extern const u16 sNormalBeamOAM_Diagonal_Frame1[4];
extern const struct FrameData sNormalBeamOam_Horizontal_Unused[3];
extern const u16 sNormalBeamOAM_Vertical_Frame0[4];
extern const struct FrameData sNormalBeamOam_Diagonal_Unused[3];
extern const u16 sNormalBeamOAM_Vertical_Frame1[4];
extern const struct FrameData sNormalBeamOam_Vertical_Unused[3];
extern const u16 sNormalBeamOAM_Horizontal_Unused_Frame0[4];
extern const struct FrameData sChargedNormalBeamOam_Horizontal[3];
extern const u16 sNormalBeamOAM_Horizontal_Unused_Frame1[4];
extern const struct FrameData sChargedNormalBeamOam_Diagonal[3];
extern const u16 sNormalBeamOAM_Diagonal_Unused_Frame0[4];
extern const struct FrameData sChargedNormalBeamOam_Vertical[3];
extern const u16 sNormalBeamOAM_Diagonal_Unused_Frame1[4];
extern const u16 sNormalBeamOAM_Vertical_Unused_Frame0[4];
extern const u16 sNormalBeamOAM_Vertical_Unused_Frame1[4];
extern const u16 sChargedNormalBeamOAM_Horizontal_Frame0[7];
extern const u16 sChargedNormalBeamOAM_Horizontal_Frame1[10];
extern const u16 sChargedNormalBeamOAM_Diagonal_Frame0[7];
extern const u16 sChargedNormalBeamOAM_Diagonal_Frame1[10];
extern const u16 sChargedNormalBeamOAM_Vertical_Frame0[7];
extern const u16 sChargedNormalBeamOAM_Vertical_Frame1[10];
extern const u16 sChargedNormalBeamOAM_Horizontal_Unused_Frame0[4];
extern const u16 sChargedNormalBeamOAM_Horizontal_Unused_Frame1[4];
extern const u16 sChargedNormalBeamOAM_Horizontal_Unused_Frame2[4];
extern const u16 sChargedNormalBeamOAM_Horizontal_Unused_Frame3[4];
extern const struct FrameData sNormalBeamOAM_Horizontal[3];
extern const struct FrameData sNormalBeamOAM_Diagonal[3];
extern const struct FrameData sNormalBeamOAM_Vertical[3];
extern const struct FrameData sNormalBeamOAM_Horizontal_Unused[3];
extern const struct FrameData sNormalBeamOAM_Diagonal_Unused[3];
extern const struct FrameData sNormalBeamOAM_Vertical_Unused[3];
extern const struct FrameData sChargedNormalBeamOAM_Horizontal[3];
extern const struct FrameData sChargedNormalBeamOAM_Diagonal[3];
extern const struct FrameData sChargedNormalBeamOAM_Vertical[3];
extern const struct FrameData sChargedNormalBeamOAM_Horizontal_Unused[5];
extern const struct FrameData sChargedNormalBeamOam_Horizontal_Unused[5];
extern const u8 sLongBeamGfx_Top[512];
extern const u8 sLongBeamGfx_Bottom[512];
extern const u8 sLongBeamGfx_Charged_Top[512];
extern const u8 sLongBeamGfx_Charged_Bottom[512];
extern const u16 sLongBeamOAM_Horizontal_Frame0[4];
extern const struct FrameData sLongBeamOam_Horizontal[3];
extern const u16 sLongBeamOAM_Horizontal_Frame1[4];
extern const struct FrameData sLongBeamOam_Diagonal[3];
extern const u16 sLongBeamOAM_Diagonal_Frame0[4];
extern const struct FrameData sLongBeamOam_Vertical[3];
extern const u16 sLongBeamOAM_Diagonal_Frame1[4];
extern const struct FrameData sChargedLongBeamOam_Horizontal[3];
extern const u16 sLongBeamOAM_Vertical_Frame0[4];
extern const struct FrameData sChargedLongBeamOam_Diagonal[3];
extern const u16 sLongBeamOAM_Vertical_Frame1[4];
extern const u16 sChargedLongBeamOAM_Horizontal_Frame0[7];
extern const u16 sChargedLongBeamOAM_Horizontal_Frame1[10];
extern const u16 sChargedLongBeamOAM_Diagonal_Frame0[7];
extern const u16 sChargedLongBeamOAM_Diagonal_Frame1[10];
extern const u16 sChargedLongBeamOAM_Vertical_Frame0[7];
extern const u16 sChargedLongBeamOAM_Vertical_Frame1[10];
extern const u16 sParticleChargedLongBeamTrailOam_Frame0[4];
extern const u16 sParticleChargedLongBeamTrailOam_Frame1[4];
extern const u16 sParticleChargedLongBeamTrailOam_Frame2[4];
extern const u16 sParticleChargedLongBeamTrailOam_Frame3[4];
extern const struct FrameData sLongBeamOAM_Horizontal[3];
extern const struct FrameData sLongBeamOAM_Diagonal[3];
extern const struct FrameData sLongBeamOAM_Vertical[3];
extern const struct FrameData sChargedLongBeamOAM_Horizontal[3];
extern const struct FrameData sChargedLongBeamOAM_Diagonal[3];
extern const struct FrameData sChargedLongBeamOAM_Vertical[3];
extern const struct FrameData sChargedLongBeamOam_Vertical[3];
extern const struct FrameData sParticleChargedLongBeamTrailOam[5];
@ -253,69 +87,23 @@ extern const u8 sIceBeamGfx_Bottom[512];
extern const u8 sIceBeamGfx_Charged_Top[512];
extern const u8 sIceBeamGfx_Charged_Bottom[512];
extern const u16 sIceBeamOAM_Horizontal_Frame0[4];
extern const struct FrameData sIceBeamOam_Horizontal[3];
extern const u16 sIceBeamOAM_Horizontal_Frame1[4];
extern const struct FrameData sIceBeamOam_Diagonal[3];
extern const u16 sIceBeamOAM_Diagonal_Frame0[4];
extern const struct FrameData sIceBeamOam_Vertical[3];
extern const u16 sIceBeamOAM_Diagonal_Frame1[4];
extern const struct FrameData sIceBeamOam_Horizontal_Unused[3];
extern const u16 sIceBeamOAM_Vertical_Frame0[4];
extern const struct FrameData sIceBeamOam_Diagonal_Unused[3];
extern const u16 sIceBeamOAM_Vertical_Frame1[4];
extern const struct FrameData sIceBeamOam_Vertical_Unused[3];
extern const u16 sIceBeamOAM_Horizontal_Unused_Frame0[4];
extern const struct FrameData sChargedIceBeamOam_Horizontal[3];
extern const u16 sIceBeamOAM_Horizontal_Unused_Frame1[4];
extern const struct FrameData sChargedIceBeamOam_Diagonal[3];
extern const u16 sIceBeamOAM_Diagonal_Unused_Frame0[4];
extern const u16 sIceBeamOAM_Diagonal_Unused_Frame1[4];
extern const u16 sIceBeamOAM_Vertical_Unused_Frame0[4];
extern const u16 sIceBeamOAM_Vertical_Unused_Frame1[4];
extern const u16 sChargedIceBeamOAM_Horizontal_Frame0[13];
extern const u16 sChargedIceBeamOAM_Horizontal_Frame1[19];
extern const u16 sChargedIceBeamOAM_Diagonal_Frame0[7];
extern const u16 sChargedIceBeamOAM_Diagonal_Frame1[10];
extern const u16 sChargedIceBeamOAM_Vertical_Frame0[13];
extern const u16 sChargedIceBeamOAM_Vertical_Frame1[19];
extern const u16 sParticleChargedIceBeamTrailOam_Frame0[4];
extern const u16 sParticleChargedIceBeamTrailOam_Frame1[4];
extern const u16 sParticleChargedIceBeamTrailOam_Frame2[4];
extern const u16 sParticleChargedIceBeamTrailOam_Frame3[4];
extern const u16 sParticleChargedIceBeamTrailOam_Frame4[4];
extern const struct FrameData sIceBeamOAM_Horizontal[3];
extern const struct FrameData sIceBeamOAM_Diagonal[3];
extern const struct FrameData sIceBeamOAM_Vertical[3];
extern const struct FrameData sIceBeamOAM_Horizontal_Unused[3];
extern const struct FrameData sIceBeamOAM_Diagonal_Unused[3];
extern const struct FrameData sIceBeamOAM_Vertical_Unused[3];
extern const struct FrameData sChargedIceBeamOAM_Horizontal[3];
extern const struct FrameData sChargedIceBeamOAM_Diagonal[3];
extern const struct FrameData sChargedIceBeamOAM_Vertical[3];
extern const struct FrameData sChargedIceBeamOam_Vertical[3];
extern const struct FrameData sParticleChargedIceBeamTrailOam[6];
@ -324,95 +112,23 @@ extern const u8 sWaveBeamGfx_Bottom[512];
extern const u8 sWaveBeamGfx_Charged_Top[512];
extern const u8 sWaveBeamGfx_Charged_Bottom[512];
extern const u16 sWaveBeamOAM_Horizontal_Frame0[4];
extern const struct FrameData sWaveBeamOam_Horizontal[8];
extern const u16 sWaveBeamOAM_Horizontal_Frame1[10];
extern const struct FrameData sWaveBeamOam_Diagonal[8];
extern const u16 sWaveBeamOAM_Horizontal_Frame2[10];
extern const struct FrameData sWaveBeamOam_Vertical[8];
extern const u16 sWaveBeamOAM_Horizontal_Frame3[7];
extern const struct FrameData sWaveBeamOam_Horizontal_Unused[8];
extern const u16 sWaveBeamOAM_Horizontal_Frame4[13];
extern const struct FrameData sWaveBeamOam_Diagonal_Unused[8];
extern const u16 sWaveBeamOAM_Horizontal_Frame6[10];
extern const struct FrameData sWaveBeamOam_Vertical_Unused[8];
extern const u16 sWaveBeamOAM_Diagonal_Frame0[4];
extern const struct FrameData sChargedWaveBeamOam_Horizontal[8];
extern const u16 sWaveBeamOAM_Diagonal_Frame1[10];
extern const struct FrameData sChargedWaveBeamOam_Diagonal[8];
extern const u16 sWaveBeamOAM_Diagonal_Frame2[10];
extern const u16 sWaveBeamOAM_Diagonal_Frame3[7];
extern const u16 sWaveBeamOAM_Diagonal_Frame4[13];
extern const u16 sWaveBeamOAM_Diagonal_Frame6[10];
extern const u16 sWaveBeamOAM_Vertical_Frame0[4];
extern const u16 sWaveBeamOAM_Vertical_Frame1[10];
extern const u16 sWaveBeamOAM_Vertical_Frame2[10];
extern const u16 sWaveBeamOAM_Vertical_Frame3[7];
extern const u16 sWaveBeamOAM_Vertical_Frame4[13];
extern const u16 sChargedWaveBeamOAM_Horizontal_Frame3[7];
extern const u16 sChargedWaveBeamOAM_Horizontal_Frame4[7];
extern const u16 sChargedWaveBeamOAM_Horizontal_Frame5[7];
extern const u16 sChargedWaveBeamOAM_Horizontal_Frame6[7];
extern const u16 sChargedWaveBeamOAM_Diagonal_Frame0[7];
extern const u16 sChargedWaveBeamOAM_Diagonal_Frame1[19];
extern const u16 sChargedWaveBeamOAM_Diagonal_Frame2[25];
extern const u16 sChargedWaveBeamOAM_Diagonal_Frame3[13];
extern const u16 sChargedWaveBeamOAM_Diagonal_Frame6[13];
extern const u16 sChargedWaveBeamOAM_Vertical_Frame1[10];
extern const u16 sChargedWaveBeamOAM_Vertical_Frame2[13];
extern const u16 sChargedWaveBeamOAM_Vertical_Frame3[7];
extern const u16 sChargedWaveBeamOAM_Vertical_Frame4[7];
extern const u16 sChargedWaveBeamOAM_Vertical_Frame5[7];
extern const u16 sChargedWaveBeamOAM_Vertical_Frame6[7];
extern const u16 sParticleChargedWaveBeamTrailOam_Frame0[4];
extern const u16 sParticleChargedWaveBeamTrailOam_Frame1[7];
extern const u16 sParticleChargedWaveBeamTrailOam_Frame2[4];
extern const u16 sParticleChargedWaveBeamTrailOam_Frame3[7];
extern const struct FrameData sWaveBeamOAM_Horizontal[8];
extern const struct FrameData sWaveBeamOAM_Diagonal[8];
extern const struct FrameData sWaveBeamOAM_Vertical[8];
extern const struct FrameData sWaveBeamOAM_Horizontal_Unused[8];
extern const struct FrameData sWaveBeamOAM_Diagonal_Unused[8];
extern const struct FrameData sWaveBeamOAM_Vertical_Unused[8];
extern const struct FrameData sChargedWaveBeamOAM_Horizontal[8];
extern const struct FrameData sChargedWaveBeamOAM_Diagonal[8];
extern const struct FrameData sChargedWaveBeamOAM_Vertical[8];
extern const struct FrameData sChargedWaveBeamOam_Vertical[8];
extern const struct FrameData sParticleChargedWaveBeamTrailOam[5];
@ -421,147 +137,41 @@ extern const u8 sPlasmaBeamGfx_Bottom[512];
extern const u8 sPlasmaBeamGfx_Charged_Top[512];
extern const u8 sPlasmaBeamGfx_Charged_Bottom[512];
extern const u16 sPlasmaBeamOAM_Horizontal_NoWave_Frame0[4];
extern const struct FrameData sPlasmaBeamOam_Horizontal_NoWave[3];
extern const u16 sPlasmaBeamOAM_Horizontal_NoWave_Frame1[4];
extern const struct FrameData sPlasmaBeamOam_Diagonal_NoWave[3];
extern const u16 sPlasmaBeamOAM_Diagonal_NoWave_Frame0[4];
extern const struct FrameData sPlasmaBeamOam_Vertical_NoWave[3];
extern const u16 sPlasmaBeamOAM_Diagonal_NoWave_Frame1[4];
extern const struct FrameData sPlasmaBeamOam_Horizontal_NoWave_Unused[3];
extern const u16 sPlasmaBeamOAM_Vertical_NoWave_Frame0[4];
extern const struct FrameData sPlasmaBeamOam_Diagonal_NoWave_Unused[3];
extern const u16 sPlasmaBeamOAM_Vertical_NoWave_Frame1[4];
extern const struct FrameData sPlasmaBeamOam_Vertical_NoWave_Unused[3];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_NoWave_Frame0[10];
extern const struct FrameData sChargedPlasmaBeamOam_Horizontal_NoWave[3];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_NoWave_Frame1[16];
extern const struct FrameData sChargedPlasmaBeamOam_Diagonal_NoWave[3];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_NoWave_Frame0[13];
extern const struct FrameData sChargedPlasmaBeamOam_Vertical_NoWave[3];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_NoWave_Frame1[19];
extern const struct FrameData sPlasmaBeamOam_Horizontal_Wave[8];
extern const u16 sChargedPlasmaBeamOAM_Vertical_NoWave_Frame0[13];
extern const struct FrameData sPlasmaBeamOam_Diagonal_Wave[8];
extern const u16 sChargedPlasmaBeamOAM_Vertical_NoWave_Frame1[19];
extern const struct FrameData sPlasmaBeamOam_Vertical_Wave[8];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Frame1[10];
extern const struct FrameData sPlasmaBeamOam_Horizontal_Wave_Unused[6];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Frame2[13];
extern const struct FrameData sPlasmaBeamOam_Diagonal_Wave_Unused[6];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Frame3[10];
extern const struct FrameData sPlasmaBeamOam_Vertical_Wave_Unused[6];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Frame4[16];
extern const struct FrameData sChargedPlasmaBeamOam_Horizontal_Wave[8];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Frame5[13];
extern const struct FrameData sChargedPlasmaBeamOam_Diagonal_Wave[8];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Frame3[10];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Frame4[16];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Frame5[13];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Frame3[10];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Frame4[16];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Frame5[13];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Frame6[10];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Unused_Frame3[19];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Unused_Frame4[13];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Unused_Frame1[10];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Unused_Frame2[16];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Unused_Frame3[16];
extern const u16 sPlasmaBeamOAM_Vertical_Wave_Unused_Frame4[10];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_Wave_Frame0[4];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_Wave_Frame1[13];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_Wave_Frame2[16];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_Wave_Frame3[10];
extern const u16 sChargedPlasmaBeamOAM_Horizontal_Wave_Frame4[13];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_Wave_Frame0[7];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_Wave_Frame1[19];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_Wave_Frame2[25];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_Wave_Frame3[19];
extern const u16 sChargedPlasmaBeamOAM_Diagonal_Wave_Frame4[19];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Unused_Frame3[19];
extern const u16 sPlasmaBeamOAM_Horizontal_Wave_Unused_Frame4[13];
extern const u16 sChargedPlasmaBeamOAM_Vertical_Wave_Frame0[7];
extern const u16 sChargedPlasmaBeamOAM_Vertical_Wave_Frame1[19];
extern const u16 sChargedPlasmaBeamOAM_Vertical_Wave_Frame2[25];
extern const u16 sChargedPlasmaBeamOAM_Vertical_Wave_Frame3[19];
extern const u16 sChargedPlasmaBeamOAM_Vertical_Wave_Frame4[19];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Unused_Frame1[19];
extern const u16 sPlasmaBeamOAM_Diagonal_Wave_Unused_Frame2[13];
extern const u16 sParticleChargedPlasmaBeamTrailOam_Frame0[4];
extern const u16 sParticleChargedFullBeamTrailOam_Frame5[4];
extern const u16 sParticleChargedFullBeamTrailOam_Frame6[4];
extern const u16 sParticleChargedPlasmaBeamTrailOam_Frame3[4];
extern const struct FrameData sPlasmaBeamOAM_Horizontal_NoWave[3];
extern const struct FrameData sPlasmaBeamOAM_Diagonal_NoWave[3];
extern const struct FrameData sPlasmaBeamOAM_Vertical_NoWave[3];
extern const struct FrameData sPlasmaBeamOAM_Horizontal_NoWave_Unused[3];
extern const struct FrameData sPlasmaBeamOAM_Diagonal_NoWave_Unused[3];
extern const struct FrameData sPlasmaBeamOAM_Vertical_NoWave_Unused[3];
extern const struct FrameData sChargedPlasmaBeamOAM_Horizontal_NoWave[3];
extern const struct FrameData sChargedPlasmaBeamOAM_Diagonal_NoWave[3];
extern const struct FrameData sChargedPlasmaBeamOAM_Vertical_NoWave[3];
extern const struct FrameData sPlasmaBeamOAM_Horizontal_Wave[8];
extern const struct FrameData sPlasmaBeamOAM_Diagonal_Wave[8];
extern const struct FrameData sPlasmaBeamOAM_Vertical_Wave[8];
extern const struct FrameData sPlasmaBeamOAM_Horizontal_Wave_Unused[6];
extern const struct FrameData sPlasmaBeamOAM_Diagonal_Wave_Unused[6];
extern const struct FrameData sPlasmaBeamOAM_Vertical_Wave_Unused[6];
extern const struct FrameData sChargedPlasmaBeamOAM_Horizontal_Wave[8];
extern const struct FrameData sChargedPlasmaBeamOAM_Diagonal_Wave[8];
extern const struct FrameData sChargedPlasmaBeamOAM_Vertical_Wave[8];
extern const struct FrameData sChargedPlasmaBeamOam_Vertical_Wave[8];
extern const struct FrameData sParticleChargedPlasmaBeamTrailOam[5];
@ -572,56 +182,22 @@ extern const u8 sPistolGfx_Bottom[512];
extern const u8 sPistolGfx_Charged_Top[512];
extern const u8 sPistolGfx_Charged_Bottom[512];
extern const u16 sPistolOAM_Horizontal_Frame0[4];
extern const struct FrameData sPistolOam_Horizontal[3];
extern const u16 sPistolOAM_Horizontal_Frame1[4];
extern const struct FrameData sPistolOam_Diagonal[3];
extern const u16 sPistolOAM_Diagonal_Frame0[4];
extern const struct FrameData sPistolOam_Vertical[3];
extern const u16 sPistolOAM_Diagonal_Frame1[4];
extern const struct FrameData sChargedPistolOam_Horizontal[3];
extern const u16 sPitsolOAM_Vertical_Frame0[4];
extern const struct FrameData sChargedPistolOam_Diagonal[3];
extern const u16 sPitsolOAM_Vertical_Frame1[4];
extern const u16 sChargedPistolOAM_Horizontal_Frame0[7];
extern const u16 sChargedPistolOAM_Horizontal_Frame1[10];
extern const u16 sChargedPistolOAM_Diagonal_Frame0[7];
extern const u16 sChargedPistolOAM_Diagonal_Frame1[10];
extern const u16 sChargedPistolOAM_Vertical_Frame0[7];
extern const u16 sChargedPistolOAM_Vertical_Frame1[10];
extern const u16 sParticleChargedPistolTrailOam_Frame0[4];
extern const u16 sParticleChargedPistolTrailOam_Frame1[4];
extern const u16 sParticleChargedPistolTrailOam_Frame2[4];
extern const u16 sParticleChargedPistolTrailOam_Frame3[4];
extern const struct FrameData sPistolOAM_Horizontal[3];
extern const struct FrameData sPistolOAM_Diagonal[3];
extern const struct FrameData sPistolOAM_Vertical[3];
extern const struct FrameData sChargedPistolOAM_Horizontal[3];
extern const struct FrameData sChargedPistolOAM_Diagonal[3];
extern const struct FrameData sChargedPistolOAM_Vertical[3];
extern const struct FrameData sChargedPistolOam_Vertical[3];
extern const struct FrameData sParticleChargedPistolTrailOam[5];
extern const struct FrameData sParticleEscapeOam_Unused[2];
extern const struct FrameData sParticleSamusReflectionOAM_Unused[2];
extern const struct FrameData sParticleSamusReflectionOam_Unused[2];
// 32ba08
#endif
#endif /* PROJECTILE_DATA_H */

View File

@ -191,18 +191,6 @@
#define SCREEN_Y_PADDING 2
#define SCREEN_Y_BLOCK_PADDING (BLOCK_SIZE * SCREEN_Y_PADDING)
#define SPRITE_HAS_ISFT(sprite) ((sprite).invincibilityStunFlashTimer & 0x7F)
#define SPRITE_CLEAR_ISFT(sprite) ((sprite).invincibilityStunFlashTimer &= 0x80)
#define SPRITE_SET_ISFT(sprite, value) ((sprite).invincibilityStunFlashTimer |= (value))
#define SPRITE_CLEAR_AND_SET_ISFT(sprite, value)\
{ \
SPRITE_CLEAR_ISFT(sprite); \
SPRITE_SET_ISFT(sprite, value); \
}
#define SPRITE_FREEZE_PALETTE_OFFSET 0
#define SPRITE_STUN_PALETTE_OFFSET 1
#define SPRITESET_IDX(idx) (16 + idx + 1)

View File

@ -25,10 +25,8 @@
#include "constants/animated_graphics.h"
#include "constants/haze.h"
#include "constants/room.h"
#include "constants/particle.h"
#include "constants/projectile.h"
const ProjFunc_T sProcessProjectileFunctionPointers[16] = {
const ProjFunc_T sProcessProjectileFunctionPointers[PROJ_TYPE_END] = {
[PROJ_TYPE_BEAM] = ProjectileProcessNormalBeam,
[PROJ_TYPE_LONG_BEAM] = ProjectileProcessLongBeam,
[PROJ_TYPE_ICE_BEAM] = ProjectileProcessIceBeam,
@ -47,7 +45,7 @@ const ProjFunc_T sProcessProjectileFunctionPointers[16] = {
[PROJ_TYPE_POWER_BOMB] = ProjectileProcessPowerBomb
};
const ParticleFunc_T sProcessParticleFunctionPointers[61] = {
const ParticleFunc_T sProcessParticleFunctionPointers[PE_END] = {
[PE_SPRITE_SPLASH_WATER_SMALL] = ParticleSpriteSplashWaterSmall,
[PE_SPRITE_SPLASH_WATER_BIG] = ParticleSpriteSplashWaterBig,
[PE_SPRITE_SPLASH_WATER_HUGE] = ParticleSpriteSplashWaterHuge,

File diff suppressed because it is too large Load Diff

View File

@ -120,7 +120,7 @@ void ParticleDraw(struct ParticleEffect* pParticle)
else
bgPriority = 0;
xFlipped = pParticle->status & PARTICLE_STATUS_XFLIP;
xFlipped = pParticle->status & PARTICLE_STATUS_X_FLIP;
for (i = 0; i < partCount; i++)
{
@ -603,7 +603,7 @@ void ParticleShootingBeamRight(struct ParticleEffect* pParticle)
if (pParticle->stage == 0)
{
pParticle->stage++;
pParticle->status |= PARTICLE_STATUS_XFLIP | PARTICLE_STATUS_LOW_PRIORITY;
pParticle->status |= PARTICLE_STATUS_X_FLIP | PARTICLE_STATUS_LOW_PRIORITY;
}
}
@ -647,7 +647,7 @@ void ParticleShootingBeamDiagUpRight(struct ParticleEffect* pParticle)
if (pParticle->stage == 0)
{
pParticle->stage++;
pParticle->status |= PARTICLE_STATUS_XFLIP | PARTICLE_STATUS_LOW_PRIORITY;
pParticle->status |= PARTICLE_STATUS_X_FLIP | PARTICLE_STATUS_LOW_PRIORITY;
}
}
@ -691,7 +691,7 @@ void ParticleShootingBeamDiagDownRight(struct ParticleEffect* pParticle)
if (pParticle->stage == 0)
{
pParticle->stage++;
pParticle->status |= (PARTICLE_STATUS_XFLIP | PARTICLE_STATUS_LOW_PRIORITY);
pParticle->status |= (PARTICLE_STATUS_X_FLIP | PARTICLE_STATUS_LOW_PRIORITY);
}
}
@ -735,7 +735,7 @@ void ParticleShootingBeamUpRight(struct ParticleEffect* pParticle)
if (pParticle->stage == 0)
{
pParticle->stage++;
pParticle->status |= (PARTICLE_STATUS_XFLIP | PARTICLE_STATUS_LOW_PRIORITY);
pParticle->status |= (PARTICLE_STATUS_X_FLIP | PARTICLE_STATUS_LOW_PRIORITY);
}
}
@ -779,7 +779,7 @@ void ParticleShootingBeamDownRight(struct ParticleEffect* pParticle)
if (pParticle->stage == 0)
{
pParticle->stage++;
pParticle->status |= (PARTICLE_STATUS_XFLIP | PARTICLE_STATUS_LOW_PRIORITY);
pParticle->status |= (PARTICLE_STATUS_X_FLIP | PARTICLE_STATUS_LOW_PRIORITY);
}
}
@ -1890,7 +1890,7 @@ void ParticleSamusReflection(struct ParticleEffect* pParticle)
if (pParticle->stage == 0)
{
pParticle->stage = 1;
pParticle->status |= PARTICLE_STATUS_LIVE_OFF_SCREEN | PARTICLE_STATUS_LOW_PRIORITY | PARTICLE_STATUS_XFLIP; // Init status
pParticle->status |= PARTICLE_STATUS_LIVE_OFF_SCREEN | PARTICLE_STATUS_LOW_PRIORITY | PARTICLE_STATUS_X_FLIP; // Init status
}
// Copy the main samus body oam

View File

@ -3,6 +3,7 @@
#include "data/engine_pointers.h"
#include "constants/audio.h"
#include "constants/clipdata.h"
#include "constants/haze.h"
#include "constants/game_state.h"
@ -257,7 +258,7 @@ void PowerBombExplosionBegin(void)
ScreenShakeStartHorizontal(120, 0x80);
SoundPlay(0x101); // Power bomb explosion
SoundPlay(SOUND_POWER_BOMB_EXPLOSION);
}
/**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -456,11 +456,11 @@ void SpriteDraw(struct SpriteData* pSprite, s32 slot)
xPosition = SUB_PIXEL_TO_PIXEL_(pSprite->xPosition) - SUB_PIXEL_TO_PIXEL(gBg1XPosition);
// Shortcuts for status
xFlip = pSprite->status & SPRITE_STATUS_XFLIP;
xFlip = pSprite->status & SPRITE_STATUS_X_FLIP;
status_unk3 = pSprite->status & SPRITE_STATUS_UNKNOWN_80;
doubleSize = pSprite->status & SPRITE_STATUS_DOUBLE_SIZE;
alphaBlending = pSprite->status & SPRITE_STATUS_ALPHA_BLENDING;
yFlip = pSprite->status & SPRITE_STATUS_YFLIP;
yFlip = pSprite->status & SPRITE_STATUS_Y_FLIP;
// Get graphical data
// Palette offset by spriteset slot

View File

@ -1219,9 +1219,9 @@ void SpriteUtilCurrentSpriteFall(void)
void SpriteUtilChooseRandomXFlip(void)
{
if (MOD_AND(gSpriteRng, 2))
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
/**
@ -1255,9 +1255,9 @@ void SpriteUtilChooseRandomXDirectionRoomSlot(u8 roomSlot)
void SpriteUtilMakeSpriteFaceSamusXFlip(void)
{
if (gCurrentSprite.xPosition > gSamusData.xPosition)
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
/**
@ -1279,9 +1279,9 @@ void SpriteUtilMakeSpriteFaceSamusDirection(void)
void SpriteUtilMakeSpriteFaceAwayFromSamusXFlip(void)
{
if (gCurrentSprite.xPosition > gSamusData.xPosition)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
/**
@ -1337,7 +1337,7 @@ void unk_f9e4(s16 movement)
velocity = movement;
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition, gCurrentSprite.xPosition);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gPreviousCollisionCheck == COLLISION_RIGHT_STEEP_FLOOR_SLOPE)
velocity = (s16)FRACT_MUL(velocity, 2, 3);
@ -1355,7 +1355,7 @@ void unk_f9e4(s16 movement)
if (velocity == 0)
velocity = 1;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += velocity;
else
gCurrentSprite.xPosition -= velocity;
@ -1847,7 +1847,7 @@ u32 SpriteUtilCheckSamusNearSpriteFrontBehind(u16 yRange, u16 xRangeFront, u16 x
}
// Get is flipped, this assume that when flipped the sprite faced right
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xFlip = TRUE;
// Check X position
@ -2469,7 +2469,7 @@ u32 SpriteUtilSpriteTakeDamageFromSamusContact(struct SpriteData* pSprite, struc
else
{
isft = CONVERT_SECONDS(.05f);
if (SPRITE_HAS_ISFT(*pSprite) < isft)
if (SPRITE_GET_ISFT(*pSprite) < isft)
{
SPRITE_CLEAR_AND_SET_ISFT(*pSprite, isft);
}
@ -3000,7 +3000,7 @@ void SpriteUtilUpdateStunTimer(struct SpriteData* pSprite)
{
u8 isft;
if (!SPRITE_HAS_ISFT(*pSprite))
if (SPRITE_GET_ISFT(*pSprite) == 0)
return;
isft = APPLY_DELTA_TIME_DEC(pSprite->invincibilityStunFlashTimer);
@ -3412,7 +3412,7 @@ u8 SpriteUtilIsSpriteStunned(void)
else
stunTimer = CONVERT_SECONDS(.24f);
if (SPRITE_HAS_ISFT(gCurrentSprite) > stunTimer && gCurrentSprite.pose < SPRITE_POSE_DESTROYED)
if (SPRITE_GET_ISFT(gCurrentSprite) > stunTimer && gCurrentSprite.pose < SPRITE_POSE_DESTROYED)
{
if (gCurrentSprite.animationDurationCounter != 0)
APPLY_DELTA_TIME_DEC(gCurrentSprite.animationDurationCounter);
@ -3500,7 +3500,7 @@ void SpriteUtilSyncCurrentSpritePositionWithSubSpriteData1PositionAndOam(void)
gCurrentSprite.yPosition = gSubSpriteData1.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData1.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData1.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -3536,7 +3536,7 @@ void SpriteUtilSyncCurrentSpritePositionWithSubSpriteData2PositionAndOAM(void)
gCurrentSprite.yPosition = gSubSpriteData2.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData2.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData2.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -3589,7 +3589,7 @@ void SpriteUtilSyncCurrentSpritePositionWithSubSpritePositionAndOam(struct SubSp
gCurrentSprite.yPosition = pSub->yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = pSub->xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = pSub->xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];

View File

@ -808,7 +808,7 @@ void AcidWormExtended(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
SpriteSpawnSecondary(SSPRITE_ACID_WORM_SPIT, 0x0, gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition, gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3), SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition, gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3), SPRITE_STATUS_X_FLIP);
}
else
{
@ -822,7 +822,7 @@ void AcidWormExtended(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
SpriteSpawnSecondary(SSPRITE_ACID_WORM_SPIT, 0x1, gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition, gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3), SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition, gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3), SPRITE_STATUS_X_FLIP);
}
else
{
@ -836,7 +836,7 @@ void AcidWormExtended(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
SpriteSpawnSecondary(SSPRITE_ACID_WORM_SPIT, 0x2, gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition, gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3), SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition, gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3), SPRITE_STATUS_X_FLIP);
}
else
{
@ -1049,7 +1049,7 @@ void AcidWormDeathFlashingAnim(void)
AcidWormHandleRotation();
if (!SPRITE_HAS_ISFT(gCurrentSprite))
if (!SPRITE_GET_ISFT(gCurrentSprite))
return;
isft = --gCurrentSprite.invincibilityStunFlashTimer;
@ -1543,7 +1543,7 @@ void AcidWormSpitMove(void)
}
}
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += xMovement;
else
gCurrentSprite.xPosition -= xMovement;

View File

@ -665,10 +665,10 @@ void AtomicElectricitySpawn(void)
// Set direction
if (spriteX <= samusX)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
if (spriteY > samusY)
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
else
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
@ -679,7 +679,7 @@ void AtomicElectricitySpawn(void)
gCurrentSprite.work1 = 0x1; // Direction
gCurrentSprite.hitboxTop = -0x1C;
gCurrentSprite.hitboxBottom = 0x1C;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = 0x0;
gCurrentSprite.hitboxRight = 0xA0;
@ -714,7 +714,7 @@ void AtomicElectricitySpawn(void)
gCurrentSprite.pOam = sAtomicElectricityOAM_MovingDiagonal;
gCurrentSprite.work1 = 0x0; // Direction
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = 0x20;
gCurrentSprite.hitboxRight = 0x60;
@ -760,7 +760,7 @@ void AtomicElectricityMove(void)
// Check move X
if (!(gCurrentSprite.work1 & 0x2))
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += speed;
else
gCurrentSprite.xPosition -= speed;

View File

@ -280,9 +280,9 @@ void BaristuteIdle(void)
// Face samus
SpriteUtilMakeSpriteFaceSamusDirection();
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
// Check should walk or jump, get the collision in front of the baristute
if ((gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT
@ -584,7 +584,7 @@ void Baristute(void)
}
// Check update palette
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
{
// Damaged
spawnHealth = GET_PSPRITE_HEALTH(gCurrentSprite.spriteId);

View File

@ -297,7 +297,7 @@ void BlackSpacePirateInit(void)
if (gCurrentSprite.roomSlot & 0x80)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
}
else

View File

@ -570,7 +570,7 @@ void KraidStatue(void)
for (pProj = gProjectileData; pProj < gProjectileData + MAX_AMOUNT_OF_PROJECTILES; pProj++)
{
if (pProj->status & PROJ_STATUS_EXISTS)
pProj->status |= PROJ_STATUS_UNKNOWN;
pProj->status |= PROJ_STATUS_UNKNOWN_80;
}
if (EventFunction(EVENT_ACTION_CHECKING, EVENT_KRAID_STATUE_OPENED) && EventFunction(EVENT_ACTION_CHECKING, EVENT_RIDLEY_STATUE_OPENED))

View File

@ -49,7 +49,7 @@ void ChozoStatueSyncSubSprites(void)
gCurrentSprite.yPosition = gSubSpriteData1.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData1.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData1.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -160,7 +160,7 @@ void ChozoStatueSetDirection(void)
case PSPRITE_CHOZO_STATUE_VARIA_HINT:
case PSPRITE_CHOZO_STATUE_VARIA:
case PSPRITE_CHOZO_STATUE_GRAVITY:
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
break;
case PSPRITE_CHOZO_STATUE_LONG_HINT:
@ -319,7 +319,7 @@ void ChozoStatueInit(void)
gCurrentSprite.properties |= (SP_ALWAYS_ACTIVE | SP_SOLID_FOR_PROJECTILES);
ChozoStatueSetDirection();
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gSubSpriteData1.xPosition = gCurrentSprite.xPosition + HALF_BLOCK_SIZE;
else
gSubSpriteData1.xPosition = gCurrentSprite.xPosition - HALF_BLOCK_SIZE;
@ -376,7 +376,7 @@ void ChozoStatueInit(void)
gCurrentSprite.pose = CHOZO_STATUE_POSE_WAIT_FOR_ITEM_TO_BE_COLLECTED;
// Spawn chozo ball
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_CHOZO_BALL, 0, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gSubSpriteData1.yPosition - CHOZO_BALL_OFFSET_Y,
@ -405,19 +405,19 @@ void ChozoStatueInit(void)
// Spawn eye
gCurrentSprite.work1 = SpriteSpawnSecondary(SSPRITE_CHOZO_STATUE_PART, CHOZO_STATUE_PART_EYE,
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
// Spawn arm
behavior = SpriteSpawnSecondary(SSPRITE_CHOZO_STATUE_PART, CHOZO_STATUE_PART_ARM,
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
// Spawn leg
SpriteSpawnSecondary(SSPRITE_CHOZO_STATUE_PART, CHOZO_STATUE_PART_LEG, gfxSlot, ramSlot,
yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
// Spawn glow
newRamSlot = SpriteSpawnSecondary(SSPRITE_CHOZO_STATUE_PART, CHOZO_STATUE_PART_GLOW, gfxSlot,
ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
gSpriteData[newRamSlot].work1 = behavior;
}
@ -799,7 +799,7 @@ void ChozoStatuePartArmCheckGrabSamusHint(void)
xPosition = gCurrentSprite.xPosition;
// Get X offset
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition += CHOZO_STATUE_HAND_X_OFFSET;
else
xPosition -= CHOZO_STATUE_HAND_X_OFFSET;
@ -839,7 +839,7 @@ void ChozoStatuePartSyncSamusPosition(void)
{
gSamusData.yPosition = gCurrentSprite.yPosition - CHOZO_STATUE_HAND_Y_OFFSET;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gSamusData.xPosition = gCurrentSprite.xPosition + CHOZO_STATUE_HAND_X_OFFSET;
else
gSamusData.xPosition = gCurrentSprite.xPosition - CHOZO_STATUE_HAND_X_OFFSET;
@ -908,7 +908,7 @@ void ChozoStatuePartArmCheckGrabSamusRefill(void)
xPosition = gCurrentSprite.xPosition;
// Get X offset
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition += CHOZO_STATUE_HAND_X_OFFSET;
else
xPosition -= CHOZO_STATUE_HAND_X_OFFSET;

View File

@ -21,12 +21,12 @@ void SpawnChozoStatueMovement(u8 stage)
if (MOD_AND(stage, 2))
{
gSpriteData[i].status = ((gCurrentSprite.status & SPRITE_STATUS_XFLIP)
gSpriteData[i].status = ((gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
| (SPRITE_STATUS_EXISTS | SPRITE_STATUS_ONSCREEN | SPRITE_STATUS_IGNORE_PROJECTILES));
}
else
{
gSpriteData[i].status = ((gCurrentSprite.status & SPRITE_STATUS_XFLIP)
gSpriteData[i].status = ((gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
| (SPRITE_STATUS_EXISTS | SPRITE_STATUS_ONSCREEN | SPRITE_STATUS_NOT_DRAWN | SPRITE_STATUS_IGNORE_PROJECTILES));
}

View File

@ -508,7 +508,7 @@ void DeoremSpawnGoingDownAnim(void)
{
gCurrentSprite.pose = 0x22;
gCurrentSprite.work0 = 0xA;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
if (gBossWork.work3)
{
@ -593,7 +593,7 @@ void DeoremSpawnGoingUpAnim(void)
--gCurrentSprite.work0;
if (gCurrentSprite.work0 == 0)
{
gCurrentSprite.status = (gCurrentSprite.status & ~SPRITE_STATUS_YFLIP) | SPRITE_STATUS_NOT_DRAWN;
gCurrentSprite.status = (gCurrentSprite.status & ~SPRITE_STATUS_Y_FLIP) | SPRITE_STATUS_NOT_DRAWN;
gCurrentSprite.pose = 0x24;
gCurrentSprite.work0 = 0x3C;
@ -1287,7 +1287,7 @@ void DeoremSegmentInit(void)
else if ((u8)(roomSlot - 6) < 6)
{
gCurrentSprite.pose = 0x22;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
}
else if ((u8)(roomSlot - 12) < 3)
{
@ -1315,7 +1315,7 @@ void DeoremSegmentInit(void)
{
gCurrentSprite.pose = 0x11;
gCurrentSprite.drawOrder = 3;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.work2 = 0x1C;
}
else
@ -1492,7 +1492,7 @@ void DeoremSegmentRightIdleAnim(void)
else
{
xPosition = gCurrentSprite.xPosition + 3 * HALF_BLOCK_SIZE;
statusToAdd = SPRITE_STATUS_XFLIP;
statusToAdd = SPRITE_STATUS_X_FLIP;
}
if (gCurrentSprite.roomSlot == 1 && deoremTimer == 241)
@ -1579,7 +1579,7 @@ void DeoremSegmentLeftIdleAnim(void)
if (gBossWork.work3 != 0)
{
xPosition = gCurrentSprite.xPosition + 3 * HALF_BLOCK_SIZE;
statusToAdd = SPRITE_STATUS_XFLIP;
statusToAdd = SPRITE_STATUS_X_FLIP;
}
else
{
@ -2363,7 +2363,7 @@ void DeoremThornInit(void)
gCurrentSprite.drawOrder = 3;
gCurrentSprite.health = GET_SSPRITE_HEALTH(gCurrentSprite.spriteId);
if ((gCurrentSprite.status & SPRITE_STATUS_XFLIP) != 0)
if ((gCurrentSprite.status & SPRITE_STATUS_X_FLIP) != 0)
{
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
gCurrentSprite.rotation = 0x80;
@ -2373,7 +2373,7 @@ void DeoremThornInit(void)
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_RIGHT;
gCurrentSprite.rotation = 0;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.yPosition -= 0xC;
}

View File

@ -63,7 +63,7 @@ void DessgeegaInit(void)
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - (BLOCK_SIZE + 4), gCurrentSprite.xPosition);
if (gPreviousCollisionCheck & COLLISION_FLAGS_UNKNOWN_F0)
{
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.yPosition -= BLOCK_SIZE;
}
// Should be idle init instead of idle, this skips the initialization of some variables
@ -72,7 +72,7 @@ void DessgeegaInit(void)
// Set hitbox and draw distances based on direction
gCurrentSprite.work0 = 0x0;
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
gCurrentSprite.drawDistanceTop = 0x8;
gCurrentSprite.drawDistanceBottom = 0x28;
@ -658,7 +658,7 @@ void DessgeegaDeath(void)
{
u16 yPosition;
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
yPosition = gCurrentSprite.yPosition + 0x30;
else
{
@ -806,14 +806,14 @@ void Dessgeega(void)
DessgeegaJumpWarningInit();
case DESSGEEGA_POSE_JUMP_WARNING:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
DessgeegaJumpWarningCeiling();
else
DessgeegaJumpWarningGround();
break;
case DESSGEEGA_POSE_JUMPING:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
DessgeegaJumpingCeiling();
else
DessgeegaJumpingGround();
@ -824,14 +824,14 @@ void Dessgeega(void)
break;
case DESSGEEGA_POSE_IDLE:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
DessgeegaIdleCeiling();
else
DessgeegaIdleGround();
break;
case DESSGEEGA_POSE_FALLING:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
DessgeegaFallingCeiling();
else
DessgeegaFallingGround();

View File

@ -134,7 +134,7 @@ void DragonIdle(void)
// Check should turn around
if (nslr == NSLR_RIGHT)
{
if (!(gCurrentSprite.status & SPRITE_STATUS_XFLIP))
if (!(gCurrentSprite.status & SPRITE_STATUS_X_FLIP))
{
gCurrentSprite.pose = DRAGON_POSE_TURN_AROUND_INIT;
return;
@ -142,7 +142,7 @@ void DragonIdle(void)
}
else if (nslr == NSLR_LEFT)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.pose = DRAGON_POSE_TURN_AROUND_INIT;
return;
@ -160,7 +160,7 @@ void DragonIdle(void)
// In fact, the fireball never colldes with the block that's checked here
yPosition = gCurrentSprite.yPosition - (BLOCK_SIZE * 2 + EIGHTH_BLOCK_SIZE);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + (BLOCK_SIZE + EIGHTH_BLOCK_SIZE);
else
xPosition = gCurrentSprite.xPosition - (BLOCK_SIZE + EIGHTH_BLOCK_SIZE);
@ -201,7 +201,7 @@ void DragonTurningAroundFirstHalf(void)
gCurrentSprite.currentAnimationFrame = 0;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
}
}
@ -272,14 +272,14 @@ void DragonSpit(void)
DragonIdleInit();
yPosition = gCurrentSprite.yPosition - DRAGON_SPIT_Y_OFFSET;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + DRAGON_SPIT_X_OFFSET;
else
xPosition = gCurrentSprite.xPosition - DRAGON_SPIT_X_OFFSET;
// Spawn projectile
SpriteSpawnSecondary(SSPRITE_DRAGON_FIREBALL, 0, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gCurrentSprite.primarySpriteRamSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
}
}
@ -311,11 +311,11 @@ void DragonFireballInit(void)
gCurrentSprite.bgPriority = MOD_AND(gIoRegistersBackup.BG1CNT, 4);
gCurrentSprite.health = GET_SSPRITE_HEALTH(gCurrentSprite.spriteId);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
gCurrentSprite.rotation = PI / 2;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
else
{

View File

@ -109,7 +109,7 @@ void EscapeGate(void)
gCurrentSprite.yPosition, gCurrentSprite.xPosition - (BLOCK_SIZE * 2), 0);
SpriteSpawnPrimary(PSPRITE_BLACK_SPACE_PIRATE, 0x80, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.yPosition, gCurrentSprite.xPosition - (BLOCK_SIZE * 10), SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition, gCurrentSprite.xPosition - (BLOCK_SIZE * 10), SPRITE_STATUS_X_FLIP);
}
gCurrentSprite.pose = ESCAPE_GATE_POSE_IDLE;
gCurrentSprite.status &= ~SPRITE_STATUS_NOT_DRAWN;

View File

@ -43,7 +43,7 @@ void GadoraInit(void)
return;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.xPosition += PIXEL_SIZE * 3;
yPosition = gCurrentSprite.yPosition;
@ -52,7 +52,7 @@ void GadoraInit(void)
// Disable hatch
GadoraHatchUpdate(xPosition, yPosition, FALSE);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition += QUARTER_BLOCK_SIZE;
else
xPosition -= QUARTER_BLOCK_SIZE;
@ -176,7 +176,7 @@ void GadoraCheckOpeningEyeAnimEnded(void)
// Spawn beam
xPosition = gCurrentSprite.xPosition + QUARTER_BLOCK_SIZE;
status = SPRITE_STATUS_XFLIP;
status = SPRITE_STATUS_X_FLIP;
SpriteSpawnSecondary(SSPRITE_GADORA_BEAM, 0, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition, xPosition, status);
@ -440,7 +440,7 @@ void GadoraEye(void)
{
// Make vulnerable
gCurrentSprite.status &= ~SPRITE_STATUS_IGNORE_PROJECTILES;
if (SPRITE_HAS_ISFT(gCurrentSprite) == 0x10)
if (SPRITE_GET_ISFT(gCurrentSprite) == 0x10)
gSpriteData[ramSlot].work0 = 0; // Force close eye if hit
}
else

View File

@ -109,7 +109,7 @@ void GametIdle(void)
ramSlot = SpriteSpawnDropFollowers(PSPRITE_GAMET_BLUE_FOLLOWER, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + (BLOCK_SIZE + HALF_BLOCK_SIZE),
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
if (ramSlot != 0xFF)
{
@ -120,7 +120,7 @@ void GametIdle(void)
ramSlot = SpriteSpawnDropFollowers(PSPRITE_GAMET_BLUE_FOLLOWER, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + (BLOCK_SIZE * 2 + HALF_BLOCK_SIZE),
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
if (ramSlot != 0xFF)
{
@ -223,7 +223,7 @@ void GametMove(void)
else
{
gCurrentSprite.work1++;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check should respawn
if (gCurrentSprite.xPosition - gSamusData.xPosition > BLOCK_SIZE * 16 || gCurrentSprite.xPosition & 0x8000)

View File

@ -110,7 +110,7 @@ void GeegaIdle(void)
ramSlot = SpriteSpawnDropFollowers(PSPRITE_GEEGA_FOLLOWER, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + (BLOCK_SIZE * 2 + HALF_BLOCK_SIZE),
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
if (ramSlot != 0xFF)
{
@ -208,7 +208,7 @@ void GeegaMove(void)
else
{
gCurrentSprite.work1++;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check should respawn
if (gCurrentSprite.xPosition - gSamusData.xPosition > BLOCK_SIZE * 16 || gCurrentSprite.xPosition & 0x8000)

View File

@ -170,9 +170,9 @@ void Geron(void)
else
{
// Check should shake
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
{
if (SPRITE_HAS_ISFT(gCurrentSprite) == 0x2)
if (SPRITE_GET_ISFT(gCurrentSprite) == 0x2)
{
// Set shaking
gCurrentSprite.pOam = sGeronOAM_Shaking;

View File

@ -1419,7 +1419,7 @@ void MellowSwarm(void)
gCurrentSprite.animationDurationCounter = 0x0;
gCurrentSprite.pose = 0x9;
if (0x78 < (gSamusData.xPosition >> 0x2) -(gBg1XPosition >> 0x2))
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.yPositionSpawn = 0xF0;
if (gCurrentSprite.spriteId == PSPRITE_MELLOW_SWARM_HEALTH_BASED)
@ -1479,7 +1479,7 @@ void MellowSwarm(void)
return;
}
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
x_pos = gSamusData.xPosition + (gSpriteRng * 0x20);
else
x_pos = gSamusData.xPosition + (gSpriteRng * -0x20);

View File

@ -39,7 +39,7 @@ void ImagoSyncSubSprites(void)
gCurrentSprite.yPosition = gSubSpriteData1.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData1.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData1.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -62,7 +62,7 @@ void ImagoShootNeedles(void)
if (gSubSpriteData1.pMultiOam == sImagoMultiSpriteData_Idle)
{
// Check samus in range for the needles
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gSubSpriteData1.xPosition < gSamusData.xPosition)
inRange = TRUE;
@ -88,11 +88,11 @@ void ImagoShootNeedles(void)
if (gCurrentSprite.currentAnimationFrame == 0x9 && gCurrentSprite.animationDurationCounter == 0x1)
{
// Spawn needle
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_IMAGO_NEEDLE, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + 0x6C, gCurrentSprite.xPosition + 0x1C, SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition + 0x6C, gCurrentSprite.xPosition + 0x1C, SPRITE_STATUS_X_FLIP);
}
else
{
@ -178,7 +178,7 @@ void ImagoCoreFlashingAnim(void)
*/
void ImagoSetSidesHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = -0x40;
gCurrentSprite.hitboxRight = 0x18;
@ -223,7 +223,7 @@ void ImagoInit(void)
gCurrentSprite.xPositionSpawn = xPosition;
gCurrentSprite.status |= (SPRITE_STATUS_XFLIP | SPRITE_STATUS_IGNORE_PROJECTILES);
gCurrentSprite.status |= (SPRITE_STATUS_X_FLIP | SPRITE_STATUS_IGNORE_PROJECTILES);
gCurrentSprite.drawDistanceTop = 0x20;
gCurrentSprite.drawDistanceBottom = 0x28;
@ -256,7 +256,7 @@ void ImagoInit(void)
gfxSlot = gCurrentSprite.spritesetGfxSlot;
ramSlot = gCurrentSprite.primarySpriteRamSlot;
status = gCurrentSprite.status & SPRITE_STATUS_XFLIP;
status = gCurrentSprite.status & SPRITE_STATUS_X_FLIP;
// Spawn parts
SpriteSpawnSecondary(SSPRITE_IMAGO_PART, IMAGO_PART_LEFT_WING_INTERNAL, gfxSlot, ramSlot, yPosition, xPosition, status);
@ -319,7 +319,7 @@ void ImagoComingDownInit(void)
if (gCurrentSprite.health == 0)
{
if (!(gCurrentSprite.status & SPRITE_STATUS_XFLIP))
if (!(gCurrentSprite.status & SPRITE_STATUS_X_FLIP))
{
gCurrentSprite.pose = IMAGO_POSE_CHECK_SAMUS_AT_SUPER_MISSILE;
return;
@ -335,7 +335,7 @@ void ImagoComingDownInit(void)
gCurrentSprite.work0 = 0;
gCurrentSprite.work1 = 0;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.work2 = 0;
else
{
@ -369,7 +369,7 @@ void ImagoComingDown(void)
if (!(gCurrentSprite.work0++ & 0xF) && gCurrentSprite.work2 < 0xC)
gCurrentSprite.work2++;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gSubSpriteData1.xPosition += gCurrentSprite.work2;
// Check should check ground
@ -390,7 +390,7 @@ void ImagoComingDown(void)
}
// Move Y
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gSubSpriteData1.yPosition += 0xC;
else
gSubSpriteData1.yPosition += 0x14;
@ -413,7 +413,7 @@ void ImagoMoveHorizontally(void)
movementStage = IMAGO_MOVEMENT_STAGE_MOVING_HORIZONTALLY;
// Move X
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (!(gCurrentSprite.work0++ & 0xF) && gCurrentSprite.work2 < 0x18)
gCurrentSprite.work2++;
@ -523,7 +523,7 @@ void ImagoMoveHorizontally(void)
return;
}
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteUtilCheckVerticalCollisionAtPosition(yPosition, xPosition - QUARTER_BLOCK_SIZE);
if (gPreviousVerticalCollisionCheck == COLLISION_LEFT_STEEP_FLOOR_SLOPE || gPreviousVerticalCollisionCheck == COLLISION_LEFT_SLIGHT_FLOOR_SLOPE)
@ -557,7 +557,7 @@ void ImagoGoingUp(void)
{
// Arrived at ceiling
gSubSpriteData1.yPosition = gCurrentSprite.yPositionSpawn;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Set X destination
gSubSpriteData1.xPosition = gCurrentSprite.xPositionSpawn + BLOCK_SIZE * 48;
@ -572,7 +572,7 @@ void ImagoGoingUp(void)
else
{
// Set coming down
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pose = IMAGO_POSE_COMING_DOWN_INIT;
}
}
@ -590,7 +590,7 @@ void ImagoGoingUp(void)
else
{
// Set coming down
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pose = IMAGO_POSE_COMING_DOWN_INIT;
}
}
@ -643,7 +643,7 @@ void ImagoAttackingGoingDown(void)
if (checkGround)
{
// Check for ground
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
movement = BLOCK_SIZE * 2 + HALF_BLOCK_SIZE;
else
movement = IMAGO_SIZE;
@ -688,7 +688,7 @@ void ImagoAttackingGoingUp(void)
{
// Arrived at ceiling
gSubSpriteData1.yPosition = gCurrentSprite.yPositionSpawn;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check should attack again
if (gSubSpriteData1.xPosition < gSamusData.xPosition && gCurrentSprite.health != 0)
@ -700,7 +700,7 @@ void ImagoAttackingGoingUp(void)
{
// Out of range or dying, set coming down
gSubSpriteData1.xPosition = gCurrentSprite.xPositionSpawn + BLOCK_SIZE * 48;
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pose = IMAGO_POSE_COMING_DOWN_INIT;
}
}
@ -716,7 +716,7 @@ void ImagoAttackingGoingUp(void)
{
// Out of range or dying, set coming down
gSubSpriteData1.xPosition = gCurrentSprite.xPositionSpawn;
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pose = IMAGO_POSE_COMING_DOWN_INIT;
}
}
@ -732,11 +732,11 @@ void ImagoAttackingGoingUp(void)
void ImagoDyingInit(void)
{
// Spawn damaged stinger
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_IMAGO_DAMAGED_STINGER, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + HALF_BLOCK_SIZE, gCurrentSprite.xPosition + 0x1C, SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition + HALF_BLOCK_SIZE, gCurrentSprite.xPosition + 0x1C, SPRITE_STATUS_X_FLIP);
}
else
{
@ -1057,7 +1057,7 @@ void ImagoSetEvent(void)
*/
void ImagoPartSetBodySidesHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = -0x28;
gCurrentSprite.hitboxRight = 0xC0;
@ -1353,7 +1353,7 @@ void Imago(void)
{
if (!(gFrameCounter8Bit & 3))
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
ParticleSet(gSubSpriteData1.yPosition, gSubSpriteData1.xPosition - BLOCK_SIZE, PE_SPRITE_EXPLOSION_MEDIUM);
else
ParticleSet(gSubSpriteData1.yPosition, gSubSpriteData1.xPosition + BLOCK_SIZE, PE_SPRITE_EXPLOSION_MEDIUM);
@ -1387,10 +1387,10 @@ void ImagoPart(void)
ramSlot = gCurrentSprite.primarySpriteRamSlot;
if (gSpriteData[ramSlot].status & SPRITE_STATUS_XFLIP)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
if (gSpriteData[ramSlot].status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
if (gSpriteData[ramSlot].health == 0)
{
@ -1510,7 +1510,7 @@ void ImagoNeedle(void)
break;
case IMAGO_NEEDLE_POSE_MOVING:
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += 0x18;
else
gCurrentSprite.xPosition -= 0x18;

View File

@ -273,7 +273,7 @@ void ImagoCocoonInit(void)
SpriteSpawnSecondary(SSPRITE_IMAGO_COCOON_VINE, IMAGO_COCOON_PART_VINE_LEFT_RIGHT, gfxSlot, ramSlot, yPosition, xPosition, 0x0);
// Spawn winged ripper
newRamSlot = SpriteSpawnSecondary(SSPRITE_WINGED_RIPPER, 0x0, gfxSlot, ramSlot, yPosition + BLOCK_SIZE * 4, xPosition, SPRITE_STATUS_XFLIP);
newRamSlot = SpriteSpawnSecondary(SSPRITE_WINGED_RIPPER, 0x0, gfxSlot, ramSlot, yPosition + BLOCK_SIZE * 4, xPosition, SPRITE_STATUS_X_FLIP);
// Set destination of winged ripper
gSpriteData[newRamSlot].yPositionSpawn = yPosition + BLOCK_SIZE * 6;
gSpriteData[newRamSlot].xPositionSpawn = xPosition - BLOCK_SIZE * 3;
@ -813,7 +813,7 @@ void ImagoCocoonVineSpawnSpore(void)
// Spore on the right
yPosition = gCurrentSprite.yPosition - IMAGO_COCOON_SPORE_RIGHT_Y_OFFSET;
xPosition = gCurrentSprite.xPosition + IMAGO_COCOON_SPORE_RIGHT_X_OFFSET;
status = SPRITE_STATUS_XFLIP;
status = SPRITE_STATUS_X_FLIP;
}
// Spawn spores
@ -881,7 +881,7 @@ void ImagoCocoonSporeSyncPosition(void)
u8 ramSlot;
ramSlot = gCurrentSprite.primarySpriteRamSlot;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.yPosition = gSpriteData[ramSlot].yPosition - IMAGO_COCOON_SPORE_RIGHT_Y_OFFSET;
gCurrentSprite.xPosition = gSpriteData[ramSlot].xPosition + IMAGO_COCOON_SPORE_RIGHT_X_OFFSET;
@ -1197,14 +1197,14 @@ void WingedRipperMove(void)
}
else if (gCurrentSprite.pOam == sWingedRipperOam_TurningAround && SpriteUtilCheckEndCurrentSpriteAnim())
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.pOam = sWingedRipperOam_Moving;
gCurrentSprite.currentAnimationFrame = 0x0;
gCurrentSprite.animationDurationCounter = 0x0;
}
else
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
}
else
@ -1226,8 +1226,8 @@ void WingedRipperMove(void)
}
else if (gCurrentSprite.pOam == sWingedRipperOam_TurningAround && SpriteUtilCheckEndCurrentSpriteAnim())
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
else
{
gCurrentSprite.pOam = sWingedRipperOam_Moving;

View File

@ -37,7 +37,7 @@ void ImagoLarvaSyncSubSprites(struct SubSpriteData* pSub)
gCurrentSprite.yPosition = pSub->yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = pSub->xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = pSub->xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -52,7 +52,7 @@ void ImagoLarvaUpdatePalette(void)
u8 timer;
u8 timerLimit;
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
return;
gCurrentSprite.work2++;
@ -108,7 +108,7 @@ void ImagoLarvaInit(struct SubSpriteData* pSub)
if (spriteId == PSPRITE_IMAGO_LARVA_LEFT)
{
// Left larva
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.hitboxLeft = -IMAGO_LARVA_TAIL_HITBOX;
gCurrentSprite.hitboxRight = IMAGO_LARVA_HEAD_HITBOX;
gCurrentSprite.pose = IMAGO_LARVA_POSE_IDLE;
@ -166,7 +166,7 @@ void ImagoLarvaInit(struct SubSpriteData* pSub)
gfxSlot = gCurrentSprite.spritesetGfxSlot;
ramSlot = gCurrentSprite.primarySpriteRamSlot;
status = gCurrentSprite.status & SPRITE_STATUS_XFLIP;
status = gCurrentSprite.status & SPRITE_STATUS_X_FLIP;
// Spawn secondaries
SpriteSpawnSecondary(SSPRITE_IMAGO_LARVA_PART, IMAGO_LARVA_PART_CLAWS, gfxSlot, ramSlot, yPosition, xPosition, status);
@ -242,7 +242,7 @@ void ImagoLarvaRetreating(struct SubSpriteData* pSub)
if (gCurrentSprite.work0-- != 0)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check can move
if (pSub->xPosition >= gCurrentSprite.xPositionSpawn - BLOCK_SIZE * 5)
@ -343,7 +343,7 @@ void ImagoLarvaAttacking(struct SubSpriteData* pSub)
{
ImagoLarvaUpdatePalette();
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
pSub->xPosition += PIXEL_SIZE * 2;
if (pSub->xPosition >= gCurrentSprite.xPositionSpawn)
@ -553,7 +553,7 @@ void ImagoLarvaPartInit(struct SubSpriteData* pSub)
gCurrentSprite.hitboxTop = -(BLOCK_SIZE * 3 - QUARTER_BLOCK_SIZE);
gCurrentSprite.hitboxBottom = 0;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = -IMAGO_LARVA_SHELL_TAIL_HITBOX;
gCurrentSprite.hitboxRight = IMAGO_LARVA_SHELL_HEAD_HITBOX;
@ -627,7 +627,7 @@ void ImagoLarvaPartShellIdle(struct SubSpriteData* pSub)
else
gCurrentSprite.hitboxBottom = 0;
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
{
gCurrentSprite.paletteRow = gCurrentSprite.absolutePaletteRow;
SPRITE_CLEAR_ISFT(gCurrentSprite);
@ -636,14 +636,14 @@ void ImagoLarvaPartShellIdle(struct SubSpriteData* pSub)
}
else if (pSub->xPosition < gSamusData.xPosition)
{
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
{
gCurrentSprite.paletteRow = gCurrentSprite.absolutePaletteRow;
SPRITE_CLEAR_ISFT(gCurrentSprite);
gCurrentSprite.health = UCHAR_MAX;
}
}
else if (SPRITE_HAS_ISFT(gCurrentSprite))
else if (SPRITE_GET_ISFT(gCurrentSprite))
{
// Hit by something, check should retreat
if (!pSub->workVariable2)
@ -821,7 +821,7 @@ void ImagoLarvaPartDead(struct SubSpriteData* pSub)
case IMAGO_LARVA_PART_RIGHT_DOT:
yPosition += QUARTER_BLOCK_SIZE;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= BLOCK_SIZE + PIXEL_SIZE * 2;
else
xPosition += BLOCK_SIZE + PIXEL_SIZE * 2;
@ -829,7 +829,7 @@ void ImagoLarvaPartDead(struct SubSpriteData* pSub)
case IMAGO_LARVA_PART_MIDDLE_DOT:
yPosition -= QUARTER_BLOCK_SIZE;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= HALF_BLOCK_SIZE;
else
xPosition += HALF_BLOCK_SIZE;
@ -838,7 +838,7 @@ void ImagoLarvaPartDead(struct SubSpriteData* pSub)
case IMAGO_LARVA_PART_SHELL:
yPosition -= BLOCK_SIZE;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= BLOCK_SIZE * 2 - PIXEL_SIZE * 2;
else
xPosition += BLOCK_SIZE * 2 - PIXEL_SIZE * 2;

View File

@ -305,7 +305,7 @@ void KraidOpenCloseRoutineAndProjectileCollision(void)
// Check collide with mouth interior
if (projY > (spriteY - yTopOffset) && projY < (spriteY + yBottomOffset) &&
pProj->direction == ACD_FORWARD && !(pProj->status & PROJ_STATUS_XFLIP))
pProj->direction == ACD_FORWARD && !(pProj->status & PROJ_STATUS_X_FLIP))
{
// Get damage and particle effect
// Plasma beam isn't taken into account and is treated the same as doing nothing

View File

@ -844,7 +844,7 @@ void MetroidDeath(void)
yPosition = gCurrentSprite.yPosition;
xPosition = gCurrentSprite.xPosition;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
yPosition += rng;
else
yPosition -= rng;
@ -927,7 +927,7 @@ void Metroid(void)
}
else
{
if (SPRITE_HAS_ISFT(gCurrentSprite) == 2)
if (SPRITE_GET_ISFT(gCurrentSprite) == 2)
{
if (gCurrentSprite.health == gCurrentSprite.yPositionSpawn)
{
@ -1028,7 +1028,7 @@ void MetroidShell(void)
yPosition = gCurrentSprite.yPosition;
xPosition = gCurrentSprite.xPosition;
if (gSpriteData[slot].status & SPRITE_STATUS_XFLIP)
if (gSpriteData[slot].status & SPRITE_STATUS_X_FLIP)
yPosition -= rng;
else
yPosition += rng;

View File

@ -48,7 +48,7 @@ void MultiviolaMove(void)
isBouncing = FALSE;
yMovement = 0x3;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Move right
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition, gCurrentSprite.xPosition + gCurrentSprite.hitboxRight);
@ -57,7 +57,7 @@ void MultiviolaMove(void)
else
{
// Bounce X
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
isBouncing++;
}
}
@ -70,7 +70,7 @@ void MultiviolaMove(void)
else
{
// Bounce X
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
isBouncing++;
}
}

View File

@ -146,9 +146,9 @@ void ParasiteGrabSamus(struct SpriteData* pSprite)
// Set vertical direction
if (pSprite->yPosition > gSamusData.yPosition - BLOCK_SIZE)
pSprite->status &= ~SPRITE_STATUS_YFLIP;
pSprite->status &= ~SPRITE_STATUS_Y_FLIP;
else
pSprite->status |= SPRITE_STATUS_YFLIP;
pSprite->status |= SPRITE_STATUS_Y_FLIP;
}
/**
@ -179,11 +179,11 @@ void ParasiteSamusGrabbed(struct SpriteData* pSprite)
gParasiteRelated = 0x5A;
// Check update vertical direction
if (pSprite->status & SPRITE_STATUS_YFLIP)
if (pSprite->status & SPRITE_STATUS_Y_FLIP)
{
if (gSamusData.yPosition + gSamusPhysics.drawDistanceBottom < pSprite->yPosition + 0x8)
{
pSprite->status &= ~SPRITE_STATUS_YFLIP;
pSprite->status &= ~SPRITE_STATUS_Y_FLIP;
pSprite->work0 = gSpriteRng;
}
}
@ -191,17 +191,17 @@ void ParasiteSamusGrabbed(struct SpriteData* pSprite)
{
if (gSamusData.yPosition + gSamusPhysics.drawDistanceTop > pSprite->yPosition - 0x8)
{
pSprite->status |= SPRITE_STATUS_YFLIP;
pSprite->status |= SPRITE_STATUS_Y_FLIP;
pSprite->work0 = gSpriteRng;
}
}
// Check update horizontal direction
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (gSamusData.xPosition + gSamusPhysics.drawDistanceRightOffset < pSprite->xPosition + 0x8)
{
pSprite->status &= ~SPRITE_STATUS_XFLIP;
pSprite->status &= ~SPRITE_STATUS_X_FLIP;
pSprite->work0 = gSpriteRng;
}
}
@ -209,7 +209,7 @@ void ParasiteSamusGrabbed(struct SpriteData* pSprite)
{
if (gSamusData.xPosition + gSamusPhysics.drawDistanceLeftOffset > pSprite->xPosition - 0x8)
{
pSprite->status |= SPRITE_STATUS_XFLIP;
pSprite->status |= SPRITE_STATUS_X_FLIP;
pSprite->work0 = gSpriteRng;
}
}
@ -218,7 +218,7 @@ void ParasiteSamusGrabbed(struct SpriteData* pSprite)
if (pSprite->work0 == 0x0)
{
// Update Y offset
if (pSprite->status & SPRITE_STATUS_YFLIP)
if (pSprite->status & SPRITE_STATUS_Y_FLIP)
{
if (gSpriteRng != 0x0)
pSprite->yPositionSpawn++;
@ -230,7 +230,7 @@ void ParasiteSamusGrabbed(struct SpriteData* pSprite)
}
// Update X offset
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (gSpriteRng != pSprite->primarySpriteRamSlot)
pSprite->xPositionSpawn++;
@ -268,7 +268,7 @@ void ParasiteExpulsedInit(struct SpriteData* pSprite)
pSprite->animationDurationCounter = 0x0;
pSprite->work3 = 0x8;
pSprite->status &= ~SPRITE_STATUS_YFLIP;
pSprite->status &= ~SPRITE_STATUS_Y_FLIP;
}
/**
@ -300,7 +300,7 @@ void ParasiteExpulsedUp(struct SpriteData* pSprite)
pSprite->yPosition = (yPosition & BLOCK_POSITION_FLAG) + (BLOCK_SIZE + QUARTER_BLOCK_SIZE);
// Update X position
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(SpriteUtilGetCollisionAtPosition(yPosition, xPosition + QUARTER_BLOCK_SIZE) & 0xF0))
pSprite->xPosition += pSprite->work2;
@ -341,7 +341,7 @@ void ParasiteMultipleExpulsedUp(struct SpriteData* pSprite)
pSprite->yPosition = (yPosition & BLOCK_POSITION_FLAG) + (BLOCK_SIZE + QUARTER_BLOCK_SIZE);
// Update X position
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(ClipdataProcess(yPosition, xPosition + QUARTER_BLOCK_SIZE) & CLIPDATA_TYPE_SOLID_FLAG))
pSprite->xPosition += pSprite->work2;
@ -399,7 +399,7 @@ void ParasiteExpulsedDown(struct SpriteData* pSprite)
}
else
{
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(SpriteUtilGetCollisionAtPosition(yPosition, xPosition + QUARTER_BLOCK_SIZE) & 0xF0))
pSprite->xPosition += pSprite->work2;
@ -456,7 +456,7 @@ void ParasiteMultipleExpulsedDown(struct SpriteData* pSprite)
return;
}
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(ClipdataProcess(yPosition, xPosition + QUARTER_BLOCK_SIZE) & CLIPDATA_TYPE_SOLID_FLAG))
pSprite->xPosition += pSprite->work2;
@ -501,7 +501,7 @@ void ParasiteJumpingUp(struct SpriteData* pSprite)
pSprite->yPosition = (yPosition & BLOCK_POSITION_FLAG) + BLOCK_SIZE + QUARTER_BLOCK_SIZE;
// Update X position
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(SpriteUtilGetCollisionAtPosition(yPosition, xPosition + QUARTER_BLOCK_SIZE) & 0xF0))
pSprite->xPosition += pSprite->work2;
@ -547,7 +547,7 @@ void ParasiteMultipleJumpingUp(struct SpriteData* pSprite)
pSprite->yPosition = (yPosition & BLOCK_POSITION_FLAG) + BLOCK_SIZE + QUARTER_BLOCK_SIZE;
// Update X position
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(ClipdataProcess(yPosition, xPosition + QUARTER_BLOCK_SIZE) & CLIPDATA_TYPE_SOLID_FLAG))
pSprite->xPosition += pSprite->work2;
@ -603,7 +603,7 @@ void ParasiteJumpingDown(struct SpriteData* pSprite)
else
{
// Update X position
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(SpriteUtilGetCollisionAtPosition(yPosition, xPosition + QUARTER_BLOCK_SIZE) & 0xF0))
pSprite->xPosition += pSprite->work2;
@ -658,7 +658,7 @@ void ParasiteMultipleJumpingDown(struct SpriteData* pSprite)
else
{
// Update X position
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (!(ClipdataProcess(yPosition, xPosition + QUARTER_BLOCK_SIZE) & CLIPDATA_TYPE_SOLID_FLAG))
pSprite->xPosition += pSprite->work2;
@ -772,7 +772,7 @@ void ParasiteIdle(struct SpriteData* pSprite)
velocity = timer;
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (gPreviousVerticalCollisionCheck & 0xF0 && SpriteUtilGetCollisionAtPosition(pSprite->yPosition - QUARTER_BLOCK_SIZE, pSprite->xPosition + QUARTER_BLOCK_SIZE) == COLLISION_SOLID)
pSprite->pose = PARASITE_POSE_TURNING_AROUND_INIT;
@ -878,7 +878,7 @@ void ParasiteMultipleIdle(struct SpriteData* pSprite)
else
velocity = pSprite->work2;
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
clipdata = ClipdataProcess(pSprite->yPosition - QUARTER_BLOCK_SIZE, pSprite->xPosition + QUARTER_BLOCK_SIZE);
if (clipdata & CLIPDATA_TYPE_SOLID_FLAG)
@ -921,7 +921,7 @@ void ParasiteTurningAroundFirstPart(struct SpriteData* pSprite)
{
if (SpriteUtilCheckEndCurrentSpriteAnim())
{
pSprite->status ^= SPRITE_STATUS_XFLIP;
pSprite->status ^= SPRITE_STATUS_X_FLIP;
pSprite->pose = PARASITE_POSE_TURNING_AROUND_SECOND_PART;
}
}
@ -1056,7 +1056,7 @@ void ParasiteFalling(struct SpriteData* pSprite)
*/
void ParasiteDyingInit(struct SpriteData* pSprite)
{
pSprite->status &= ~(SPRITE_STATUS_UNKNOWN_80 | SPRITE_STATUS_YFLIP);
pSprite->status &= ~(SPRITE_STATUS_UNKNOWN_80 | SPRITE_STATUS_Y_FLIP);
pSprite->pose = PARASITE_POSE_DYING;
pSprite->pOam = sParasiteOAM_Dying;
@ -1140,9 +1140,9 @@ void ParasiteGrabGeron(struct SpriteData* pSprite)
// Set vertical direction
if (pSprite->yPosition > gSpriteData[ramSlot].yPosition - (BLOCK_SIZE + HALF_BLOCK_SIZE))
pSprite->status &= ~SPRITE_STATUS_YFLIP;
pSprite->status &= ~SPRITE_STATUS_Y_FLIP;
else
pSprite->status |= SPRITE_STATUS_YFLIP;
pSprite->status |= SPRITE_STATUS_Y_FLIP;
}
/**
@ -1178,11 +1178,11 @@ void ParasiteGeronGrabbed(struct SpriteData* pSprite)
gParasiteRelated = 0x5A;
// Check update vertical direction
if (pSprite->status & SPRITE_STATUS_YFLIP)
if (pSprite->status & SPRITE_STATUS_Y_FLIP)
{
if (gSpriteData[ramSlot].yPosition < pSprite->yPosition + 0x8)
{
pSprite->status &= ~SPRITE_STATUS_YFLIP;
pSprite->status &= ~SPRITE_STATUS_Y_FLIP;
pSprite->work0 = gSpriteRng;
}
}
@ -1190,17 +1190,17 @@ void ParasiteGeronGrabbed(struct SpriteData* pSprite)
{
if (gSpriteData[ramSlot].yPosition + gSpriteData[ramSlot].hitboxTop > pSprite->yPosition - 0x8)
{
pSprite->status |= SPRITE_STATUS_YFLIP;
pSprite->status |= SPRITE_STATUS_Y_FLIP;
pSprite->work0 = gSpriteRng;
}
}
// Check update horizontal direction
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (gSpriteData[ramSlot].xPosition + gSpriteData[ramSlot].hitboxRight < pSprite->xPosition + 0x8)
{
pSprite->status &= ~SPRITE_STATUS_XFLIP;
pSprite->status &= ~SPRITE_STATUS_X_FLIP;
pSprite->work0 = gSpriteRng;
}
}
@ -1208,7 +1208,7 @@ void ParasiteGeronGrabbed(struct SpriteData* pSprite)
{
if (gSpriteData[ramSlot].xPosition + gSpriteData[ramSlot].hitboxLeft > pSprite->xPosition - 0x8)
{
pSprite->status |= SPRITE_STATUS_XFLIP;
pSprite->status |= SPRITE_STATUS_X_FLIP;
pSprite->work0 = gSpriteRng;
}
}
@ -1217,7 +1217,7 @@ void ParasiteGeronGrabbed(struct SpriteData* pSprite)
if (pSprite->work0 == 0x0)
{
// Update Y offset
if (pSprite->status & SPRITE_STATUS_YFLIP)
if (pSprite->status & SPRITE_STATUS_Y_FLIP)
{
if (gSpriteRng != 0x0)
pSprite->yPositionSpawn++;
@ -1229,7 +1229,7 @@ void ParasiteGeronGrabbed(struct SpriteData* pSprite)
}
// Update X offset
if (pSprite->status & SPRITE_STATUS_XFLIP)
if (pSprite->status & SPRITE_STATUS_X_FLIP)
{
if (gSpriteRng != pSprite->primarySpriteRamSlot)
pSprite->xPositionSpawn++;

View File

@ -172,7 +172,7 @@ void PistonCheckProjectile(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_SAMUS_COLLIDING)
{
if (SPRITE_HAS_ISFT(gCurrentSprite) == 0x10)
if (SPRITE_GET_ISFT(gCurrentSprite) == 0x10)
{
// Projectile detected
SPRITE_CLEAR_ISFT(gCurrentSprite);

View File

@ -45,7 +45,7 @@ void RidleySyncSubSprites(void)
gCurrentSprite.yPosition = gSubSpriteData1.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData1.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData1.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -78,7 +78,7 @@ void RidleyTailSyncSubSprites(void)
gCurrentSprite.yPosition = gSubSpriteData2.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData2.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData2.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -150,7 +150,7 @@ void RidleyUpdateHealth(void)
break;
default:
if (SPRITE_HAS_ISFT(gCurrentSprite) == 0x10)
if (SPRITE_GET_ISFT(gCurrentSprite) == 0x10)
SoundPlayNotAlreadyPlaying(0x1ED);
if (gCurrentSprite.health == 0 && gSubSpriteData1.health != 0)
@ -269,7 +269,7 @@ void RidleyPartClawIdle(u8 ramSlot)
updatePosition++;
yPosition = gCurrentSprite.yPosition + BLOCK_SIZE * 4;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + (BLOCK_SIZE * 3 - QUARTER_BLOCK_SIZE);
else
xPosition = gCurrentSprite.xPosition - (BLOCK_SIZE * 3 - QUARTER_BLOCK_SIZE);
@ -282,7 +282,7 @@ void RidleyPartClawIdle(u8 ramSlot)
{
case 0:
yPosition = gCurrentSprite.yPosition + 0xEC;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + 0xB8;
else
xPosition = gCurrentSprite.xPosition - 0xB8;
@ -290,7 +290,7 @@ void RidleyPartClawIdle(u8 ramSlot)
case 1:
yPosition = gCurrentSprite.yPosition + 0xDC;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + 0xD0;
else
xPosition = gCurrentSprite.xPosition - 0xD0;
@ -298,7 +298,7 @@ void RidleyPartClawIdle(u8 ramSlot)
case 2:
yPosition = gCurrentSprite.yPosition + 0xC0;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + 0xEC;
else
xPosition = gCurrentSprite.xPosition - 0xEC;
@ -306,7 +306,7 @@ void RidleyPartClawIdle(u8 ramSlot)
case 3:
yPosition = gCurrentSprite.yPosition + 0x9C;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + (BLOCK_SIZE * 4 - QUARTER_BLOCK_SIZE);
else
xPosition = gCurrentSprite.xPosition - (BLOCK_SIZE * 4 - QUARTER_BLOCK_SIZE);
@ -314,7 +314,7 @@ void RidleyPartClawIdle(u8 ramSlot)
case 4:
yPosition = gCurrentSprite.yPosition + 0x7C;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + (BLOCK_SIZE * 4 - QUARTER_BLOCK_SIZE);
else
xPosition = gCurrentSprite.xPosition - (BLOCK_SIZE * 4 - QUARTER_BLOCK_SIZE);
@ -329,7 +329,7 @@ void RidleyPartClawIdle(u8 ramSlot)
yPosition = gCurrentSprite.yPosition + BLOCK_SIZE + HALF_BLOCK_SIZE;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition = gCurrentSprite.xPosition + BLOCK_SIZE * 4;
else
xPosition = gCurrentSprite.xPosition - BLOCK_SIZE * 4;
@ -434,7 +434,7 @@ void RidleySpawnAscendingFireball(u16 timer)
u16 xPosition;
u16 yPosition;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
status = SPRITE_STATUS_FACING_RIGHT;
xPosition = gCurrentSprite.xPosition + (BLOCK_SIZE * 2 - QUARTER_BLOCK_SIZE);
@ -528,7 +528,7 @@ void RidleyInit(void)
gSubSpriteData1.currentAnimationFrame = 0;
gCurrentSprite.pose = RIDLEY_POSE_CHECK_PLAY_CUTSCENE;
gCurrentSprite.status |= SPRITE_STATUS_NOT_DRAWN | SPRITE_STATUS_XFLIP | SPRITE_STATUS_FACING_RIGHT | SPRITE_STATUS_IGNORE_PROJECTILES;
gCurrentSprite.status |= SPRITE_STATUS_NOT_DRAWN | SPRITE_STATUS_X_FLIP | SPRITE_STATUS_FACING_RIGHT | SPRITE_STATUS_IGNORE_PROJECTILES;
gCurrentSprite.roomSlot = RIDLEY_PART_BODY;
yPosition = gSubSpriteData1.yPosition;
@ -538,47 +538,47 @@ void RidleyInit(void)
// Spawn left wing
SpriteSpawnSecondary(SSPRITE_RIDLEY_PART, RIDLEY_PART_LEFT_WING, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
// Spawn head
gSubSpriteData1.workVariable4 = SpriteSpawnSecondary(SSPRITE_RIDLEY_PART, RIDLEY_PART_HEAD,
gfxSlot, ramSlot, yPosition, xPosition, SPRITE_STATUS_XFLIP);
gfxSlot, ramSlot, yPosition, xPosition, SPRITE_STATUS_X_FLIP);
// Spawn tail
SpriteSpawnSecondary(SSPRITE_RIDLEY_PART, RIDLEY_PART_TAIL, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_TIP, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_LEFT_MOST, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_LEFT_MIDDLE, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_LEFT_RIGHT, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_RIGHT_MOST, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_RIGHT_MIDDLE, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_RIGHT_LEFT, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_RIDLEY_TAIL, RIDLEY_TAIL_PART_BODY_ATTACHMENT, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
// Spawn claw
gSubSpriteData1.workVariable5 = SpriteSpawnSecondary(SSPRITE_RIDLEY_PART, RIDLEY_PART_CLAW,
gfxSlot, ramSlot, yPosition, xPosition, SPRITE_STATUS_XFLIP);
gfxSlot, ramSlot, yPosition, xPosition, SPRITE_STATUS_X_FLIP);
// Spawn right wing
SpriteSpawnSecondary(SSPRITE_RIDLEY_PART, RIDLEY_PART_RIGHT_WING, gfxSlot, ramSlot,
yPosition, xPosition, SPRITE_STATUS_XFLIP);
yPosition, xPosition, SPRITE_STATUS_X_FLIP);
}
/**
@ -840,9 +840,9 @@ void RidleySpawning(void)
gCurrentSprite.work1++;
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
break;
@ -919,9 +919,9 @@ void RidleySpawning(void)
if (--gCurrentSprite.work2 == 0)
{
if (gSubSpriteData1.xPosition < gSamusData.xPosition)
gCurrentSprite.status |= (SPRITE_STATUS_XFLIP | SPRITE_STATUS_FACING_RIGHT);
gCurrentSprite.status |= (SPRITE_STATUS_X_FLIP | SPRITE_STATUS_FACING_RIGHT);
else
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_FACING_RIGHT);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_FACING_RIGHT);
gCurrentSprite.work1 = RIDLEY_SPAWNING_ACTION_GOING_DOWN;
}
@ -1076,7 +1076,7 @@ void RidleyIdle(void)
{
if (MOD_AND(gSpriteData[clawSlot].work0++, 16) == 0)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_RIDLEY_FIREBALL, RIDLEY_FIREBALL_PART_SAMUS_GRABBED,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
@ -1373,9 +1373,9 @@ void RidleyTurningAroundFirstPart(void)
// Flip
gCurrentSprite.status ^= SPRITE_STATUS_FACING_RIGHT;
if(gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
}
@ -1715,7 +1715,7 @@ void RidleyBigFireballsAttack(void)
}
else if (gCurrentSprite.work0 == 0x14)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
status = SPRITE_STATUS_FACING_RIGHT;
xPosition = gCurrentSprite.xPosition + (BLOCK_SIZE * 2 - QUARTER_BLOCK_SIZE);
@ -1993,7 +1993,7 @@ void RidleyPartSyncPalette(u8 ramSlot)
*/
void RidleyPartClawUpdateSidesHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = 0xA0;
gCurrentSprite.hitboxRight = 0xE0;
@ -2199,7 +2199,7 @@ void RidleyTailChargingAttack(void)
gSpriteData[ramSlot].pose = RIDLEY_POSE_TAIL_ATTACKS;
// Flip and check do diagonal attack or not
if (gSpriteData[ramSlot].status & SPRITE_STATUS_XFLIP)
if (gSpriteData[ramSlot].status & SPRITE_STATUS_X_FLIP)
{
if (gSubSpriteData1.xPosition - BLOCK_SIZE * 2 > gSamusData.xPosition)
gSpriteData[ramSlot].status &= ~SPRITE_STATUS_FACING_RIGHT;
@ -2443,7 +2443,7 @@ void RidleyTailCheckBackToIdleAnimEnded(void)
gCurrentSprite.pose = RIDLEY_TAIL_POSE_IDLE;
gSpriteData[ramSlot].pose = RIDLEY_POSE_IDLE_INIT;
if (gSpriteData[ramSlot].status & SPRITE_STATUS_XFLIP)
if (gSpriteData[ramSlot].status & SPRITE_STATUS_X_FLIP)
gSpriteData[ramSlot].status |= SPRITE_STATUS_FACING_RIGHT;
else
gSpriteData[ramSlot].status &= ~SPRITE_STATUS_FACING_RIGHT;
@ -2526,7 +2526,7 @@ void RidleyFireballInit(void)
gCurrentSprite.rotation = 0;
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
// Set pattern
if (gCurrentSprite.roomSlot == RIDLEY_FIREBALL_PART_SAMUS_GRABBED)
@ -2785,7 +2785,7 @@ void Ridley(void)
}
}
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = -0x60;
gCurrentSprite.hitboxRight = 0x80;
@ -2842,10 +2842,10 @@ void RidleyTail(void)
}
// Sync flip
if (gSpriteData[ramSlot].status & SPRITE_STATUS_XFLIP)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
if (gSpriteData[ramSlot].status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
if (gCurrentSprite.roomSlot != RIDLEY_TAIL_PART_TIP)
{
@ -2976,10 +2976,10 @@ void RidleyPart(void)
}
// Sync flip
if (gSpriteData[ramSlot].status & SPRITE_STATUS_XFLIP)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
if (gSpriteData[ramSlot].status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
if (part != RIDLEY_PART_TAIL && gCurrentSprite.status & SPRITE_STATUS_NOT_DRAWN)
{

View File

@ -65,7 +65,7 @@ void RipperMove(void)
else
speed = 2;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Move right
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - QUARTER_BLOCK_SIZE,
@ -110,7 +110,7 @@ void RipperTurnAroundFirstPart(void)
{
if (SpriteUtilCheckEndCurrentSpriteAnim())
{
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pose = RIPPER_POSE_TURNING_AROUND_SECOND_PART;
gCurrentSprite.pOam = sRipperOam_TurningAroundPart2;

View File

@ -58,7 +58,7 @@ void Ripper2MovingInit(void)
*/
void Ripper2Move(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - QUARTER_BLOCK_SIZE,
gCurrentSprite.xPosition + (HALF_BLOCK_SIZE + PIXEL_SIZE * 3));
@ -104,7 +104,7 @@ void Ripper2TurnAroundPart1(void)
{
if (SpriteUtilCheckEndCurrentSpriteAnim())
{
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pose = RIPPER2_POSE_TURNING_AROUND_SECOND_PART;
gCurrentSprite.pOam = sRipper2Oam_TurningAroundPart2;

View File

@ -941,7 +941,7 @@ void RuinsTestMoveToCenter(void)
u16 spriteY;
u16 targetY;
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
return;
targetY = gBossWork.work1;
@ -2344,7 +2344,7 @@ void RuinsTestLightning(void)
// Spawn right lightning
SpriteSpawnSecondary(SSPRITE_RUINS_TEST_LIGHTNING, RUINS_TEST_LIGHTNING_PART_GROUND_RIGHT,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition, gCurrentSprite.xPosition, SPRITE_STATUS_XFLIP);
gCurrentSprite.yPosition, gCurrentSprite.xPosition, SPRITE_STATUS_X_FLIP);
}
break;
@ -2356,7 +2356,7 @@ void RuinsTestLightning(void)
}
// Move
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += velocity;
else
gCurrentSprite.xPosition -= velocity;
@ -2376,7 +2376,7 @@ void RuinsTestLightning(void)
gCurrentSprite.pose = RUINS_TEST_LIGHTNING_POSE_ON_GROUND_VERTICAL;
// Update position
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
else
{

View File

@ -55,7 +55,7 @@ void SearchlightEyeInit(void)
}
else
{
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.xPosition -= HALF_BLOCK_SIZE;
}
@ -79,10 +79,10 @@ void SearchlightEyeInit(void)
ramSlot = gCurrentSprite.primarySpriteRamSlot;
// Spawn beam
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_SEARCHLIGHT_EYE_BEAM2, 0, gfxSlot,
ramSlot, yPosition, xPosition + SEARCHLIGHT_EYE_BEAM_SIZE, SPRITE_STATUS_XFLIP);
ramSlot, yPosition, xPosition + SEARCHLIGHT_EYE_BEAM_SIZE, SPRITE_STATUS_X_FLIP);
}
else
{
@ -104,7 +104,7 @@ void SearchlightEyeMove(void)
yPosition = gCurrentSprite.yPosition;
xPosition = gCurrentSprite.xPosition;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= QUARTER_BLOCK_SIZE;
else
xPosition += QUARTER_BLOCK_SIZE;
@ -204,7 +204,7 @@ void SearchlightEyeShoot(void)
if (gCurrentSprite.status & SPRITE_STATUS_ONSCREEN)
{
// Custom and for some reason
status = gCurrentSprite.status & SPRITE_STATUS_XFLIP ? SPRITE_STATUS_XFLIP : 0;
status = gCurrentSprite.status & SPRITE_STATUS_X_FLIP ? SPRITE_STATUS_X_FLIP : 0;
// Spawn beam
SpriteSpawnSecondary(SSPRITE_SEARCHLIGHT_EYE_PROJECTILE, 0,
@ -278,7 +278,7 @@ void SearchlightEyeBeamDetectSamus(void)
foundBlock = FALSE;
// Check for block
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// X start
xPosition = gCurrentSprite.xPosition + -(BLOCK_SIZE * 6 + HALF_BLOCK_SIZE - PIXEL_SIZE);
@ -453,7 +453,7 @@ void SearchlightEyeProjectile(void)
gCurrentSprite.drawOrder = 3;
gCurrentSprite.bgPriority = MOD_AND(gIoRegistersBackup.BG1CNT, 4);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = 0;
gCurrentSprite.hitboxRight = (QUARTER_BLOCK_SIZE + EIGHTH_BLOCK_SIZE);
@ -468,7 +468,7 @@ void SearchlightEyeProjectile(void)
SoundPlay(0x26D);
case 9:
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += PIXEL_SIZE * 3;
else
gCurrentSprite.xPosition -= PIXEL_SIZE * 3;

View File

@ -41,14 +41,14 @@ void SidehopperInit(void)
if (gPreviousCollisionCheck & 0xF0)
{
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.yPosition -= BLOCK_SIZE;
}
gCurrentSprite.work0 = 0x0;
gCurrentSprite.pose = SIDEHOPPER_POSE_IDLE;
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
gCurrentSprite.drawDistanceTop = 0x8;
gCurrentSprite.drawDistanceBottom = 0x28;
@ -107,7 +107,7 @@ void SidehopperJumpingInit(void)
else
gCurrentSprite.work2 = FALSE;
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
gCurrentSprite.hitboxBottom = 0x70;
else
gCurrentSprite.hitboxTop = -0x70;
@ -128,7 +128,7 @@ void SidehopperLandingInit(void)
gCurrentSprite.currentAnimationFrame = 0x0;
gCurrentSprite.pOam = sSidehopperOAM_Landing;
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
gCurrentSprite.hitboxBottom = 0x5C;
else
gCurrentSprite.hitboxTop = -0x5C;
@ -629,7 +629,7 @@ void SidehopperDeath(void)
{
u16 yPosition;
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
yPosition = gCurrentSprite.yPosition + 0x34;
else
yPosition = gCurrentSprite.yPosition - 0x34;
@ -667,14 +667,14 @@ void Sidehopper(void)
SidehopperJumpWarningInit();
case SIDEHOPPER_POSE_JUMP_WARNING:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
SidehopperJumpWarningCeiling();
else
SidehopperJumpWarningGround();
break;
case SIDEHOPPER_POSE_JUMPING:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
SidehopperJumpingCeiling();
else
SidehopperJumpingGround();
@ -685,14 +685,14 @@ void Sidehopper(void)
break;
case SIDEHOPPER_POSE_IDLE:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
SidehopperIdleCeiling();
else
SidehopperIdleGround();
break;
case SIDEHOPPER_POSE_FALLING:
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
SidehopperFallingCeiling();
else
SidehopperFallingGround();

View File

@ -225,13 +225,13 @@ void SkreeCrashGround(void)
yPosition - (PIXEL_SIZE * 2), xPosition, 0);
SpriteSpawnSecondary(spriteId, SKREE_EXPLOSION_PART_GOING_UP, gfxSlot, ramSlot,
yPosition - (PIXEL_SIZE * 2), xPosition, SPRITE_STATUS_XFLIP);
yPosition - (PIXEL_SIZE * 2), xPosition, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(spriteId, SKREE_EXPLOSION_PART_GOING_DOWN, gfxSlot, ramSlot,
yPosition + (PIXEL_SIZE * 2), xPosition - (PIXEL_SIZE * 3), 0);
SpriteSpawnSecondary(spriteId, SKREE_EXPLOSION_PART_GOING_DOWN, gfxSlot, ramSlot,
yPosition + (PIXEL_SIZE * 2), xPosition + (PIXEL_SIZE * 3), SPRITE_STATUS_XFLIP);
yPosition + (PIXEL_SIZE * 2), xPosition + (PIXEL_SIZE * 3), SPRITE_STATUS_X_FLIP);
gCurrentSprite.status = 0;
@ -288,7 +288,7 @@ void SkreeExplosionMove(void)
if (gCurrentSprite.currentAnimationFrame > 1)
gCurrentSprite.ignoreSamusCollisionTimer = DELTA_TIME;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.xPosition += PIXEL_SIZE * 2;
gCurrentSprite.rotation += PI / 4;

View File

@ -19,7 +19,7 @@
*/
void SkulteraSetSidesHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxLeft = -SKULTERA_TAIL_HITBOX;
gCurrentSprite.hitboxRight = SKULTERA_HEAD_HITBOX;
@ -42,7 +42,7 @@ u8 SkulteraXMovement(u16 movement)
s16 negMovement;
negMovement = movement;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - HALF_BLOCK_SIZE,
gCurrentSprite.xPosition + (QUARTER_BLOCK_SIZE * 3 + PIXEL_SIZE * 2));
@ -136,7 +136,7 @@ void SkulteraMoving(void)
else
{
// Check out of movement territory, if out set turning around
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gCurrentSprite.xPositionSpawn + SKULTERA_TERRITORY_RANGE < gCurrentSprite.xPosition)
gCurrentSprite.pose = SKULTERA_POSE_TURNING_AROUND;
@ -160,7 +160,7 @@ void SkulteraMoving(void)
nslr = SpriteUtilCheckSamusNearSpriteLeftRight(BLOCK_SIZE * 3, BLOCK_SIZE * 5);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check on right
if (nslr == NSLR_RIGHT)
@ -241,7 +241,7 @@ void SkulteraChasingSamus(void)
nslr = SpriteUtilCheckSamusNearSpriteLeftRight(BLOCK_SIZE * 3, BLOCK_SIZE * 5);
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (nslr != NSLR_RIGHT)
{
@ -291,7 +291,7 @@ void SkulteraCheckTurningAroundAnimEnded(void)
SkulteraIdleInit();
// Flip and set hitbox
gCurrentSprite.status ^= SPRITE_STATUS_XFLIP;
gCurrentSprite.status ^= SPRITE_STATUS_X_FLIP;
SkulteraSetSidesHitbox();
}

View File

@ -25,7 +25,7 @@ u8 SovaCheckCollidingWithAir(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - HALF_BLOCK_SIZE, gCurrentSprite.xPosition);
if (gPreviousCollisionCheck == COLLISION_AIR)
@ -81,7 +81,7 @@ void SovaUpdateHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxTop = -0x1C;
gCurrentSprite.hitboxBottom = 0x1C;
@ -136,9 +136,9 @@ void SovaSetCrawlingOAM(void)
gCurrentSprite.pOam = sSovaOam_OnGround;
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.animationDurationCounter = 0;
@ -184,7 +184,7 @@ void SovaInit(void)
if (gPreviousCollisionCheck & 0xF0)
{
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.yPosition -= HALF_BLOCK_SIZE;
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
}
@ -200,9 +200,9 @@ void SovaInit(void)
if (!(gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN))
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.samusCollision = SSC_HURTS_SAMUS;
@ -282,7 +282,7 @@ void SovaMove(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
@ -439,9 +439,9 @@ void SovaMove(void)
gCurrentSprite.currentAnimationFrame = 0;
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
@ -500,7 +500,7 @@ void SovaMove(void)
gCurrentSprite.pOam = sSovaOam_WalkingOnRightSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.xPosition += speed;
@ -512,7 +512,7 @@ void SovaMove(void)
gCurrentSprite.pOam = sSovaOam_WalkingOnLeftSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.xPosition += (speed * 2 / 3);
@ -527,7 +527,7 @@ void SovaMove(void)
gCurrentSprite.pOam = sSovaOam_WalkingOnRightSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.xPosition -= speed;
@ -539,7 +539,7 @@ void SovaMove(void)
gCurrentSprite.pOam = sSovaOam_WalkingOnLeftSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.xPosition -= (speed * 2 / 3);
@ -571,8 +571,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningEdgeLeft;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_TOP_RIGHT_EDGE:
@ -581,8 +581,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningEdgeLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_BOTTOM_RIGHT_EDGE:
@ -591,8 +591,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningCornerRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_TOP_RIGHT_CORNER:
@ -601,8 +601,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningCornerRight;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_TOP_LEFT_EDGE:
@ -611,8 +611,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningEdgeRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_BOTTOM_RIGHT_CORNER:
@ -621,8 +621,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningCornerLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_TOP_LEFT_CORNER:
@ -631,8 +631,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningEdgeRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case SOVA_TURNING_DIRECTION_BOTTOM_LEFT_EDGE:
@ -641,8 +641,8 @@ void SovaTurningAroundInit(void)
else
gCurrentSprite.pOam = sSovaOam_TurningCornerLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
default:
@ -660,7 +660,7 @@ void SovaTurningAround(void)
return;
gCurrentSprite.pose = SOVA_POSE_IDLE;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
gCurrentSprite.work2 = FALSE;
switch (gCurrentSprite.work1)
@ -672,7 +672,7 @@ void SovaTurningAround(void)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -684,7 +684,7 @@ void SovaTurningAround(void)
gCurrentSprite.xPosition += BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -695,7 +695,7 @@ void SovaTurningAround(void)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -707,7 +707,7 @@ void SovaTurningAround(void)
gCurrentSprite.xPosition += BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -717,12 +717,12 @@ void SovaTurningAround(void)
gCurrentSprite.xPosition += 0x1C;
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.yPosition += BLOCK_SIZE;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
else
{
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
@ -734,12 +734,12 @@ void SovaTurningAround(void)
gCurrentSprite.xPosition -= 0x1C;
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.yPosition += BLOCK_SIZE;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
else
{
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
@ -750,10 +750,10 @@ void SovaTurningAround(void)
{
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.xPosition += 0x18;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.work2 = TRUE;
@ -764,10 +764,10 @@ void SovaTurningAround(void)
{
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.xPosition -= 0x1C;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.work2 = TRUE;
@ -796,9 +796,9 @@ void SovaLandingInit(void)
SpriteUtilChooseRandomXDirection();
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
/**
@ -821,7 +821,7 @@ void SovaFallingInit(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition -= HALF_BLOCK_SIZE;
else
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
@ -835,7 +835,7 @@ void SovaFallingInit(void)
gCurrentSprite.pose = SOVA_POSE_FALLING;
gCurrentSprite.work3 = 0;
gCurrentSprite.work2 = 0;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP | SPRITE_STATUS_FACING_DOWN);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP | SPRITE_STATUS_FACING_DOWN);
SovaUpdateHitbox();
@ -895,7 +895,7 @@ void SovaDeath(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= 0x28;
else
xPosition += 0x28;

View File

@ -161,13 +161,13 @@ void SpacePirateFlip(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.hitboxLeft = -0x18;
gCurrentSprite.hitboxRight = 0x40;
}
else
{
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.hitboxLeft = -0x40;
gCurrentSprite.hitboxRight = 0x18;
}
@ -888,23 +888,23 @@ void SpacePirateFireLaserGround(void)
if (gCurrentSprite.work1 == SPACE_PIRATE_AIM_FORWARD)
{
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_FORWARD, gfxSlot, ramSlot,
yPosition - 0x34, xPosition + 0x44, SPRITE_STATUS_XFLIP);
yPosition - 0x34, xPosition + 0x44, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_FORWARD, gfxSlot, ramSlot,
yPosition - 0x78, xPosition + 0x78, SPRITE_STATUS_XFLIP);
yPosition - 0x78, xPosition + 0x78, SPRITE_STATUS_X_FLIP);
}
else if (gCurrentSprite.work1 == SPACE_PIRATE_AIM_DIAGONALLY_UP)
{
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_DIAGONALLY_UP, gfxSlot, ramSlot,
yPosition - 0x98, xPosition + 0x44, SPRITE_STATUS_XFLIP);
yPosition - 0x98, xPosition + 0x44, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_DIAGONALLY_UP, gfxSlot, ramSlot,
yPosition - 0x5E, xPosition + 0x58, SPRITE_STATUS_XFLIP);
yPosition - 0x5E, xPosition + 0x58, SPRITE_STATUS_X_FLIP);
}
else if (gCurrentSprite.work1 == SPACE_PIRATE_AIM_DIAGONALLY_DOWN)
{
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_DIAGONALLY_DOWN, gfxSlot, ramSlot,
yPosition - 0x1C, xPosition + 0x44, SPRITE_STATUS_XFLIP);
yPosition - 0x1C, xPosition + 0x44, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_DIAGONALLY_DOWN, gfxSlot, ramSlot,
yPosition - 0x60, xPosition + 0x58, SPRITE_STATUS_XFLIP);
yPosition - 0x60, xPosition + 0x58, SPRITE_STATUS_X_FLIP);
}
}
else
@ -959,9 +959,9 @@ void SpacePirateFireLaserWall(void)
else
{
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_FORWARD, gfxSlot, ramSlot,
yPosition - 0x94, xPosition + 0x44, SPRITE_STATUS_XFLIP);
yPosition - 0x94, xPosition + 0x44, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, SPACE_PIRATE_LASER_PART_FORWARD, gfxSlot, ramSlot,
yPosition - 0x4E, xPosition + 0x44, SPRITE_STATUS_XFLIP);
yPosition - 0x4E, xPosition + 0x44, SPRITE_STATUS_X_FLIP);
}
}
@ -3111,7 +3111,7 @@ void SpacePirateWaitingAtDoor(void)
{
SpriteSpawnSecondary(SSPRITE_SPACE_PIRATE_LASER, 0x80, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition - 0x50,
gCurrentSprite.xPosition, SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition, SPRITE_STATUS_X_FLIP);
}
else
{
@ -4182,7 +4182,7 @@ u8 roomSlot;
else if (roomSlot == SPACE_PIRATE_LASER_PART_DIAGONALLY_DOWN)
{
gCurrentSprite.pOam = sSpacePirateLaserOAM_Diagonal;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
}
else
{
@ -4256,7 +4256,7 @@ void SpacePirateLaserMove(void)
case SPACE_PIRATE_LASER_PART_DIAGONALLY_UP:
gCurrentSprite.yPosition -= 0xF;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += 0xF;
else
gCurrentSprite.xPosition -= 0xF;
@ -4265,14 +4265,14 @@ void SpacePirateLaserMove(void)
case SPACE_PIRATE_LASER_PART_DIAGONALLY_DOWN:
gCurrentSprite.yPosition += 0xF;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += 0xF;
else
gCurrentSprite.xPosition -= 0xF;
break;
default:
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += 0x14;
else
gCurrentSprite.xPosition -= 0x14;

View File

@ -56,7 +56,7 @@ void SpacePirateCarryingPowerBomb(void)
gCurrentSprite.samusCollision = SSC_NONE;
gCurrentSprite.pose = SPACE_PIRATE_CARRYING_POWER_BOMB_POSE_SPAWNING;
gCurrentSprite.status |= (SPRITE_STATUS_XFLIP | SPRITE_STATUS_FACING_RIGHT);
gCurrentSprite.status |= (SPRITE_STATUS_X_FLIP | SPRITE_STATUS_FACING_RIGHT);
break;
case SPACE_PIRATE_CARRYING_POWER_BOMB_POSE_SPAWNING:

View File

@ -59,7 +59,7 @@ void Steam(void)
{
// Steam on ceiling
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.yPosition -= BLOCK_SIZE;
if (isLarge)
@ -107,7 +107,7 @@ void Steam(void)
{
// Steam on right wall
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.yPosition -= HALF_BLOCK_SIZE;
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
}
@ -181,7 +181,7 @@ void SteamDiagonal(void)
gCurrentSprite.xPosition - (HALF_BLOCK_SIZE + PIXEL_SIZE));
if (!(collision & COLLISION_FLAGS_UNKNOWN_F0))
gCurrentSprite.status |= SPRITE_STATUS_XFLIP; // Flip if wall on left
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP; // Flip if wall on left
if (gCurrentSprite.spriteId == PSPRITE_STEAM_LARGE_DIAGONAL_UP)
{
@ -203,7 +203,7 @@ void SteamDiagonal(void)
{
gCurrentSprite.work1 = TRUE; // Is large flag
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.drawDistanceTop = SUB_PIXEL_TO_PIXEL(HALF_BLOCK_SIZE);
gCurrentSprite.drawDistanceBottom = SUB_PIXEL_TO_PIXEL(BLOCK_SIZE * 4);
gCurrentSprite.drawDistanceHorizontal = SUB_PIXEL_TO_PIXEL(BLOCK_SIZE * 5);
@ -211,7 +211,7 @@ void SteamDiagonal(void)
}
else if (gCurrentSprite.spriteId == PSPRITE_STEAM_SMALL_DIAGONAL_DOWN)
{
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.drawDistanceTop = SUB_PIXEL_TO_PIXEL(QUARTER_BLOCK_SIZE);
gCurrentSprite.drawDistanceBottom = SUB_PIXEL_TO_PIXEL(BLOCK_SIZE * 2 + HALF_BLOCK_SIZE);
gCurrentSprite.drawDistanceHorizontal = SUB_PIXEL_TO_PIXEL(BLOCK_SIZE * 3);

View File

@ -34,7 +34,7 @@ void TangleVineSyncSprites(void)
gCurrentSprite.yPosition = gSubSpriteData1.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData1.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData1.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];

View File

@ -42,7 +42,7 @@ void UnknownItemChozoStatueSyncSubSprites(void)
gCurrentSprite.yPosition = gSubSpriteData1.yPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_Y_OFFSET];
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition = gSubSpriteData1.xPosition - pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
else
gCurrentSprite.xPosition = gSubSpriteData1.xPosition + pData[gCurrentSprite.roomSlot][MULTI_SPRITE_DATA_ELEMENT_X_OFFSET];
@ -64,7 +64,7 @@ void UnknownItemChozoStatueInit(void)
gCurrentSprite.properties |= (SP_ALWAYS_ACTIVE | SP_SOLID_FOR_PROJECTILES);
ChozoStatueSetDirection();
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gSubSpriteData1.xPosition = gCurrentSprite.xPosition + HALF_BLOCK_SIZE;
else
gSubSpriteData1.xPosition = gCurrentSprite.xPosition - HALF_BLOCK_SIZE;
@ -120,7 +120,7 @@ void UnknownItemChozoStatueInit(void)
gCurrentSprite.pose = UNKNOWN_ITEM_CHOZO_STATUE_POSE_WAIT_FOR_ITEM_TO_BE_COLLECTED;
// Spawn chozo ball
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_CHOZO_BALL, 0, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gSubSpriteData1.yPosition - (BLOCK_SIZE + HALF_BLOCK_SIZE),
@ -146,19 +146,19 @@ void UnknownItemChozoStatueInit(void)
// Spawn eye
gCurrentSprite.work1 = SpriteSpawnSecondary(SSPRITE_UNKNOWN_ITEM_CHOZO_STATUE_PART, UNKNOWN_ITEM_CHOZO_STATUE_PART_EYE,
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
// Spawn arm
behavior = SpriteSpawnSecondary(SSPRITE_UNKNOWN_ITEM_CHOZO_STATUE_PART, UNKNOWN_ITEM_CHOZO_STATUE_PART_ARM,
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gfxSlot, ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
// Spawn leg
SpriteSpawnSecondary(SSPRITE_UNKNOWN_ITEM_CHOZO_STATUE_PART, UNKNOWN_ITEM_CHOZO_STATUE_PART_LEG, gfxSlot, ramSlot,
yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
// Spawn glow
newRamSlot = SpriteSpawnSecondary(SSPRITE_UNKNOWN_ITEM_CHOZO_STATUE_PART, UNKNOWN_ITEM_CHOZO_STATUE_PART_GLOW, gfxSlot,
ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
ramSlot, yPosition, xPosition, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
gSpriteData[newRamSlot].work1 = behavior;
}
@ -520,7 +520,7 @@ void UnknownItemChozoStatuePartArmCheckGrabSamusHint(void)
xPosition = gCurrentSprite.xPosition;
// Get X offset
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition += UNKNOWN_ITEM_CHOZO_STATUE_HAND_X_OFFSET;
else
xPosition -= UNKNOWN_ITEM_CHOZO_STATUE_HAND_X_OFFSET;
@ -556,7 +556,7 @@ void UnknownItemChozoStatuePartSyncSamusPosition(void)
{
gSamusData.yPosition = gCurrentSprite.yPosition - UNKNOWN_ITEM_CHOZO_STATUE_HAND_Y_OFFSET;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gSamusData.xPosition = gCurrentSprite.xPosition + UNKNOWN_ITEM_CHOZO_STATUE_HAND_X_OFFSET;
else
gSamusData.xPosition = gCurrentSprite.xPosition - UNKNOWN_ITEM_CHOZO_STATUE_HAND_X_OFFSET;
@ -625,7 +625,7 @@ void UnknownItemChozoStatuePartArmCheckGrabSamusRefill(void)
xPosition = gCurrentSprite.xPosition;
// Get X offset
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition += UNKNOWN_ITEM_CHOZO_STATUE_HAND_X_OFFSET;
else
xPosition -= UNKNOWN_ITEM_CHOZO_STATUE_HAND_X_OFFSET;
@ -1070,7 +1070,7 @@ void ChozoStatueStandingChangeCcaa(u8 bodyCaa, u8 handCaa)
yPosition = gSubSpriteData1.yPosition;
xPosition = gSubSpriteData1.xPosition;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
xPosition += HALF_BLOCK_SIZE;
@ -1122,7 +1122,7 @@ void ChozoStatueSeatedChangeCcaa(u8 caa)
yPosition = gSubSpriteData1.yPosition;
xPosition = gSubSpriteData1.xPosition;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentClipdataAffectingAction = caa;
ClipdataProcess(yPosition - HALF_BLOCK_SIZE, xPosition + HALF_BLOCK_SIZE);

View File

@ -51,13 +51,13 @@ void WaverMove(void)
xSpeed = PIXEL_SIZE;
// Move horizontaly
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition, gCurrentSprite.hitboxRight + gCurrentSprite.xPosition);
if (gPreviousCollisionCheck == COLLISION_AIR)
gCurrentSprite.xPosition += xSpeed;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
}
else
{
@ -65,7 +65,7 @@ void WaverMove(void)
if (gPreviousCollisionCheck == COLLISION_AIR)
gCurrentSprite.xPosition -= xSpeed;
else
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
}
// Move vertically

View File

@ -54,7 +54,7 @@ u8 WorkerRobotCheckSamusInFront(void)
if (SpriteUtilCheckObjectsTouching(spriteTop, spriteBottom, spriteLeft, spriteRight,
samusTop, samusBottom, samusLeft, samusRight))
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (spriteX < samusX)
return TRUE;
@ -92,7 +92,7 @@ void WorkerRobotInit(void)
SpriteUtilMakeSpriteFaceAwayFromSamusXFlip();
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
gCurrentSprite.pose = WORKER_ROBOT_POSE_SLEEPING;
@ -193,12 +193,12 @@ void WorkerRobotWalkingDetectProjectile(void)
if (onSide)
{
if (pProj->status & PROJ_STATUS_XFLIP)
if (pProj->status & PROJ_STATUS_X_FLIP)
{
projX = spriteLeft;
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gCurrentSprite.pOam != sWorkerRobotOAM_Walking)
gCurrentSprite.pOam = sWorkerRobotOAM_Walking;
@ -214,7 +214,7 @@ void WorkerRobotWalkingDetectProjectile(void)
projX = spriteRight;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_RIGHT;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gCurrentSprite.pOam != sWorkerRobotOAM_WalkingBackwards)
gCurrentSprite.pOam = sWorkerRobotOAM_WalkingBackwards;
@ -306,7 +306,7 @@ void WorkerRobotWalking(void)
return;
gCurrentSprite.work1 = collision;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (!(gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT))
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
@ -344,7 +344,7 @@ void WorkerRobotWalking(void)
if (gCurrentSprite.work1 == 0)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (!(gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT))
gCurrentSprite.status |= SPRITE_STATUS_FACING_RIGHT;
@ -452,10 +452,10 @@ void WorkerRobotTurningAround(void)
{
if (SpriteUtilCheckEndCurrentSpriteAnim())
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_FACING_RIGHT);
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_FACING_RIGHT);
else
gCurrentSprite.status |= (SPRITE_STATUS_XFLIP | SPRITE_STATUS_FACING_RIGHT);
gCurrentSprite.status |= (SPRITE_STATUS_X_FLIP | SPRITE_STATUS_FACING_RIGHT);
gCurrentSprite.pose = WORKER_ROBOT_POSE_CHECK_TURNING_AROUND_ENDED;

View File

@ -177,7 +177,7 @@ void ZebMove(void)
else
{
gCurrentSprite.work1++;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check should respawn
if (gCurrentSprite.xPosition - gSamusData.xPosition > BLOCK_SIZE * 16 || gCurrentSprite.xPosition & 0x8000)

View File

@ -110,7 +110,7 @@ void ZebboIdle(void)
ramSlot = SpriteSpawnDropFollowers(PSPRITE_ZEBBO_GREEN_FOLLOWER, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + (BLOCK_SIZE + HALF_BLOCK_SIZE),
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
if (ramSlot != 0xFF)
{
@ -121,7 +121,7 @@ void ZebboIdle(void)
ramSlot = SpriteSpawnDropFollowers(PSPRITE_ZEBBO_GREEN_FOLLOWER, gCurrentSprite.roomSlot,
gCurrentSprite.spritesetGfxSlot, gCurrentSprite.primarySpriteRamSlot,
gCurrentSprite.yPosition + (BLOCK_SIZE * 2 + HALF_BLOCK_SIZE),
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition - HALF_BLOCK_SIZE, gCurrentSprite.status & SPRITE_STATUS_X_FLIP);
if (ramSlot != 0xFF)
{
@ -220,7 +220,7 @@ void ZebboMove(void)
else
{
gCurrentSprite.work1++;
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// Check should respawn
if (gCurrentSprite.xPosition - gSamusData.xPosition > BLOCK_SIZE * 16 || gCurrentSprite.xPosition & 0x8000)

View File

@ -20,7 +20,7 @@ void ZeelaSpawnEyes(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteSpawnSecondary(SSPRITE_ZEELA_EYES, 0x0, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition - 0x18,
@ -34,16 +34,16 @@ void ZeelaSpawnEyes(void)
{
SpriteSpawnSecondary(SSPRITE_ZEELA_EYES, 0x0, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition - 0x18,
gCurrentSprite.xPosition + 0x30, SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition + 0x30, SPRITE_STATUS_X_FLIP);
SpriteSpawnSecondary(SSPRITE_ZEELA_EYES, 0x1, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition + 0x18,
gCurrentSprite.xPosition + 0x30, SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition + 0x30, SPRITE_STATUS_X_FLIP);
}
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
SpriteSpawnSecondary(SSPRITE_ZEELA_EYES, 0x1, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition + 0x30,
@ -51,7 +51,7 @@ void ZeelaSpawnEyes(void)
SpriteSpawnSecondary(SSPRITE_ZEELA_EYES, 0x1, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition + 0x30,
gCurrentSprite.xPosition + 0x18, SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition + 0x18, SPRITE_STATUS_X_FLIP);
}
else
{
@ -61,7 +61,7 @@ void ZeelaSpawnEyes(void)
SpriteSpawnSecondary(SSPRITE_ZEELA_EYES, 0x2, gCurrentSprite.spritesetGfxSlot,
gCurrentSprite.primarySpriteRamSlot, gCurrentSprite.yPosition - 0x30,
gCurrentSprite.xPosition + 0x18, SPRITE_STATUS_XFLIP);
gCurrentSprite.xPosition + 0x18, SPRITE_STATUS_X_FLIP);
}
}
}
@ -77,7 +77,7 @@ u8 ZeelaCheckCollidingWithAir(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - HALF_BLOCK_SIZE, gCurrentSprite.xPosition);
if (gPreviousCollisionCheck == COLLISION_AIR)
@ -100,7 +100,7 @@ u8 ZeelaCheckCollidingWithAir(void)
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
SpriteUtilCheckCollisionAtPosition(gCurrentSprite.yPosition - 0x4, gCurrentSprite.xPosition - HALF_BLOCK_SIZE);
if (gPreviousCollisionCheck == COLLISION_AIR)
@ -133,7 +133,7 @@ void ZeelaUpdateHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
// On right wall
gCurrentSprite.hitboxTop = -ZEELA_RIGHT_HITBOX;
@ -152,7 +152,7 @@ void ZeelaUpdateHitbox(void)
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
// On ceiling
gCurrentSprite.hitboxTop = -ZEELA_LEGS_HITBOX;
@ -184,9 +184,9 @@ void ZeelaSetCrawlingOam(void)
else
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
else
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.pOam = sZeelaOam_OnGround;
}
@ -230,7 +230,7 @@ void ZeelaInit(void)
if (gPreviousCollisionCheck & 0xF0)
{
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.yPosition -= BLOCK_SIZE;
}
else
@ -252,7 +252,7 @@ void ZeelaInit(void)
if (gPreviousCollisionCheck & 0xF0)
{
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.yPosition -= HALF_BLOCK_SIZE;
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
}
@ -312,7 +312,7 @@ void ZeelaMove(void)
if (SpriteUtilShouldFall())
{
if (gCurrentSprite.status & (SPRITE_STATUS_YFLIP | SPRITE_STATUS_FACING_DOWN))
if (gCurrentSprite.status & (SPRITE_STATUS_Y_FLIP | SPRITE_STATUS_FACING_DOWN))
gCurrentSprite.pose = ZEELA_POSE_FALLING_INIT;
return;
@ -320,7 +320,7 @@ void ZeelaMove(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
@ -417,7 +417,7 @@ void ZeelaMove(void)
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
@ -530,7 +530,7 @@ void ZeelaMove(void)
{
if (gCurrentSprite.pOam != sZeelaOam_WalkingOnSlope)
{
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.pOam = sZeelaOam_WalkingOnSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
@ -542,7 +542,7 @@ void ZeelaMove(void)
{
if (gCurrentSprite.pOam != sZeelaOam_WalkingOnSlope)
{
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pOam = sZeelaOam_WalkingOnSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
@ -557,7 +557,7 @@ void ZeelaMove(void)
{
if (gCurrentSprite.pOam != sZeelaOam_WalkingOnSlope)
{
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.pOam = sZeelaOam_WalkingOnSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
@ -569,7 +569,7 @@ void ZeelaMove(void)
{
if (gCurrentSprite.pOam != sZeelaOam_WalkingOnSlope)
{
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.pOam = sZeelaOam_WalkingOnSlope;
gCurrentSprite.animationDurationCounter = 0;
gCurrentSprite.currentAnimationFrame = 0;
@ -604,8 +604,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningCornerRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_TOP_RIGHT_EDGE:
@ -614,8 +614,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningCornerRight;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_BOTTOM_RIGHT_EDGE:
@ -624,8 +624,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningEdgeLeft;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_TOP_RIGHT_CORNER:
@ -634,8 +634,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningEdgeLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_TOP_LEFT_EDGE:
@ -644,8 +644,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningEdgeRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_BOTTOM_RIGHT_CORNER:
@ -654,8 +654,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningCornerLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_TOP_LEFT_CORNER:
@ -664,8 +664,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningEdgeRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case ZEELA_TURNING_DIRECTION_BOTTOM_LEFT_EDGE:
@ -674,8 +674,8 @@ void ZeelaTurningAroundInit(void)
else
gCurrentSprite.pOam = sZeelaOam_TurningCornerLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
default:
@ -703,7 +703,7 @@ void ZeelaTurning(void)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -715,7 +715,7 @@ void ZeelaTurning(void)
gCurrentSprite.xPosition += BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -726,7 +726,7 @@ void ZeelaTurning(void)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -738,7 +738,7 @@ void ZeelaTurning(void)
gCurrentSprite.xPosition += BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -752,7 +752,7 @@ void ZeelaTurning(void)
else
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP);
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -766,7 +766,7 @@ void ZeelaTurning(void)
else
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP);
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -777,7 +777,7 @@ void ZeelaTurning(void)
gCurrentSprite.xPosition += 0x1C;
}
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -788,7 +788,7 @@ void ZeelaTurning(void)
gCurrentSprite.xPosition -= HALF_BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -832,17 +832,17 @@ void ZeelaFallingInit(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition -= HALF_BLOCK_SIZE;
else
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
}
else if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
else if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
gCurrentSprite.yPosition += HALF_BLOCK_SIZE + EIGHTH_BLOCK_SIZE;
gCurrentSprite.pose = ZEELA_POSE_FALLING;
gCurrentSprite.work3 = 0;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP | SPRITE_STATUS_FACING_DOWN);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP | SPRITE_STATUS_FACING_DOWN);
ZeelaUpdateHitbox();
ZeelaSetFallingOam();
@ -902,14 +902,14 @@ void ZeelaDeath(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= HALF_BLOCK_SIZE + EIGHTH_BLOCK_SIZE;
else
xPosition += HALF_BLOCK_SIZE + EIGHTH_BLOCK_SIZE;
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
yPosition += HALF_BLOCK_SIZE + EIGHTH_BLOCK_SIZE;
else
yPosition -= HALF_BLOCK_SIZE + EIGHTH_BLOCK_SIZE;
@ -1034,7 +1034,7 @@ void ZeelaEyesMove(void)
xMovement = 3;
}
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition += xMovement;
else
gCurrentSprite.xPosition -= xMovement;

View File

@ -463,7 +463,7 @@ void ZiplineButtonIdle(void)
moving = FALSE;
ramSlot = gCurrentSprite.work1;
if (SPRITE_HAS_ISFT(gCurrentSprite))
if (SPRITE_GET_ISFT(gCurrentSprite))
{
// Button hit, set moving
gSpriteData[ramSlot].health = ZIPLINE_HEALTH_MOVING;

View File

@ -25,7 +25,7 @@ u8 ZoomerCheckCollidingWithAir(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition - HALF_BLOCK_SIZE, gCurrentSprite.xPosition) == COLLISION_AIR &&
SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition + HALF_BLOCK_SIZE, gCurrentSprite.xPosition) == COLLISION_AIR)
@ -40,7 +40,7 @@ u8 ZoomerCheckCollidingWithAir(void)
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
if (SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition - 0x4, gCurrentSprite.xPosition - HALF_BLOCK_SIZE) == COLLISION_AIR &&
SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition - 0x4, gCurrentSprite.xPosition + HALF_BLOCK_SIZE) == COLLISION_AIR)
@ -65,7 +65,7 @@ void ZoomerUpdateHitbox(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
gCurrentSprite.hitboxTop = -0x1C;
gCurrentSprite.hitboxBottom = 0x1C;
@ -82,7 +82,7 @@ void ZoomerUpdateHitbox(void)
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
gCurrentSprite.hitboxTop = -0x4;
gCurrentSprite.hitboxBottom = 0x34;
@ -146,7 +146,7 @@ void ZoomerInit(void)
else if (SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition - 0x44, gCurrentSprite.xPosition) & 0xF0)
{
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.yPosition -= BLOCK_SIZE;
}
else if (SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition - HALF_BLOCK_SIZE, gCurrentSprite.xPosition - 0x24) & 0xF0)
@ -158,7 +158,7 @@ void ZoomerInit(void)
else if (SpriteUtilGetCollisionAtPosition(gCurrentSprite.yPosition - HALF_BLOCK_SIZE, gCurrentSprite.xPosition + HALF_BLOCK_SIZE) & 0xF0)
{
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.yPosition -= HALF_BLOCK_SIZE;
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
}
@ -220,14 +220,14 @@ void ZoomerCrawling(void)
if (SpriteUtilShouldFall())
{
if (gCurrentSprite.status & (SPRITE_STATUS_YFLIP | SPRITE_STATUS_FACING_DOWN))
if (gCurrentSprite.status & (SPRITE_STATUS_Y_FLIP | SPRITE_STATUS_FACING_DOWN))
gCurrentSprite.pose = ZOOMER_POSE_FALLING_INIT;
return;
}
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
@ -324,7 +324,7 @@ void ZoomerCrawling(void)
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_RIGHT)
{
@ -513,8 +513,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningCornerRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_TOP_RIGHT_EDGE:
@ -523,8 +523,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningCornerRight;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_BOTTOM_RIGHT_EDGE:
@ -533,8 +533,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningEdgeLeft;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_TOP_RIGHT_CORNER:
@ -543,8 +543,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningEdgeLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_TOP_LEFT_EDGE:
@ -553,8 +553,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningEdgeRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_BOTTOM_RIGHT_CORNER:
@ -563,8 +563,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningCornerLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_TOP_LEFT_CORNER:
@ -573,8 +573,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningEdgeRight;
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
case ZOOMER_TURNING_DIRECTION_BOTTOM_LEFT_EDGE:
@ -583,8 +583,8 @@ void ZoomerTurningAroundInit(void)
else
gCurrentSprite.pOam = sZoomerOAM_TurningCornerLeft;
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
break;
default:
@ -612,7 +612,7 @@ void ZoomerTurningAround(void)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -624,7 +624,7 @@ void ZoomerTurningAround(void)
gCurrentSprite.xPosition += BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -635,7 +635,7 @@ void ZoomerTurningAround(void)
gCurrentSprite.xPosition &= BLOCK_POSITION_FLAG;
}
gCurrentSprite.status &= ~SPRITE_STATUS_XFLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -647,7 +647,7 @@ void ZoomerTurningAround(void)
gCurrentSprite.xPosition += BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_XFLIP;
gCurrentSprite.status |= SPRITE_STATUS_X_FLIP;
gCurrentSprite.status |= SPRITE_STATUS_FACING_DOWN;
break;
@ -661,7 +661,7 @@ void ZoomerTurningAround(void)
else
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP);
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -675,7 +675,7 @@ void ZoomerTurningAround(void)
else
gCurrentSprite.yPosition &= BLOCK_POSITION_FLAG;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP);
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -686,7 +686,7 @@ void ZoomerTurningAround(void)
gCurrentSprite.xPosition += 0x1C;
}
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -697,7 +697,7 @@ void ZoomerTurningAround(void)
gCurrentSprite.xPosition -= HALF_BLOCK_SIZE;
}
gCurrentSprite.status |= SPRITE_STATUS_YFLIP;
gCurrentSprite.status |= SPRITE_STATUS_Y_FLIP;
gCurrentSprite.status &= ~SPRITE_STATUS_FACING_DOWN;
break;
@ -739,17 +739,17 @@ void ZoomerFallingInit(void)
{
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
gCurrentSprite.xPosition -= HALF_BLOCK_SIZE;
else
gCurrentSprite.xPosition += HALF_BLOCK_SIZE;
}
else if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
else if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
gCurrentSprite.yPosition += 0x28;
gCurrentSprite.pose = ZOOMER_POSE_FALLING;
gCurrentSprite.work3 = 0x0;
gCurrentSprite.status &= ~(SPRITE_STATUS_XFLIP | SPRITE_STATUS_YFLIP | SPRITE_STATUS_FACING_DOWN);
gCurrentSprite.status &= ~(SPRITE_STATUS_X_FLIP | SPRITE_STATUS_Y_FLIP | SPRITE_STATUS_FACING_DOWN);
ZoomerUpdateHitbox();
ZoomerSetFallingOAM();
@ -808,14 +808,14 @@ void ZoomerDeath(void)
if (gCurrentSprite.status & SPRITE_STATUS_FACING_DOWN)
{
if (gCurrentSprite.status & SPRITE_STATUS_XFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_X_FLIP)
xPosition -= 0x28;
else
xPosition += 0x28;
}
else
{
if (gCurrentSprite.status & SPRITE_STATUS_YFLIP)
if (gCurrentSprite.status & SPRITE_STATUS_Y_FLIP)
yPosition += 0x28;
else
yPosition -= 0x28;