summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spritetex.yaml122
-rw-r--r--src/spritetex.S143
2 files changed, 257 insertions, 8 deletions
diff --git a/spritetex.yaml b/spritetex.yaml
index 5d930c6..aaa2a2d 100644
--- a/spritetex.yaml
+++ b/spritetex.yaml
@@ -1,5 +1,5 @@
---
-source_files: [../src/spritetex.S]
+source_files: [../src/spritetex.s]
hooks:
# - name: TEX_WoodBox
# type: branch_insn
@@ -15,3 +15,123 @@ hooks:
src_addr_ntsc: 0x80875BB4
src_addr_pal: 0x80875BB4
target_func: 'TEX_Bush'
+
+
+
+# The below was added by Tempus
+
+
+ - name: TEX_Goomba
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80031384
+ target_func: 'TEX_Goomba'
+
+
+ - name: TEX_Barrel
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x809AB3B4
+ target_func: 'TEX_Barrel'
+
+
+# - name: TEX_Blooper
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x80A0451C
+# target_func: 'TEX_Blooper'
+
+
+# - name: TEX_BigBlock
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x809B8DB8
+# target_func: 'TEX_BigBlock'
+
+
+# - name: TEX_Thwomp
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x809F63F4
+# target_func: 'TEX_Thwomp'
+
+
+ - name: TEX_GiantBuzzy
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x809B6B44
+ target_func: 'TEX_GiantBuzzy'
+
+
+ - name: TEX_Buzzy
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80A67834
+ target_func: 'TEX_Buzzy'
+
+
+ - name: TEX_SpikeTop
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80AB2C34
+ target_func: 'TEX_SpikeTop'
+
+
+ - name: TEX_Spiny
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x8003DBF8
+ target_func: 'TEX_Spiny'
+
+
+ - name: TEX_SpringBlock
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80AC8640
+ target_func: 'TEX_SpringBlock'
+
+
+# - name: TEX_Coaster
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x80859714
+# target_func: 'TEX_Coaster'
+
+
+# - name: TEX_Koopa
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x80A72904
+# target_func: 'TEX_Koopa'
+
+
+# - name: TEX_Gabon
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x80A00284
+# target_func: 'TEX_Gabon'
+
+
+# - name: TEX_Podoboo
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x809D0CC0
+# target_func: 'TEX_Podoboo'
+
+
+# - name: TEX_Switch
+# type: branch_insn
+# branch_type: bl
+# src_addr_pal: 0x80A19EC8
+# target_func: 'TEX_Switch'
+
+
+ - name: TEX_WiggleShroom
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x800BC9D8
+ target_func: 'TEX_WiggleShroom'
+
+
+
+
diff --git a/src/spritetex.S b/src/spritetex.S
index 681f763..65aeefc 100644
--- a/src/spritetex.S
+++ b/src/spritetex.S
@@ -20,25 +20,25 @@ GetTexFilenameForR5:
# obj number should be put into r5
# returned filename is in r5
# this makes it easy to use with dRes_c::GetResource
-
+
stwu sp, -0x10(sp)
mflr r0
stw r0, 0x14(sp)
stw r3, 0xC(sp)
stw r4, 0x8(sp)
-
+
lis r3, TexFilenameBuffer@h
ori r3, r3, TexFilenameBuffer@l
-
+
lis r4, TexFormatString@h
ori r4, r4, TexFormatString@l
-
+
crclr 4*cr1+eq
bl sprintf
-
+
lis r5, TexFilenameBuffer@h
ori r5, r5, TexFilenameBuffer@l
-
+
lwz r0, 0x14(sp)
lwz r3, 0xC(sp)
lwz r4, 0x8(sp)
@@ -63,6 +63,135 @@ TEX_Bush:
b GetTexFilenameForR5
+# The below was added by Tempus
+
+
+.global TEX_Goomba
+TEX_Goomba:
+ lwz r5, 4(r3)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Barrel
+TEX_Barrel:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Blooper
+TEX_Blooper:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_BigBlock
+TEX_BigBlock:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Thwomp
+TEX_Thwomp:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_GiantBuzzy
+TEX_GiantBuzzy:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Buzzy
+TEX_Buzzy:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_SpikeTop
+TEX_SpikeTop:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Spiny
+TEX_Spiny:
+ lwz r5, 4(r31)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_SpringBlock
+TEX_SpringBlock:
+ lwz r5, 4(r31)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Coaster
+TEX_Coaster:
+ lwz r5, 4(r5)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Koopa
+TEX_Koopa:
+ lwz r5, 4(r30)
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Gabon
+TEX_Gabon:
+ lwz r5, 4(r30)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Podoboo
+TEX_Podoboo:
+ lwz r5, 4(r27)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_Switch
+TEX_Switch:
+ lwz r5, 4(r30)
+ srwi r5, r5, 16
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
+
+.global TEX_WiggleShroom
+TEX_WiggleShroom:
+ lwz r5, 4(r31)
+ srwi r5, r5, 24
+ andi. r5, r5, 0xF
+ b GetTexFilenameForR5
+
@@ -71,5 +200,5 @@ TexFilenameBuffer:
.long 0,0,0,0
TexFormatString:
- .string "g3d/t%02d.brres"
+ .string "g3d/t02d.brres"