Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/melee/gr/grvenom.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void grVenom_80203B18(void)
{
Ground_GObj* gobj1 = grVenom_80203EAC(5);
gp1 = GET_GROUND(gobj1);
gp1->u.venom.xC4 = (u32) gobj;
gp1->u.venom_platform.target_gobj = gobj;
grVenom_80203EAC(9);
gobj1 = grVenom_80203EAC(7);
grAnime_801C8138(gobj1, 7, 0);
Expand Down Expand Up @@ -647,7 +647,7 @@ void fn_802040B4(Ground_GObj* gobj)
{
Ground* gp = GET_GROUND(gobj);
if (Stage_80225194() == 0xE4) {
gp->u.venom.xC8 = 1;
gp->u.venom_platform.smash_taunt_timer = 1;
}
}

Expand All @@ -671,15 +671,15 @@ void grVenom_802040F0(Ground_GObj* gobj)
grAnime_801C7FF8(gobj, 4, 7, 3, 0.0F, 1.0F);
grAnime_801C7FF8(gobj, 7, 7, 3, 0.0F, 1.0F);
Ground_801C10B8(gobj, (HSD_GObjEvent) fn_802040B4);
gp->u.venom.xC8 = -1;
gp->u.venom.xCC = (u32) Ground_801C3FA4(gobj, 2);
gp->u.venom.xD0 = (u32) Ground_801C3FA4(gobj, 3);
lb_8000B1CC((HSD_JObj*) gp->u.venom.xCC, NULL, &pos1);
lb_8000B1CC((HSD_JObj*) gp->u.venom.xD0, NULL, &pos2);
gp->u.venom_platform.smash_taunt_timer = -1;
gp->u.venom_platform.upper_jobj = Ground_801C3FA4(gobj, 2);
gp->u.venom_platform.lower_jobj = Ground_801C3FA4(gobj, 3);
lb_8000B1CC(gp->u.venom_platform.upper_jobj, NULL, &pos1);
lb_8000B1CC(gp->u.venom_platform.lower_jobj, NULL, &pos2);
if (pos2.y > pos1.y) {
temp = (HSD_JObj*) gp->u.venom.xCC;
gp->u.venom.xCC = new_var->u.venom.xD0;
gp->u.venom.xD0 = (u32) temp;
temp = gp->u.venom_platform.upper_jobj;
gp->u.venom_platform.upper_jobj = new_var->u.venom_platform.lower_jobj;
gp->u.venom_platform.lower_jobj = temp;
}
gp->x10_flags.b5 = 1;
}
Expand All @@ -704,19 +704,19 @@ void grVenom_80204284(Ground_GObj* gobj)
tmp_gp = GET_GROUND(gobj);
gp = tmp_gp;
src_jobj = GET_JOBJ(gobj);
dst_jobj = (HSD_JObj*) ((HSD_GObj*) gp->u.venom.xC4)->hsd_obj;
dst_jobj = gp->u.venom_platform.target_gobj->hsd_obj;

HSD_JObjGetTranslation(src_jobj, &pos);
HSD_JObjSetTranslate(dst_jobj, &pos);

Ground_801C39C0();
Ground_801C3BB4();

timer = gp->u.venom.xC8;
timer = gp->u.venom_platform.smash_taunt_timer;
if (timer > 0) {
gp->u.venom.xC8 = timer + 1;
if ((s32) gp->u.venom.xC8 >= 0x3C) {
if ((s32) gp->u.venom.xC8 == 0x3C) {
gp->u.venom_platform.smash_taunt_timer = timer + 1;
if (gp->u.venom_platform.smash_taunt_timer >= 0x3C) {
if (gp->u.venom_platform.smash_taunt_timer == 0x3C) {
ifStatus_802F6898();
un_802FF570();
other_gobj = grVenom_80203EAC(1);
Expand All @@ -734,7 +734,7 @@ void grVenom_80204284(Ground_GObj* gobj)
if (Ground_GetMapGObj(1) == NULL) {
ifStatus_802F68F0();
un_802FF620();
gp->u.venom.xC8 = -1;
gp->u.venom_platform.smash_taunt_timer = -1;
}
}
}
Expand Down Expand Up @@ -1831,8 +1831,8 @@ bool grVenom_80206D7C(Vec3* pos, int arg1, HSD_JObj* arg2)
gobj = Ground_GetMapGObj(5);
if (gobj != NULL) {
gp = gobj->user_data;
if (gp != NULL && (HSD_JObj*) gp->u.venom.xD0 == arg2) {
lb_8000B1CC((HSD_JObj*) gp->u.venom.xCC, NULL, &sp14);
if (gp != NULL && gp->u.venom_platform.lower_jobj == arg2) {
lb_8000B1CC(gp->u.venom_platform.upper_jobj, NULL, &sp14);
if (pos->y > sp14.y) {
return 0;
}
Expand Down
8 changes: 8 additions & 0 deletions src/melee/gr/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,13 @@ struct grSmashTaunt_GroundVars {
/* +28 */ f32 xEC;
};

struct grVenom_Platform_GroundVars {
/* +00 gp+C4 */ Ground_GObj* target_gobj;
/* +04 gp+C8 */ s32 smash_taunt_timer;
/* +08 gp+CC */ HSD_JObj* upper_jobj;
/* +0C gp+D0 */ HSD_JObj* lower_jobj;
};
Comment thread
ribbanya marked this conversation as resolved.

struct grVenom_GroundVars {
/* +00 gp+C4 */ union {
u32 xC4; ///< @todo Not a #u32, either
Expand Down Expand Up @@ -1876,6 +1883,7 @@ struct Ground {
struct GroundVars_unk unk;
struct grHomeRun_GroundVars homerun;
struct grHomeRun_GroundVars2 homerun2;
struct grVenom_Platform_GroundVars venom_platform;
struct grVenom_GroundVars venom;
struct grVenom_GroundVars2 venom2;
struct grYorster_GroundVars yorster;
Expand Down
Loading