Skip to content

Commit

Permalink
99% of it_802CE0C4
Browse files Browse the repository at this point in the history
- needed to remove inlines due to stack usage
- relocation diff needs adressing
  • Loading branch information
wyatt-avilla committed Mar 28, 2024
1 parent c1a78b7 commit 6e44130
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/melee/it/items/ithassam.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ithassam.h"

#include "math.h"

#include "cm/camera.h"
#include "ef/eflib.h"
#include "ft/ftlib.h"
Expand Down Expand Up @@ -200,12 +202,12 @@ void it_802CE008(Item_GObj* gobj)

bool it_802CE0C4(HSD_GObj* gobj)
{
f32 prev_dir;
Item* ip;
f32 temp_f1;
HSD_JObj* jobj;
HassamVars* attr;
HSD_JObj* jobj;

ip = GET_ITEM(gobj);
ip = (Item*) (gobj->user_data);
attr = ip->xC4_article_data->x4_specialAttributes;
if (it_80272C6C(gobj) == 0) {
Item_80268E5C(gobj, 1, ITEM_ANIM_UPDATE);
Expand All @@ -214,10 +216,10 @@ bool it_802CE0C4(HSD_GObj* gobj)
}
it_8027A160(ip->xBBC_dynamicBoneTable->bones[2], ip);
if (ip->xDB0_itcmd_var1 != 0) {
jobj = GET_JOBJ(gobj);
jobj = (gobj->hsd_obj);

ip->xDD4_itemVar.hassam.x68 = HSD_JObjGetRotationY(jobj);
ip->xDD4_itemVar.hassam.x68 += 0.017453292F * (0xB4 / attr->x20);
ip->xDD4_itemVar.hassam.x68 = HSD_JObjGetRotationY(gobj->hsd_obj);
ip->xDD4_itemVar.hassam.x68 += deg_to_rad * (180 / attr->x20);
HSD_JObjSetRotationY(jobj, ip->xDD4_itemVar.hassam.x68);

if (++ip->xDB0_itcmd_var1 > (u32) attr->x20) {
Expand All @@ -229,9 +231,9 @@ bool it_802CE0C4(HSD_GObj* gobj)
if (ip->xDAC_itcmd_var0 != 0) {
it_802CE400(gobj);
} else {
temp_f1 = ip->facing_dir;
prev_dir = ip->facing_dir;
it_802CDF28(gobj);
if (temp_f1 != ip->facing_dir) {
if (prev_dir != ip->facing_dir) {
ip->xDB0_itcmd_var1 = 1;
}
ip->xDAC_itcmd_var0 = 1;
Expand Down

0 comments on commit 6e44130

Please sign in to comment.