mirror of https://github.com/zeldaret/tmc.git
				
				
				
			Labeled one Portal Type and some animations
This commit is contained in:
		
							parent
							
								
									e994fab66a
								
							
						
					
					
						commit
						ab3e4ef0f4
					
				| 
						 | 
				
			
			@ -14,7 +14,7 @@ SCRIPT_START script_08016482
 | 
			
		|||
	DisablePlayerControl
 | 
			
		||||
	SetPlayerAction 0x00005408
 | 
			
		||||
	StartPlayerScript script_08016384
 | 
			
		||||
	SetPlayerAnimation FALL_ON_BACK
 | 
			
		||||
	SetPlayerAnimation ANIM_FALL_ON_BACK
 | 
			
		||||
	_0807E8E4_0
 | 
			
		||||
	_0807E8E4_1
 | 
			
		||||
	_0807E8E4_2
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,10 @@
 | 
			
		|||
 | 
			
		||||
#define MAX_ROOMS 64
 | 
			
		||||
 | 
			
		||||
typedef enum {
 | 
			
		||||
    PT_POT = 4,
 | 
			
		||||
} PortalTypes;
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
    u16 pixel_width;
 | 
			
		||||
    u16 pixel_height;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -294,6 +294,7 @@ typedef enum {
 | 
			
		|||
    ANIM_TRAPPED_BY_GHINI       = 0x25c,
 | 
			
		||||
    ANIM_BOW_END                = 0x280,
 | 
			
		||||
    ANIM_BOW                    = 0x284,
 | 
			
		||||
    ANIM_ROCS_CAPE              = 0x288,
 | 
			
		||||
    ANIM_SWIM_END               = 0x28c,
 | 
			
		||||
    ANIM_SWIM                   = 0x290,
 | 
			
		||||
    ANIM_FROZEN                 = 0x294,
 | 
			
		||||
| 
						 | 
				
			
			@ -347,6 +348,7 @@ typedef enum {
 | 
			
		|||
    ANIM_GET_ITEM_SWORD         = 0x45f,
 | 
			
		||||
    ANIM_524                    = 0x524,
 | 
			
		||||
    ANIM_ENTER_POT              = 0x52c,
 | 
			
		||||
    ANIM_IN_POT                 = 0x530,
 | 
			
		||||
    ANIM_LANTERN_END            = 0x604,
 | 
			
		||||
    ANIM_LANTERN                = 0x608,
 | 
			
		||||
    ANIM_BOTTLE_EMPTY           = 0x610,
 | 
			
		||||
| 
						 | 
				
			
			@ -380,9 +382,12 @@ typedef enum {
 | 
			
		|||
    ANIM_PULL_NOCAP             = 0x944,
 | 
			
		||||
    ANIM_FALL_IN_HOLE_NOCAP     = 0x950,
 | 
			
		||||
    ANIM_IN_HOLE_NOCAP          = 0x954,
 | 
			
		||||
    ANIM_SWORD_MINISH           = 0xc00,
 | 
			
		||||
    ANIM_WALK_MINISH            = 0xc04,
 | 
			
		||||
    ANIM_ROLL_MINISH            = 0xc08,
 | 
			
		||||
    ANIM_SWIM_MINISH            = 0xc0c,
 | 
			
		||||
    ANIM_C10                    = 0xc10,
 | 
			
		||||
    ANIM_C14                    = 0xc14,
 | 
			
		||||
    ANIM_BOUNCE_MINISH          = 0xc18,
 | 
			
		||||
    ANIM_DROWN_MINISH           = 0xc19,
 | 
			
		||||
    ANIM_DIE1_MINISH            = 0xc1a,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -554,7 +554,7 @@ void sub_080262A8(ChuchuBossEntity* this) {
 | 
			
		|||
    super->timer = 1;
 | 
			
		||||
    sub_080276F4(super, 6, 1);
 | 
			
		||||
    if (super->type2 == 0) {
 | 
			
		||||
        gPlayerState.animation = 0x104;
 | 
			
		||||
        gPlayerState.animation = ANIM_DOOR;
 | 
			
		||||
        this->unk_84->unk_03 = 1;
 | 
			
		||||
    } else {
 | 
			
		||||
        this->unk_7c = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -258,7 +258,7 @@ bool32 sub_0804AD18(void) {
 | 
			
		|||
        case 6:
 | 
			
		||||
            return FALSE;
 | 
			
		||||
        case 3:
 | 
			
		||||
        case 4:
 | 
			
		||||
        case PT_POT:
 | 
			
		||||
        case 5:
 | 
			
		||||
        default:
 | 
			
		||||
            return FALSE;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,7 +71,7 @@ void sub_080768F8(ItemBehavior* this, u32 index) {
 | 
			
		|||
        if ((gPlayerState.flags & PL_MINISH) == 0) {
 | 
			
		||||
            this->timer = 0x10;
 | 
			
		||||
        } else {
 | 
			
		||||
            gPlayerState.animation = 0xc14;
 | 
			
		||||
            gPlayerState.animation = ANIM_C14;
 | 
			
		||||
        }
 | 
			
		||||
        sub_08077D38(this, index);
 | 
			
		||||
        sub_08076964(this, index);
 | 
			
		||||
| 
						 | 
				
			
			@ -119,7 +119,7 @@ void sub_08076964(ItemBehavior* this, u32 index) {
 | 
			
		|||
                SetItemAnim(this, 0x104);
 | 
			
		||||
                return;
 | 
			
		||||
            } else {
 | 
			
		||||
                gPlayerState.animation = 0xc10;
 | 
			
		||||
                gPlayerState.animation = ANIM_C10;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -69,7 +69,7 @@ void sub_08076758(ItemBehavior* this, u32 index) {
 | 
			
		|||
                    gPlayerEntity.field_0x7a.HWORD = 2;
 | 
			
		||||
                    gPlayerEntity.zVelocity = Q_16_16(2.0);
 | 
			
		||||
                    gPlayerState.jump_status |= 0x10;
 | 
			
		||||
                    gPlayerState.animation = 0x288;
 | 
			
		||||
                    gPlayerState.animation = ANIM_ROCS_CAPE;
 | 
			
		||||
                    SoundReq(SFX_172);
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ void sub_08075338(ItemBehavior* this, u32 index) {
 | 
			
		|||
    if (gPlayerState.flags & PL_MINISH) {
 | 
			
		||||
        this->priority |= 0x80;
 | 
			
		||||
        sub_08077D38(this, index);
 | 
			
		||||
        gPlayerState.animation = 0xc00;
 | 
			
		||||
        gPlayerState.animation = ANIM_SWORD_MINISH;
 | 
			
		||||
        SoundReq(SFX_PLY_VO1);
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,7 +122,7 @@ void sub_0808C01C(JarPortalEntity* this, u32 r1) {
 | 
			
		|||
        gArea.portal_x = super->x.HALF.HI;
 | 
			
		||||
        gArea.portal_y = super->y.HALF.HI;
 | 
			
		||||
        gArea.portal_exit_dir = 2;
 | 
			
		||||
        type = 4;
 | 
			
		||||
        type = PT_POT;
 | 
			
		||||
        if (r1 != 0)
 | 
			
		||||
            type = 2;
 | 
			
		||||
        gArea.portal_type = type;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -477,7 +477,7 @@ void sub_0809E1F0(KeyStealingTakkuriEntity* this) {
 | 
			
		|||
 | 
			
		||||
void sub_0809E210(KeyStealingTakkuriEntity* this) {
 | 
			
		||||
    gPlayerEntity.animationState = GetAnimationStateForDirection8(GetFacingDirection(&gPlayerEntity, super)) & 0xfe;
 | 
			
		||||
    gPlayerState.animation = 0x100;
 | 
			
		||||
    gPlayerState.animation = ANIM_DEFAULT;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void sub_0809E238(KeyStealingTakkuriEntity* this) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -551,7 +551,7 @@ void sub_08085E74(LilypadLargeEntity* this) {
 | 
			
		|||
    gPlayerEntity.x.HALF.LO = 0;
 | 
			
		||||
    gPlayerEntity.y.HALF.LO = 0;
 | 
			
		||||
    gPlayerEntity.direction = super->direction;
 | 
			
		||||
    gPlayerState.animation = 0x100;
 | 
			
		||||
    gPlayerState.animation = ANIM_DEFAULT;
 | 
			
		||||
    gRoomControls.camera_target = super;
 | 
			
		||||
    if (gPlayerState.item != NULL) {
 | 
			
		||||
        DeleteEntity(gPlayerState.item);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1049,7 +1049,7 @@ static void PortalJumpOnUpdate(Entity* this) {
 | 
			
		|||
        this->subAction = 1;
 | 
			
		||||
        this->animationState = IdleSouth;
 | 
			
		||||
        this->spriteSettings.flipX = FALSE;
 | 
			
		||||
        if (gArea.portal_type == 4) {
 | 
			
		||||
        if (gArea.portal_type == PT_POT) {
 | 
			
		||||
            gPlayerState.animation = ANIM_ENTER_POT;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1090,7 +1090,7 @@ static void PortalStandUpdate(Entity* this) {
 | 
			
		|||
        this->timer = 8;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (gArea.portal_type == 4) {
 | 
			
		||||
    if (gArea.portal_type == PT_POT) {
 | 
			
		||||
        if (this->frame == 0) {
 | 
			
		||||
            UpdateAnimationSingleFrame(this);
 | 
			
		||||
            return;
 | 
			
		||||
| 
						 | 
				
			
			@ -2049,7 +2049,7 @@ static void PlayerRollInit(Entity* this) {
 | 
			
		|||
        if (playerFlags & PL_NO_CAP) {
 | 
			
		||||
            gPlayerState.animation = ANIM_ROLL_NOCAP;
 | 
			
		||||
        } else {
 | 
			
		||||
            gPlayerState.animation = 0x3a0;
 | 
			
		||||
            gPlayerState.animation = ANIM_ROLL;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    gPlayerState.flags |= PL_ROLLING;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1975,7 +1975,7 @@ void ResolvePlayerAnimation(void) {
 | 
			
		|||
                            case 5:
 | 
			
		||||
                                anim = ANIM_DEFAULT_NOCAP;
 | 
			
		||||
                                break;
 | 
			
		||||
                            case 4:
 | 
			
		||||
                            case PT_POT:
 | 
			
		||||
                                anim = ANIM_DEFAULT;
 | 
			
		||||
                                break;
 | 
			
		||||
                            default:
 | 
			
		||||
| 
						 | 
				
			
			@ -2016,7 +2016,7 @@ void ResolvePlayerAnimation(void) {
 | 
			
		|||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                if ((gPlayerState.flags & PL_USE_PORTAL) != 0) {
 | 
			
		||||
                    anim = (gArea.portal_type == 4) ? 0x530 : 0x2c2;
 | 
			
		||||
                    anim = (gArea.portal_type == PT_POT) ? ANIM_IN_POT : ANIM_PORTAL;
 | 
			
		||||
                } else {
 | 
			
		||||
                    if (gPlayerState.sword_state != 0) {
 | 
			
		||||
                        anim = ANIM_SWORD_CHARGE_END;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue