Merge pull request #496 from hatal175/data5

This commit is contained in:
notyourav
2022-04-15 17:16:42 -07:00
committed by GitHub
30 changed files with 426 additions and 688 deletions
-75
View File
@@ -1,75 +0,0 @@
.syntax unified
push {r4, r5, r6, lr}
mov r6, sb
mov r5, r8
push {r5, r6}
adds r5, r0, #0
adds r0, #0x5b
ldrb r0, [r0]
movs r1, #1
mov sb, r1
mov r2, sb
ands r2, r0
mov sb, r2
adds r0, r5, #0
adds r0, #0x5a
ldrb r1, [r0]
lsrs r0, r1, #4
mov r8, r0
movs r0, #7
mov r2, r8
ands r2, r0
mov r8, r2
movs r6, #7
ands r6, r1
ldrb r4, [r5, #0x14]
lsrs r4, r4, #1
ldr r1, _0806A350 @ =gUnk_081121E4
ldrb r0, [r5, #0x1e]
lsls r0, r0, #2
adds r0, r4, r0
adds r0, r0, r1
ldrb r2, [r0]
adds r2, #0x10
adds r0, r5, #0
movs r1, #0
bl SetExtraSpriteFrame
ldr r0, _0806A354 @ =gUnk_08112204
adds r4, r4, r0
ldrb r2, [r4]
adds r0, r5, #0
movs r1, #0
bl sub_0806FF48
adds r0, r5, #0
movs r1, #1
mov r2, r8
bl SetExtraSpriteFrame
adds r6, #0x1c
adds r0, r5, #0
movs r1, #2
adds r2, r6, #0
bl SetExtraSpriteFrame
movs r0, #0x1a
add sb, r0
adds r0, r5, #0
movs r1, #3
mov r2, sb
bl SetExtraSpriteFrame
adds r0, r5, #0
movs r1, #1
movs r2, #0
bl SetSpriteSubEntryOffsetData1
adds r0, r5, #0
movs r1, #1
movs r2, #3
bl SetSpriteSubEntryOffsetData2
adds r0, r5, #0
bl sub_0807000C
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, pc}
.align 2, 0
_0806A350: .4byte gUnk_081121E4
_0806A354: .4byte gUnk_08112204
.syntax divided
-200
View File
@@ -36943,31 +36943,6 @@
"size": 6,
"type": "animation"
},
{
"path": "smith/gUnk_08110354.bin",
"start": 1114964,
"size": 12
},
{
"path": "smith/gUnk_08110380.bin",
"start": 1115008,
"size": 16
},
{
"path": "smith/gUnk_08110390.bin",
"start": 1115024,
"size": 64
},
{
"path": "smith/gUnk_081103D0.bin",
"start": 1115088,
"size": 16
},
{
"path": "smith/gUnk_081103E0.bin",
"start": 1115104,
"size": 4
},
{
"path": "animations/gSpriteAnimations_KingDaltus_0.bin",
"start": 1115392,
@@ -37052,11 +37027,6 @@
"size": 39,
"type": "animation"
},
{
"path": "kingDaltus/gUnk_081104F8.bin",
"start": 1115384,
"size": 8
},
{
"path": "animations/gSpriteAnimations_MinisterPotho_0.bin",
"start": 1115736,
@@ -37099,11 +37069,6 @@
"size": 38,
"type": "animation"
},
{
"path": "ministerPotho/gUnk_08110650.bin",
"start": 1115728,
"size": 8
},
{
"path": "animations/gSpriteAnimations_Npc26_0.bin",
"start": 1115880,
@@ -37320,16 +37285,6 @@
"size": 24,
"type": "animation"
},
{
"path": "zelda/gUnk_08110BE0.bin",
"start": 1117152,
"size": 32
},
{
"path": "zelda/gUnk_08110C00.bin",
"start": 1117184,
"size": 12
},
{
"path": "animations/gSpriteAnimations_Mutoh_0.bin",
"start": 1117280,
@@ -37354,16 +37309,6 @@
"size": 5,
"type": "animation"
},
{
"path": "mutoh/gUnk_08110C0C.bin",
"start": 1117196,
"size": 4
},
{
"path": "mutoh/gUnk_08110C10.bin",
"start": 1117200,
"size": 80
},
{
"path": "animations/gSpriteAnimations_Carpenter_0.bin",
"start": 1117448,
@@ -37460,21 +37405,6 @@
"size": 5,
"type": "animation"
},
{
"path": "carpenter/gUnk_08110CA8.bin",
"start": 1117352,
"size": 64
},
{
"path": "carpenter/gUnk_08110CE8.bin",
"start": 1117416,
"size": 24
},
{
"path": "carpenter/gUnk_08110D00.bin",
"start": 1117440,
"size": 8
},
{
"path": "animations/gSpriteAnimations_CastorWildsStatue_0.bin",
"start": 1117852,
@@ -37493,31 +37423,6 @@
"size": 6,
"type": "animation"
},
{
"path": "castorWildsStatue/gUnk_08110E64.bin",
"start": 1117796,
"size": 4
},
{
"path": "castorWildsStatue/gUnk_08110E68.bin",
"start": 1117800,
"size": 16
},
{
"path": "castorWildsStatue/gUnk_08110E78.bin",
"start": 1117816,
"size": 18
},
{
"path": "castorWildsStatue/gUnk_08110E8A.bin",
"start": 1117834,
"size": 10
},
{
"path": "castorWildsStatue/gUnk_08110E94.bin",
"start": 1117844,
"size": 8
},
{
"path": "cat/gUnk_08111114.bin",
"start": 1118484,
@@ -37612,36 +37517,6 @@
"size": 36,
"type": "animation"
},
{
"path": "cat/gUnk_08110EF0.bin",
"start": 1117936,
"size": 8
},
{
"path": "cat/gUnk_08110EF8.bin",
"start": 1117944,
"size": 480
},
{
"path": "cat/gUnk_081110FC.bin",
"start": 1118460,
"size": 8
},
{
"path": "cat/gUnk_08111104.bin",
"start": 1118468,
"size": 8
},
{
"path": "cat/gUnk_0811110C.bin",
"start": 1118476,
"size": 3
},
{
"path": "cat/gUnk_0811110F.bin",
"start": 1118479,
"size": 5
},
{
"path": "animations/gSpriteAnimations_MountainMinish_0.bin",
"start": 1119104,
@@ -37744,21 +37619,6 @@
"size": 8,
"type": "animation"
},
{
"path": "melari/gUnk_08111520.bin",
"start": 1119520,
"size": 16
},
{
"path": "melari/gUnk_08111538.bin",
"start": 1119544,
"size": 6
},
{
"path": "melari/gUnk_0811153E.bin",
"start": 1119550,
"size": 6
},
{
"path": "animations/gSpriteAnimations_BladeBrothers_1_0.bin",
"start": 1120113,
@@ -38060,11 +37920,6 @@
"size": 37,
"type": "animation"
},
{
"path": "goron/gUnk_08111A94.bin",
"start": 1120916,
"size": 48
},
{
"path": "animations/gSpriteAnimations_GoronMerchant_1.bin",
"start": 1121214,
@@ -38531,31 +38386,6 @@
"size": 36,
"type": "animation"
},
{
"path": "syrup/gUnk_081121B4.bin",
"start": 1122740,
"size": 16
},
{
"path": "syrup/gUnk_081121C4.bin",
"start": 1122756,
"size": 16
},
{
"path": "syrup/gUnk_081121DC.bin",
"start": 1122780,
"size": 8
},
{
"path": "syrup/gUnk_081121E4.bin",
"start": 1122788,
"size": 32
},
{
"path": "syrup/gUnk_08112204.bin",
"start": 1122820,
"size": 4
},
{
"path": "animations/gSpriteAnimations_Rem_1.bin",
"start": 1123008,
@@ -39074,16 +38904,6 @@
"size": 5,
"type": "animation"
},
{
"path": "librari/gUnk_08112D48.bin",
"start": 1125704,
"size": 8
},
{
"path": "librari/gUnk_08112D50.bin",
"start": 1125712,
"size": 10
},
{
"path": "animations/gSpriteAnimations_Percy_0.bin",
"start": 1125980,
@@ -39132,26 +38952,6 @@
"size": 5,
"type": "animation"
},
{
"path": "percy/gUnk_08112E1C.bin",
"start": 1125916,
"size": 16
},
{
"path": "percy/gUnk_08112E2C.bin",
"start": 1125932,
"size": 4
},
{
"path": "percy/gUnk_08112E2C_1.bin",
"start": 1125940,
"size": 28
},
{
"path": "percy/gUnk_08112E54.bin",
"start": 1125972,
"size": 8
},
{
"path": "animations/gSpriteAnimations_VaatiReborn_0.bin",
"start": 1126280,
-14
View File
@@ -1,14 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110CA8:: @ 08110CA8
.incbin "carpenter/gUnk_08110CA8.bin"
gUnk_08110CE8:: @ 08110CE8
.incbin "carpenter/gUnk_08110CE8.bin"
gUnk_08110D00:: @ 08110D00
.incbin "carpenter/gUnk_08110D00.bin"
-30
View File
@@ -1,30 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110E4C:: @ 08110E4C
.4byte sub_080673C0
.4byte sub_080673F4
.4byte sub_08067410
.4byte sub_0806752C
gUnk_08110E5C:: @ 08110E5C
.4byte sub_08067418
.4byte sub_08067514
gUnk_08110E64:: @ 08110E64
.incbin "castorWildsStatue/gUnk_08110E64.bin"
gUnk_08110E68:: @ 08110E68
.incbin "castorWildsStatue/gUnk_08110E68.bin"
gUnk_08110E78:: @ 08110E78
.incbin "castorWildsStatue/gUnk_08110E78.bin"
gUnk_08110E8A:: @ 08110E8A
.incbin "castorWildsStatue/gUnk_08110E8A.bin"
gUnk_08110E94:: @ 08110E94
.incbin "castorWildsStatue/gUnk_08110E94.bin"
-34
View File
@@ -1,34 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110EF0:: @ 08110EF0
.incbin "cat/gUnk_08110EF0.bin"
gUnk_08110EF8:: @ 08110EF8
.incbin "cat/gUnk_08110EF8.bin"
gCat:: @ 081110D8
.4byte sub_080677EC
.4byte sub_080678AC
.4byte sub_08067904
.4byte sub_0806797C
.4byte sub_0806799C
.4byte sub_080679C4
.4byte sub_08067A0C
.4byte sub_08067A78
.4byte sub_08067A98
gUnk_081110FC:: @ 081110FC
.incbin "cat/gUnk_081110FC.bin"
gUnk_08111104:: @ 08111104
.incbin "cat/gUnk_08111104.bin"
gUnk_0811110C:: @ 0811110C
.incbin "cat/gUnk_0811110C.bin"
gUnk_0811110F:: @ 0811110F
.incbin "cat/gUnk_0811110F.bin"
-17
View File
@@ -1,17 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08111A80:: @ 08111A80
.4byte sub_08069310
.4byte sub_08069328
.4byte sub_08069390
gUnk_08111A8C:: @ 08111A8C
.4byte sub_080693C4
.4byte sub_080693D0
gUnk_08111A94:: @ 08111A94
.incbin "goron/gUnk_08111A94.bin"
-18
View File
@@ -1,18 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_081104E0:: @ 081104E0
.4byte sub_08066654
.4byte sub_08066688
.4byte sub_080666DC
gUnk_081104EC:: @ 081104EC
.4byte sub_080666E4
.4byte sub_0806670C
.4byte sub_08066718
gUnk_081104F8:: @ 081104F8
.incbin "kingDaltus/gUnk_081104F8.bin"
-11
View File
@@ -1,11 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08112D48:: @ 08112D48
.incbin "librari/gUnk_08112D48.bin"
gUnk_08112D50:: @ 08112D50
.incbin "librari/gUnk_08112D50.bin"
-18
View File
@@ -1,18 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08111520:: @ 08111520
.incbin "melari/gUnk_08111520.bin"
gUnk_08111530:: @ 08111530
.4byte sub_08068708
.4byte sub_08068730
gUnk_08111538:: @ 08111538
.incbin "melari/gUnk_08111538.bin"
gUnk_0811153E:: @ 0811153E
.incbin "melari/gUnk_0811153E.bin"
-13
View File
@@ -1,13 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110644:: @ 08110644
.4byte sub_080667E4
.4byte sub_08066808
.4byte sub_0806685C
gUnk_08110650:: @ 08110650
.incbin "ministerPotho/gUnk_08110650.bin"
-11
View File
@@ -1,11 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110C0C:: @ 08110C0C
.incbin "mutoh/gUnk_08110C0C.bin"
gUnk_08110C10:: @ 08110C10
.incbin "mutoh/gUnk_08110C10.bin"
-17
View File
@@ -1,17 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08112E1C:: @ 08112E1C
.incbin "percy/gUnk_08112E1C.bin"
gUnk_08112E2C:: @ 08112E2C
.incbin "percy/gUnk_08112E2C.bin"
.4byte sub_0806B504
.incbin "percy/gUnk_08112E2C_1.bin"
.4byte sub_0806B540
gUnk_08112E54:: @ 08112E54
.incbin "percy/gUnk_08112E54.bin"
-32
View File
@@ -1,32 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110354:: @ 08110354
.incbin "smith/gUnk_08110354.bin"
gUnk_08110360:: @ 08110360
.4byte sub_080660EC
.4byte sub_08066118
.4byte sub_08066170
gUnk_0811036C:: @ 0811036C
.4byte sub_08066178
.4byte sub_080661B0
.4byte sub_080661BC
.4byte sub_08066200
.4byte sub_08066218
gUnk_08110380:: @ 08110380
.incbin "smith/gUnk_08110380.bin"
gUnk_08110390:: @ 08110390
.incbin "smith/gUnk_08110390.bin"
gUnk_081103D0:: @ 081103D0
.incbin "smith/gUnk_081103D0.bin"
gUnk_081103E0:: @ 081103E0
.incbin "smith/gUnk_081103E0.bin"
-24
View File
@@ -1,24 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_081121B4:: @ 081121B4
.incbin "syrup/gUnk_081121B4.bin"
gUnk_081121C4:: @ 081121C4
.incbin "syrup/gUnk_081121C4.bin"
gUnk_081121D4:: @ 081121D4
.4byte sub_0806A1F8
.4byte sub_0806A234
gUnk_081121DC:: @ 081121DC
.incbin "syrup/gUnk_081121DC.bin"
gUnk_081121E4:: @ 081121E4
.incbin "syrup/gUnk_081121E4.bin"
gUnk_08112204:: @ 08112204
.incbin "syrup/gUnk_08112204.bin"
-15
View File
@@ -1,15 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnk_08110BD8:: @ 08110BD8
.4byte sub_08066CCC
.4byte sub_08066CF8
gUnk_08110BE0:: @ 08110BE0
.incbin "zelda/gUnk_08110BE0.bin"
gUnk_08110C00:: @ 08110C00
.incbin "zelda/gUnk_08110C00.bin"
+1
View File
@@ -39,6 +39,7 @@ u32 sub_0806F5B0(u32);
u32 sub_0806F824(Entity*, Entity*, s32, s32);
u32 sub_0806F948(Entity*);
void sub_0806FBB4(Entity*);
void sub_0806FF48(Entity*, u32, u32);
void sub_0806FCF4(Entity*, s32, s32, s32);
void sub_0806FD3C(Entity*);
bool32 sub_0806FDA0(Entity*);
+13 -13
View File
@@ -1209,35 +1209,35 @@ SECTIONS {
data/animations/npc/milkCart.o(.rodata);
src/npc/ghostBrothers.o(.rodata);
data/animations/npc/ghostBrothers.o(.rodata);
data/const/npc/smith.o(.rodata);
src/npc/smith.o(.rodata);
data/animations/npc/smith.o(.rodata);
src/npc/npc23.o(.rodata);
data/const/npc/kingDaltus.o(.rodata);
src/npc/kingDaltus.o(.rodata);
data/animations/npc/kingDaltus.o(.rodata);
data/const/npc/ministerPotho.o(.rodata);
src/npc/ministerPotho.o(.rodata);
data/animations/npc/ministerPotho.o(.rodata);
src/npc/npc26.o(.rodata);
data/animations/npc/npc26.o(.rodata);
src/npc/vaati.o(.rodata);
data/animations/npc/vaati.o(.rodata);
data/const/npc/zelda.o(.rodata);
data/const/npc/mutoh.o(.rodata);
src/npc/zelda.o(.rodata);
src/npc/mutoh.o(.rodata);
data/animations/npc/mutoh.o(.rodata);
data/const/npc/carpenter.o(.rodata);
src/npc/carpenter.o(.rodata);
data/animations/npc/carpenter.o(.rodata);
data/const/npc/castorWildsStatue.o(.rodata);
src/npc/castorWildsStatue.o(.rodata);
data/animations/npc/castorWildsStatue.o(.rodata);
data/const/npc/cat.o(.rodata);
src/npc/cat.o(.rodata);
data/animations/npc/cat.o(.rodata);
src/npc/mountainMinish.o(.rodata);
data/animations/npc/mountainMinish.o(.rodata);
data/const/npc/melari.o(.rodata);
src/npc/melari.o(.rodata);
data/animations/npc/melari.o(.rodata);
data/const/npc/bladeBrothers.o(.rodata);
data/animations/npc/bladeBrothers.o(.rodata);
data/const/npc/cow.o(.rodata);
data/animations/npc/cow.o(.rodata);
data/const/npc/goron.o(.rodata);
src/npc/goron.o(.rodata);
data/animations/npc/goron.o(.rodata);
src/npc/goronMerchant.o(.rodata);
data/animations/npc/goronMerchant.o(.rodata);
@@ -1245,15 +1245,15 @@ SECTIONS {
data/animations/npc/gorman.o(.rodata);
data/const/npc/dog.o(.rodata);
data/animations/npc/dog.o(.rodata);
data/const/npc/syrup.o(.rodata);
src/npc/syrup.o(.rodata);
data/animations/npc/syrup.o(.rodata);
src/npc/rem.o(.rodata);
data/animations/npc/rem.o(.rodata);
data/const/npc/townMinish.o(.rodata);
data/animations/npc/townMinish.o(.rodata);
data/const/npc/librari.o(.rodata);
src/npc/librari.o(.rodata);
data/animations/npc/librari.o(.rodata);
data/const/npc/percy.o(.rodata);
src/npc/percy.o(.rodata);
data/animations/npc/percy.o(.rodata);
src/npc/vaatiReborn.o(.rodata);
data/animations/npc/vaatiReborn.o(.rodata);
+12 -7
View File
@@ -4,11 +4,12 @@
#include "npc.h"
#include "item.h"
extern SpriteLoadData gUnk_08110CA8[];
extern u16 gUnk_08110CE8[];
extern Dialog gUnk_08110D00;
static const SpriteLoadData gUnk_08110CA8[] = {
{ 0x51, 0x3f, 0x4 }, { 0x1451, 0x3f, 0x4 }, { 0x4001, 0x3f, 0x4 }, { 0, 0, 0 },
{ 0x51, 0x3f, 0x4 }, { 0x1451, 0x3f, 0x4 }, { 0x4001, 0x3f, 0x4 }, { 0, 0, 0 },
{ 0x51, 0x3f, 0x4 }, { 0x1451, 0x3f, 0x4 }, { 0, 0, 0 }, { 0, 0, 0 },
{ 0x51, 0x3f, 0x4 }, { 0x1451, 0x3f, 0x4 }, { 0, 0, 0 }, { 0, 0, 0 },
};
void Carpenter(Entity* this) {
if (*(u32*)&this->cutsceneBeh == 0) {
@@ -67,6 +68,9 @@ void sub_080672B0(Entity* this, ScriptExecutionContext* context) {
}
void sub_080672C8(Entity* this) {
static const u16 messageIndices[] = {
0x1b0d, 0x1b0e, 0x0, 0x1b18, 0x1b19, 0x0, 0x1b23, 0x1b23, 0x0, 0x1b26, 0x1b26, 0x0,
};
u32 dialog = 0;
u32 tmp;
if (GetInventoryValue(ITEM_GUST_JAR) == 0) {
@@ -74,11 +78,12 @@ void sub_080672C8(Entity* this) {
dialog = 1;
}
}
MessageNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this);
MessageNoOverlap(messageIndices[(dialog * 2 + this->type * 6) / 2], this);
}
void sub_08067304(Entity* this) {
ShowNPCDialogue(this, &gUnk_08110D00);
static const Dialog dialog = { 0xb, 3, 4, 1, { 0x3642, 0x3641 } };
ShowNPCDialogue(this, &dialog);
}
void sub_08067314(Entity* this) {
+33 -15
View File
@@ -6,27 +6,35 @@
#include "effects.h"
#include "npc.h"
extern Hitbox gUnk_08110E94;
extern void (*gUnk_08110E4C[])(Entity*);
extern void (*gUnk_08110E5C[])(Entity*);
extern s8 gUnk_08110E64[];
extern u32 gUnk_08110E68[];
static const Hitbox gUnk_08110E94;
typedef struct {
s8 x;
s8 y;
} PACKED PosOffset;
extern PosOffset gUnk_08110E78[];
extern PosOffset gUnk_08110E8A[];
void sub_080673C0(Entity*);
void sub_080673F4(Entity*);
void sub_08067410(Entity*);
void sub_0806752C(Entity*);
void sub_08067418(Entity*);
void sub_08067514(Entity*);
void CastorWildsStatue(Entity* this) {
static void (*const actionFuncs[])(Entity*) = {
sub_080673C0,
sub_080673F4,
sub_08067410,
sub_0806752C,
};
static void (*const scriptedActionFuncs[])(Entity*) = {
sub_08067418,
sub_08067514,
};
if ((this->flags & ENT_SCRIPTED) != 0) {
gUnk_08110E5C[this->action](this);
scriptedActionFuncs[this->action](this);
} else {
gUnk_08110E4C[this->action](this);
actionFuncs[this->action](this);
sub_0806ED78(this);
}
}
@@ -39,7 +47,7 @@ void sub_080673C0(Entity* this) {
}
this->frameIndex = this->type & 1;
if ((this->type & 1) == 0) {
this->hitbox = &gUnk_08110E94;
this->hitbox = (Hitbox*)&gUnk_08110E94;
}
}
@@ -58,7 +66,7 @@ void sub_08067418(Entity* this) {
this->action = 1;
this->field_0x74.HWORD = COORD_TO_TILE(this);
if (this->type == 0) {
this->hitbox = &gUnk_08110E94;
this->hitbox = (Hitbox*)&gUnk_08110E94;
SetTile(0x4022, this->field_0x74.HWORD - 1, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD, this->collisionLayer);
SetTile(0x4022, this->field_0x74.HWORD + 0x3f, this->collisionLayer);
@@ -94,6 +102,7 @@ void sub_0806752C(Entity* this) {
}
void sub_08067534(Entity* this) {
static const s8 gUnk_08110E64[] = { -8, 8, 0, 0 };
Entity* entity;
s32 i;
for (i = 0; i < 2; ++i) {
@@ -108,6 +117,7 @@ void sub_08067534(Entity* this) {
}
void sub_0806757C(Entity* this) {
static const u32 gUnk_08110E68[] = { 0xc8, 0xc9, 0xca, 0xc8 };
if (this->subAction != 0) {
if (this->subAction >= 3) {
RestorePrevTileEntity(0xe81, 1);
@@ -121,7 +131,13 @@ void sub_0806757C(Entity* this) {
}
void sub_080675D4(Entity* this) {
PosOffset* gUnk = gUnk_08110E78;
static const PosOffset gUnk_08110E78[] = { { 0x0, 0x0 }, { 0x0, -0x10 }, { 0x0, 0x10 },
{ -0x10, 0x0 }, { 0x10, 0x0 }, { -0x10, -0x10 },
{ -0x10, 0x10 }, { 0x10, 0x10 }, { 0x10, -0x10 } };
static const PosOffset gUnk_08110E8A[] = {
{ -0xc, -0xc }, { 0xc, -0xc }, { -0xc, 0xc }, { 0xc, 0xc }, { 0x0, 0x0 }
};
const PosOffset* gUnk = gUnk_08110E78;
u32 subAction = (this->subAction << 2) - 0xc;
s32 i;
@@ -155,6 +171,8 @@ void sub_080675D4(Entity* this) {
}
}
static const Hitbox gUnk_08110E94 = { 0, 3, { 5, 3, 3, 5 }, 12, 20 };
void sub_080676D8(Entity* this) {
this->subAction += 1;
}
+112 -36
View File
@@ -6,47 +6,106 @@
#include "npc.h"
#include "enemy.h"
extern void sub_08067C44(Entity*);
static const Hitbox gUnk_08110EF0 = { 0, -1, { 5, 3, 3, 5 }, 5, 4 };
extern void (*gCat[9])(Entity*);
extern Dialog gUnk_08110EF8;
extern Hitbox gUnk_08110EF0;
extern void sub_08067B08(Entity*);
extern u32 sub_08067D20(Entity*);
extern void sub_08067AAC(Entity*);
extern void sub_08067B34(Entity*);
extern void sub_08067B80(Entity*, u32);
extern void sub_08067B70(Entity*);
extern void sub_08067C24(Entity*);
extern void sub_08067BD4(Entity*);
extern u32 sub_08067D74(Entity*);
extern void sub_08067C18(Entity*);
void sub_08067C44(Entity*);
void sub_08067B08(Entity*);
u32 sub_08067D20(Entity*);
void sub_08067AAC(Entity*);
void sub_08067B34(Entity*);
void sub_08067B80(Entity*, u32);
void sub_08067B70(Entity*);
void sub_08067C24(Entity*);
void sub_08067BD4(Entity*);
u32 sub_08067D74(Entity*);
void sub_08067C18(Entity*);
void sub_08067DCC(Entity*, u32);
void sub_08067DDC(Entity*);
void sub_080677EC(Entity*);
void sub_080678AC(Entity*);
void sub_08067904(Entity*);
void sub_0806797C(Entity*);
void sub_0806799C(Entity*);
void sub_080679C4(Entity*);
void sub_08067A0C(Entity*);
void sub_08067A78(Entity*);
void sub_08067A98(Entity*);
extern Hitbox* gUnk_08111154[8];
extern void sub_08067DDC(Entity*);
extern u16 gUnk_081110FC[4];
extern void sub_08067DCC(Entity*, u32);
extern u8 gUnk_0811110C[2];
extern u32 gUnk_0811110F;
extern u16 gUnk_08111104[];
extern u32 sub_0806FCA0(Entity*, Entity*);
void sub_08067790(Entity* this) {
ShowNPCDialogue(this, &gUnk_08110EF8 + this->type * 10 + gSave.global_progress);
static const Dialog dialogs[][10] = {
{ { 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3503, 0x3504 },
{ 0, 0, 6, 1, 0x3603, 0x3604 },
{ 0, 0, 6, 1, 0x3703, 0x3704 },
{ 0, 0, 6, 1, 0x3803, 0x3804 },
{ 0, 0, 6, 1, 0x3902, 0x3903 },
{ 0, 0, 6, 1, 0x3902, 0x3903 } },
{ { 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3503, 0x3504 },
{ 0, 0, 6, 1, 0x3603, 0x3604 },
{ 0, 0, 6, 1, 0x3703, 0x3704 },
{ 0, 0, 6, 1, 0x3803, 0x3804 },
{ 0, 0, 6, 1, 0x3902, 0x3903 },
{ 0, 0, 6, 1, 0x3902, 0x3903 } },
{ { 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3503, 0x3504 },
{ 0, 0, 6, 1, 0x3603, 0x3604 },
{ 0, 0, 6, 1, 0x3703, 0x3704 },
{ 0, 0, 6, 1, 0x3803, 0x3804 },
{ 0, 0, 6, 1, 0x3902, 0x3903 },
{ 0, 0, 6, 1, 0x3902, 0x3903 } },
{ { 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3503, 0x3504 },
{ 0, 0, 6, 1, 0x3603, 0x3604 },
{ 0, 0, 6, 1, 0x3703, 0x3704 },
{ 0, 0, 6, 1, 0x3803, 0x3804 },
{ 0, 0, 6, 1, 0x3902, 0x3903 },
{ 0, 0, 6, 1, 0x3902, 0x3903 } },
{ { 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 },
{ 0, 0, 6, 1, 0x4e17, 0x4e18 } },
{ { 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3407, 0x3408 },
{ 0, 0, 6, 1, 0x3503, 0x3504 },
{ 0, 0, 6, 1, 0x3603, 0x3604 },
{ 0, 0, 6, 1, 0x3703, 0x3704 },
{ 0, 0, 6, 1, 0x3803, 0x3804 },
{ 0, 0, 6, 1, 0x3902, 0x3903 },
{ 0, 0, 6, 1, 0x3902, 0x3903 } },
};
ShowNPCDialogue(this, &dialogs[this->type][gSave.global_progress]);
}
// Main
void Cat(Entity* ent) {
gCat[ent->action](ent);
static void (*const actionFuncs[9])(Entity*) = {
sub_080677EC, sub_080678AC, sub_08067904, sub_0806797C, sub_0806799C,
sub_080679C4, sub_08067A0C, sub_08067A78, sub_08067A98,
};
actionFuncs[ent->action](ent);
sub_08067C44(ent);
if (((ent->flags & ENT_COLLIDE) == 0) && (ent->type != 5)) {
sub_0806ED78(ent);
@@ -71,7 +130,7 @@ void sub_080677EC(Entity* this) {
}
this->field_0x68.HALF.LO = sub_0801E99C(this);
this->hitbox = &gUnk_08110EF0;
this->hitbox = (Hitbox*)&gUnk_08110EF0;
uVar2 = sub_0805ACC0(this);
if (uVar2 == 0) {
uVar2 = this->x.HALF.HI;
@@ -198,6 +257,23 @@ void sub_08067A98(Entity* this) {
}
}
static const u16 gUnk_081110FC[4] = {
60,
150,
240,
400,
};
static const u16 gUnk_08111104[] = {
180,
300,
450,
600,
};
static const u8 gUnk_0811110C[] = { 0x3c, 0x96, 0x14 };
static const u8 gUnk_0811110F[] = { 0, -4, 8, 8, 0 };
void sub_08067AAC(Entity* this) {
this->action = 2;
this->field_0x70.HALF.HI = gUnk_081110FC[(Random() & 3)];
@@ -205,7 +281,7 @@ void sub_08067AAC(Entity* this) {
this->spriteSettings.flipX = this->direction >> 4 ^ 1;
sub_08067DCC(this, 3);
sub_08078850(this, 0, gUnk_0811110C[2], &gUnk_0811110F);
sub_08078850(this, 0, gUnk_0811110C[2], gUnk_0811110F);
}
void sub_08067B08(Entity* this) {
@@ -217,7 +293,7 @@ void sub_08067B08(Entity* this) {
void sub_08067B34(Entity* this) {
sub_08067DCC(this, 0);
this->frameDuration = (Random() & 0x30) + 0xb4;
sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.flipX], &gUnk_0811110F);
sub_08078850(this, 0, gUnk_0811110C[this->spriteSettings.flipX], gUnk_0811110F);
}
void sub_08067B70(Entity* this) {
@@ -368,7 +444,7 @@ void sub_08067DDC(Entity* this) {
COLLISION_OFF(this);
this->contactFlags = 0;
this->iframes = 0;
this->hitbox = &gUnk_08110EF0;
this->hitbox = (Hitbox*)&gUnk_08110EF0;
}
void Cat_Fusion(Entity* this) {
+25 -9
View File
@@ -5,15 +5,26 @@
#include "effects.h"
#include "npc.h"
extern void (*gUnk_08111A80[])(Entity*);
extern void (*gUnk_08111A8C[])(Entity*);
extern Dialog gUnk_08111A94[];
void sub_08069310(Entity*);
void sub_08069328(Entity*);
void sub_08069390(Entity*);
void sub_080693C4(Entity*);
void sub_080693D0(Entity*);
void Goron(Entity* this) {
static void (*const actionFuncs[])(Entity*) = {
sub_08069310,
sub_08069328,
sub_08069390,
};
static void (*const scriptedActionFuncs[])(Entity*) = {
sub_080693C4,
sub_080693D0,
};
if (this->flags & ENT_SCRIPTED) {
gUnk_08111A8C[this->action](this);
scriptedActionFuncs[this->action](this);
} else {
gUnk_08111A80[this->action](this);
actionFuncs[this->action](this);
sub_0806ED78(this);
}
}
@@ -25,7 +36,7 @@ void sub_08069310(Entity* this) {
}
void sub_08069328(Entity* this) {
if (((u32)(++this->subtimer << 24) >> 24) > 16) {
if (++this->subtimer > 16) {
int action;
this->subtimer = 0;
@@ -94,16 +105,16 @@ void sub_08069428(Entity* this, s32 offsetX, bool32 createFx65) {
}
u32 sub_08069480(Entity* this) {
return (sub_0801E99C(this) << 24) >> 24;
return (u8)sub_0801E99C(this);
}
void sub_0806948C(Entity* this, ScriptExecutionContext* context) {
context->condition = CheckKinstoneFused((sub_08069480(this) << 24) >> 24);
context->condition = CheckKinstoneFused((u8)sub_08069480(this));
gActiveScriptInfo.flags |= 1;
}
void sub_080694B0(Entity* this) {
u32 kinstone = (sub_08069480(this) << 24) >> 24;
u32 kinstone = (u8)sub_08069480(this);
if (CheckKinstoneFused(kinstone)) {
sub_08078778(this);
} else {
@@ -112,6 +123,11 @@ void sub_080694B0(Entity* this) {
}
void sub_080694D8(Entity* this) {
static const Dialog gUnk_08111A94[] = {
{ 0x2f, 3, 4, 1, { 0x3f13, 0x3f0e } }, { 0x2f, 3, 4, 1, { 0x3f14, 0x3f0f } },
{ 0x2f, 3, 4, 1, { 0x3f15, 0x3f10 } }, { 0x2f, 3, 4, 1, { 0x3f16, 0x3f11 } },
{ 0x2f, 3, 4, 1, { 0x3f17, 0x3f12 } }, { 0, 0, 1, 1, { 0, 0x3f18 } },
};
ShowNPCDialogue(this, &gUnk_08111A94[this->type]);
}
+25 -7
View File
@@ -4,12 +4,24 @@
#include "npc.h"
#include "item.h"
extern u16 gUnk_081104F8[];
extern void (*const gUnk_081104E0[])(Entity*);
extern void (*const gUnk_081104EC[])(Entity*);
void sub_08066654(Entity*);
void sub_08066688(Entity*);
void sub_080666DC(Entity*);
void sub_080666E4(Entity*);
void sub_0806670C(Entity*);
void sub_08066718(Entity*);
void KingDaltus(Entity* this) {
static void (*const actionFuncs[])(Entity*) = {
sub_08066654,
sub_08066688,
sub_080666DC,
};
static void (*const scriptedActionFuncs[])(Entity*) = {
sub_080666E4,
sub_0806670C,
sub_08066718,
};
if ((this->flags & ENT_SCRIPTED) != 0) {
if (this->interactType == 2) {
this->interactType = 0;
@@ -17,9 +29,9 @@ void KingDaltus(Entity* this) {
InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
sub_0806F118(this);
}
gUnk_081104EC[this->action](this);
scriptedActionFuncs[this->action](this);
} else {
gUnk_081104E0[this->action](this);
actionFuncs[this->action](this);
sub_0806ED78(this);
}
}
@@ -79,6 +91,12 @@ void sub_0806672C(Entity* this) {
}
void sub_0806673C(Entity* this) {
static const u16 messageIndices[] = {
0x1058,
0x1326,
0x1329,
0x132e,
};
u32 index;
if (CheckGlobalFlag(2) == 0) {
index = 0;
@@ -89,7 +107,7 @@ void sub_0806673C(Entity* this) {
} else {
index = 3;
}
MessageNoOverlap(gUnk_081104F8[index], this);
MessageNoOverlap(messageIndices[index], this);
}
void KingDaltus_Fusion(Entity* this) {
+11 -6
View File
@@ -3,8 +3,6 @@
#include "npc.h"
#include "item.h"
extern u16 gUnk_08112D48[];
void Librari(Entity* this) {
switch (this->action) {
case 0:
@@ -35,6 +33,12 @@ void Librari(Entity* this) {
}
void sub_0806B260(Entity* this, ScriptExecutionContext* context) {
static const u16 messageIndices[] = {
0x4a19,
0x4a1a,
0x4a22,
0x4a27,
};
u32 index;
context->condition = 0;
@@ -51,12 +55,13 @@ void sub_0806B260(Entity* this, ScriptExecutionContext* context) {
} else {
index = 3;
}
MessageNoOverlap(gUnk_08112D48[index], this);
MessageNoOverlap(messageIndices[index], this);
}
extern u16 gUnk_08112D50[];
void sub_0806B2B4(Entity* this) {
static const u16 messageIndices[] = {
0xdad, 0xdae, 0xdaf, 0xdb0, 0xdb1,
};
u32 index;
if (CheckLocalFlag(0xb3)) {
@@ -78,7 +83,7 @@ void sub_0806B2B4(Entity* this) {
} else {
index = 0;
}
MessageNoOverlap(gUnk_08112D50[index], this);
MessageNoOverlap(messageIndices[index], this);
}
void Librari_Fusion(Entity* this) {
+21 -12
View File
@@ -1,17 +1,24 @@
#include "npc.h"
#include "item.h"
extern void sub_08068780(Entity*);
void sub_08068780(Entity*);
void sub_08068708(Entity*);
void sub_08068730(Entity*);
extern void (*const gUnk_08111530[])(Entity*);
extern SpriteLoadData gUnk_08111520;
extern u16 gUnk_0811153E[];
extern u16 gUnk_08111538[];
static const SpriteLoadData gUnk_08111520[] = {
{ 0xb5, 0x1a, 0x4 },
{ 0x1cb5, 0x1a, 0x4 },
{ 0x50b4, 0x1c, 0x4 },
{ 0, 0, 0 },
};
void Melari(Entity* this) {
static void (*const scriptedActionFuncs[])(Entity*) = {
sub_08068708,
sub_08068730,
};
if ((this->flags & ENT_SCRIPTED) == 0) {
gUnk_08111530[this->action](this);
scriptedActionFuncs[this->action](this);
sub_0806ED78(this);
} else {
sub_08068780(this);
@@ -19,7 +26,7 @@ void Melari(Entity* this) {
}
void sub_08068708(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_08111520) != 0) {
if (LoadExtraSpriteData(this, gUnk_08111520) != 0) {
this->action = 1;
InitializeAnimation(this, 0);
sub_08078778(this);
@@ -47,11 +54,13 @@ void sub_08068730(Entity* this) {
}
void sub_08068780(Entity* this) {
static const u16 soundOnScreen[] = { SFX_HAMMER1, SFX_HAMMER2, SFX_HAMMER3 };
static const u16 soundNotOnScreen[] = { SFX_HAMMER4, SFX_HAMMER5, SFX_HAMMER6 };
Entity* ent;
switch (this->action) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08111520) == 0) {
if (LoadExtraSpriteData(this, gUnk_08111520) == 0) {
return;
}
this->action = 1;
@@ -80,9 +89,9 @@ void sub_08068780(Entity* this) {
if (this->frame & 0x40) {
this->frame &= 0xbf;
if (CheckOnScreen(this) == 0) {
SoundReq(gUnk_0811153E[(s32)Random() % 3]);
SoundReq(soundNotOnScreen[(s32)Random() % 3]);
} else {
EnqueueSFX(gUnk_08111538[(s32)Random() % 3]);
EnqueueSFX(soundOnScreen[(s32)Random() % 3]);
}
ent = CreateFx(this, FX_STARS2, 0x20);
if (ent != NULL) {
@@ -140,7 +149,7 @@ void sub_08068964(Entity* this) {
void Melari_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08111520)) {
if (LoadExtraSpriteData(this, gUnk_08111520)) {
this->action++;
this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 6);
+16 -5
View File
@@ -4,16 +4,21 @@
#include "npc.h"
#include "item.h"
extern void (*const gUnk_08110644[])(Entity*);
void sub_08066864(Entity*);
extern u16 gUnk_08110650[];
void sub_080667E4(Entity*);
void sub_08066808(Entity*);
void sub_0806685C(Entity*);
void MinisterPotho(Entity* this) {
static void (*const actionFuncs[])(Entity*) = {
sub_080667E4,
sub_08066808,
sub_0806685C,
};
if ((this->flags & ENT_SCRIPTED) != 0) {
sub_08066864(this);
} else {
gUnk_08110644[this->action](this);
actionFuncs[this->action](this);
sub_0806ED78(this);
}
}
@@ -81,6 +86,12 @@ void sub_080668F0(Entity* this) {
}
void sub_08066904(Entity* this) {
static const u16 messageIndices[] = {
0x105a,
0x1327,
0x132a,
0x132f,
};
u32 index;
if (CheckGlobalFlag(2) == 0) {
index = 0;
@@ -91,7 +102,7 @@ void sub_08066904(Entity* this) {
} else {
index = 3;
}
MessageNoOverlap(gUnk_08110650[index], this);
MessageNoOverlap(messageIndices[index], this);
}
void MinisterPotho_Fusion(Entity* this) {
+20 -7
View File
@@ -6,9 +6,11 @@
#include "npc.h"
#include "item.h"
extern SpriteLoadData gUnk_08110C00;
extern u16 gUnk_08110C0C[];
extern Dialog gUnk_08110C10[];
static const SpriteLoadData gUnk_08110C00[] = {
{ 0x51, 0x3e, 0x4 },
{ 0x1051, 0x3e, 0x4 },
{ 0, 0, 0 },
};
void Mutoh(Entity* this) {
if (*(u32*)&this->cutsceneBeh == 0) {
@@ -17,7 +19,7 @@ void Mutoh(Entity* this) {
switch (this->action) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08110C00)) {
if (LoadExtraSpriteData(this, gUnk_08110C00)) {
this->action = 1;
this->spriteSettings.draw = TRUE;
SetDefaultPriority(this, PRIO_MESSAGE);
@@ -49,6 +51,10 @@ void Mutoh_Head(Entity* this) {
}
void sub_080670B4(Entity* this) {
static const u16 messageIndices[] = {
0x1b02,
0x1b03,
};
u32 uVar2;
uVar2 = 0;
@@ -57,11 +63,18 @@ void sub_080670B4(Entity* this) {
uVar2 = 1;
}
}
MessageNoOverlap(gUnk_08110C0C[uVar2], this);
MessageNoOverlap(messageIndices[uVar2], this);
}
void sub_080670E4(Entity* this) {
ShowNPCDialogue(this, &gUnk_08110C10[gSave.global_progress]);
static const Dialog dialogs[] = {
{ 0, 0, 3, 1, { 0x4101, 0x4100 } }, { 0, 0, 3, 1, { 0x4101, 0x4100 } },
{ 0, 0, 3, 1, { 0x4101, 0x4100 } }, { 0, 0, 3, 1, { 0x4101, 0x4100 } },
{ 0, 0, 3, 1, { 0x4101, 0x4100 } }, { 0xb, 3, 4, 1, { 0x4104, 0x4102 } },
{ 0xb, 3, 4, 1, { 0x4104, 0x4103 } }, { 0xb, 3, 4, 1, { 0x4104, 0x4103 } },
{ 0xb, 3, 4, 1, { 0x4104, 0x4105 } }, { 0xb, 3, 4, 1, { 0x4104, 0x4105 } },
};
ShowNPCDialogue(this, &dialogs[gSave.global_progress]);
}
void sub_08067100(Entity* this) {
@@ -71,7 +84,7 @@ void sub_08067100(Entity* this) {
void Mutoh_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110C00) != 0) {
if (LoadExtraSpriteData(this, gUnk_08110C00) != 0) {
this->action++;
this->spriteSettings.draw = TRUE;
InitializeAnimation(this, 2);
+27 -9
View File
@@ -3,13 +3,18 @@
#include "npc.h"
#include "functions.h"
extern void sub_0806B41C(Entity*);
extern void sub_0806B3CC(Entity*);
static const SpriteLoadData gUnk_08112E1C[] = {
{ 0x30f6, 0x47, 0x4 },
{ 0xf6, 0x47, 0x4 },
{ 0x1cf6, 0x47, 0x4 },
{ 0, 0, 0 },
};
void sub_0806B41C(Entity*);
void sub_0806B3CC(Entity*);
void sub_0806B504(Entity*);
void sub_0806B540(Entity*);
extern u16* gUnk_08001A7C[40];
extern u16 gUnk_08112E54[4];
extern Dialog gUnk_08112E2C[5];
extern SpriteLoadData gUnk_08112E1C;
void Percy_Head(Entity* this) {
SetExtraSpriteFrame(this, 0, (this->frameSpriteSettings & 0x3f) + 0x13);
@@ -30,7 +35,7 @@ void Percy(Entity* this) {
void sub_0806B3CC(Entity* this) {
if (this->action == 0) {
if (!LoadExtraSpriteData(this, &gUnk_08112E1C)) {
if (!LoadExtraSpriteData(this, gUnk_08112E1C)) {
return;
}
this->action = 1;
@@ -51,7 +56,7 @@ void sub_0806B41C(Entity* this) {
switch (this->action) {
case 0:
if (LoadExtraSpriteData(this, &gUnk_08112E1C)) {
if (LoadExtraSpriteData(this, gUnk_08112E1C)) {
this->action = 1;
this->spriteSettings.draw = 1;
if (this->type2 == 2) {
@@ -84,10 +89,23 @@ void sub_0806B41C(Entity* this) {
}
void sub_0806B4F0(Entity* this) {
static const Dialog gUnk_08112E2C[5] = {
{ 0, 0, 5, 0, { .func = sub_0806B504 } },
{ 0, 0, 1, 1, { 0, 0x2312 } },
{ 0, 0, 1, 1, { 0, 0x2311 } },
{ 0, 0, 1, 1, { 0, 0x2519 } },
{ 0, 0, 5, 0, { .func = sub_0806B540 } },
};
ShowNPCDialogue(this, &gUnk_08112E2C[this->type2]);
}
void sub_0806B504(Entity* this) {
static const u16 messageIndices[4] = {
0x230c,
0x230d,
0x230e,
0x2310,
};
int idx;
idx = 1;
@@ -98,7 +116,7 @@ void sub_0806B504(Entity* this) {
SetLocalFlag(URO_POEMN_TALK);
}
MessageNoOverlap(gUnk_08112E54[idx], this);
MessageNoOverlap(messageIndices[idx], this);
}
void sub_0806B540(Entity* this) {
@@ -149,7 +167,7 @@ void sub_0806B60C(Entity* this) {
void Percy_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08112E1C) != 0) {
if (LoadExtraSpriteData(this, gUnk_08112E1C) != 0) {
this->action += 1;
this->spriteSettings.draw = 1;
InitializeAnimation(this, 2);
+46 -14
View File
@@ -1,16 +1,33 @@
#include "npc.h"
#include "functions.h"
extern void (*const gUnk_08110360[])(Entity*);
extern void (*const gUnk_0811036C[])(Entity*);
static const SpriteLoadData gUnk_08110354[] = {
{ 0x4d, 0x38, 0x4 },
{ 0x4004, 0x38, 0x4 },
{ 0, 0, 0 },
};
extern u16 gUnk_08110380[];
extern SpriteLoadData gUnk_08110354;
extern Dialog gUnk_08110390[];
extern u16 gUnk_081103D0[];
extern u32 gUnk_081103E0;
void sub_080660EC(Entity*);
void sub_08066118(Entity*);
void sub_08066170(Entity*);
void sub_08066178(Entity*);
void sub_080661B0(Entity*);
void sub_080661BC(Entity*);
void sub_08066200(Entity*);
void sub_08066218(Entity*);
void Smith(Entity* this) {
static void (*const actionFuncs[])(Entity*) = {
sub_080660EC,
sub_08066118,
sub_08066170,
};
static void (*const scriptedActionFuncs[])(Entity*) = {
sub_08066178, sub_080661B0, sub_080661BC, sub_08066200, sub_08066218,
};
static const u16 gUnk_08110380[] = {
0xdc, 0xdd, 0xde, 0xdc, 0xdd, 0xde, 0xdc, 0xdd,
};
u32 index;
if ((this->flags & ENT_SCRIPTED) != 0) {
@@ -22,9 +39,9 @@ void Smith(Entity* this) {
InitAnimationForceUpdate(this, index);
sub_0806F118(this);
}
gUnk_0811036C[this->action](this);
scriptedActionFuncs[this->action](this);
} else {
gUnk_08110360[this->action](this);
actionFuncs[this->action](this);
sub_0806ED78(this);
}
if (this->animIndex == 0xc) {
@@ -54,7 +71,7 @@ void Smith_Head(Entity* this) {
}
void sub_080660EC(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
if (LoadExtraSpriteData(this, gUnk_08110354) != 0) {
this->action = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
InitAnimationForceUpdate(this, 2);
@@ -89,7 +106,7 @@ void sub_08066170(Entity* this) {
}
void sub_08066178(Entity* this) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
if (LoadExtraSpriteData(this, gUnk_08110354) != 0) {
this->action = 1;
this->spriteSettings.draw = 1;
this->field_0x68.HALF.LO = sub_0801E99C(this);
@@ -126,6 +143,12 @@ void sub_08066218(Entity* this) {
}
void sub_0806622C(Entity* this) {
static const Dialog dialogs[] = {
{ 0x15, 2, 4, 1, { 0x3201, 0x100e } }, { 0x15, 2, 4, 1, { 0x3201, 0x100e } },
{ 0x15, 2, 4, 1, { 0x3202, 0x100e } }, { 0x15, 2, 4, 1, { 0x3203, 0x100e } },
{ 0x15, 2, 4, 1, { 0x3204, 0x100e } }, { 0x15, 2, 4, 1, { 0x3205, 0x100e } },
{ 0x15, 2, 4, 1, { 0x3206, 0x100e } }, { 0x15, 2, 4, 1, { 0x3206, 0x100e } },
};
u32 index;
if (gSave.global_progress - 2 < 0) {
@@ -133,17 +156,26 @@ void sub_0806622C(Entity* this) {
} else {
index = gSave.global_progress - 2;
}
ShowNPCDialogue(this, &gUnk_08110390[index]);
ShowNPCDialogue(this, &dialogs[index]);
}
void nullsub_501(Entity* this) {
}
void sub_08066258(void) {
SoundReq(gUnk_081103D0[Random() & 7]);
static const u16 hammerSounds[] = {
SFX_HAMMER4, SFX_HAMMER5, SFX_HAMMER6, SFX_HAMMER4, SFX_HAMMER5, SFX_HAMMER6, SFX_HAMMER4, SFX_HAMMER5,
};
SoundReq(hammerSounds[Random() & 7]);
}
void sub_08066274(Entity* this) {
static const u8 gUnk_081103E0[] = {
0,
6,
8,
12,
};
sub_08078850(this, 1, 0, &gUnk_081103E0);
}
@@ -153,7 +185,7 @@ void sub_08066288(Entity* this) {
void Smith_Fusion(Entity* this) {
if (this->action == 0) {
if (LoadExtraSpriteData(this, &gUnk_08110354) != 0) {
if (LoadExtraSpriteData(this, gUnk_08110354) != 0) {
this->action++;
this->spriteSettings.draw = 1;
InitAnimationForceUpdate(this, 6);
+52 -14
View File
@@ -2,23 +2,37 @@
#include "functions.h"
#include "object.h"
extern void (*gUnk_081121D4[])(Entity*);
static const SpriteLoadData gUnk_081121B4[] = {
{ 0xc2, 0x46, 0x4 },
{ 0x44c2, 0x46, 0x4 },
{ 0x54c3, 0x46, 0x4 },
{ 0x70c2, 0x46, 0x4 },
};
static const SpriteLoadData gUnk_081121C4[] = {
{ 0xc2, 0x46, 0x4 },
{ 0x44c2, 0x46, 0x4 },
{ 0x54c4, 0x46, 0x4 },
{ 0x70c2, 0x46, 0x4 },
};
extern SpriteLoadData gUnk_081121C4;
extern SpriteLoadData gUnk_081121B4;
extern void sub_0806A26C(Entity*);
void sub_0806A26C(Entity*);
void sub_0806A1F8(Entity*);
void sub_0806A234(Entity*);
void Syrup(Entity* this) {
gUnk_081121D4[this->action](this);
static void (*const actionFuncs[])(Entity*) = {
sub_0806A1F8,
sub_0806A234,
};
actionFuncs[this->action](this);
sub_0806ED78(this);
}
void sub_0806A1F8(Entity* this) {
u32 iVar1;
SpriteLoadData* paVar2;
const SpriteLoadData* paVar2;
this->type == 0 ? (paVar2 = &gUnk_081121B4) : (paVar2 = &gUnk_081121C4);
this->type == 0 ? (paVar2 = gUnk_081121B4) : (paVar2 = gUnk_081121C4);
iVar1 = LoadExtraSpriteData(this, paVar2);
if (iVar1) {
@@ -39,11 +53,10 @@ void sub_0806A234(Entity* this) {
}
}
extern u8 gUnk_081121DC[];
void sub_0806A26C(Entity* this) {
static const s8 gUnk_081121DC[] = { -1, -2, -3, 0, 1, 2, 3, 0 };
u8 unk;
u8* ptr;
const s8* ptr;
u32 uVar2, uVar1;
Entity* pEVar1;
pEVar1 = CreateObject(SPECIAL_FX, 0x2f, 0);
@@ -51,11 +64,36 @@ void sub_0806A26C(Entity* this) {
PositionEntityOnTop(this, pEVar1);
uVar2 = uVar1 = Random();
ptr = gUnk_081121DC;
pEVar1->spriteOffsetX = (u8)ptr[uVar2 & 7];
pEVar1->spriteOffsetX = ptr[uVar2 & 7];
uVar1 /= 256;
uVar1 &= 7;
pEVar1->spriteOffsetY = (u8)ptr[uVar1] - 8;
pEVar1->spriteOffsetY = ptr[uVar1] - 8;
}
}
ASM_FUNC("asm/non_matching/syrup/Syrup_Head.inc", void Syrup_Head(Entity* this))
static const u8 gUnk_081121E4[] = { 0x0, 0x5, 0x0, 0x5, 0x1, 0x6, 0x1, 0x6, 0x2, 0x7, 0x2, 0x7, 0x3, 0x8, 0x3, 0x8,
0x4, 0x9, 0x4, 0x9, 0x3, 0x8, 0x3, 0x8, 0x2, 0x7, 0x2, 0x7, 0x1, 0x6, 0x1, 0x6 };
static const u8 gUnk_08112204[] = { 0, 1, 0, 0 };
void Syrup_Head(Entity* param_1) {
u32 bVar1;
u8 bVar2;
u32 uVar3;
u32 tmp1;
u32 tmp2;
bVar1 = (param_1->frameSpriteSettings) & 1;
bVar2 = param_1->frame;
tmp1 = bVar2 >> 4 & 7;
tmp2 = (bVar2 & 7);
uVar3 = (u32)(param_1->animationState >> 1);
SetExtraSpriteFrame(param_1, 0, gUnk_081121E4[uVar3 + (u32)param_1->frameIndex * 4] + 0x10);
sub_0806FF48(param_1, 0, gUnk_08112204[uVar3]);
SetExtraSpriteFrame(param_1, 1, tmp1);
SetExtraSpriteFrame(param_1, 2, tmp2 + 0x1c);
SetExtraSpriteFrame(param_1, 3, bVar1 + 0x1a);
SetSpriteSubEntryOffsetData1(param_1, 1, 0);
SetSpriteSubEntryOffsetData2(param_1, 1, 3);
sub_0807000C(param_1);
}
+12 -5
View File
@@ -9,11 +9,14 @@ void sub_08068680(Entity*, Entity*);
void sub_08068694(Entity*, Entity*);
extern Entity* GetEntityByType(u32, u32);
extern void sub_080686C4(Entity*, Entity*);
extern void (*gUnk_08110BD8[])(Entity* ent);
extern u16 gUnk_08110BE0[];
void sub_08066CCC(Entity*);
void sub_08066CF8(Entity*);
void Zelda(Entity* this) {
static void (*const gUnk_08110BD8[])(Entity * ent) = {
sub_08066CCC,
sub_08066CF8,
};
gUnk_08110BD8[this->action](this);
}
@@ -161,9 +164,13 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
gActiveScriptInfo.commandSize = 0;
}
static const u16 gUnk_08110BE0[] = {
0x81c, 0x85c, 0x89c, 0x8dc, 0x91c, 0x95c, 0x99c, 0x9dc, 0x9dd, 0x9de, 0x9df, 0x9e0, 0x9e1, 0x9e2, 0x0, 0x0,
};
void sub_08066F94(void) {
u16 uVar1;
u16* puVar2;
const u16* puVar2;
puVar2 = gUnk_08110BE0;
while (*puVar2 != 0) {
@@ -175,7 +182,7 @@ void sub_08066F94(void) {
void sub_08066FB8(void) {
u16 uVar1;
u16* puVar2;
const u16* puVar2;
puVar2 = gUnk_08110BE0;
while (*puVar2 != 0) {