summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-01-19 00:12:33 +0100
committerTreeki <treeki@gmail.com>2013-01-19 00:12:33 +0100
commit15afe4d423d3966b90f6c72b9cdc06914b0ac363 (patch)
tree85cb6490a0d6c26bc5b202788f119e34feeed805
parent1e2fe2181af8215e6da3f55d0350385d0af2f7e0 (diff)
downloadkamek-15afe4d423d3966b90f6c72b9cdc06914b0ac363.tar.gz
kamek-15afe4d423d3966b90f6c72b9cdc06914b0ac363.zip
hammer model added
-rw-r--r--poweruphax.yaml31
-rw-r--r--src/koopatlas/core.cpp18
-rw-r--r--src/poweruphax.S38
3 files changed, 77 insertions, 10 deletions
diff --git a/poweruphax.yaml b/poweruphax.yaml
index 7d88437..8545048 100644
--- a/poweruphax.yaml
+++ b/poweruphax.yaml
@@ -954,3 +954,34 @@ hooks:
src_addr_pal: 0x807B2524
target_func: 'UpdateSIS'
+# And now, the item itself
+
+ - name: AddIHammer1
+ type: add_func_pointer
+ src_addr_pal: 0x80983334
+ target_func: 'I_hammerArcFilename'
+ - name: ReplaceLostPropellerModel
+ type: add_func_pointer
+ src_addr_pal: 0x80983350
+ target_func: 'I_propeller_model'
+ - name: InsertLostG3D
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x808D4C80
+ target_func: 'InsertLostG3D'
+ - name: AddPtrToSIHammer
+ type: add_func_pointer
+ src_addr_pal: 0x809833D4
+ target_func: 'SI_hammer'
+
+ - name: SkawoHatesMe
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x808D4CCC
+ target_func: 'SkawoHatesMe'
+ - name: SkawoStillHatesMe
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x808D4CEC
+ target_func: 'SkawoStillHatesMe'
+
diff --git a/src/koopatlas/core.cpp b/src/koopatlas/core.cpp
index f0a57af..f130359 100644
--- a/src/koopatlas/core.cpp
+++ b/src/koopatlas/core.cpp
@@ -142,15 +142,9 @@ bool WMInit_LoadSIAnims(void *ptr) {
DVD_LoadFile(GetDVDClass(), "WorldMap", "SI_penguin", 0);
DVD_LoadFile(GetDVDClass(), "WorldMap", "SI_propeller", 0);
DVD_LoadFile(GetDVDClass(), "WorldMap", "SI_star", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_hammer", 0);
+ DVD_LoadFile(GetDVDClass(), "Maps", "SI_hammer", 0);
+
DVD_LoadFile(GetDVDClass(), "Object", "cobCourse", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "obj_coin", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_kinoko", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_fireflower", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_iceflower", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_penguin", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_propeller", 0);
- DVD_LoadFile(GetDVDClass(), "Object", "I_star", 0);
DVD_LoadFile(GetDVDClass(), "Object", "I_kinoko_bundle", 0);
DVD_LoadFile(GetDVDClass(), "Object", "lakitu", 0);
DVD_LoadFile(GetDVDClass(), "Object", "star_coin", 0);
@@ -241,7 +235,7 @@ bool WMInit_SetupExtra(void *ptr) {
// next: items for the Powerup screen
for (int i = 0; i < 8; i++) {
- void *obj = CreateChildObject(WM_ITEM, wm, i==7?6:i, 0, 0);
+ void *obj = CreateChildObject(WM_ITEM, wm, i, 0, 0);
wm->stockItem->newItemPtr[i] = obj;
}
@@ -437,6 +431,12 @@ int dScKoopatlas_c::onDelete() {
DVD_FreeFile(GetDVDClass2(), "SI_penguin");
DVD_FreeFile(GetDVDClass2(), "SI_propeller");
DVD_FreeFile(GetDVDClass2(), "SI_star");
+ DVD_FreeFile(GetDVDClass2(), "SI_hammer");
+
+ DVD_FreeFile(GetDVDClass2(), "cobCourse");
+ DVD_FreeFile(GetDVDClass2(), "I_kinoko_bundle");
+ DVD_FreeFile(GetDVDClass2(), "lakitu");
+ DVD_FreeFile(GetDVDClass2(), "star_coin");
mapListLoader.unload();
diff --git a/src/poweruphax.S b/src/poweruphax.S
index 16800e6..2a65f3e 100644
--- a/src/poweruphax.S
+++ b/src/poweruphax.S
@@ -961,12 +961,26 @@ g3d_I_kinoko_brres: .string "g3d/I_kinoko.brres"
.global I_propeller_model
I_propeller_model: .string "I_propeller_model"
+.global SI_kinoko
+SI_kinoko: .string "SI_kinoko"
+
+.global SI_hammer
+SI_hammer: .string "SI_hammer"
+
+g3d: .string "g3d/"
+
.text
.global AddHSToBattleItem_FixWait2Anim
AddHSToBattleItem_FixWait2Anim:
lis r4, wait2@h
ori r4, r4, wait2@l
blr
+
+.global InsertLostG3D
+InsertLostG3D:
+ lis r4, g3d@h
+ ori r4, r4, g3d@l
+ blr
.data
wait2: .string "wait2"
@@ -1240,7 +1254,7 @@ notGoodEnough:
lwz r0, 0x91C(r30)
li r3, 7
cmpwi r0, 0
- b _ChosenStartChoice
+ beq _ChosenStartChoice
stw r3, 0x8A0(r30)
_ChosenStartChoice:
b ChosenStartChoice
@@ -1417,3 +1431,25 @@ DontUpdateSIS:
.align 4
ptrToTwo: .long 2
+.text
+.global SkawoHatesMe, SkawoStillHatesMe
+
+SkawoHatesMe:
+ lwzx r4, r27, r0
+ cmpwi r0, 28
+ bnelr
+ lis r5, SkawoFucksDucks@h
+ ori r5, r5, SkawoFucksDucks@l
+ blr
+SkawoStillHatesMe:
+ lwzx r4, r4, r0
+ cmpwi r0, 28
+ bnelr
+ lis r4, DuckFuckersUnited@h
+ ori r4, r4, DuckFuckersUnited@l
+ blr
+.data
+SkawoFucksDucks: .string "g3d/I_fireflower.brres"
+DuckFuckersUnited: .string "I_fireflower"
+.align 4
+