Skip to content

Commit

Permalink
Merge branch 'upstream-master' into aaronb-master
Browse files Browse the repository at this point in the history
  • Loading branch information
ribbanya committed Oct 13, 2024
2 parents 33b87a2 + 3f8154d commit eec6943
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 176 deletions.
162 changes: 0 additions & 162 deletions asm/melee/ft/ft_0819.s

This file was deleted.

14 changes: 7 additions & 7 deletions config/GALE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28510,8 +28510,8 @@ ftDrawCommon_804D8370 = .sdata2:0x804D8370; // type:object size:0x8 scope:global
@254 = .sdata2:0x804D838C; // type:object size:0x4 scope:local data:float
@255 = .sdata2:0x804D8390; // type:object size:0x4 scope:local data:float
@257 = .sdata2:0x804D8398; // type:object size:0x8 scope:local data:double
ft_804D83A0 = .sdata2:0x804D83A0; // type:object size:0x4 scope:local data:float
ft_804D83A4 = .sdata2:0x804D83A4; // type:object size:0x4 scope:local data:float
@253 = .sdata2:0x804D83A0; // type:object size:0x4 scope:local data:float
@254 = .sdata2:0x804D83A4; // type:object size:0x4 scope:local data:float
ft_804D83A8 = .sdata2:0x804D83A8; // type:object size:0x4 scope:local data:float
ft_804D83AC = .sdata2:0x804D83AC; // type:object size:0x4 scope:local data:float
ft_804D83B0 = .sdata2:0x804D83B0; // type:object size:0x4 scope:local data:float
Expand Down Expand Up @@ -32835,11 +32835,11 @@ it_804DD9B0 = .sdata2:0x804DD9B0; // type:object size:0x4 scope:global data:floa
it_804DD9D8 = .sdata2:0x804DD9D8; // type:object size:0x4 scope:global data:float
it_804DD9DC = .sdata2:0x804DD9DC; // type:object size:0x4 scope:global data:float
it_804DD9E0 = .sdata2:0x804DD9E0; // type:object size:0x8 scope:global data:double
it_804DD9E8 = .sdata2:0x804DD9E8; // type:object size:0x4 scope:global data:float
it_804DD9EC = .sdata2:0x804DD9EC; // type:object size:0x4 scope:global data:float
it_804DD9F0 = .sdata2:0x804DD9F0; // type:object size:0x4 scope:global data:float
it_804DD9F8 = .sdata2:0x804DD9F8; // type:object size:0x8 scope:global data:double
it_804DDA00 = .sdata2:0x804DDA00; // type:object size:0x8 scope:global data:double
@206 = .sdata2:0x804DD9E8; // type:object size:0x4 scope:local data:float
@207 = .sdata2:0x804DD9EC; // type:object size:0x4 scope:local data:float
@212 = .sdata2:0x804DD9F0; // type:object size:0x4 scope:local data:float
@231 = .sdata2:0x804DD9F8; // type:object size:0x8 scope:local data:double
@232 = .sdata2:0x804DDA00; // type:object size:0x8 scope:local data:double
@187 = .sdata2:0x804DDA08; // type:object size:0x4 scope:local data:float
@187 = .sdata2:0x804DDA10; // type:object size:0x4 scope:local data:float
it_804DDA18 = .sdata2:0x804DDA18; // type:object size:0x4 scope:global data:float
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def TRKLib(lib_name: str, objects: Objects) -> Library:
Object(NonMatching, "melee/ft/ftdrawcommon.c"),
Object(Matching, "melee/ft/ftcliffcommon.c"),
Object(Matching, "melee/ft/ftwalljump.c"),
Object(NonMatching, "melee/ft/ft_0819.c"),
Object(Matching, "melee/ft/ft_0819.c"),
Object(NonMatching, "melee/ft/ft_081B.c"),
Object(NonMatching, "melee/ft/ft_0852.c"),
Object(NonMatching, "melee/ft/ftdata.c"),
Expand Down
2 changes: 1 addition & 1 deletion obj_files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ TEXT_O_FILES +=\
$(BUILD_DIR)/asm/melee/ft/ftdrawcommon.s.o\
$(BUILD_DIR)/src/melee/ft/ftcliffcommon.c.o\
$(BUILD_DIR)/src/melee/ft/ftwalljump.c.o\
$(BUILD_DIR)/asm/melee/ft/ft_0819.s.o\
$(BUILD_DIR)/src/melee/ft/ft_0819.c.o\
$(BUILD_DIR)/asm/melee/ft/ft_081B.s.o\
$(BUILD_DIR)/asm/melee/ft/ft_0852.s.o\
$(BUILD_DIR)/asm/melee/ft/ftdata.s.o\
Expand Down
53 changes: 52 additions & 1 deletion src/melee/ft/ft_0819.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#include <placeholder.h>

#include "ft_0819.h"

#include "ft/ft_0C31.h"
#include "ft/inlines.h"
#include "ft/types.h"
#include "it/inlines.h"
#include "it/it_26B1.h"
#include "lb/lb_00F9.h"
#include "lb/types.h"

#include <baselib/gobj.h>
Expand Down Expand Up @@ -40,4 +47,48 @@ void ft_800819A8(HSD_GObj* gobj)
fp->dmg.x1930.z = fp->cur_pos.y + fp->co_attrs.x15C;
}

/// #ft_80081A00
static inline void inlineA0(Fighter_GObj* gobj)
{
Fighter* fp = GET_FIGHTER(gobj);
Item_GObj* cur;
for (cur = HSD_GObj_Entities->items; cur != NULL;
cur = HSD_GObjGetNext(cur))
{
if (it_8026BC68(cur)) {
Item* ip = GET_ITEM(cur);
if (lb_80014638(&fp->dmg.x1930, &ip->xACC_itemHurtbox[1].b_pos.z))
{
ip->xCD0 = ip->pos.x > fp->cur_pos.x ? -1.0f : +1.0f;
ip->xCFC = gobj;
ip->xCB0_source_ply = fp->player_id;
fp->dmg.x1950 = true;
}
}
}
}

bool ft_80081A00(Fighter_GObj* fp_gobj)
{
f32 lx, rx;
Fighter* fp = GET_FIGHTER(fp_gobj);
PAD_STACK(8 * 4);
if (!fp->x2219_b1 && !fp->x2223_b4) {
Vec3 sp64;
PAD_STACK(14 * 4);
fp->x2223_b5 = true;
sp64 = fp->coll_data.cur_topn;
lx = fp->coll_data.xA4_ecbCurrCorrect.left.x;
rx = fp->coll_data.xA4_ecbCurrCorrect.right.x;
fp->dmg.x193c.x = lx + sp64.x;
fp->dmg.x193c.y = rx + sp64.x;
fp->dmg.x193c.z = fp->cur_pos.y + fp->co_attrs.x15C;
inlineA0(fp_gobj);
if (fp->dmg.x1950) {
ftCo_800C703C(fp_gobj);
fp->dmg.x1950 = false;
return true;
}
}

return false;
}
3 changes: 2 additions & 1 deletion src/melee/ft/ft_0819.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef GALE01_081938
#define GALE01_081938

#include "ft/forward.h"
#include <baselib/forward.h>

/* 081938 */ void ft_80081938(HSD_GObj* gobj);
/* 0819A8 */ void ft_800819A8(HSD_GObj* gobj);
/* 081A00 */ void ft_80081A00(void);
/* 081A00 */ bool ft_80081A00(Fighter_GObj* gobj);

#endif
2 changes: 1 addition & 1 deletion src/melee/ft/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ struct Fighter {
/* fp+193C */ Vec3 x193c;
/* fp+1948 */ int x1948;
/* fp+194C */ int x194C;
/* fp+1950 */ int x1950;
/* fp+1950 */ bool x1950;
/* fp+1954 */ float x1954;
/* fp+1958 */ float x1958;
/* fp+195C */ float x195c_hitlag_frames;
Expand Down
2 changes: 1 addition & 1 deletion src/melee/it/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ struct Item {
/// @brief The entity that was detected by this item's inert hitbox.
HSD_GObj* toucher;

u32 xCFC;
HSD_GObj* xCFC;

/// @at{D00} @sz{4}
/// @brief The entity that got grabbed by this item.
Expand Down
2 changes: 1 addition & 1 deletion src/melee/lb/lb_00F9.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
/* 014574 */ void lb_80014574(u8, int, int, int);
/* 0145C0 */ void lb_800145C0(u8);
/* 0145F4 */ UNK_RET lb_800145F4(UNK_PARAMS);
/* 014638 */ UNK_T lb_80014638(void);
/* 014638 */ bool lb_80014638(Vec3*, UNK_T);
/* 014770 */ bool lb_80014770(Vec3*, int);
/* 0149E0 */ UNK_RET lb_800149E0(UNK_PARAMS);

Expand Down

0 comments on commit eec6943

Please sign in to comment.