Skip to content

Commit

Permalink
Finish matching grticeclimber (#1281)
Browse files Browse the repository at this point in the history
* Finish matching grticeclimber

* Remove .s file
  • Loading branch information
PsiLupan authored Feb 21, 2024
1 parent 2db7684 commit d28ae89
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 486 deletions.
478 changes: 0 additions & 478 deletions asm/melee/gr/grticeclimber.s

This file was deleted.

2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def RuntimeLib(lib_name: str, objects: Objects) -> LibDict:
Object(Matching, "melee/gr/grtdrmario.c"),
Object(Matching, "melee/gr/grtfalco.c"),
Object(Matching, "melee/gr/grtfox.c"),
Object(NonMatching, "melee/gr/grticeclimber.c"),
Object(Matching, "melee/gr/grticeclimber.c"),
Object(Matching, "melee/gr/grtkirby.c"),
Object(Matching, "melee/gr/grtkoopa.c"),
Object(Matching, "melee/gr/grtlink.c"),
Expand Down
2 changes: 1 addition & 1 deletion obj_files.mk
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ TEXT_O_FILES +=\
$(BUILD_DIR)/src/melee/gr/grtdrmario.c.o\
$(BUILD_DIR)/src/melee/gr/grtfalco.c.o\
$(BUILD_DIR)/src/melee/gr/grtfox.c.o\
$(BUILD_DIR)/asm/melee/gr/grticeclimber.s.o\
$(BUILD_DIR)/src/melee/gr/grticeclimber.c.o\
$(BUILD_DIR)/src/melee/gr/grtkirby.c.o\
$(BUILD_DIR)/src/melee/gr/grtkoopa.c.o\
$(BUILD_DIR)/src/melee/gr/grtlink.c.o\
Expand Down
7 changes: 4 additions & 3 deletions src/melee/gr/grmaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#include <baselib/forward.h>

#include <placeholder.h>
#include <baselib/gobj.h>

/* 1C8858 */ void grMaterial_801C8858(HSD_JObj*, u32 flags);
/* 1C8CDC */ UNK_RET grMaterial_801C8CDC(UNK_PARAMS);
/* 1C8CFC */ int grMaterial_801C8CFC(int, int, Ground*, HSD_JObj*, int, Event,
int);
/* 1C8CDC */ UNK_RET grMaterial_801C8CDC(HSD_GObj*);
/* 1C8CFC */ int grMaterial_801C8CFC(int, int, Ground*, HSD_JObj*, int,
HSD_GObjEvent, int);
/* 1C8E08 */ void grMaterial_801C8E08(int);
/* 1C94D8 */ void grMaterial_801C94D8(UNK_T hsd_obj);
/* 1C95C4 */ void grMaterial_801C95C4(HSD_GObj*);
Expand Down
20 changes: 18 additions & 2 deletions src/melee/gr/grticeclimber.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
#include "gr/grticeclimber.h"

#include "cm/camera.h"
#include "ef/efsync.h"
#include "gr/granime.h"
#include "gr/grdisplay.h"
#include "gr/grmaterial.h"
#include "gr/ground.h"
#include "gr/grzakogenerator.h"
#include "gr/inlines.h"
#include "gr/types.h"
#include "it/inlines.h"
#include "it/item.h"
#include "it/types.h"
#include "lb/lb_00B0.h"
#include "lb/lb_00F9.h"

#include <placeholder.h>
#include <dolphin/os/OSError.h>
#include <baselib/gobj.h>
#include <baselib/gobjgxlink.h>
#include <baselib/gobjproc.h>
#include <baselib/jobj.h>

/* static */ StageCallbacks grTIc_803E8A98[4] = {
{
Expand Down Expand Up @@ -166,9 +173,18 @@ void grTIceClimber_802211E4(HSD_GObj* gobj)

void grTIceClimber_80221204(HSD_GObj* arg0) {}

void grTIceClimber_80221208(void)
void grTIceClimber_80221208(HSD_GObj* gobj)
{
NOT_IMPLEMENTED;
Vec3 pos;
Item* it = GET_ITEM(gobj);
PAD_STACK(16);

HSD_JObjSetFlagsAll(it->xDD4_itemVar.target.jobj, 0x10);
lb_8000B1CC(it->xDD4_itemVar.target.jobj, NULL, &pos);
efSync_Spawn(0x445, gobj, &pos);
Camera_80030E44(2, 0);
Ground_801C53EC(310);
grMaterial_801C8CDC(gobj);
}

s16 grTIc_803E8B5C[] = {
Expand Down
2 changes: 1 addition & 1 deletion src/melee/gr/grticeclimber.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/* 2211DC */ bool grTIceClimber_802211DC(HSD_GObj*);
/* 2211E4 */ void grTIceClimber_802211E4(HSD_GObj*);
/* 221204 */ void grTIceClimber_80221204(HSD_GObj*);
/* 221208 */ void grTIceClimber_80221208(void);
/* 221208 */ void grTIceClimber_80221208(HSD_GObj*);
/* 221288 */ void grTIceClimber_80221288(HSD_GObj*);
/* 221354 */ lb_UnkAnimStruct* grTIceClimber_80221354(enum_t);
/* 22135C */ bool grTIceClimber_8022135C(Vec3*, int, HSD_JObj*);
Expand Down
5 changes: 5 additions & 0 deletions src/melee/it/itCommonItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,9 @@ typedef struct {
s32 timer;
} ItPokemonVars;

typedef struct {
int x0;
HSD_JObj* jobj;
} itTargetVars;

#endif
1 change: 1 addition & 0 deletions src/melee/it/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ struct Item {
FoxIllusionVars foxillusion;
itKirbyHammerVars kirbyhammer;
itShellVars shell;
itTargetVars target;
u8 padding[0xFCC - 0xDD4];
} xDD4_itemVar;
};
Expand Down

0 comments on commit d28ae89

Please sign in to comment.