mirror of
https://github.com/zeldaret/tmc
synced 2026-08-12 20:02:55 -04:00
updated symbols
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern u32 gUnk_0813AD10;
|
||||
extern u32 gUnk_0813AD24;
|
||||
extern u32 gUnk_0813AD38;
|
||||
|
||||
extern void sub_0805E3A0(Entity *, u32);
|
||||
extern void sub_0807DD50(Entity *);
|
||||
extern void sub_0807DD94(Entity *, u32);
|
||||
extern void sub_08080840(u32 *);
|
||||
|
||||
void sub_0806C550(Entity *param_1)
|
||||
|
||||
{
|
||||
if (param_1->action == 0) {
|
||||
param_1->action += 1;
|
||||
sub_0805E3A0(param_1,2);
|
||||
sub_0807DD50(param_1);
|
||||
}
|
||||
else {
|
||||
sub_0807DD94(param_1,0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_0806C578(void)
|
||||
|
||||
{
|
||||
sub_08080840(&gUnk_0813AD10);
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_0806C588(void)
|
||||
|
||||
{
|
||||
sub_08080840(&gUnk_0813AD24);
|
||||
return;
|
||||
}
|
||||
|
||||
void FUN_0806c598(void)
|
||||
|
||||
{
|
||||
sub_08080840(&gUnk_0813AD38);
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
|
||||
extern u32 __modsi3(u32, u32);
|
||||
extern void UpdateSprite(Entity *, u32);
|
||||
extern void sub_08087380();
|
||||
extern u32 sub_0807CC3C();
|
||||
extern Entity *sub_080873AC(Entity*, u32, u32);
|
||||
extern void PositionRelative();
|
||||
|
||||
extern void (*gGreatFairy[11])(Entity*);
|
||||
extern void (*gGreatFairyBehaviors[6])(Entity*);
|
||||
|
||||
extern u32 gUnk_0810C2E4;
|
||||
extern RoomControls gRoomControls;
|
||||
extern Entity gLinkEntity;
|
||||
extern s16 gGreatFairyRippleOffsets[10];
|
||||
|
||||
void sub_08086A90(Entity *ent)
|
||||
|
||||
{
|
||||
u8 bVar1;
|
||||
|
||||
if (ent->action == 0) {
|
||||
bVar1 = __modsi3((ent->entityType).parameter1, 11);
|
||||
(ent->entityType).parameter2 = bVar1;
|
||||
}
|
||||
gGreatFairy[(ent->entityType).parameter2](ent);
|
||||
}
|
||||
|
||||
void sub_08086ABC(Entity *ent)
|
||||
{
|
||||
gGreatFairyBehaviors[ent->action](ent);
|
||||
|
||||
|
||||
if ((gLinkEntity.y.HALF.HI - gRoomControls.roomOriginY) < 168) {
|
||||
|
||||
gRoomControls.cameraTarget = ent;
|
||||
gRoomControls.unk5 = 2;
|
||||
}
|
||||
else {
|
||||
gRoomControls.cameraTarget = &gLinkEntity;
|
||||
gRoomControls.unk5 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08086AF8(Entity *ent)
|
||||
{
|
||||
sub_08087380();
|
||||
ent->parameter3 = 0;
|
||||
ent->cutsceneBeh = 290;
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void sub_0806ED78(Entity *);
|
||||
extern void LoadAnimation();
|
||||
extern void sub_08063280();
|
||||
extern void TextboxTryNoOverlap(u32);
|
||||
extern void sub_080042B8();
|
||||
extern void CreateFx();
|
||||
|
||||
extern void (*gMailboxBehaviors[4])(Entity *);
|
||||
|
||||
void sub_080631E8(Entity *ent)
|
||||
{
|
||||
gMailboxBehaviors[ent->action](ent);
|
||||
|
||||
if (ent->action != 0) {
|
||||
sub_0806ED78(ent);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08063210(Entity *ent)
|
||||
|
||||
{
|
||||
ent->action = 1;
|
||||
LoadAnimation(ent, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_08063220(Entity *ent)
|
||||
|
||||
{
|
||||
u8 bVar1;
|
||||
|
||||
if (ent->interactType != 0) {
|
||||
ent->action = 2;
|
||||
bVar1 = 8;
|
||||
}
|
||||
else {
|
||||
bVar1 = 0;
|
||||
}
|
||||
|
||||
if (ent->field_0x58 != bVar1) {
|
||||
LoadAnimation(ent);
|
||||
}
|
||||
else {
|
||||
sub_08063280(ent, bVar1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void sub_08063254(Entity *ent)
|
||||
|
||||
{
|
||||
sub_08063280(ent);
|
||||
if ((ent->frames.all & 0x80) != 0) {
|
||||
ent->action = 3;
|
||||
TextboxTryNoOverlap(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_08063278(Entity *ent)
|
||||
|
||||
{
|
||||
sub_08063280(ent);
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_08063280(Entity *ent)
|
||||
|
||||
{
|
||||
Entity *e; // r4@1
|
||||
u8 var; // r2@1
|
||||
|
||||
e = ent;
|
||||
sub_080042B8();
|
||||
var = e->frames.all & 0x7F;
|
||||
e->frames.all = e->frames.all ^ var;
|
||||
if ( var == 2 )
|
||||
CreateFx(e, 49, 0);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
|
||||
extern void _call_via_r1(Entity *, u32);
|
||||
extern void sub_0806ED78();
|
||||
extern void LoadAnimation();
|
||||
extern void sub_080042B8();
|
||||
|
||||
extern void (*gMilkCartBehaviors[2])(Entity*);
|
||||
|
||||
void sub_08065B4C(Entity *ent)
|
||||
{
|
||||
gMilkCartBehaviors[ent->action](ent);
|
||||
sub_0806ED78(ent);
|
||||
}
|
||||
|
||||
|
||||
void sub_08065B6C(Entity *ent)
|
||||
{
|
||||
ent->action++;
|
||||
ent->spriteSettings.b.ss0 = 1;
|
||||
(ent->y).HALF.LO += -32768;
|
||||
ent->animationState = 6;
|
||||
LoadAnimation(ent, 3);
|
||||
}
|
||||
|
||||
|
||||
void sub_08065B9C(Entity *ent)
|
||||
{
|
||||
sub_080042B8(ent);
|
||||
}
|
||||
+10
-7
@@ -15,29 +15,32 @@ extern void UnfreezeTime(void);
|
||||
|
||||
extern Entity gLinkEntity;
|
||||
extern LinkState gLinkState;
|
||||
extern void gOcarinaStates;
|
||||
extern void (*gOcarinaStates[4])(ItemBehavior *, u32);
|
||||
extern u8 gUnk_02034490;
|
||||
|
||||
void Ocarina(ItemBehavior *pItemBeh,u32 inputFlags)
|
||||
|
||||
{
|
||||
u32 *ocarinaStates = &gOcarinaStates;
|
||||
_call_via_r2(pItemBeh, inputFlags,(ocarinaStates)[pItemBeh->stateID]);
|
||||
//u32 *ocarinaStates = &gOcarinaStates;
|
||||
//_call_via_r2(pItemBeh, inputFlags,(ocarinaStates)[pItemBeh->stateID]);
|
||||
gOcarinaStates[pItemBeh->stateID](pItemBeh, inputFlags);
|
||||
gLinkEntity.itemCooldown = gLinkEntity.itemCooldown + 1;
|
||||
}
|
||||
|
||||
void OcarinaUse(ItemBehavior *itemBeh,s32 inputFlags)
|
||||
|
||||
{
|
||||
u32 bVar1;
|
||||
|
||||
u32 var;
|
||||
|
||||
if (gLinkState.linkAction == 24) {
|
||||
sub_08077E78(itemBeh,inputFlags);
|
||||
}
|
||||
else {
|
||||
itemBeh->unk4 = itemBeh->unk4 | 15;
|
||||
itemBeh->unk4 |= 15;
|
||||
gLinkEntity.animationState = 4;
|
||||
gLinkEntity.shadowSize = gLinkEntity.animationState & (gLinkEntity.shadowSize - 0x45);
|
||||
var = gLinkEntity.spriteSettings.raw & ~0x40;
|
||||
gLinkEntity.spriteSettings.raw &= var;
|
||||
|
||||
gLinkEntity.flags = gLinkEntity.flags & 127;
|
||||
gLinkEntity.itemCooldown = 2;
|
||||
gLinkState.flags.all = (gLinkState.flags.all | 0x10000000);
|
||||
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "textbox.h"
|
||||
|
||||
extern void UpdateSprite(Entity *, u32);
|
||||
extern void sub_08078778(Entity *);
|
||||
extern void sub_0805E47C(Entity *);
|
||||
extern void sub_08004274(Entity *);
|
||||
extern void sub_0806ED78(Entity *);
|
||||
extern void TextboxTryNoOverlap(u32);
|
||||
extern void sub_0805E584();
|
||||
extern void sub_0807DD64();
|
||||
extern void CreateFx();
|
||||
extern void sub_08062CA4();
|
||||
extern void sub_0807DDAC();
|
||||
extern void sub_0807DDE4();
|
||||
extern u32 sub_0801E7F4();
|
||||
extern void sub_0806F1AC();
|
||||
|
||||
|
||||
extern void (*gStampBehaviors1[4])(Entity*);
|
||||
extern void (*gStampBehaviors2[2])(Entity*);
|
||||
|
||||
extern TextBox gTextBox;
|
||||
extern u32 gUnk_0810C2E4;
|
||||
|
||||
extern void UpdateSprite(Entity *, u32);
|
||||
extern void sub_08078778(Entity *);
|
||||
extern void sub_0805E47C(Entity *);
|
||||
extern void sub_08004274(Entity *);
|
||||
extern void sub_0806ED78(Entity *);
|
||||
extern void TextboxTryNoOverlap(u32);
|
||||
extern void sub_0805E584();
|
||||
extern void sub_0807DD64();
|
||||
extern void CreateFx();
|
||||
extern void sub_08062CA4();
|
||||
extern void sub_0807DDAC();
|
||||
extern void sub_0807DDE4();
|
||||
extern u32 sub_0801E7F4();
|
||||
extern void sub_0806F1AC();
|
||||
|
||||
|
||||
extern void (*gStampBehaviors1[4])(Entity*);
|
||||
extern void (*gStampBehaviors2[2])(Entity*);
|
||||
|
||||
extern TextBox gTextBox;
|
||||
extern u32 gUnk_0810C2E4;
|
||||
|
||||
void sub_08062B98(Entity *ent)
|
||||
{
|
||||
if ((ent->flags & 2) != 0) {
|
||||
gStampBehaviors2[ent->action](ent);
|
||||
}
|
||||
else {
|
||||
gStampBehaviors1[ent->action](ent);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08062BD4(Entity *ent)
|
||||
{
|
||||
ent->action = 1;
|
||||
ent->spriteSettings.b.ss0 = 1;
|
||||
UpdateSprite(ent, 0);
|
||||
sub_08078778(ent);
|
||||
}
|
||||
|
||||
void sub_08062BF8(Entity *ent)
|
||||
{
|
||||
sub_08004274(ent);
|
||||
if (ent->interactType != 0) {
|
||||
ent->interactType = 0;
|
||||
ent->action++;
|
||||
sub_0805E47C(ent);
|
||||
}
|
||||
sub_0806ED78(ent);
|
||||
}
|
||||
|
||||
void sub_08062C24(Entity *ent)
|
||||
{
|
||||
sub_08004274(ent);
|
||||
if ((ent->frames.all & 128) != 0) {
|
||||
UpdateSprite(ent, 4);
|
||||
TextboxTryNoOverlap(2561);
|
||||
ent->action++;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08062C54(Entity *ent)
|
||||
{
|
||||
if ((gTextBox.doTextBox & 127) == 0) {
|
||||
ent->action = 1;
|
||||
UpdateSprite(ent, 0);
|
||||
sub_0805E584(ent);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08062C7C(Entity *ent)
|
||||
{
|
||||
ent->action = 1;
|
||||
sub_0807DD64(ent);
|
||||
UpdateSprite(ent, 0);
|
||||
CreateFx(ent, 37, 0);
|
||||
sub_08062CA4(ent);
|
||||
}
|
||||
|
||||
void sub_08062CA4(Entity *ent)
|
||||
{
|
||||
sub_0807DDAC(ent, 0);
|
||||
sub_0807DDE4(ent);
|
||||
sub_08004274(ent);
|
||||
}
|
||||
|
||||
void sub_08062CBC(Entity *ent)
|
||||
{
|
||||
u32 uVar1;
|
||||
|
||||
uVar1 = sub_0801E7F4(44);
|
||||
sub_0806F1AC(ent, &gUnk_0810C2E4 + ((-uVar1 | uVar1) >> 31) * 2);
|
||||
}
|
||||
|
||||
void sub_08062CE0(Entity *ent)
|
||||
{
|
||||
if (ent->action == 0) {
|
||||
ent->action = 1;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -44,8 +44,8 @@ void TextboxNoOverlap(u32 index,Entity *ent)
|
||||
|
||||
ShowTextbox(index);
|
||||
|
||||
y = *(&ent->y.HI + 1);
|
||||
h = *(&ent->height.HI + 1);
|
||||
y = ent->y.HALF.HI;
|
||||
h = ent->height.HALF.HI;
|
||||
|
||||
if (88 < ((y + h) - gRoomControls.roomScrollY)) {
|
||||
gTextBox.textWindowPosY = 1;
|
||||
|
||||
Reference in New Issue
Block a user