summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--asm/townsperson.s112
-rw-r--r--linker.ld149
-rw-r--r--src/enemy/bladeTrap.c (renamed from src/bladeTrap.c)0
-rw-r--r--src/enemy/bombPeahat.c (renamed from src/bombPeahat.c)0
-rw-r--r--src/enemy/bowMoblin.c (renamed from src/bowMoblin.c)0
-rw-r--r--src/enemy/hangingSeed.c (renamed from src/hangingSeed.c)0
-rw-r--r--src/enemy/keese.c (renamed from src/keese.c)0
-rw-r--r--src/enemy/lakitu.c (renamed from src/lakitu.c)0
-rw-r--r--src/enemy/lakituCloud.c (renamed from src/lakituCloud.c)0
-rw-r--r--src/enemy/miniFireballGuy.c (renamed from src/miniFireballGuy.c)0
-rw-r--r--src/enemy/octorok.c (renamed from src/octorok.c)0
-rw-r--r--src/enemy/slime.c (renamed from src/slime.c)0
-rw-r--r--src/enemy/smallPesto.c (renamed from src/smallPesto.c)0
-rw-r--r--src/manager/manager1.c (renamed from src/manager1.c)0
-rw-r--r--src/manager/manager2.c (renamed from src/manager2.c)0
-rw-r--r--src/manager/manager27.c (renamed from src/manager27.c)0
-rw-r--r--src/manager/manager2E.c (renamed from src/manager2E.c)0
-rw-r--r--src/npc/bigGoron.c (renamed from src/bigGoron.c)0
-rw-r--r--src/npc/bladeBrothers.c (renamed from src/bladeBrothers.c)0
-rw-r--r--src/npc/carpenter.c (renamed from src/carpenter.c)0
-rw-r--r--src/npc/cat.c (renamed from src/cat.c)0
-rw-r--r--src/npc/clothesRack.c (renamed from src/clothesRack.c)0
-rw-r--r--src/npc/cow.c (renamed from src/cow.c)0
-rw-r--r--src/npc/dampe.c (renamed from src/dampe.c)0
-rw-r--r--src/npc/emma.c (renamed from src/emma.c)0
-rw-r--r--src/npc/epona.c (renamed from src/epona.c)0
-rw-r--r--src/npc/festari.c (renamed from src/festari.c)0
-rw-r--r--src/npc/forestMinish.c (renamed from src/forestMinish.c)0
-rw-r--r--src/npc/gentari.c (renamed from src/gentari.c)0
-rw-r--r--src/npc/goron.c (renamed from src/goron.c)0
-rw-r--r--src/npc/guard.c (renamed from src/guard.c)0
-rw-r--r--src/npc/mailbox.c (renamed from src/mailbox.c)0
-rw-r--r--src/npc/malon.c (renamed from src/malon.c)0
-rw-r--r--src/npc/milkCart.c (renamed from src/milkCart.c)0
-rw-r--r--src/npc/mutoh.c (renamed from src/mutoh.c)0
-rw-r--r--src/npc/postman.c (renamed from src/postman.c)0
-rw-r--r--src/npc/rem.c (renamed from src/rem.c)0
-rw-r--r--src/npc/simon.c (renamed from src/simon.c)0
-rw-r--r--src/npc/smith.c (renamed from src/smith.c)0
-rw-r--r--src/npc/stamp.c (renamed from src/stamp.c)0
-rw-r--r--src/npc/syrup.c (renamed from src/syrup.c)0
-rw-r--r--src/npc/talon.c (renamed from src/talon.c)0
-rw-r--r--src/npc/teachers.c (renamed from src/teachers.c)0
-rw-r--r--src/npc/townMinish.c (renamed from src/townMinish.c)0
-rw-r--r--src/npc/townsperson.c58
-rw-r--r--src/npc/wheaton.c (renamed from src/wheaton.c)0
-rw-r--r--src/npc/windTribespeople.c (renamed from src/windTribespeople.c)0
-rw-r--r--src/npc/zelda.c (renamed from src/zelda.c)0
-rw-r--r--src/object/archway.c (renamed from src/archway.c)0
-rw-r--r--src/object/bell.c (renamed from src/bell.c)0
-rw-r--r--src/object/chestSpawner.c (renamed from src/chestSpawner.c)0
-rw-r--r--src/object/cloud.c (renamed from src/cloud.c)0
-rw-r--r--src/object/fan.c (renamed from src/fan.c)0
-rw-r--r--src/object/giantLeaf.c (renamed from src/giantLeaf.c)0
-rw-r--r--src/object/greatFairy.c (renamed from src/greatFairy.c)0
-rw-r--r--src/object/heartContainer.c (renamed from src/heartContainer.c)0
-rw-r--r--src/object/lightableSwitch.c (renamed from src/lightableSwitch.c)0
-rw-r--r--src/object/mask.c (renamed from src/mask.c)0
-rw-r--r--src/object/metalDoor.c (renamed from src/metalDoor.c)0
-rw-r--r--src/object/mineralWaterSource.c (renamed from src/mineralWaterSource.c)0
-rw-r--r--src/object/minishSizedEntrance.c (renamed from src/minishSizedEntrance.c)0
-rw-r--r--src/object/object1A.c (renamed from src/object1A.c)0
-rw-r--r--src/object/object1C.c (renamed from src/object1C.c)0
-rw-r--r--src/object/object1D.c (renamed from src/object1D.c)0
-rw-r--r--src/object/object49.c (renamed from src/object49.c)0
-rw-r--r--src/object/object86.c (renamed from src/object86.c)0
-rw-r--r--src/object/object9E.c (renamed from src/object9E.c)0
-rw-r--r--src/object/objectA8.c (renamed from src/objectA8.c)0
-rw-r--r--src/object/railtrack.c (renamed from src/railtrack.c)0
-rw-r--r--src/object/smoke.c (renamed from src/smoke.c)0
-rw-r--r--src/object/swordsmanNewsletter.c (renamed from src/swordsmanNewsletter.c)0
-rw-r--r--src/object/thoughtBubble.c (renamed from src/thoughtBubble.c)0
-rw-r--r--src/object/treeHidingPortal.c (renamed from src/treeHidingPortal.c)0
-rw-r--r--src/object/well.c (renamed from src/well.c)0
-rw-r--r--src/object/windTribeFlag.c (renamed from src/windTribeFlag.c)0
-rw-r--r--src/object/windcrest.c (renamed from src/windcrest.c)0
77 files changed, 138 insertions, 186 deletions
diff --git a/Makefile b/Makefile
index 0735bd2a..90bf1ca4 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,7 @@ FIX := tools/gbafix/gbafix
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:
+
$(shell mkdir -p $(C_BUILDDIR) $(ASM_BUILDDIR) $(DATA_ASM_BUILDDIR) $(SONG_BUILDDIR) $(MID_BUILDDIR))
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
@@ -101,6 +102,10 @@ MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
+SUBDIRS := $(sort $(dir $(OBJS)))
+
+$(shell mkdir -p $(SUBDIRS))
+
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
TOOLBASE = $(TOOLDIRS:tools/%=%)
TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))
diff --git a/asm/townsperson.s b/asm/townsperson.s
index 1993b4c6..32bf8e55 100644
--- a/asm/townsperson.s
+++ b/asm/townsperson.s
@@ -6,118 +6,6 @@
.text
-
- thumb_func_start Townsperson
-Townsperson: @ 0x08061B8C
- push {lr}
- adds r2, r0, #0
- ldrb r1, [r2, #0x10]
- movs r0, #2
- ands r0, r1
- cmp r0, #0
- beq _08061BB0
- ldr r0, _08061BAC @ =gUnk_0810B77C
- ldrb r1, [r2, #0xc]
- lsls r1, r1, #2
- adds r1, r1, r0
- ldr r1, [r1]
- adds r0, r2, #0
- bl _call_via_r1
- b _08061BC0
- .align 2, 0
-_08061BAC: .4byte gUnk_0810B77C
-_08061BB0:
- ldr r0, _08061BC4 @ =gUnk_0810B774
- ldrb r1, [r2, #0xc]
- lsls r1, r1, #2
- adds r1, r1, r0
- ldr r1, [r1]
- adds r0, r2, #0
- bl _call_via_r1
-_08061BC0:
- pop {pc}
- .align 2, 0
-_08061BC4: .4byte gUnk_0810B774
-
- thumb_func_start sub_08061BC8
-sub_08061BC8: @ 0x08061BC8
- push {r4, lr}
- adds r4, r0, #0
- ldr r1, _08061BFC @ =gUnk_0810B6EC
- ldrb r0, [r4, #0xa]
- lsls r0, r0, #2
- adds r0, r0, r1
- ldr r1, [r0]
- adds r0, r4, #0
- bl LoadExtraSpriteData
- cmp r0, #0
- beq _08061BF8
- movs r0, #2
- strb r0, [r4, #0x14]
- ldrb r0, [r4, #0xa]
- adds r0, #1
- strb r0, [r4, #0xf]
- ldrb r0, [r4, #0xc]
- adds r0, #1
- strb r0, [r4, #0xc]
- adds r0, r4, #0
- movs r1, #2
- bl sub_08061CB4
-_08061BF8:
- pop {r4, pc}
- .align 2, 0
-_08061BFC: .4byte gUnk_0810B6EC
-
- thumb_func_start sub_08061C00
-sub_08061C00: @ 0x08061C00
- push {r4, lr}
- adds r4, r0, #0
- movs r1, #0x20
- movs r2, #0x20
- bl sub_0806ED9C
- adds r1, r0, #0
- cmp r1, #0
- bge _08061C18
- ldrb r0, [r4, #0x14]
- adds r1, r0, #4
- b _08061C32
-_08061C18:
- ldrb r0, [r4, #0xf]
- cmp r0, #0
- bne _08061C24
- movs r0, #0x10
- strb r0, [r4, #0xf]
- b _08061C32
-_08061C24:
- subs r0, #1
- strb r0, [r4, #0xf]
- adds r0, r4, #0
- adds r0, #0x58
- ldrb r0, [r0]
- movs r1, #3
- ands r1, r0
-_08061C32:
- adds r0, r4, #0
- bl sub_08061CB4
- adds r0, r4, #0
- bl sub_0806ED78
- adds r1, r4, #0
- adds r1, #0x39
- movs r0, #0
- ldrsb r0, [r1, r0]
- cmp r0, #0
- beq _08061C58
- movs r0, #0
- strb r0, [r1]
- ldrb r0, [r4, #0xb]
- ldr r1, _08061C5C @ =0x00000A01
- adds r0, r0, r1
- bl TextboxNoOverlapFollow
-_08061C58:
- pop {r4, pc}
- .align 2, 0
-_08061C5C: .4byte 0x00000A01
-
thumb_func_start Townsperson_Head
Townsperson_Head: @ 0x08061C60
push {r4, r5, lr}
diff --git a/linker.ld b/linker.ld
index cca61b62..70de38a4 100644
--- a/linker.ld
+++ b/linker.ld
@@ -323,16 +323,16 @@ SECTIONS {
asm/code_0801D714.o(.text);
asm/code_0801D79C.o(.text);
/* enemies */
- src/octorok.o(.text);
+ src/enemy/octorok.o(.text);
asm/octorok.o(.text);
asm/chuchu.o(.text);
asm/leever.o(.text);
asm/peahat.o(.text);
asm/rollobite.o(.text);
asm/darkNut.o(.text);
- src/hangingSeed.o(.text);
+ src/enemy/hangingSeed.o(.text);
asm/beetle.o(.text);
- src/keese.o(.text);
+ src/enemy/keese.o(.text);
asm/keese.o(.text);
asm/doorMimic.o(.text);
asm/rockChuchu.o(.text);
@@ -352,7 +352,7 @@ SECTIONS {
asm/madderpillar.o(.text);
asm/waterDrop.o(.text);
asm/wallMaster.o(.text);
- src/bombPeahat.o(.text);
+ src/enemy/bombPeahat.o(.text);
asm/bombPeahat.o(.text);
asm/spark.o(.text);
asm/chaser.o(.text);
@@ -371,10 +371,10 @@ SECTIONS {
asm/armos.o(.text);
asm/eyegore.o(.text);
asm/rope.o(.text);
- src/smallPesto.o(.text);
+ src/enemy/smallPesto.o(.text);
asm/smallPesto.o(.text);
asm/acroBandits.o(.text);
- src/bladeTrap.o(.text);
+ src/enemy/bladeTrap.o(.text);
asm/keaton.o(.text);
asm/crow.o(.text);
asm/mulldozer.o(.text);
@@ -397,10 +397,10 @@ SECTIONS {
asm/flyingSkull.o(.text);
asm/mazaalBracelet.o(.text);
asm/takkuri.o(.text);
- src/bowMoblin.o(.text);
+ src/enemy/bowMoblin.o(.text);
asm/bowMoblin.o(.text);
- src/lakitu.o(.text);
- src/lakituCloud.o(.text);
+ src/enemy/lakitu.o(.text);
+ src/enemy/lakituCloud.o(.text);
asm/enemy49.o(.text);
asm/vaatiRebornEnemy.o(.text);
asm/vaatiProjectile.o(.text);
@@ -413,11 +413,11 @@ SECTIONS {
asm/vaatiArm.o(.text);
asm/dust.o(.text);
asm/vaatiBall.o(.text);
- src/slime.o(.text);
+ src/enemy/slime.o(.text);
asm/slime.o(.text);
asm/miniSlime.o(.text);
asm/fireballGuy.o(.text);
- src/miniFireballGuy.o(.text);
+ src/enemy/miniFireballGuy.o(.text);
asm/miniFireballGuy.o(.text);
asm/enemy5A.o(.text);
asm/businessScrubPrologue.o(.text);
@@ -467,9 +467,9 @@ SECTIONS {
asm/code_08055FF4.o(.text);
src/textbox.o(.text);
asm/code_08056418.o(.text);
- src/manager1.o(.text);
+ src/manager/manager1.o(.text);
asm/manager1.o(.text);
- src/manager2.o(.text);
+ src/manager/manager2.o(.text);
asm/manager2.o(.text);
asm/manager3.o(.text);
asm/manager4.o(.text);
@@ -507,14 +507,14 @@ SECTIONS {
asm/manager24.o(.text);
asm/manager25.o(.text);
asm/manager26.o(.text);
- src/manager27.o(.text);
+ src/manager/manager27.o(.text);
asm/manager28.o(.text);
asm/manager29.o(.text);
asm/manager2A.o(.text);
asm/manager2B.o(.text);
asm/manager2C.o(.text);
asm/manager2D.o(.text);
- src/manager2E.o(.text);
+ src/manager/manager2E.o(.text);
asm/manager2E.o(.text);
asm/manager2F.o(.text);
asm/manager30.o(.text);
@@ -533,27 +533,28 @@ SECTIONS {
asm/getEmptyEntity.o(.text);
asm/code_0805E744.o(.text);
/* npcs */
- src/gentari.o(.text);
- src/festari.o(.text);
+ src/npc/gentari.o(.text);
+ src/npc/festari.o(.text);
asm/festari.o(.text);
- src/forestMinish.o(.text);
- src/postman.o(.text);
+ src/npc/forestMinish.o(.text);
+ src/npc/postman.o(.text);
asm/postman.o(.text);
asm/npc5.o(.text);
+ src/npc/townsperson.o(.text);
asm/townsperson.o(.text);
asm/kid.o(.text);
asm/npc9.o(.text);
- src/stamp.o(.text);
+ src/npc/stamp.o(.text);
asm/marcy.o(.text);
- src/wheaton.o(.text);
+ src/npc/wheaton.o(.text);
asm/pita.o(.text);
asm/minishEzlo.o(.text);
- src/mailbox.o(.text);
+ src/npc/mailbox.o(.text);
asm/beedle.o(.text);
asm/brocco.o(.text);
asm/sittingPerson.o(.text);
asm/pina.o(.text);
- src/guard.o(.text);
+ src/npc/guard.o(.text);
asm/guardWithSpear.o(.text);
asm/castleMaid.o(.text);
asm/din.o(.text);
@@ -562,38 +563,38 @@ SECTIONS {
asm/sturgeon.o(.text);
asm/tingleSiblings.o(.text);
asm/stockwell.o(.text);
- src/talon.o(.text);
- src/malon.o(.text);
- src/epona.o(.text);
- src/milkCart.o(.text);
+ src/npc/talon.o(.text);
+ src/npc/malon.o(.text);
+ src/npc/epona.o(.text);
+ src/npc/milkCart.o(.text);
asm/ghostBrothers.o(.text);
- src/smith.o(.text);
+ src/npc/smith.o(.text);
asm/npc23.o(.text);
asm/kingDaltus.o(.text);
asm/ministerPotho.o(.text);
asm/npc26.o(.text);
asm/vaati.o(.text);
- src/zelda.o(.text);
- src/mutoh.o(.text);
- src/carpenter.o(.text);
+ src/npc/zelda.o(.text);
+ src/npc/mutoh.o(.text);
+ src/npc/carpenter.o(.text);
asm/carpenter.o(.text);
asm/castorWildsStatue.o(.text);
- src/cat.o(.text);
+ src/npc/cat.o(.text);
asm/cat.o(.text);
asm/mountainMinish.o(.text);
asm/zeldaFollower.o(.text);
asm/melari.o(.text);
- src/bladeBrothers.o(.text);
- src/cow.o(.text);
- src/goron.o(.text);
+ src/npc/bladeBrothers.o(.text);
+ src/npc/cow.o(.text);
+ src/npc/goron.o(.text);
asm/goronMerchant.o(.text);
asm/gorman.o(.text);
asm/dog.o(.text);
- src/syrup.o(.text);
+ src/npc/syrup.o(.text);
asm/syrup.o(.text);
- src/rem.o(.text);
+ src/npc/rem.o(.text);
asm/rem.o(.text);
- src/townMinish.o(.text);
+ src/npc/townMinish.o(.text);
asm/townMinish.o(.text);
asm/librari.o(.text);
asm/percy.o(.text);
@@ -602,24 +603,24 @@ SECTIONS {
asm/librarians.o(.text);
asm/farmers.o(.text);
asm/carlov.o(.text);
- src/dampe.o(.text);
+ src/npc/dampe.o(.text);
asm/drLeft.o(.text);
asm/kingGustaf.o(.text);
asm/gina.o(.text);
- src/simon.o(.text);
+ src/npc/simon.o(.text);
asm/anju.o(.text);
asm/mama.o(.text);
- src/emma.o(.text);
- src/teachers.o(.text);
- src/windTribespeople.o(.text);
+ src/npc/emma.o(.text);
+ src/npc/teachers.o(.text);
+ src/npc/windTribespeople.o(.text);
asm/windTribespeople.o(.text);
asm/gregal.o(.text);
asm/mayorHagen.o(.text);
- src/bigGoron.o(.text);
+ src/npc/bigGoron.o(.text);
asm/bigGoron.o(.text);
asm/ezloCap.o(.text);
asm/npc4E.o(.text);
- src/clothesRack.o(.text);
+ src/npc/clothesRack.o(.text);
asm/clothesRack.o(.text);
asm/picolyteBottles.o(.text);
asm/smallTownMinish.o(.text);
@@ -671,7 +672,7 @@ SECTIONS {
asm/object9.o(.text);
asm/objectA.o(.text);
asm/objectB.o(.text);
- src/chestSpawner.o(.text);
+ src/object/chestSpawner.o(.text);
asm/chestSpawner.o(.text);
asm/objectD.o(.text);
asm/objectE.o(.text);
@@ -679,18 +680,18 @@ SECTIONS {
asm/object10.o(.text);
asm/object11.o(.text);
asm/object12.o(.text);
- src/railtrack.o(.text);
+ src/object/railtrack.o(.text);
asm/lilypadLarge.o(.text);
asm/object15.o(.text);
asm/floatingPlatform.o(.text);
asm/object17.o(.text);
asm/evilSpirit.o(.text);
asm/houseDoorExterior.o(.text);
- src/object1A.o(.text);
- src/greatFairy.o(.text);
+ src/object/object1A.o(.text);
+ src/object/greatFairy.o(.text);
asm/greatFairy.o(.text);
- src/object1C.o(.text);
- src/object1D.o(.text);
+ src/object/object1C.o(.text);
+ src/object/object1D.o(.text);
asm/object1E.o(.text);
asm/object1F.o(.text);
asm/object20.o(.text);
@@ -706,7 +707,7 @@ SECTIONS {
asm/object2A.o(.text);
asm/object2B.o(.text);
asm/beanstalk.o(.text);
- src/smoke.o(.text);
+ src/object/smoke.o(.text);
asm/pushableRock.o(.text);
asm/hittableLever.o(.text);
asm/object30.o(.text);
@@ -727,7 +728,7 @@ SECTIONS {
asm/macroLink.o(.text);
asm/object3D.o(.text);
asm/object3E.o(.text);
- src/giantLeaf.o(.text);
+ src/object/giantLeaf.o(.text);
asm/fairy.o(.text);
asm/ladderUp.o(.text);
asm/object42.o(.text);
@@ -735,35 +736,35 @@ SECTIONS {
asm/object44.o(.text);
asm/object45.o(.text);
asm/giantBookLadder.o(.text);
- src/heartContainer.o(.text);
+ src/object/heartContainer.o(.text);
asm/heartContainer.o(.text);
asm/object48.o(.text);
- src/object49.o(.text);
+ src/object/object49.o(.text);
asm/object49.o(.text);
asm/backgroundCloud.o(.text);
asm/object4B.o(.text);
asm/pushableFurniture.o(.text);
asm/furniture.o(.text);
- src/minishSizedEntrance.o(.text);
+ src/object/minishSizedEntrance.o(.text);
asm/minishSizedEntrance.o(.text);
- src/archway.o(.text);
+ src/object/archway.o(.text);
asm/giantRock.o(.text);
asm/object51.o(.text);
asm/object52.o(.text);
asm/object53.o(.text);
asm/pullableLever.o(.text);
asm/minecart.o(.text);
- src/thoughtBubble.o(.text);
+ src/object/thoughtBubble.o(.text);
asm/hiddenLadderDown.o(.text);
asm/gentariCurtains.o(.text);
asm/lavaPlatform.o(.text);
asm/object5A.o(.text);
asm/object5B.o(.text);
- src/mask.o(.text);
+ src/object/mask.o(.text);
asm/houseDoorInterior.o(.text);
asm/whirlwind.o(.text);
asm/objectBlockingStairs.o(.text);
- src/swordsmanNewsletter.o(.text);
+ src/object/swordsmanNewsletter.o(.text);
asm/object61.o(.text);
asm/giantTwig.o(.text);
asm/object63.o(.text);
@@ -777,14 +778,14 @@ SECTIONS {
asm/crenalBeanSprout.o(.text);
asm/minecartDoor.o(.text);
asm/objectOnPillar.o(.text);
- src/mineralWaterSource.o(.text);
+ src/object/mineralWaterSource.o(.text);
asm/minishSizedArchway.o(.text);
asm/object70.o(.text);
asm/pushableGrave.o(.text);
asm/object72.o(.text);
asm/lilypadSmall.o(.text);
asm/object74.o(.text);
- src/bell.o(.text);
+ src/object/bell.o(.text);
asm/macroDecorations.o(.text);
asm/object79.o(.text);
asm/steam.o(.text);
@@ -799,7 +800,7 @@ SECTIONS {
asm/bigPushableLever.o(.text);
asm/smallIceBlock.o(.text);
asm/bigIceBlock.o(.text);
- src/object86.o(.text);
+ src/object/object86.o(.text);
asm/object87.o(.text);
asm/macroBook.o(.text);
asm/object89.o(.text);
@@ -813,7 +814,7 @@ SECTIONS {
asm/object91.o(.text);
asm/bakerOven.o(.text);
asm/object93.o(.text);
- src/windTribeFlag.o(.text);
+ src/object/windTribeFlag.o(.text);
asm/bird.o(.text);
asm/object96.o(.text);
asm/object97.o(.text);
@@ -821,21 +822,21 @@ SECTIONS {
asm/object99.o(.text);
asm/macroAcorn.o(.text);
asm/object9B.o(.text);
- src/treeHidingPortal.o(.text);
+ src/object/treeHidingPortal.o(.text);
asm/treeHidingPortal.o(.text);
- src/lightableSwitch.o(.text);
- src/object9E.o(.text);
- src/fan.o(.text);
+ src/object/lightableSwitch.o(.text);
+ src/object/object9E.o(.text);
+ src/object/fan.o(.text);
asm/fan.o(.text);
asm/objectA0.o(.text);
asm/palaceArchway.o(.text);
asm/objectA2.o(.text);
- src/cloud.o(.text);
+ src/object/cloud.o(.text);
asm/minishLight.o(.text);
asm/objectA5.o(.text);
asm/objectA6.o(.text);
asm/objectA7.o(.text);
- src/objectA8.o(.text);
+ src/object/objectA8.o(.text);
asm/objectA8.o(.text);
asm/objectA9.o(.text);
asm/waterfallOpening.o(.text);
@@ -844,18 +845,18 @@ SECTIONS {
asm/objectAD.o(.text);
asm/floatingBlock.o(.text);
asm/objectAF.o(.text);
- src/metalDoor.o(.text);
+ src/object/metalDoor.o(.text);
asm/jailBars.o(.text);
asm/objectB2.o(.text);
asm/objectB3.o(.text);
asm/objectB4.o(.text);
asm/objectB5.o(.text);
asm/objectB6.o(.text);
- src/well.o(.text);
+ src/object/well.o(.text);
asm/windTribeTeleporter.o(.text);
asm/objectB9.o(.text);
asm/objectBA.o(.text);
- src/windcrest.o(.text);
+ src/object/windcrest.o(.text);
asm/litArea.o(.text);
asm/objectBD.o(.text);
asm/pinwheel.o(.text);
@@ -914,7 +915,7 @@ SECTIONS {
data/data_080D5360.o(.rodata);
src/item.o(.rodata);
data/data_0811BD44.o(.rodata);
- src/greatFairy.o(.rodata);
+ src/object/greatFairy.o(.rodata);
data/greatFairyAnimations.o(.rodata);
data/data_081208A0.o(.rodata);
data/strings.o(.rodata);
diff --git a/src/bladeTrap.c b/src/enemy/bladeTrap.c
index 3c37d08a..3c37d08a 100644
--- a/src/bladeTrap.c
+++ b/src/enemy/bladeTrap.c
diff --git a/src/bombPeahat.c b/src/enemy/bombPeahat.c
index 3921737a..3921737a 100644
--- a/src/bombPeahat.c
+++ b/src/enemy/bombPeahat.c
diff --git a/src/bowMoblin.c b/src/enemy/bowMoblin.c
index 6c7620d6..6c7620d6 100644
--- a/src/bowMoblin.c
+++ b/src/enemy/bowMoblin.c
diff --git a/src/hangingSeed.c b/src/enemy/hangingSeed.c
index 7f0ba1dc..7f0ba1dc 100644
--- a/src/hangingSeed.c
+++ b/src/enemy/hangingSeed.c
diff --git a/src/keese.c b/src/enemy/keese.c
index 0cbc9acd..0cbc9acd 100644
--- a/src/keese.c
+++ b/src/enemy/keese.c
diff --git a/src/lakitu.c b/src/enemy/lakitu.c
index 9189c525..9189c525 100644
--- a/src/lakitu.c
+++ b/src/enemy/lakitu.c
diff --git a/src/lakituCloud.c b/src/enemy/lakituCloud.c
index 0dca3465..0dca3465 100644
--- a/src/lakituCloud.c
+++ b/src/enemy/lakituCloud.c
diff --git a/src/miniFireballGuy.c b/src/enemy/miniFireballGuy.c
index d7bdc540..d7bdc540 100644
--- a/src/miniFireballGuy.c
+++ b/src/enemy/miniFireballGuy.c
diff --git a/src/octorok.c b/src/enemy/octorok.c
index ff699ec0..ff699ec0 100644
--- a/src/octorok.c
+++ b/src/enemy/octorok.c
diff --git a/src/slime.c b/src/enemy/slime.c
index 42a5d952..42a5d952 100644
--- a/src/slime.c
+++ b/src/enemy/slime.c
diff --git a/src/smallPesto.c b/src/enemy/smallPesto.c
index c29fe80c..c29fe80c 100644
--- a/src/smallPesto.c
+++ b/src/enemy/smallPesto.c
diff --git a/src/manager1.c b/src/manager/manager1.c
index ba556db0..ba556db0 100644
--- a/src/manager1.c
+++ b/src/manager/manager1.c
diff --git a/src/manager2.c b/src/manager/manager2.c
index 707c13d1..707c13d1 100644
--- a/src/manager2.c
+++ b/src/manager/manager2.c
diff --git a/src/manager27.c b/src/manager/manager27.c
index db5bd8b6..db5bd8b6 100644
--- a/src/manager27.c
+++ b/src/manager/manager27.c
diff --git a/src/manager2E.c b/src/manager/manager2E.c
index 3e528098..3e528098 100644
--- a/src/manager2E.c
+++ b/src/manager/manager2E.c
diff --git a/src/bigGoron.c b/src/npc/bigGoron.c
index 0d6b9f3f..0d6b9f3f 100644
--- a/src/bigGoron.c
+++ b/src/npc/bigGoron.c
diff --git a/src/bladeBrothers.c b/src/npc/bladeBrothers.c
index 68630e8e..68630e8e 100644
--- a/src/bladeBrothers.c
+++ b/src/npc/bladeBrothers.c
diff --git a/src/carpenter.c b/src/npc/carpenter.c
index b0608f6d..b0608f6d 100644
--- a/src/carpenter.c
+++ b/src/npc/carpenter.c
diff --git a/src/cat.c b/src/npc/cat.c
index 1ec7df88..1ec7df88 100644
--- a/src/cat.c
+++ b/src/npc/cat.c
diff --git a/src/clothesRack.c b/src/npc/clothesRack.c
index 9dd18b37..9dd18b37 100644
--- a/src/clothesRack.c
+++ b/src/npc/clothesRack.c
diff --git a/src/cow.c b/src/npc/cow.c
index 633334b1..633334b1 100644
--- a/src/cow.c
+++ b/src/npc/cow.c
diff --git a/src/dampe.c b/src/npc/dampe.c
index b7947c32..b7947c32 100644
--- a/src/dampe.c
+++ b/src/npc/dampe.c
diff --git a/src/emma.c b/src/npc/emma.c
index c43b961c..c43b961c 100644
--- a/src/emma.c
+++ b/src/npc/emma.c
diff --git a/src/epona.c b/src/npc/epona.c
index 617867b6..617867b6 100644
--- a/src/epona.c
+++ b/src/npc/epona.c
diff --git a/src/festari.c b/src/npc/festari.c
index ff64ccd6..ff64ccd6 100644
--- a/src/festari.c
+++ b/src/npc/festari.c
diff --git a/src/forestMinish.c b/src/npc/forestMinish.c
index 29a4ea6a..29a4ea6a 100644
--- a/src/forestMinish.c
+++ b/src/npc/forestMinish.c
diff --git a/src/gentari.c b/src/npc/gentari.c
index f41a7438..f41a7438 100644
--- a/src/gentari.c
+++ b/src/npc/gentari.c
diff --git a/src/goron.c b/src/npc/goron.c
index b65e97ea..b65e97ea 100644
--- a/src/goron.c
+++ b/src/npc/goron.c
diff --git a/src/guard.c b/src/npc/guard.c
index 765a89dd..765a89dd 100644
--- a/src/guard.c
+++ b/src/npc/guard.c
diff --git a/src/mailbox.c b/src/npc/mailbox.c
index 1aca5a34..1aca5a34 100644
--- a/src/mailbox.c
+++ b/src/npc/mailbox.c
diff --git a/src/malon.c b/src/npc/malon.c
index de484cc4..de484cc4 100644
--- a/src/malon.c
+++ b/src/npc/malon.c
diff --git a/src/milkCart.c b/src/npc/milkCart.c
index b423dca7..b423dca7 100644
--- a/src/milkCart.c
+++ b/src/npc/milkCart.c
diff --git a/src/mutoh.c b/src/npc/mutoh.c
index b50ff552..b50ff552 100644
--- a/src/mutoh.c
+++ b/src/npc/mutoh.c
diff --git a/src/postman.c b/src/npc/postman.c
index b3a51dba..b3a51dba 100644
--- a/src/postman.c
+++ b/src/npc/postman.c
diff --git a/src/rem.c b/src/npc/rem.c
index 2edd917e..2edd917e 100644
--- a/src/rem.c
+++ b/src/npc/rem.c
diff --git a/src/simon.c b/src/npc/simon.c
index 4e01af67..4e01af67 100644
--- a/src/simon.c
+++ b/src/npc/simon.c
diff --git a/src/smith.c b/src/npc/smith.c
index 061d3c40..061d3c40 100644
--- a/src/smith.c
+++ b/src/npc/smith.c
diff --git a/src/stamp.c b/src/npc/stamp.c
index db1d7310..db1d7310 100644
--- a/src/stamp.c
+++ b/src/npc/stamp.c
diff --git a/src/syrup.c b/src/npc/syrup.c
index 341c60c8..341c60c8 100644
--- a/src/syrup.c
+++ b/src/npc/syrup.c
diff --git a/src/talon.c b/src/npc/talon.c
index 01449c06..01449c06 100644
--- a/src/talon.c
+++ b/src/npc/talon.c
diff --git a/src/teachers.c b/src/npc/teachers.c
index a82bdadd..a82bdadd 100644
--- a/src/teachers.c
+++ b/src/npc/teachers.c
diff --git a/src/townMinish.c b/src/npc/townMinish.c
index c47a2a3f..c47a2a3f 100644
--- a/src/townMinish.c
+++ b/src/npc/townMinish.c
diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c
new file mode 100644
index 00000000..454474cb
--- /dev/null
+++ b/src/npc/townsperson.c
@@ -0,0 +1,58 @@
+#include "global.h"
+#include "entity.h"
+#include "npc.h"
+#include "link.h"
+#include "textbox.h"
+
+extern void (*const gUnk_0810B774[])(Entity*);
+extern void (*const gUnk_0810B77C[])(Entity*);
+extern void sub_08061CB4(Entity*, u32);
+extern u32 sub_0806ED9C(Entity*, u32, u32);
+extern void sub_0806ED78(Entity*);
+
+extern SpriteLoadData* gUnk_0810B6EC[];
+
+void Townsperson(Entity *this)
+{
+ if ((this->flags & 2) != 0) {
+ gUnk_0810B77C[this->action](this);
+ }
+ else {
+ gUnk_0810B774[this->action](this);
+ }
+}
+
+void sub_08061BC8(Entity *this)
+{
+ if (LoadExtraSpriteData(this, gUnk_0810B6EC[this->entityType.form])) {
+ this->animationState = 2;
+ this->field_0xf = this->entityType.form + 1;
+ this->action++;
+ sub_08061CB4(this, 2);
+ }
+}
+
+void sub_08061C00(Entity *this)
+{
+ s32 uVar1;
+
+ uVar1 = sub_0806ED9C(this, 0x20, 0x20);
+ if (uVar1 < 0) {
+ uVar1 = this->animationState + 4;
+ }
+ else {
+ if (this->field_0xf == 0) {
+ this->field_0xf = 0x10;
+ }
+ else {
+ this->field_0xf--;
+ uVar1 = this->animIndex & 3;
+ }
+ }
+ sub_08061CB4(this, uVar1);
+ sub_0806ED78(this);
+ if (this->interactType != 0) {
+ this->interactType = 0;
+ TextboxNoOverlapFollow(this->entityType.parameter + 0xa01);
+ }
+} \ No newline at end of file
diff --git a/src/wheaton.c b/src/npc/wheaton.c
index 06285482..06285482 100644
--- a/src/wheaton.c
+++ b/src/npc/wheaton.c
diff --git a/src/windTribespeople.c b/src/npc/windTribespeople.c
index d01f22d4..d01f22d4 100644
--- a/src/windTribespeople.c
+++ b/src/npc/windTribespeople.c
diff --git a/src/zelda.c b/src/npc/zelda.c
index 2ba8bf28..2ba8bf28 100644
--- a/src/zelda.c
+++ b/src/npc/zelda.c
diff --git a/src/archway.c b/src/object/archway.c
index ff6c7b14..ff6c7b14 100644
--- a/src/archway.c
+++ b/src/object/archway.c
diff --git a/src/bell.c b/src/object/bell.c
index 072b0798..072b0798 100644
--- a/src/bell.c
+++ b/src/object/bell.c
diff --git a/src/chestSpawner.c b/src/object/chestSpawner.c
index 8af7769d..8af7769d 100644
--- a/src/chestSpawner.c
+++ b/src/object/chestSpawner.c
diff --git a/src/cloud.c b/src/object/cloud.c
index 734559c4..734559c4 100644
--- a/src/cloud.c
+++ b/src/object/cloud.c
diff --git a/src/fan.c b/src/object/fan.c
index 481e3887..481e3887 100644
--- a/src/fan.c
+++ b/src/object/fan.c
diff --git a/src/giantLeaf.c b/src/object/giantLeaf.c
index 9003f28b..9003f28b 100644
--- a/src/giantLeaf.c
+++ b/src/object/giantLeaf.c
diff --git a/src/greatFairy.c b/src/object/greatFairy.c
index 2f3276b9..2f3276b9 100644
--- a/src/greatFairy.c
+++ b/src/object/greatFairy.c
diff --git a/src/heartContainer.c b/src/object/heartContainer.c
index 10714a8e..10714a8e 100644
--- a/src/heartContainer.c
+++ b/src/object/heartContainer.c
diff --git a/src/lightableSwitch.c b/src/object/lightableSwitch.c
index 2368da04..2368da04 100644
--- a/src/lightableSwitch.c
+++ b/src/object/lightableSwitch.c
diff --git a/src/mask.c b/src/object/mask.c
index 6dd866c9..6dd866c9 100644
--- a/src/mask.c
+++ b/src/object/mask.c
diff --git a/src/metalDoor.c b/src/object/metalDoor.c
index 1f18a272..1f18a272 100644
--- a/src/metalDoor.c
+++ b/src/object/metalDoor.c
diff --git a/src/mineralWaterSource.c b/src/object/mineralWaterSource.c
index c874530b..c874530b 100644
--- a/src/mineralWaterSource.c
+++ b/src/object/mineralWaterSource.c
diff --git a/src/minishSizedEntrance.c b/src/object/minishSizedEntrance.c
index ca261d35..ca261d35 100644
--- a/src/minishSizedEntrance.c
+++ b/src/object/minishSizedEntrance.c
diff --git a/src/object1A.c b/src/object/object1A.c
index f7d9e469..f7d9e469 100644
--- a/src/object1A.c
+++ b/src/object/object1A.c
diff --git a/src/object1C.c b/src/object/object1C.c
index 16c20816..16c20816 100644
--- a/src/object1C.c
+++ b/src/object/object1C.c
diff --git a/src/object1D.c b/src/object/object1D.c
index 1912facb..1912facb 100644
--- a/src/object1D.c
+++ b/src/object/object1D.c
diff --git a/src/object49.c b/src/object/object49.c
index d9551953..d9551953 100644
--- a/src/object49.c
+++ b/src/object/object49.c
diff --git a/src/object86.c b/src/object/object86.c
index 979ab47a..979ab47a 100644
--- a/src/object86.c
+++ b/src/object/object86.c
diff --git a/src/object9E.c b/src/object/object9E.c
index 4c770e82..4c770e82 100644
--- a/src/object9E.c
+++ b/src/object/object9E.c
diff --git a/src/objectA8.c b/src/object/objectA8.c
index b68a141a..b68a141a 100644
--- a/src/objectA8.c
+++ b/src/object/objectA8.c
diff --git a/src/railtrack.c b/src/object/railtrack.c
index 95c418f4..95c418f4 100644
--- a/src/railtrack.c
+++ b/src/object/railtrack.c
diff --git a/src/smoke.c b/src/object/smoke.c
index b4c83115..b4c83115 100644
--- a/src/smoke.c
+++ b/src/object/smoke.c
diff --git a/src/swordsmanNewsletter.c b/src/object/swordsmanNewsletter.c
index 414ac180..414ac180 100644
--- a/src/swordsmanNewsletter.c
+++ b/src/object/swordsmanNewsletter.c
diff --git a/src/thoughtBubble.c b/src/object/thoughtBubble.c
index 73316eca..73316eca 100644
--- a/src/thoughtBubble.c
+++ b/src/object/thoughtBubble.c
diff --git a/src/treeHidingPortal.c b/src/object/treeHidingPortal.c
index 8ea54861..8ea54861 100644
--- a/src/treeHidingPortal.c
+++ b/src/object/treeHidingPortal.c
diff --git a/src/well.c b/src/object/well.c
index 9efcd750..9efcd750 100644
--- a/src/well.c
+++ b/src/object/well.c
diff --git a/src/windTribeFlag.c b/src/object/windTribeFlag.c
index f9c82da8..f9c82da8 100644
--- a/src/windTribeFlag.c
+++ b/src/object/windTribeFlag.c
diff --git a/src/windcrest.c b/src/object/windcrest.c
index 231eb425..231eb425 100644
--- a/src/windcrest.c
+++ b/src/object/windcrest.c