Decomp 1 function in z_actor

This commit is contained in:
rozlette 2019-09-29 14:19:42 -05:00
parent a8060ddcff
commit 57633d0e26
2 changed files with 488 additions and 1 deletions

View File

@ -209,7 +209,7 @@ SECTIONS
build/asm/z_effect_soft_sprite_old_init.o(.text)
build/asm/flg_set.o(.text)
build/asm/z_DLF.o(.text)
build/asm/z_actor.o(.text)
build/src/code/z_actor.o(.text)
build/asm/code_0x800BF9A0.o(.text)
build/asm/z_bgcheck.o(.text)
build/asm/code_0x800CAAD0.o(.text)

487
src/code/z_actor.c Normal file
View File

@ -0,0 +1,487 @@
#include <ultra64.h>
#include <global.h>
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_PrintLists.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B3BA4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B3BC8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B3FC0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4024.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4088.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B40B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B40E0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B42F8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4A98.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4AEC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4B50.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4EDC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4F40.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B4F78.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5040.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B51A4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5208.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5814.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5BB0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5BF4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5C34.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5C78.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5C90.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5CAC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5CB8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5CC4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5CDC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5CF8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_GetRoomCleared.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetRoomCleared.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_UnsetRoomCleared.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_GetCollectibleFlag.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetCollectibleFlag.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5DF0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5E0C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_Nop800B5E50.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5E68.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B5F24.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6434.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B645C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6468.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6474.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B648C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B64FC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6584.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6608.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6680.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_MarkForDeath.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B672C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B675C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B67A0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B67C0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetScale.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetObjectSegment.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_InitToDefaultValues.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_FiniActor.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetMovementScale.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_ApplyMovement.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetVelocityYRotationAndGravity.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetVelocityAndMoveYRotationAndGravity.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetVelocityXYRotation.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetVelocityAndMoveXYRotation.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetVelocityXYRotationReverse.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SetVelocityAndMoveXYRotationReverse.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6C04.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6C58.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_YawBetweenActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6D00.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_YawToPoint.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_PitchBetweenActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6D7C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_PitchToPoint.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_DistanceBetweenActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_DistanceToPoint.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_XZDistanceBetweenActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_XZDistanceToPoint.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6E6C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_YDistanceBetweenActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6F20.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B6FC8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7090.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7118.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7128.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B715C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7170.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B71DC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7200.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B722C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B724C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7298.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B72E0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B72F8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7320.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7378.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B73E0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B742C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B748C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B750C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B75A0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B761C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7678.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B78B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7E04.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B7FE0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8018.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8050.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8118.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B81E0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8214.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8248.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B82EC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B83BC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B83F8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B84D0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8500.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B85E0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8614.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B863C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B867C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B86C8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8708.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8718.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B874C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8804.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B882C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B886C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8898.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8934.asm")
UNK_TYPE Actor_HasParent(z_Actor* actor, z_GlobalContext* ctxt) {
if (actor->parent != NULL) {
return 1;
} else {
return 0;
}
}
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8A1C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8B84.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8BB0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8BD0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8BFC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8C20.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8C50.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8C78.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8C9C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8CEC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8D10.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8D50.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8D98.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8DD4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8E1C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8E58.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8EC8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8EF4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8F98.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8FC0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B8FE8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9010.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9038.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9084.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9098.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B90AC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B90F4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9120.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_Init.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9334.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B948C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9780.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_DrawActor.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9D1C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9E3C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9E4C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9E84.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800B9EF4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BA2D8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BA2FC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_DrawAllActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BA6FC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BA798.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BA8B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BA9B4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_InsertIntoTypeList.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_RemoveFromTypeList.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_FreeOverlay.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SpawnNoParentDefaultUnk38Unk20.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_LoadOverlay.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_Spawn.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SpawnDefaultUnk38.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/Actor_SpawnTransitionActors.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BB2D0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BB498.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BB59C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BB604.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BB8EC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBA88.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBAC0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBB74.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBC20.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBCEC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBDAC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BBFB0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC154.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC188.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC1B4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC270.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC444.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC4EC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC5B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC5EC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC620.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC770.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC7D8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC848.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BC8B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BCB50.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BCB70.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BCBF4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BCC68.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BCCDC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BD2B4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BD384.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BD6E4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BD888.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BD9A0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BD9E0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BDAA0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BDB6C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BDC5C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BDCF4.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BDFB0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BDFC0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE03C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE0B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE184.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE22C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE258.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE2B8.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE33C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE3D0.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE504.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE568.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE5CC.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE63C.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BE680.asm")
GLOBAL_ASM("./asm/nonmatching/z_actor/func_800BF7CC.asm")