import some overlays, wip ovl_01

This commit is contained in:
Rainchus 2024-06-29 22:32:10 -05:00
parent dea9a5919b
commit 9068217d0e
29 changed files with 1325 additions and 134 deletions

View File

@ -316,7 +316,7 @@ void func_800A0D00(void*, f32, f32, f32);
void func_80025CA8(s16, s32);
void func_80025B34(s16);
void func_80026040(s16);
void func_80039C48(s32*, s16*);
void func_80039C48(char*, s16*);
void func_80009340(omObjData*, s32, s32, s32, s32);
void func_8001E2F8(s16, u8);
void func_8001E360(s16, u8, u8, u8);

View File

@ -1,6 +1,8 @@
#ifndef _MACROS_H_
#define _MACROS_H_
#define MAX_PLAYERS 4
#define SQ(x) ((x) * (x))
#define PI 3.142857f

View File

@ -30,8 +30,8 @@ extern f32 D_800EE98C;
extern viewAngle D_800F33EC;
extern cameraPosition D_800F6524;
extern camera* D_800F32A0; //pointer to camera struct
extern u32 D_800FB4D0;
extern u16 D_800F2BC0;
extern omObjData* D_800F3FB0;
extern unk_Struct00* D_800C3110;
//extern u8 D_800ED5DD;
extern u8 D_800F6F20;

View File

@ -861,7 +861,8 @@ segments:
- [0x122BA0, c]
- [0x1240D0, c]
- [0x124FD0, data, 1217D0]
- [0x125050, .rodata, 1217D0]
#- [0x125010, data, 122BA0] #800F9E20
- [0x125050, .rodata, 1217D0] #800F9E60
- [0x125080, .rodata, 122BA0]
- {0x1250D0, type: bss, vram: 0x800F9EE0, name: ovl_0C_bss}
- type: code
@ -905,7 +906,8 @@ segments:
subsegments:
- [0x131FA0, c]
- [0x136C10, c]
- [0x136F40, .rodata, 131FA0]
- [0x136F40, data, 131FA0]
- [0x136FF0, .rodata, 131FA0]
- {0x137050, type: bss, vram: 0x800FB690, name: ovl_0F_bss}
- type: code
start: 0x137050

View File

@ -135,7 +135,7 @@ s16 GetSumOfPlayerStars(void) {
s32 starTotal = 0;
s32 i;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
starTotal += GetPlayerStruct(i)->starAmount;
}

View File

@ -184,7 +184,7 @@ void func_80053020(void) {
s32 i;
playerMain* player;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
player = GetPlayerStruct(i);
player->playerObj = NULL;
}

View File

@ -255,7 +255,7 @@ void func_80055A34(s32 arg0) {
void func_80055A40(s32 arg1) {
s32 i;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
func_800543D8(i);
func_80054758(i, D_800C54D8[i + 4][0], D_800C54D8[i + 4][1]);
func_800546B4(i, gPlayers[i].turn_status);

View File

@ -223,7 +223,7 @@ void func_80056B78(void) {
gameStatus->unk_23 = 0;
gameStatus->unk_24 = 1;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
temp_v0 = GetPlayerStruct(i);
temp_v0->starAmount = 0;
temp_v0->poisonedFlag = 0;

View File

@ -1305,7 +1305,7 @@ s32 func_80076174(void) {
return 0;
}
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
if (D_800EDEB4[gPlayers[i].flags] & 0xC000) {
return 0;
}
@ -2465,7 +2465,7 @@ void func_8007B52C(void) {
D_800F64F4 = func_8006DD8C(var_s6, D_800ED4B0[var_s6].unk_274);
if (D_800C6268[temp_fp].unk_00 == 2) {
for (i = 0, var_a0 = 0; i < 4; i++) {
for (i = 0, var_a0 = 0; i < MAX_PLAYERS; i++) {
if (var_a0 < gPlayers[i].unk_00) {
var_a0 = gPlayers[i].unk_00;
}
@ -2474,7 +2474,7 @@ void func_8007B52C(void) {
if (var_a0 < 2) {
var_s3 = 0;
var_s2 = 2;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
if (gPlayers[i].unk_00 == 0) {
func_8006DA5C(temp_v0, (void*) (s32) gPlayers[i].characterID + 44, var_s3);
func_8006DA5C(var_s6, (void*) (s32) gPlayers[i].characterID + 44, var_s3++);
@ -2484,7 +2484,7 @@ void func_8007B52C(void) {
}
}
} else {
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
func_8006DA5C(temp_v0, (void*) (s32) gPlayers[i].characterID + 44, gPlayers[i].unk_00);
func_8006DA5C(var_s6, (void*) (s32) gPlayers[i].characterID + 44, gPlayers[i].unk_00);
}
@ -2493,7 +2493,7 @@ void func_8007B52C(void) {
if (D_800C6268[temp_fp].unk_00 == 3) {
var_s3 = 0;
var_s2 = 1;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
if (gPlayers[i].unk_00 == 0) {
func_8006DA5C(temp_v0, (void*) (s32) gPlayers[i].characterID + 44, var_s3++);
} else {
@ -2501,7 +2501,7 @@ void func_8007B52C(void) {
}
}
} else {
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
func_8006DA5C(temp_v0, (void*) (s32) gPlayers[i].characterID + 44, i);
}
}

View File

@ -142,7 +142,7 @@ void func_8001A454(void) {
void func_8001A498(void) {
s32 i;
for (i = 0; i < 4; i++) {
for (i = 0; i < MAX_PLAYERS; i++) {
if (i < D_800F3778) {
D_800ED558[i] = 0;
gPlayers[i].unk_06 = gPlayers[i].unk_06 & ~1;

View File

@ -91,30 +91,3 @@ static void __osPackEepReadData(u8 address) {
ptr += sizeof(__OSContEepromFormat);
ptr[0] = CONT_CMD_END;
}
// static void __osPackEepReadData(u8 address) {
// u8 *ptr;
// __OSContEepromFormat eepromformat;
// int i;
// ptr = (u8 *)&__osEepPifRam.ramarray;
// for (i = 0; i < ARRLEN(__osEepPifRam.ramarray); i++) {
// __osEepPifRam.ramarray[i] = CONT_CMD_NOP;
// }
// __osEepPifRam.pifstatus = CONT_CMD_EXE;
// eepromformat.txsize = CONT_CMD_READ_EEPROM_TX;
// eepromformat.rxsize = CONT_CMD_READ_EEPROM_RX;
// eepromformat.cmd = CONT_CMD_READ_EEPROM;
// eepromformat.address = address;
// for (i = 0; i < ARRLEN(eepromformat.data); i++) {
// eepromformat.data[i] = 0;
// }
// for (i = 0; i < 4; i++) { //skip the first 4 bytes
// *ptr++ = 0;
// }
// *(__OSContEepromFormat *)(ptr) = eepromformat;
// ptr += sizeof(__OSContEepromFormat);
// ptr[0] = CONT_CMD_END;
// }

View File

@ -81,7 +81,6 @@ extern u16 D_800FE2C2_MemoryMatch;
extern u16 D_800FE2C4_MemoryMatch;
extern u16 D_800F5144;
extern omObjData* D_800F3FB0;
extern Vec3f D_800FDDC0_MemoryMatch;
extern Vec3f D_800FDDCC_MemoryMatch;

View File

@ -0,0 +1,51 @@
#include "common.h"
void func_800F7E08_ChanceTime(s32, s32, s32, u16, f32, f32, f32);
void func_800F78C4_ChanceTime(s32, s32, s32, u16, f32, f32, f32);
void func_800F80D8_ChanceTime(s32);
void func_800F8168_ChanceTime(s32);
void func_800F81F8_ChanceTime(s32);
void func_800F988C_ChanceTime(omObjData*);
void func_800F9948_ChanceTime(s32);
void func_800F8A6C_ChanceTime(void);
s16 func_800FEC4C_ChanceTime(s32, f32, omObjData*);
void func_800FE97C_ChanceTime(s32 arg0);
void func_800FF6D0_ChanceTime(omObjData*);
void func_800FFAA0_ChanceTime(void);
extern s8 D_801011F5_ChanceTime;
extern s8 D_801011F6_ChanceTime;
extern u8 D_801012E0_ChanceTime;
extern u8 D_801012E1_ChanceTime;
extern u8 D_801012E2_ChanceTime;
extern s32* D_80101330_ChanceTime[];
extern s32 D_80101480_ChanceTime;
extern s32 D_80101488_ChanceTime;
extern s8 D_8010175C_ChanceTime;
extern s8 D_801011F9_ChanceTime;
extern s8 D_80101370_ChanceTime;
extern s8 D_80101378_ChanceTime;
extern s8 D_8010183C_ChanceTime;
extern s8 D_8010183D_ChanceTime;
extern s8 D_801011F8_ChanceTime;
extern s8 D_80101360_ChanceTime;
extern s8 D_80101320_ChanceTime;
extern s16 D_801012B4_ChanceTime;
extern s16 D_8010131A_ChanceTime;
extern s16 D_80101760_ChanceTime;
extern Vec3f D_80101214_ChanceTime;
extern omObjData* D_80101284_ChanceTime;
extern u32 D_80101288_ChanceTime;
//extern u16 D_8010128A_ChanceTime;
extern omObjData* D_800F3FB4;
extern omObjData* D_800F3FB8;
extern omObjData* D_800F3FBC;
extern unkStructSize14 D_800C59AC[];
extern char D_80101464_ChanceTime[];
extern char D_80101470_ChanceTime[];
extern f64 D_80101478_ChanceTime;
extern s8 D_801011F0_ChanceTime;
extern s8 D_80101AAE_ChanceTime;
extern s8 D_80101AAF_ChanceTime;
extern s8 D_80101AB0_ChanceTime;
extern s8 D_80101AB1_ChanceTime;

View File

@ -1,4 +1,4 @@
#include "common.h"
#include "ChanceTime.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F65E0_ChanceTime);
@ -14,7 +14,21 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F6B00_C
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F7108_ChanceTime);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F7818_ChanceTime);
void func_800F7818_ChanceTime(s32 arg0) {
s32 temp_v0;
s32 temp_a1;
s32 temp_a2;
temp_v0 = gPlayers[D_80101AAE_ChanceTime].characterID;
temp_a1 = D_800C59AC[temp_v0].unk_00;
temp_a2 = D_800C59AC[temp_v0].unk_04;
if (D_801011F0_ChanceTime == 0) {
func_800F78C4_ChanceTime(arg0, temp_a1, temp_a2, D_80101AAE_ChanceTime, 0.0f, 0, 1400.0f);
} else {
func_800F78C4_ChanceTime(arg0, temp_a1, temp_a2, D_80101AAE_ChanceTime, -140.0f, 0, 1400.0f);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F78C4_ChanceTime);
@ -22,29 +36,155 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F7C7C_C
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F7E08_ChanceTime);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F80D8_ChanceTime);
void func_800F80D8_ChanceTime(s32 arg0) {
u8 temp_v1;
s32 temp2;
s32 temp3;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F8168_ChanceTime);
temp_v1 = gPlayers[D_80101AAF_ChanceTime].characterID;
temp2 = D_800C59AC[temp_v1].unk_00;
temp3 = D_800C59AC[temp_v1].unk_04;
func_800F7E08_ChanceTime(arg0, temp2, temp3, D_80101AAF_ChanceTime, -800.0f, 10.0f, 800.0f);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F81F8_ChanceTime);
void func_800F8168_ChanceTime(s32 arg0) {
u8 temp_v1;
s32 temp2;
s32 temp3;
temp_v1 = gPlayers[D_80101AB0_ChanceTime].characterID;
temp2 = D_800C59AC[temp_v1].unk_00;
temp3 = D_800C59AC[temp_v1].unk_04;
func_800F7E08_ChanceTime(arg0, temp2, temp3, D_80101AB0_ChanceTime, -700.0f, 10.0f, 800.0f);
}
void func_800F81F8_ChanceTime(s32 arg0) {
u8 temp_v1;
s32 temp2;
s32 temp3;
temp_v1 = gPlayers[D_80101AB1_ChanceTime].characterID;
temp2 = D_800C59AC[temp_v1].unk_00;
temp3 = D_800C59AC[temp_v1].unk_04;
func_800F7E08_ChanceTime(arg0, temp2, temp3, D_80101AB1_ChanceTime, -600.0f, 10.0f, 800.0f);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F8288_ChanceTime);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F84B4_ChanceTime);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F8700_ChanceTime);
void func_800F8700_ChanceTime(s16 arg0) {
switch (arg0) {
case 1:
D_800F3FB4 = omAddObj(0xA, 9, 0x2B, -1, &func_800F80D8_ChanceTime);
return;
case 2:
D_800F3FB8 = omAddObj(0xA, 9, 0x2B, -1, &func_800F8168_ChanceTime);
return;
case 3:
D_800F3FBC = omAddObj(0xA, 9, 0x2B, -1, &func_800F81F8_ChanceTime);
return;
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F87CC_ChanceTime);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F8A6C_ChanceTime);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F988C_ChanceTime);
void func_800F988C_ChanceTime(omObjData* arg0) {
func_800264F8(arg0->mdlcnt, arg0->mtncnt, (_sinf(arg0->trans.x * 0.0174532925199432955) / 2.0f) + 0.5f, "030-hata1", "hata2", 0);
arg0->trans.x += 20.0f;
if (arg0->trans.x >= 360.0f) {
arg0->trans.x -= 360.0f;
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F9948_ChanceTime);
void func_800F9948_ChanceTime(s32 arg0) {
D_80101288_ChanceTime = LoadFormFile(0xA0076, 0x2AD);
func_80026040(arg0);
D_80101284_ChanceTime = omAddObj(0x1000, 0, 0, -1, &func_800F988C_ChanceTime);
D_80101284_ChanceTime->trans.x = 0.0f;
D_80101284_ChanceTime->mdlcnt = arg0;
D_80101284_ChanceTime->mtncnt = (u16)D_80101288_ChanceTime;
omSetStatBit(D_80101284_ChanceTime, 0xA0);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F99D8_ChanceTime);
void func_800F99D8_ChanceTime(omObjData* arg0) {
f32 temp_f20 = D_80101214_ChanceTime.x;
f32 temp_f24 = D_80101214_ChanceTime.y;
f32 temp_f22 = D_80101214_ChanceTime.z;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F9B50_ChanceTime);
arg0->model[0] = LoadFormFile(0xA0072, 0x689);
arg0->model[1] = func_800174F4(0x20, 0x299);
func_80025830(arg0->model[1], 1.3f, 1.0f, 1.3f);
func_8001775C(arg0, 0, 0xA0072);
func_8001775C(arg0, 1, 0xA0073);
func_8001775C(arg0, 2, 0xA0074);
func_80025EB4(arg0->model[0], 2, 2);
func_800258EC(arg0->model[0], 4, 4);
func_800258EC(arg0->model[1], 4, 4);
arg0->trans.x = temp_f20;
arg0->trans.y = temp_f24;
arg0->trans.z = temp_f22;
arg0->rot.y = 0.0f;
func_80025798(arg0->model[1], temp_f20, arg0->rot.y, temp_f22);
arg0->scale.x = arg0->scale.y = arg0->scale.z = 0.9f;
func_800F9948_ChanceTime(arg0->model[0]);
func_80025B34(arg0->model[0]);
arg0->func_ptr = &func_800F8A6C_ChanceTime;
}
void func_800F9B50_ChanceTime(void) {
s16 var_s0;
s32 tmp;
var_s0 = CreateTextWindow(0x46, 0x3C, 0x10, 4);
ShowTextWindow(var_s0);
if (D_8010175C_ChanceTime == 0) {
func_8006DA5C(var_s0, D_80101330_ChanceTime[gPlayers[D_801012E0_ChanceTime].characterID], 0);
func_8006DA5C(var_s0, D_80101330_ChanceTime[gPlayers[D_801012E1_ChanceTime].characterID], 1);
} else {
func_8006DA5C(var_s0, D_80101330_ChanceTime[gPlayers[D_801012E1_ChanceTime].characterID], 0);
func_8006DA5C(var_s0, D_80101330_ChanceTime[gPlayers[D_801012E0_ChanceTime].characterID], 1);
}
if (D_801011F6_ChanceTime == 0) {
func_8006DA5C(var_s0, "Coins", 2);
} else {
func_8006DA5C(var_s0, "Stars", 2);
}
tmp = D_801012E2_ChanceTime;
switch(tmp)
{
case 4:
LoadStringIntoWindow(var_s0, (void*)0xF0, -1, -1);
break;
case 0:
case 1:
LoadStringIntoWindow(var_s0, (void*)0xEE, -1, -1);
break;
case 10:
LoadStringIntoWindow(var_s0, (void*)0xF4, -1, -1);
break;
default:
LoadStringIntoWindow(var_s0, (void*)0xED, -1, -1);
break;
}
func_8006E070(var_s0, 0);
WaitForTextConfirmation(var_s0);
HideTextWindow(var_s0);
D_801011F5_ChanceTime = 1;
while (1) {
HuPrcVSleep();
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_01_ChanceTime/D51E0", func_800F9D60_ChanceTime);

View File

@ -1,4 +1,6 @@
#include "common.h"
#include "MusicalMushroom.h"
//800FB4D0 state of game (4 means players can move)
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F65E0_MusicalMushroom);
@ -24,8 +26,40 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F7508_MusicalMushroom);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", D_800FB520_MusicalMushroom);
extern u32 D_800FB4D0_MusicalMushroom;
void func_800F75D8_MusicalMushroom(omObjData* arg0) { //matches but needs rodata support
//line 1 was: unkGlobalStruct_00* temp_s1 = arg0->unk_50; but i think global struct 00 and 01 are the same struct
unkGlobalStruct_00* temp_s1 = arg0->unk_50;
f32* temp_a1 = &D_800FB778_MusicalMushroom[arg0->work[0]];
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F75D8_MusicalMushroom);
switch (D_800FB4D0_MusicalMushroom) {
case 1:
func_80009624(temp_s1, 0);
D_800FB4D0_MusicalMushroom = 2;
break;
case 2:
func_800F7508_MusicalMushroom(arg0, temp_a1);
break;
case 3:
func_8006071C(temp_s1->unk_B3);
if (arg0->work[0] == (D_800F2BC0 - 1)) {
D_800FB4D0_MusicalMushroom = 4;
}
arg0->rot.y += 90.0f;
temp_s1->unk_3C = arg0->rot.y;
/* fall through */
case 0:
func_800184BC(arg0, 0);
break;
case 4:
arg0->rot.y = 0.0f;
func_80009458();
break;
}
func_80017DB0(arg0);
func_800F7484_MusicalMushroom(arg0, 1.0f, 0, 1);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F76E8_MusicalMushroom);
@ -54,3 +88,4 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F91C8_MusicalMushroom);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11C810", func_800F9338_MusicalMushroom);

View File

@ -1,8 +1,55 @@
#include "common.h"
#include "MusicalMushroom.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11F890", func_800F9660_MusicalMushroom);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11F890", func_800F9D70_MusicalMushroom);
void func_800F9D70_MusicalMushroom(omObjData* arg0) {
s32 temp_v1_2;
u32 temp_v1;
u8 temp_s0;
unkGlobalStruct_02* temp_v0;
u32 phi_s2;
u32 phi_s1;
f64 phi_f2;
s32 zero = 0;
arg0->model[0] = func_800174C0(0x1D0000, 0x299);
arg0->trans.z = zero;
arg0->trans.y = zero;
arg0->trans.x = zero;
arg0->unk_50 = func_80023684(sizeof(unkGlobalStruct_02), 31000);
temp_v0 = arg0->unk_50;
func_8009B770(temp_v0, 0, sizeof(unkGlobalStruct_02));
arg0->func_ptr = &func_800F9660_MusicalMushroom;
temp_v1 = rand8() % 100;
phi_s2 = 140;
if (temp_v1 < 20) {
phi_s1 = 200;
} else {
phi_s2 = 200;
if (temp_v1 < 80) {
phi_s1 = 270;
} else {
phi_s2 = 270;
phi_s1 = 360;
}
}
temp_s0 = rand8();
temp_v1_2 = (temp_s0 << 8) | rand8();
temp_v1_2 = phi_s2 + (temp_v1_2 % (phi_s1 - phi_s2)); //phi_s1 - phi_s2 will always be 60, 70, or 90
phi_f2 = temp_v1_2;
//TODO: this should be implicit by the compiler
if (temp_v1_2 < 0) {
phi_f2 += 4294967296.0;
}
D_800FB678_MusicalMushroom = phi_f2;
temp_v0->unk_04 = 1;
func_80008FB8(arg0, 0.5f);
func_80008FC4(arg0, 20.0f);
temp_v0->unk_05 = 0;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0B_MusicalMushroom/11F890", func_800F9EFC_MusicalMushroom);

View File

@ -0,0 +1,14 @@
#include "common.h"
void func_80009458(void);
void func_80009624(unkGlobalStruct_00*, s32);
void func_80017DB0(omObjData*);
// void func_800184BC(omObjData*, s32);
//void func_8006071C(s8, f32*);
void func_800F7484_MusicalMushroom(omObjData*, f32, s32, s32);
void func_800F7508_MusicalMushroom(omObjData*, f32*);
extern u32 D_800FB4D0_MusicalMushroom;
extern f32 D_800FB778_MusicalMushroom[4];
extern f64 D_800FB580_MusicalMushroom;
extern f32 D_800FB678_MusicalMushroom;
void func_800F9660_MusicalMushroom(void);

View File

@ -1,18 +1,119 @@
#include "common.h"
#include "PedalPower.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F65E0_PedalPower);
void func_800F65E0_PedalPower(void) {
func_80029090(0x20);
func_8002ADF0(&D_800EDEC0, 64);
func_8001DE70(32);
omInitObjMan(32, 0);
func_80060088();
omSetStatBit(omAddObj(0x7FDA, 0, 0, -1, func_8005EB1C), 160);
func_8000942C();
D_800F6524.x = 50.0f;
D_800F6524.y = 200.0f;
D_800F6524.z = -100.0f;
D_800F33EC.y = D_800F33EC.x = D_800F33EC.z = 0.0f;
D_800EE98C = 1750.0f;
func_800F67AC_PedalPower();
func_800F6870_PedalPower();
D_800FA72D_PedalPower = 0;
D_800FA738_PedalPower = 0;
D_800FA72C_PedalPower = 0;
func_800F8EE0_PedalPower();
func_800F79B0_PedalPower();
func_800F6CF8_PedalPower();
func_80023448(3);
func_800234B8(0, 16, 16, 16);
func_80023504(1, -43.0f, -18.0f, -110.0f);
func_800234B8(1, 0, 0, 0);
func_80023504(2, 9.0f, -17.0f, 118.0f);
func_800234B8(2, 0, 0, 0);
func_80023504(3, -43.0f, -18.0f, -110.0f);
func_800234B8(3, 0, 0, 0);
func_8002890C(0, 15, 0);
SetFadeInTypeAndTime(0, 16);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F67AC_PedalPower);
void func_800F67AC_PedalPower(void) {
s16 temp_s0;
u8 temp_s1;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F6870_PedalPower);
func_800178A0(1);
temp_s0 = func_800178E8();
temp_s1 = temp_s0;
func_80017660(temp_s1, 0.0f, 0.0f, 320.0f, 240.0f);
func_800176C4(temp_s1, 640.0f, 480.0f, 511.0f, 640.0f, 480.0f, 511.0f);
func_8001D494(temp_s0, 30.0f, 80.0f, 8000.0f);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F689C_PedalPower);
void func_800F6870_PedalPower(void) {
if (func_80075FE0() != 0) {
func_80075FE0();
}
}
void func_800F689C_PedalPower(s32 arg0, u32 arg1) {
u32 new_var;
switch (D_800ED430) {
case 0:
func_80075FE0();
if (arg1 == 0) {
func_80075CCC(0);
if (func_80075FE0() != 0) {
func_80075FE0();
break;
}
} else {
if (arg1 >= 60) {
func_80009458();
break;
}
}
break;
case 1:
do { (new_var = 0x384); } while (0); //required to match
if (new_var == arg1) {
func_80009438();
}
break;
case 2:
break;
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F6944_PedalPower);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F6CF8_PedalPower);
void func_800F6CF8_PedalPower(void) {
omAddObj(2, 2, 0, -1, &func_800F6D2C_PedalPower);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F6D2C_PedalPower);
void func_800F6D2C_PedalPower(omObjData* arg0) {
UnkPedalPowerStruct* temp_s1;
arg0->unk_50 = func_80023684(sizeof(UnkPedalPowerStruct), 0x7918);
func_8009B770(arg0->unk_50, 0, sizeof(UnkPedalPowerStruct));
temp_s1 = arg0->unk_50;
D_800FA73C_PedalPower.x = 400.0f;
D_800FA73C_PedalPower.y = 250.0f;
D_800FA73C_PedalPower.z = 600.0f;
arg0->trans.x = 400.0f;
arg0->trans.y = D_800FA73C_PedalPower.y;
arg0->trans.z = D_800FA73C_PedalPower.z;
arg0->scale.z = 1.2f;
arg0->scale.y = 1.2f;
arg0->scale.x = 1.2f;
arg0->rot.y = -45.0f;
arg0->func_ptr = &func_800F6ED0_PedalPower;
arg0->model[0] = LoadFormFile(0xA0088, 0x649);
func_80009340(arg0, 1, 0x26, 0x64D, 8);
func_8001E360(temp_s1->unk_22, 255, 255, 255);
func_8001E2F8(temp_s1->unk_22, 255);
func_80025EB4(arg0->model[0], 2, 1);
func_80021240(arg0->model[0]);
func_80025798(arg0->model[0], arg0->trans.x, arg0->trans.y, arg0->trans.z);
func_800257E4(arg0->model[0], arg0->rot.x, arg0->rot.y, arg0->rot.z);
func_80025830(arg0->model[0], arg0->scale.x, arg0->scale.y, arg0->scale.z);
func_80025830(arg0->model[1], 2.0f, 2.0f, 2.0f);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/1217D0", func_800F6ED0_PedalPower);

View File

@ -1,10 +1,53 @@
#include "common.h"
#include "PedalPower.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F79B0_PedalPower);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F7AEC_PedalPower);
void func_800F7AEC_PedalPower(omObjData* arg0) {
unkGlobalStruct_02* temp_s1;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F7C04_PedalPower);
arg0->model[0] = func_800174C0(0x1E0002, 0x99);
arg0->model[1] = func_800174C0(0x1E0003, 0x99);
arg0->model[2] = func_800174C0(0x14, 0x99);
arg0->model[3] = func_800174C0(0x1E0008, 0x99);
arg0->trans.x = arg0->trans.y = arg0->trans.z = 0.0f;
arg0->rot.x = 0.0f;
func_80025798(arg0->model[0], arg0->trans.x, arg0->trans.y, arg0->trans.z);
func_80025798(arg0->model[3], arg0->trans.x, arg0->trans.y - 25.0f, arg0->trans.z);
temp_s1 = func_80023684(sizeof(unkGlobalStruct_02), 0x7918);
arg0->unk_50 = temp_s1;
func_8009B770(temp_s1, 0, sizeof(unkGlobalStruct_02));
temp_s1->unk_04 = 1;
temp_s1->unk_05 = 0;
arg0->func_ptr = &func_800F6944_PedalPower;
}
void func_800F7C04_PedalPower(omObjData* arg0) {
unkGlobalStruct_02* temp_s0;
D_800F9EFA_PedalPower = arg0->model[3] = func_800174C0(0x1E0004, 0x99);
D_800F9EF6_PedalPower = arg0->model[2] = func_800174C0(0x1E0006, 0x99);
D_800F9EF8_PedalPower = arg0->model[0] = func_800174C0(0x1E0000, 0x99);
D_800F9EFC_PedalPower = arg0->model[1] = func_800174C0(0x1E0001, 0x699);
arg0->model[4] = func_800174C0(0x1E0009, 0x99);
arg0->model[5] = func_800174C0(0x1E000A, 0x99);
func_80025CA8(D_800F9EF6_PedalPower, D_800FA720_PedalPower);
func_80025EB4(D_800F9EF8_PedalPower, 2, 1);
func_80025EB4(D_800F9EF6_PedalPower, 2, 1);
func_80026040(D_800F9EFA_PedalPower);
func_80039C48("15mt001_DEF", &D_800F9EFE_PedalPower);
D_800F9F04_PedalPower = 0;
arg0->trans.x = arg0->trans.y = arg0->trans.z = 0.0f;
arg0->rot.x = 0.0f;
func_80025798(arg0->model[0], arg0->trans.x, arg0->trans.y, arg0->trans.z);
func_80025798(arg0->model[5], arg0->trans.x, arg0->trans.y, arg0->trans.z + 100.0f);
temp_s0 = func_80023684(sizeof(unkGlobalStruct_02), 0x7918);
arg0->unk_50 = temp_s0;
func_8009B770(temp_s0, 0, sizeof(unkGlobalStruct_02));
temp_s0->unk_04 = 1;
temp_s0->unk_05 = 0;
arg0->func_ptr = &func_800F7DD4_PedalPower;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F7DD4_PedalPower);
@ -12,6 +55,37 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F886C_
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F89F0_PedalPower);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F8D34_PedalPower);
void func_800F8D34_PedalPower(omObjData* arg0) {
unkGlobalStruct_02* temp_s0;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0C_PedalPower/122BA0", func_800F8E08_PedalPower);
arg0->model[0]= func_800174C0(0x190002, 0x99);
arg0->trans.x = D_800F9E38_PedalPower[D_800F9E20_PedalPower];
arg0->trans.y = 0.0f;
arg0->trans.z = -50.0f;
func_80025798(arg0->model[0], arg0->trans.x, arg0->trans.y, -50.0f);
temp_s0 = func_80023684(sizeof(unkGlobalStruct_02), 0x7918);
arg0->unk_50 = temp_s0;
func_8009B770(temp_s0, 0, sizeof(unkGlobalStruct_02));
temp_s0->unk_04 = 1;
temp_s0->unk_05 = 0;
arg0->func_ptr = NULL;
D_800F9E20_PedalPower += 1;
}
void func_800F8E08_PedalPower(omObjData* arg0) {
unkGlobalStruct_02* temp_s0;
arg0->model[0]= func_800174C0(0x1E000B, 0x99);
arg0->trans.x = -25.0f;
arg0->trans.y = 0.0f;
arg0->trans.z = 75.0f;
func_80025798(arg0->model[0], arg0->trans.x, arg0->trans.y, 75.0f);
func_80025830(arg0->model[0], 2.5f, 1.0f, 1.0f);
temp_s0 = func_80023684(sizeof(unkGlobalStruct_02), 0x7918);
arg0->unk_50 = temp_s0;
func_8009B770(temp_s0, 0, sizeof(unkGlobalStruct_02));
temp_s0->unk_04 = 1;
temp_s0->unk_05 = 0;
arg0->func_ptr = NULL;
}

View File

@ -0,0 +1,31 @@
#include "common.h"
typedef struct UnkPedalPowerStruct {
/* 0x00 */ char unk_00[0x22];
/* 0x22 */ u8 unk_22;
/* 0x23 */ char unk_23[0x49];
} UnkPedalPowerStruct; //sizeof 0x6C
void func_800F7DD4_PedalPower(void);
void func_800F6944_PedalPower(void);
void func_800F6ED0_PedalPower(void);
void func_800F6D2C_PedalPower(omObjData*);
void func_800F67AC_PedalPower(void);
void func_800F6870_PedalPower(void);
void func_800F6CF8_PedalPower(void);
void func_800F79B0_PedalPower(void);
void func_800F8EE0_PedalPower(void);
extern s32 D_800F9E90_PedalPower;
extern u16 D_800F9EF6_PedalPower;
extern u16 D_800F9EF8_PedalPower;
extern u16 D_800F9EFA_PedalPower;
extern u16 D_800F9EFC_PedalPower;
extern s16 D_800F9EFE_PedalPower;
extern s32 D_800F9F04_PedalPower;
extern s32 D_800FA720_PedalPower;
extern s8 D_800FA72C_PedalPower;
extern s8 D_800FA72D_PedalPower;
extern s8 D_800FA738_PedalPower;
extern Vec3f D_800FA73C_PedalPower;
extern u8 D_800F9E20_PedalPower;
extern f32 D_800F9E38_PedalPower[];

View File

@ -1,14 +1,53 @@
#include "common.h"
#include "CrazyCutter.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F65E0_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F686C_CrazyCutter);
void func_800F686C_CrazyCutter(omObjData* arg0) {
D_800FD460_CrazyCutter--;
if (D_800FD460_CrazyCutter == 0) {
D_800FD460_CrazyCutter = 20;
func_80075CCC(0);
arg0->func_ptr = &func_800F68C4_CrazyCutter;
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F68C4_CrazyCutter);
void func_800F68C4_CrazyCutter(omObjData* arg0) {
if (func_80075FE0() == 0 || func_80075FE0() & 2) {
D_800FD460_CrazyCutter--;
if (D_800FD460_CrazyCutter == 0) {
D_800FD4B0_CrazyCutter = 1;
func_800F978C_CrazyCutter();
arg0->func_ptr = &func_800F97C8_CrazyCutter;
}
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F6938_CrazyCutter);
void func_800F6938_CrazyCutter(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) {
func_800178A0(1);
D_800EE98C = arg0;
D_800F33EC.y = arg1;
D_800F33EC.x = arg2;
D_800F33EC.z = arg3;
D_800F6524.x = arg4;
D_800F6524.y = arg5;
D_800F6524.z = arg6;
func_8001D494(0, 10.0f, D_800C3110->unk_44, D_800C3110->unk_48);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F69EC_CrazyCutter);
void func_800F69EC_CrazyCutter(Object* arg0) {
D_800FD468_CrazyCutter--;
if (D_800FD468_CrazyCutter == 0) {
D_800FD464_CrazyCutter = 1;
omAddObj(4, 10, 10, 4, &func_800F94C0_CrazyCutter);
omAddObj(4, 10, 10, 4, &func_800F94DC_CrazyCutter);
omAddObj(4, 10, 10, 4, &func_800F94F8_CrazyCutter);
omAddObj(4, 10, 10, 4, &func_800F9514_CrazyCutter);
omAddObj(0, 0, 0, -1, &func_800F686C_CrazyCutter);
omAddObj(2, 1, 1, -1, &func_800F6B04_CrazyCutter);
SetFadeInTypeAndTime(0, 16);
omDelObj(arg0);
}
}
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", D_800FD010_CrazyCutter);
@ -16,7 +55,63 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F6B04
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F6F00_CrazyCutter);
#ifdef NON_EQUIVALENT
void func_800F7180_CrazyCutter(omObjData* arg0) {
s32 i;
if (D_800FD554_CrazyCutter == 0) {
D_800FD460_CrazyCutter++;
if (D_800FD544_CrazyCutter == 4) {
if (D_800FD460_CrazyCutter == 15) {
func_80060128(55);
}
if (D_800FD460_CrazyCutter == 55) {
for (i = 0; i < 4; i++) {
func_800FAACC_CrazyCutter(i, 2, 1);
}
}
if (D_800FD460_CrazyCutter == 90) {
arg0->func_ptr = &func_800FA9D8_CrazyCutter;
}
} else if (D_800FD544_CrazyCutter == 0) {
if (D_800FD460_CrazyCutter == 1) {
func_80060128(52);
for (i = 0; i < 4; i++) {
func_800FAACC_CrazyCutter(i, 4, 1);
}
} else {
if (D_800FD460_CrazyCutter == 90) {
arg0->func_ptr = &func_800FA9D8_CrazyCutter;
}
}
} else {
if (D_800FD460_CrazyCutter == 15) {
func_80060128(0x3C);
}
if (D_800FD460_CrazyCutter == 0x37) {
for (i = 0; i < 4; i++) {
if (func_800FAAB0_CrazyCutter(i, 0x10000) != 0) {
func_800FAACC_CrazyCutter(i, 2, 1);
} else {
func_800FAACC_CrazyCutter(i, 4, 1);
}
}
}
if (D_800FD460_CrazyCutter == 80) {
arg0->func_ptr = &func_800FA9D8_CrazyCutter;
}
}
} else {
arg0->func_ptr = &func_800FA9D8_CrazyCutter;
}
}
#else
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F7180_CrazyCutter);
#endif
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", D_800FD028_CrazyCutter);
@ -36,25 +131,88 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F8FDC
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F90E4_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F94C0_CrazyCutter);
void func_800F94C0_CrazyCutter(s32 arg0) {
func_800F731C_CrazyCutter(arg0, 0);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F94DC_CrazyCutter);
void func_800F94DC_CrazyCutter(s32 arg0) {
func_800F731C_CrazyCutter(arg0, 1);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F94F8_CrazyCutter);
void func_800F94F8_CrazyCutter(s32 arg0) {
func_800F731C_CrazyCutter(arg0, 2);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F9514_CrazyCutter);
void func_800F9514_CrazyCutter(s32 arg0) {
func_800F731C_CrazyCutter(arg0, 3);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F9530_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F9654_CrazyCutter);
void func_800F9654_CrazyCutter(s32 arg0) {
if (D_800F5144 != 0) {
func_8006071C(D_800FD5C6_CrazyCutter);
func_800601D4(40);
omOvlReturnEx(1);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F9694_CrazyCutter);
void func_800F9694_CrazyCutter(Vec3f* arg0, s16 arg1[], s32 arg2) {
Vec2f sp10;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F978C_CrazyCutter);
Convert3DTo2D(0, arg0, &sp10);
arg1[0] = sp10.x;
arg1[1] = sp10.y;
if (arg2 & 1) {
arg1[0] = arg1[0] - 160;
}
if (arg2 / 2) {
arg1[1] = arg1[1] - 120;
}
arg1[0] = arg1[0] * 0.4f;
arg1[1] = arg1[1] * 0.4f;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F97C8_CrazyCutter);
void func_800F978C_CrazyCutter(void) {
D_800FD14E_CrazyCutter = 30;
D_800FD150_CrazyCutter = 30;
func_80075CCC(8, 30, 160, 32);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F98B4_CrazyCutter);
void func_800F97C8_CrazyCutter(omObjData* arg0) {
s32 i;
s32 temp;
D_800FD150_CrazyCutter -= 1;
if (D_800FD150_CrazyCutter == 0) {
D_800FD150_CrazyCutter = 30;
D_800FD14E_CrazyCutter--;
}
func_80079078(D_800FD14E_CrazyCutter);
temp = 0;
for (i = 0; i < 4; i++) {
temp += func_800FAAB0_CrazyCutter(i, 1);
}
if ((D_800FD14E_CrazyCutter == 0) | (temp == 4)) {
func_800790C0();
func_800601D4(40);
func_8006071C(D_800FD5C6_CrazyCutter);
arg0->func_ptr = &func_800FA56C_CrazyCutter;
}
}
void func_800F98B4_CrazyCutter(unkCrazyCutter_00* arg0) {
D_800FD488_CrazyCutter[arg0->unk_30] = 1;
D_800FD558_CrazyCutter[arg0->unk_30] = D_800FCCF0_CrazyCutter[arg0->unk_30] + arg0->unk_00;
D_800FD568_CrazyCutter[arg0->unk_30] = arg0->unk_04;
D_800FD578_CrazyCutter[arg0->unk_30] = D_800FCD00_CrazyCutter[arg0->unk_30] + arg0->unk_08 + -4.0f;
D_800FD5C8_CrazyCutter = PlaySound(0x237);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800F9968_CrazyCutter);
@ -64,7 +222,15 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FA38C
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FA56C_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FA808_CrazyCutter);
void func_800FA808_CrazyCutter(omObjData* arg0) {
if (func_80075FE0() == 0 || func_80075FE0() & 2) {
if (D_800FD590_CrazyCutter == 0) {
func_800FBB2C_CrazyCutter();
D_800FD590_CrazyCutter += 1;
}
arg0->func_ptr = &func_800FA880_CrazyCutter;
}
}
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", D_800FD06C_CrazyCutter);
@ -90,12 +256,32 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FA880
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FA9D8_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FAA18_CrazyCutter);
void func_800FAA18_CrazyCutter(Object* arg0) {
s32 i;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FAAB0_CrazyCutter);
if (func_80072718() == 0) {
for (i = 0; i < 4; i++) {
if (func_800FAAB0_CrazyCutter(i, 0x4000) == 0) {
gPlayers[i].miniGameCoins += 10;
}
}
func_800601D4(0x28);
omOvlReturnEx(1);
omDelObj(arg0);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FAACC_CrazyCutter);
s32 func_800FAAB0_CrazyCutter(s32 arg0, s32 arg1) {
return (arg1 & D_800FD4D8_CrazyCutter[arg0]) != 0;
}
void func_800FAACC_CrazyCutter(s32 arg0, s32 arg1, s32 arg2) {
if (arg2 != 0) {
D_800FD4D8_CrazyCutter[arg0] = arg1 | D_800FD4D8_CrazyCutter[arg0];
} else {
D_800FD4D8_CrazyCutter[arg0] = ~arg1 & D_800FD4D8_CrazyCutter[arg0];
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FAB0C_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FAC38_CrazyCutter);
@ -104,9 +290,43 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FAF8C
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FB2B8_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FB450_CrazyCutter);
void func_800FB450_CrazyCutter(s32 arg0) {
s8 temp_s1;
s8 temp_s0;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FB548_CrazyCutter);
if (arg0 != D_800FD530_CrazyCutter) {
D_800FD530_CrazyCutter = arg0;
temp_s1 = InitSprite(arg0 | 0x1F0000);
temp_s0 = func_80064EF4(1, 0);
func_8006752C(temp_s0, 0, 0xFF);
func_80067480(temp_s0, 0, 0xFFFF);
func_800674BC(temp_s0, 0, 0x9000);
func_80067354(temp_s0, 0, 1.0f, 1.0f);
func_800672B0(temp_s0, 0, 1);
func_80067208(temp_s0, 0, temp_s1, 0);
D_800FD518_CrazyCutter = func_800FC4F0_CrazyCutter(temp_s0, 0, &D_800FD520_CrazyCutter, &D_800FD524_CrazyCutter);
func_80064D38(temp_s0);
}
}
void func_800FB548_CrazyCutter(s32 arg0) {
s8 temp_s1;
s8 temp_s0;
if (arg0 != D_800FD538_CrazyCutter) {
D_800FD538_CrazyCutter = arg0;
temp_s1 = InitSprite(arg0 | 0x1F0000);
temp_s0 = func_80064EF4(1, 0);
func_8006752C(temp_s0, 0, 0xFF);
func_80067480(temp_s0, 0, 0xFFFF);
func_800674BC(temp_s0, 0, 0x9000);
func_80067354(temp_s0, 0, 1.0f, 1.0f);
func_800672B0(temp_s0, 0, 1);
func_80067208(temp_s0, 0, temp_s1, 0);
D_800FD51C_CrazyCutter = func_800FC4F0_CrazyCutter(temp_s0, 0, &D_800FD528_CrazyCutter, &D_800FD52C_CrazyCutter);
func_80064D38(temp_s0);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FB640_CrazyCutter);
@ -116,7 +336,16 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FB944
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FBAFC_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FBB2C_CrazyCutter);
void func_800FBB2C_CrazyCutter(void) {
omObjData* temp_s0;
s32* temp_v0;
temp_s0 = omAddObj(0xC, 0, 0, -1, &func_800FBB94_CrazyCutter);
temp_v0 = func_80023684(sizeof(s32), 0x7918);
temp_s0->unk_50 = temp_v0;
*temp_v0 = 90;
D_800FD5C0_CrazyCutter = PlaySound(0x1C0);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FBB94_CrazyCutter);
@ -126,8 +355,21 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FBFB4
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FC024_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FC240_CrazyCutter);
void func_800FC240_CrazyCutter(s16 arg0) {
s16 i;
for (i = 0; i < 4; i++) {
func_800674BC(arg0, i, 0x8000);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FC29C_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/1250D0", func_800FC45C_CrazyCutter);
void func_800FC45C_CrazyCutter(s16 arg0, s16 arg1) {
s16 i = 0;
for (i = 0; i < 4; i++) {
func_80067354(arg0, i, arg1 / 10.0f, arg1 / 10.0f);
}
}

View File

@ -1,4 +1,4 @@
#include "common.h"
#include "CrazyCutter.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FC4F0_CrazyCutter);
@ -6,14 +6,58 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FC70C
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FC8C0_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FC998_CrazyCutter);
s32 func_800FC998_CrazyCutter(u32 arg0, s32 arg1, u32 arg2, u8* arg3, s32 arg4) { //fake match
s32 new_var = arg4;
s32 var_v0;
s32 var_v1;
u8 *temp_a3;
temp_a3 = (arg3 + (((arg2 >> 1) + (arg2 & 1)) * arg1)) + (arg0 >> 1);
if ((arg0 & 1) != 0) {
var_v0 = (*temp_a3) & 0xF0;
var_v1 = arg4 & 0xF;
} else {
var_v0 = (*temp_a3) & 0xF;
var_v1 = arg4 * 0x10;
}
*temp_a3 = var_v0 | var_v1;
var_v1 = new_var & 0xF;
return 0;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FC9F4_CrazyCutter);
s32 func_800FC9F4_CrazyCutter(s32 arg0, s32 arg1, s32 arg2, u8* arg3, u8 arg4) {
u8 temp_v1;
u8* temp_a3;
temp_a3 = arg3 + (arg2 * arg1) + arg0;
temp_v1 = *temp_a3;
*temp_a3 = arg4;
return *temp_a3 != temp_v1;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FCA20_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FCAAC_CrazyCutter);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FCC64_CrazyCutter);
// s32 func_800FCC64_CrazyCutter(u32 arg0, s32 arg1, u32 arg2, u8* arg3, s32 arg4) {
// s32 var_v0;
// s32 var_v1;
// u8* temp_a3;
// temp_a3 = arg3 + (((arg2 >> 1) + (arg2 & 1)) * arg1) + (arg0 >> 1);
// if ((arg0 & 1) != 0) {
// var_v0 = *temp_a3 & 0xF0;
// var_v1 = arg4 & 0xF;
// } else {
// var_v0 = *temp_a3 & 0xF;
// var_v1 = arg4 * 0x10;
// }
// return (((var_v0 | var_v1) ^ arg4) & 0xFF) != 0;
// }
s32 func_800FCCC8_CrazyCutter(s32 arg0, s32 arg1, s32 arg2, u8* arg3, u8 arg4) {
return arg4 != *(arg3 + (arg2 * arg1) + arg0);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0D_CrazyCutter/12AFE0", func_800FCCC8_CrazyCutter);

View File

@ -0,0 +1,55 @@
#include "common.h"
typedef struct unkCrazyCutter_00 {
/* 0x00 */ f32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ char unk_0C[0x24];
/* 0x30 */ s32 unk_30;
} unkCrazyCutter_00;
void func_800FBB2C_CrazyCutter(void);
void func_800FA880_CrazyCutter(void);
void func_800FA56C_CrazyCutter(void);
void func_800F68C4_CrazyCutter(omObjData*);
void func_800F978C_CrazyCutter(void);
void func_800F97C8_CrazyCutter(omObjData*);
s32 func_800FAAB0_CrazyCutter(s32, s32);
void func_800FAACC_CrazyCutter(s32, s32, s32);
void func_800FA9D8_CrazyCutter(void);
void func_800F686C_CrazyCutter(omObjData*);
void func_800F6B04_CrazyCutter(void);
void func_800F94C0_CrazyCutter(s32);
void func_800F94DC_CrazyCutter(s32);
void func_800F94F8_CrazyCutter(s32);
void func_800F9514_CrazyCutter(s32);
void func_800F731C_CrazyCutter(s32, s32);
s32 func_800FC4F0_CrazyCutter(s8, s32, s32*, s32*);
void func_800FBB94_CrazyCutter(void);
extern s16 D_800FD5C0_CrazyCutter;
extern s32 D_800FD51C_CrazyCutter;
extern s32 D_800FD528_CrazyCutter;
extern s32 D_800FD52C_CrazyCutter;
extern s32 D_800FD538_CrazyCutter;
extern s32 D_800FD518_CrazyCutter;
extern s32 D_800FD520_CrazyCutter;
extern s32 D_800FD524_CrazyCutter;
extern s32 D_800FD530_CrazyCutter;
extern s32 D_800FD4D8_CrazyCutter[];
extern u16 D_800FD590_CrazyCutter;
extern f32 D_800FCCF0_CrazyCutter[];
extern f32 D_800FCD00_CrazyCutter[];
extern s32 D_800FD488_CrazyCutter[];
extern f32 D_800FD558_CrazyCutter[];
extern f32 D_800FD568_CrazyCutter[];
extern f32 D_800FD578_CrazyCutter[];
extern s16 D_800FD5C8_CrazyCutter;
extern u16 D_800FD14E_CrazyCutter;
extern u16 D_800FD150_CrazyCutter;
extern s16 D_800FD5C6_CrazyCutter;
extern s16 D_800FD544_CrazyCutter;
extern s32 D_800FD554_CrazyCutter;
extern s32 D_800FD460_CrazyCutter;
extern s32 D_800FD464_CrazyCutter;
extern s32 D_800FD468_CrazyCutter;
extern s32 D_800FD4B0_CrazyCutter;

View File

@ -1,4 +1,5 @@
#include "common.h"
#include "FaceLift.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F65E0_FaceLift);
@ -66,7 +67,35 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F8CE0_Fa
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F8D5C_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F8DC8_FaceLift);
void func_800F8DC8_FaceLift(omObjData* arg0) {
s16 i;
func_800F80A4_FaceLift(arg0, 4);
func_800FA374_FaceLift(arg0->model[0], arg0->model[1]);
func_800258EC(arg0->model[0], 4, 4);
func_800258EC(arg0->model[1], 4, 4);
func_800258EC(arg0->model[2], 4, 4);
func_800258EC(arg0->model[3], 4, 4);
arg0->model[4] = LoadFormFile(0x200003, 0x219);
func_80025F10(arg0->model[4], 16);
func_80025830(arg0->model[4], 3.8f, 3.8f, 3.8f);
for (i = 0; i < ARRAY_COUNT(D_800FC980_FaceLift); i++) {
D_800FC980_FaceLift[i].x = D_800FC4B0_FaceLift[i].unk_00;
D_800FC980_FaceLift[i].y = D_800FC4B0_FaceLift[i].unk_04;
D_800FC980_FaceLift[i].z = 0;
}
func_80023504(1, 0.0f, 119.0f, 0.0f);
func_80023504(2, 0.0f, -117.0f, 22.0f);
func_800234B8(2, 0xFF, 0, 0);
func_80025F10(func_8002451C(0, &func_800F9988_FaceLift, 0), 16);
D_800FC9F0_FaceLift.x = ((-17.25f - D_800FC500_FaceLift.unk_50) / (D_800FC500_FaceLift.unk_50 - D_800FC500_FaceLift.unk_00));
D_800FC9F0_FaceLift.y = ((-17.25f - D_800FC500_FaceLift.unk_50) / (D_800FC500_FaceLift.unk_50 - D_800FC500_FaceLift.unk_28));
arg0->work[0] = 0;
SetFadeInTypeAndTime(0, 16);
arg0->func_ptr = &func_800F8FCC_FaceLift;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F8FCC_FaceLift);
@ -80,7 +109,14 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F9988_Fa
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F99E8_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F9AD4_FaceLift);
void func_800F9AD4_FaceLift(omObjData* arg0) {
s16 temp = InitSprite(0x20000B);
D_800FC960_FaceLift = func_80019060(temp, 0, 1);
func_80018C90(D_800FC960_FaceLift);
arg0->work[1] = 0;
arg0->func_ptr = &func_800F9B38_FaceLift;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800F9B38_FaceLift);
@ -96,7 +132,13 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FA5B4_Fa
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FA7D0_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FA9DC_FaceLift);
void func_800FA9DC_FaceLift(omObjData* arg0) {
if (D_800FC3D0_FaceLift != 0 || D_800F5144 != 0) {
func_800726AC(0, 0x14);
arg0->func_ptr = &func_800FAA38_FaceLift;
func_800601D4(40);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FAA38_FaceLift);
@ -104,7 +146,9 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FAA64_Fa
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FAB24_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FACB8_FaceLift);
void func_800FACB8_FaceLift(omObjData* arg0) {
func_800FACD8_FaceLift(arg0, D_800FCA18_FaceLift);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FACD8_FaceLift);
@ -124,16 +168,39 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FB858_Fa
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FB9E8_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FBE08_FaceLift);
void func_800FBE08_FaceLift(void) {
void* fsData;
fsData = ReadMainFS(0x0000007E);
D_800FCA1E_FaceLift = func_800678A4(fsData);
FreeMainFS(fsData);
fsData = ReadMainFS(0x0020000C);
D_800FCA2A_FaceLift = func_800678A4(fsData);
FreeMainFS(fsData);
D_800FCA28_FaceLift = 0;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FBE78_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FC094_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FC0F0_FaceLift);
void func_800FC0F0_FaceLift(s16 arg0) {
s16 i;
for (i = 0; i < 4; i++) {
func_80067480(arg0, i, 0x8000);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FC14C_FaceLift);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FC30C_FaceLift);
void func_800FC30C_FaceLift(s16 arg0, s16 arg1) {
s16 i;
for (i = 0; i < 4; i++) {
func_80067354(arg0, i, arg1 / 10.0f, arg1 / 10.0f);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0E_FaceLift/12BC20", func_800FC39C_FaceLift);
void func_800FC39C_FaceLift(s16 arg0, s16 arg1, s16 arg2) {
func_80066DC4(arg0, 0, arg1, arg2);
}

View File

@ -0,0 +1,39 @@
#include "common.h"
typedef struct unk_FaceLift_00 {
/* 0x00 */ f32 unk_00;
/* 0x04 */ char unk_04[0x24];
/* 0x28 */ f32 unk_28;
/* 0x2C */ char unk_2C[0x24];
/* 0x50 */ f32 unk_50;
} unk_FaceLift_00;
typedef struct unk_FaceLift_01 {
/* 0x00 */ f32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ char unk_08[0x20];
} unk_FaceLift_01;
void func_800F9B38_FaceLift(void);
s16 func_8002451C(s32, void*, s32);
void func_80025830(s16, f32, f32, f32);
void func_800258EC(s16, s32, s32);
void func_80025F10(s16, s32);
void func_800F80A4_FaceLift(omObjData*, s32);
void func_800FA374_FaceLift(s16, s16);
void func_800F8FCC_FaceLift(void);
void func_800F9988_FaceLift(void);
void func_800FAA38_FaceLift(void);
void func_800FACD8_FaceLift(omObjData*, s32);
extern s32 D_800FCA18_FaceLift;
extern u16 D_800FC3D0_FaceLift;
extern u16 D_800F5144;
extern s16 D_800FC960_FaceLift;
extern unk_FaceLift_01 D_800FC4B0_FaceLift[];
extern unk_FaceLift_00 D_800FC500_FaceLift;
extern Vec3f D_800FC980_FaceLift[6];
extern Vec2f D_800FC9F0_FaceLift;
extern s16 D_800FCA1E_FaceLift;
extern s16 D_800FCA28_FaceLift;
extern s16 D_800FCA2A_FaceLift;

View File

@ -1,45 +1,143 @@
#include "common.h"
#include "WhackAPlant.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F65E0_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F6B8C_WhackAPlant);
void func_800F6B8C_WhackAPlant(void) {
s32 i = 0;
for (i = 0; i < D_800F3778; i++) {}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F6BC4_WhackAPlant);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F6D54_WhackAPlant);
void func_800F6BC4_WhackAPlant(omObjData* arg0) {
s16 temp_s2;
s32 i;
D_800FB740_WhackAPlant = 0;
D_800FB69A_WhackAPlant = 0;
D_800FB6F4_WhackAPlant = 0;
D_800FB710_WhackAPlant[1] = 0;
for (i = 0; i < 9; i++) {
temp_s2 = func_8001E00C((void*)-1, 0x68D, 8);
D_800ECDE0[temp_s2].unk_02 = D_800FB6BA_WhackAPlant;
func_80025930(D_800ECDE0[temp_s2].unk_00, 0x60000000, 0x60000000);
D_800FB6C0_WhackAPlant[i] = temp_s2;
D_800FB6EA_WhackAPlant[i] = 0;
}
for (i = 0; i < 9; i++) {
temp_s2 = func_8001E00C((void*)-1, 0x68D, 8);
D_800ECDE0[temp_s2].unk_02 = D_800FB6BC_WhackAPlant;
func_80025930(D_800ECDE0[temp_s2].unk_00, 0x60000000, 0x60000000);
D_800FB6D8_WhackAPlant[i] = temp_s2;
func_8001E2F8(temp_s2, 0xE0);
func_8001E360(temp_s2, 0xFF, 0xFF, 0xBE);
}
D_800ED430 = 1;
arg0->func_ptr = &func_800F6D54_WhackAPlant;
}
void func_800F6D54_WhackAPlant(void) {
switch (D_800FB740_WhackAPlant) {
case 0:
func_800FA078_WhackAPlant();
break;
case 1:
break;
case 2:
func_800FA1E0_WhackAPlant();
break;
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F6DBC_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F6FE4_WhackAPlant);
void func_800F6FE4_WhackAPlant(omObjData* arg0) {
unkGlobalStruct_02* temp_s0;
D_800F2AF8[D_800ED440++] = arg0;
temp_s0 = func_80023684(sizeof(unkGlobalStruct_02), 0x7918);
arg0->unk_50 = temp_s0;
func_8009B770(temp_s0, 0, sizeof(unkGlobalStruct_02));
temp_s0->unk_04 = 1;
temp_s0->unk_05 = 1;
func_80009058(arg0, 170.0f, 170.0f, -320.0f, -320.0f, 320.0f, 320.0f);
func_80008FB8(arg0, 0.5f);
arg0->func_ptr = NULL;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F70AC_WhackAPlant);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB580_WhackAPlant);
void func_800F7570_WhackAPlant(omObjData* arg0) {
unkGlobalStruct_00* temp_s1 = arg0->unk_50;
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB584_WhackAPlant);
if (D_800FB60A_WhackAPlant < 0x69) {
omSetTra(arg0, arg0->trans.x, arg0->trans.y + PI, arg0->trans.z);
func_80017DB0(arg0);
} else {
D_800FB710_WhackAPlant[0] = 3;
arg0->func_ptr = &func_800F7714_WhackAPlant;
func_800258EC(D_800FB6F8_WhackAPlant->model[0], 0x1C00, 0x400);
temp_s1->unk_3C = 0.0f;
}
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB5C8_WhackAPlant);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB5CC_WhackAPlant);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB608_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F7570_WhackAPlant);
D_800FB60A_WhackAPlant += 1;
D_800FB724_WhackAPlant.x = func_800AEAC0(D_800FB60C_WhackAPlant) * D_800FB610_WhackAPlant;
D_800FB724_WhackAPlant.z = func_800AEFD0(D_800FB60C_WhackAPlant) * D_800FB610_WhackAPlant;
D_800FB724_WhackAPlant.y = D_800FB614_WhackAPlant + 270.0f;
D_800FB718_WhackAPlant = D_800FB618_WhackAPlant + 270.0f;
D_800FB60C_WhackAPlant -= 3.4285715f;
D_800FB610_WhackAPlant = D_800FB610_WhackAPlant + 7.561905f;
D_800FB614_WhackAPlant = D_800FB614_WhackAPlant + 7.6190476f;
D_800FB618_WhackAPlant = D_800FB618_WhackAPlant + -2.5714285f;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F7714_WhackAPlant);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB61C_WhackAPlant);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB620_WhackAPlant);
INCLUDE_RODATA("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", D_800FB624_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F7AE0_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F7F90_WhackAPlant);
void func_800F7F90_WhackAPlant(omObjData* arg0) {
unkGlobalStruct_00* temp_s1 = arg0->unk_50;
unk_Struct01* temp_v1 = temp_s1->unk_E4;
if (D_800FB61C_WhackAPlant < 0xF) {
temp_s1->unk_3C += temp_v1->unk_08;
arg0->trans.x += temp_v1->unk_0C;
arg0->trans.z += temp_v1->unk_10;
D_800FB61C_WhackAPlant += 1;
if (D_800FB61C_WhackAPlant == 0xF) {
func_800184BC(arg0, 0);
arg0->trans.x = arg0->trans.z = 0.0f;
if (D_800FB698_WhackAPlant == 0) {
D_800FB730_WhackAPlant = 1;
}
}
}
func_80017DB0(arg0);
func_8009ECB0(&D_800F2B7C[arg0->model[0]].unk7C, 0.0f, temp_s1->unk_3C, 0.0f);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F8098_WhackAPlant);
// void func_800F8098_WhackAPlant(omObjData* arg0) {
// u16 temp = (++D_800FB61E_WhackAPlant);
// if (temp < 0x5A) {
// arg0->unk_1C += -2.7777777f;
// }
// if (D_800FB620_WhackAPlant != 0) {
// u16 temp2 = (--D_800FB620_WhackAPlant);
// if (!temp2) {
// func_80060540(0x24B, 0);
// }
// }
// func_80017DB0(arg0);
// }
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F8134_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F82B4_WhackAPlant);
@ -62,15 +160,81 @@ INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F998C
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F9AF4_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F9D38_WhackAPlant);
void func_800F9D38_WhackAPlant(omObjData* arg0) {
D_800FB6A4_WhackAPlant = func_80019060(D_800FB6A2_WhackAPlant, 0, 1);
func_80018D84(D_800FB6A4_WhackAPlant, 0x8000);
D_800FB69E_WhackAPlant = func_80019060(D_800FB69C_WhackAPlant, 0, 1);
D_800FB6A0_WhackAPlant = func_80019060(D_800FB69C_WhackAPlant, 0, 1);
func_80018D84(D_800FB69E_WhackAPlant, 0x8000);
func_80018D84(D_800FB6A0_WhackAPlant, 0x8000);
SetBasicSpritePos(D_800FB6A4_WhackAPlant, 0x8E, 0x20);
SetBasicSpritePos(D_800FB69E_WhackAPlant, 0xA2, 0x20);
SetBasicSpritePos(D_800FB6A0_WhackAPlant, 0xAA, 0x20);
arg0->work[0] = 0;
arg0->work[1] = 0;
arg0->work[2] = 0;
arg0->work[3] = 0;
arg0->scale.y = 1.0f;
arg0->func_ptr = &func_800F9E44_WhackAPlant;
}
void func_800F9E44_WhackAPlant(omObjData* arg0) {
s32 temp_v1;
u32 temp_s0;
s32 temp_s1;
temp_v1 = arg0->unk_10;
if (temp_v1 != 0) {
arg0->unk_10 = 0;
if (temp_v1 == 1) {
arg0->work[0] += arg0->work[3];
arg0->work[3] = 0;
arg0->work[1] = 2;
arg0->scale.y = 1.0f;
}
}
switch (arg0->work[1]) {
case 2:
arg0->scale.y += 0.3f;
if (arg0->scale.y >= 2.4f) {
arg0->work[1] = 4;
arg0->scale.y = 2.4f;
}
break;
case 4:
arg0->scale.y -= 0.3f;
if (arg0->scale.y <= 1.0f) {
arg0->work[1] = 0;
arg0->scale.y = 1.0f;
}
break;
}
temp_s1 = arg0->work[0];
temp_s0 = arg0->work[0];
temp_s0 = temp_s0 / 10;
func_80018E50(D_800FB69E_WhackAPlant, temp_s0, 0);
func_80018E50(D_800FB6A0_WhackAPlant, temp_s1 - (temp_s0 * 0xA), 0);
SetBasicSpriteSize(D_800FB69E_WhackAPlant, 1.0f, arg0->scale.y);
SetBasicSpriteSize(D_800FB6A0_WhackAPlant, 1.0f, arg0->scale.y);
SetBasicSpritePos(D_800FB69E_WhackAPlant, 0xA0, 32.0f - ((arg0->scale.y - 1.0f) * 6.0f));
SetBasicSpritePos(D_800FB6A0_WhackAPlant, 0xB0, 32.0f - ((arg0->scale.y - 1.0f) * 6.0f));
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800F9E44_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800FA078_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800FA1E0_WhackAPlant);
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800FA668_WhackAPlant);
void func_800FA668_WhackAPlant(void) {
if ((D_800FB608_WhackAPlant != 0) || (D_800F5144 != 0)) {
func_800FB4C0_WhackAPlant(131);
func_800601D4(40);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/131FA0", func_800FA6AC_WhackAPlant);

View File

@ -1,15 +1,77 @@
#include "common.h"
#include "WhackAPlant.h"
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB250_WhackAPlant);
void func_800FB250_WhackAPlant(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
func_800178A0(1);
func_800178E8();
D_800EE98C = arg1;
D_800F33EC.y = arg2;
D_800F33EC.x = arg3;
D_800F33EC.z = arg4;
D_800F6524.x = arg5;
D_800F6524.y = arg6;
D_800F6524.z = arg7;
D_800C3110->unk_40 = arg0;
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB308_WhackAPlant);
void func_800FB308_WhackAPlant(omObjData* arg0, s16 arg1, f32 arg2, f32 arg3, f32 arg4) {
if (arg1 == 0) {
omSetTra(arg0, arg2, arg3, arg4);
return;
}
func_80025798(arg0->model[arg1], arg2, arg3, arg4);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB378_WhackAPlant);
void func_800FB378_WhackAPlant(omObjData* arg0, s16 arg1, f32 arg2, f32 arg3, f32 arg4) {
if (arg1 == 0) {
omSetRot(arg0, arg2, arg3, arg4);
return;
}
func_800257E4(arg0->model[arg1], arg2, arg3, arg4);
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB3E8_WhackAPlant);
s32 func_800FB3E8_WhackAPlant(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
f32 temp_f0;
f32 temp_f12;
f32 temp_f14;
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB43C_WhackAPlant);
temp_f12 = arg0 - arg3;
temp_f12 = temp_f12 * temp_f12;
temp_f14 = arg1 - arg4;
temp_f12 = (temp_f14 * temp_f14) + temp_f12;
temp_f0 = arg2 + arg5;
temp_f0 = temp_f0 * temp_f0;
if (temp_f12 <= temp_f0) {
return 1;
} else {
return 0;
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB4C0_WhackAPlant);
f32 func_800FB43C_WhackAPlant(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
f32 temp_f22 = arg2 - arg0;
if (func_800B1750(SQ(temp_f22) + ((arg3 - arg1) * (arg3 - arg1))) < 15.0f) {
return 1000.0f;
} else {
return func_800B0CD8(temp_f22, arg3 - arg1);
}
}
INCLUDE_ASM("asm/nonmatchings/overlays/ovl_0F_WhackAPlant/136C10", func_800FB4DC_WhackAPlant);
void func_800FB4C0_WhackAPlant(s32 arg0) {
omOvlReturnEx(1);
}
void func_800FB4DC_WhackAPlant(void) {
D_800EE738[1] = 0;
D_800EE738[2] = 900.0f;
D_800EE738[0] = 0;
D_800C3110->unk_40 = 45.0f;
D_800EE738[3] = 45.0f;
D_800EE738[4] = 20000.0f;
D_800EE738[5] = 10000.0f;
func_8001D420(0, &D_800FB724_WhackAPlant, (Vec3f*) &D_800FB710_WhackAPlant[2], &D_800FB734_WhackAPlant);
func_8001D57C(0);
}

View File

@ -0,0 +1,42 @@
#include "common.h"
void func_800F6D54_WhackAPlant(void);
void func_800FA078_WhackAPlant(void);
void func_800FA1E0_WhackAPlant(void);
void func_800F7714_WhackAPlant(void);
void func_800F9E44_WhackAPlant(omObjData* arg0);
void func_800FB4C0_WhackAPlant(s32);
extern s16 D_800FB69A_WhackAPlant;
extern u16 D_800FB6BA_WhackAPlant;
extern u16 D_800FB6BC_WhackAPlant;
extern s16 D_800FB6C0_WhackAPlant[];
extern s16 D_800FB6D8_WhackAPlant[];
extern s8 D_800FB6EA_WhackAPlant[];
extern s16 D_800FB6F4_WhackAPlant;
extern f32 D_800EE738[];
extern Vec3f D_800FB734_WhackAPlant;
extern u16 D_800FB608_WhackAPlant;
extern s16 D_800FB69C_WhackAPlant;
extern u16 D_800FB69E_WhackAPlant;
extern u16 D_800FB6A0_WhackAPlant;
extern s16 D_800FB6A2_WhackAPlant;
extern u16 D_800FB6A4_WhackAPlant;
extern omObjData* D_800F2AF8[];
extern u16 D_800FB740_WhackAPlant;
extern s16 D_800F3778;
extern u16 D_800FB60A_WhackAPlant;
extern f32 D_800FB60C_WhackAPlant;
extern f32 D_800FB610_WhackAPlant;
extern f32 D_800FB614_WhackAPlant;
extern f32 D_800FB618_WhackAPlant;
extern omObjData* D_800FB6F8_WhackAPlant;
extern s16 D_800FB710_WhackAPlant[2];
extern f32 D_800FB718_WhackAPlant;
extern Vec3f D_800FB724_WhackAPlant;
//extern s32 D_800F2B7C;
extern u16 D_800FB61C_WhackAPlant;
extern s16 D_800FB698_WhackAPlant;
extern s16 D_800FB730_WhackAPlant;
extern u16 D_800FB61E_WhackAPlant;
extern u16 D_800FB620_WhackAPlant;

View File

@ -496,6 +496,13 @@ D_800F370C = 0x800F370C; //type:u16
D_800F370E = 0x800F370E; //type:s16
D_800ED100 = 0x800ED100; //size:0x94
D_800FC500_FaceLift = 0x800FC500; //rom:0x131B40 segment:FaceLift
D_800F3FB0 = 0x800F3FB0;
D_800F3FB4 = 0x800F3FB4;
D_800F3FB8 = 0x800F3FB8;
D_800F3FBC = 0x800F3FBC;
__MotorDataBuf = 0x800EA1D0;
piAccessBuf = 0x800EA1C0;
tmp_task = 0x800EA180;