diff --git a/src/melee/it/items/itcoin.c b/src/melee/it/items/itcoin.c index acf3f57b8f..11b99e5c95 100644 --- a/src/melee/it/items/itcoin.c +++ b/src/melee/it/items/itcoin.c @@ -115,102 +115,25 @@ bool it_802F1604(Item_GObj* gobj) return false; } -void it_802F1630(HSD_GObj* arg0) +void it_802F1630(HSD_GObj* gobj) { - HSD_JObj* temp_r30; - s32 temp_cr0_eq; - s32 temp_cr0_eq_2; - s32 temp_cr0_eq_3; - s32 temp_r31; - s32 var_r3; - s32 var_r3_2; - s32 var_r3_3; - u32 temp_r4_2; - u32 temp_r4_3; - u32 temp_r4_4; - void* temp_r4; - - temp_r4 = arg0->user_data; - temp_r31 = - M2C_ERROR(/* unknown instruction: subi $r31, $r3, %l(it_803F93C8) */); - M2C_FIELD(temp_r4, f32*, 0x48) = it_804DD9B8; - M2C_FIELD(temp_r4, f32*, 0x44) = it_804DD9B8; - M2C_FIELD(temp_r4, f32*, 0x40) = it_804DD9B8; - temp_r30 = arg0->hsd_obj; - if (temp_r30 == NULL) { - __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, %sda21(it_804D5758) */), 0x27F, M2C_ERROR(/* unknown instruction: subi $r5, $r13, %sda21(it_804D5760) */)); - } - if (temp_r30->flags & 0x20000) { - // __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, - // %sda21(it_804D5758) */), 0x280, temp_r31 + 0x60); - } - temp_r30->rotate.x = it_804DD9B8; - if (!(temp_r30->flags & 0x02000000)) { - temp_cr0_eq = temp_r30 == NULL; - if (temp_cr0_eq == 0) { - if (temp_cr0_eq != 0) { - __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, %sda21(it_804D5758) */), 0x234, M2C_ERROR(/* unknown instruction: subi $r5, $r13, %sda21(it_804D5760) */)); - } - temp_r4_2 = temp_r30->flags; - var_r3 = 0; - if (!(temp_r4_2 & 0x800000) && (temp_r4_2 & 0x40)) { - var_r3 = 1; - } - if (var_r3 == 0) { - HSD_JObjSetMtxDirtySub(temp_r30); - } - } - } - if (temp_r30 == NULL) { - __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, %sda21(it_804D5758) */), 0x294, M2C_ERROR(/* unknown instruction: subi $r5, $r13, %sda21(it_804D5760) */)); - } - if (temp_r30->flags & 0x20000) { - //__assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, - //%sda21(it_804D5758) */), 0x295, temp_r31 + 0x60); - } - temp_r30->rotate.y = it_804DD9B8; - if (!(temp_r30->flags & 0x02000000)) { - temp_cr0_eq_2 = temp_r30 == NULL; - if (temp_cr0_eq_2 == 0) { - if (temp_cr0_eq_2 != 0) { - __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, %sda21(it_804D5758) */), 0x234, M2C_ERROR(/* unknown instruction: subi $r5, $r13, %sda21(it_804D5760) */)); - } - temp_r4_3 = temp_r30->flags; - var_r3_2 = 0; - if (!(temp_r4_3 & 0x800000) && (temp_r4_3 & 0x40)) { - var_r3_2 = 1; - } - if (var_r3_2 == 0) { - HSD_JObjSetMtxDirtySub(temp_r30); - } - } - } - if (temp_r30 == NULL) { - __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, %sda21(it_804D5758) */), 0x2A9, M2C_ERROR(/* unknown instruction: subi $r5, $r13, %sda21(it_804D5760) */)); - } - if (temp_r30->flags & 0x20000) { - //__assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, - //%sda21(it_804D5758) */), 0x2AA, temp_r31 + 0x60); - } - temp_r30->rotate.z = it_804DD9B8; - if (!(temp_r30->flags & 0x02000000)) { - temp_cr0_eq_3 = temp_r30 == NULL; - if (temp_cr0_eq_3 == 0) { - if (temp_cr0_eq_3 != 0) { - __assert(M2C_ERROR(/* unknown instruction: subi $r3, $r13, %sda21(it_804D5758) */), 0x234, M2C_ERROR(/* unknown instruction: subi $r5, $r13, %sda21(it_804D5760) */)); - } - temp_r4_4 = temp_r30->flags; - var_r3_3 = 0; - if (!(temp_r4_4 & 0x800000) && (temp_r4_4 & 0x40)) { - var_r3_3 = 1; - } - if (var_r3_3 == 0) { - HSD_JObjSetMtxDirtySub(temp_r30); - } - } - } - Item_80268E5C(arg0, 1, ITEM_UNK_0x1); - it_802756D0(arg0); + Item* ip; + HSD_JObj* jobj; + + PAD_STACK(16); + + ip = GET_ITEM(gobj); + ip->x40_vel.z = 0.0F; + ip->x40_vel.y = 0.0F; + ip->x40_vel.x = 0.0F; + jobj = GET_JOBJ(gobj); + + HSD_JObjSetRotationX(jobj, 0.0F); + HSD_JObjSetRotationY(jobj, 0.0F); + HSD_JObjSetRotationZ(jobj, 0.0F); + + Item_80268E5C(gobj, 1, ITEM_UNK_0x1); + it_802756D0(gobj); } bool it_802F1850(Item_GObj* gobj)