Skip to content

Commit

Permalink
tiny bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
red031000 committed Oct 13, 2024
1 parent cd0c9b4 commit 557f4dd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
12 changes: 5 additions & 7 deletions include/map_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct LocalMapObject { // declared field_system.h
/*0x07C*/ VecFx32 facingVec;
/*0x088*/ VecFx32 unk88;
/*0x094*/ VecFx32 unk94;
/*0x0A0*/ int unkA0;
/*0x0A0*/ u32 unkA0;
/*0x0A4*/ int movementCmd;
/*0x0A8*/ int movementStep;
/*0x0AC*/ u16 unkAC;
Expand Down Expand Up @@ -229,7 +229,10 @@ void MapObject_SetXRange(LocalMapObject *object, s32 xRange);
s32 MapObject_GetXRange(LocalMapObject *object);
void MapObject_SetYRange(LocalMapObject *object, s32 yRange);
s32 MapObject_GetYRange(LocalMapObject *object);
void sub_0205F328(LocalMapObject *obj, u32 a1);
void sub_0205F328(LocalMapObject *obj, u32 param1);
u32 sub_0205F330(LocalMapObject *object);
MapObjectManager *MapObject_GetManager(LocalMapObject *object);

// FIXME: Functions beyond here aren't organized according to the corresponding c file
void sub_0205FC94(LocalMapObject *object, u32 movement);
void MapObject_ClearFlag18(LocalMapObject *object, BOOL clear);
Expand Down Expand Up @@ -314,11 +317,8 @@ void sub_0205F490(LocalMapObject *object, LocalMapObject_UnkCallback callback);
void sub_0205F498(LocalMapObject *object);
void sub_0205F4A4(LocalMapObject *object, LocalMapObject_UnkCallback callback);
void sub_0205F4B8(LocalMapObject *object, LocalMapObject_UnkCallback callback);
void MapObject_SetManager(LocalMapObject *object, MapObjectManager *manager);
MapObjectManager *MapObject_GetManager(LocalMapObject *object);
MapObjectManager *sub_0205F364(LocalMapObject *object);
ObjectEvent *ObjectEvent_GetById(u16 id, int num_templates, ObjectEvent *templates);
void sub_0205F338(LocalMapObject *object, SysTask *a1);
BOOL FieldSystem_FlagCheck(FieldSystem *, u16);
u16 ObjectEvent_GetXCoord(ObjectEvent *template);
u32 ObjectEvent_GetHeight(ObjectEvent *template);
Expand All @@ -339,7 +339,6 @@ LocalMapObject_UnkCallback sub_0205FB2C(UnkLMOCallbackStruct2 *unk);
LocalMapObject_UnkCallback sub_0205FB30(UnkLMOCallbackStruct2 *unk);
LocalMapObject_UnkCallback sub_0205FB34(UnkLMOCallbackStruct2 *unk);
UnkLMOCallbackStruct2 *sub_0205FB38(u32 spriteId);
void sub_0205F348(LocalMapObject *object);
u16 ObjectEvent_GetFlagID(ObjectEvent *);
FieldSystem *MapObject_GetFieldSystem(LocalMapObject *object);
void sub_0205FCC4(LocalMapObject *object);
Expand All @@ -348,7 +347,6 @@ void sub_0205FCCC(LocalMapObject *object);
void sub_0205FCD0(LocalMapObject *object);
BOOL sub_0205F73C(LocalMapObject *object);
BOOL sub_0205F5D4(MapObjectManager *manager);
u32 sub_0205F330(LocalMapObject *object);
SysTask *sub_0205F340(LocalMapObject *object);
u8 *sub_0205F370(LocalMapObject *object, s32 size);
u8 *sub_0205F398(LocalMapObject *object, s32 size);
Expand Down
18 changes: 11 additions & 7 deletions src/map_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ static u32 MapObject_GetFlags2BitsMask(LocalMapObject *object, u32 bits);
static void MapObject_SetMapID(LocalMapObject *object, u32 mapId);
static void MapObject_SetMovement(LocalMapObject *object, u32 movement);
static void MapObject_SetInitialFacingDirection(LocalMapObject *object, u32 initialFacing);
static void sub_0205F338(LocalMapObject *object, SysTask *sysTask);
static SysTask *sub_0205F340(LocalMapObject *object);
static void sub_0205F348(LocalMapObject *object);
static void MapObject_SetManager(LocalMapObject *object, MapObjectManager *manager);

MapObjectManager *MapObjectManager_Init(FieldSystem *fieldSystem, u32 objectCount, u32 priority) {
MapObjectManager *ret = MapObjectManager_New(objectCount);
Expand Down Expand Up @@ -1107,27 +1111,27 @@ s32 MapObject_GetYRange(LocalMapObject *object) {
return object->yRange;
}

void sub_0205F328(LocalMapObject *object, u32 a1) {
object->unkA0 = a1;
void sub_0205F328(LocalMapObject *object, u32 param1) {
object->unkA0 = param1;
}

u32 sub_0205F330(LocalMapObject *object) {
return object->unkA0;
}

void sub_0205F338(LocalMapObject *object, SysTask *a1) {
object->unkB0 = a1;
static void sub_0205F338(LocalMapObject *object, SysTask *sysTask) {
object->unkB0 = sysTask;
}

SysTask *sub_0205F340(LocalMapObject *object) {
static SysTask *sub_0205F340(LocalMapObject *object) {
return object->unkB0;
}

void sub_0205F348(LocalMapObject *object) {
static void sub_0205F348(LocalMapObject *object) {
SysTask_Destroy(sub_0205F340(object));
}

void MapObject_SetManager(LocalMapObject *object, MapObjectManager *manager) {
static void MapObject_SetManager(LocalMapObject *object, MapObjectManager *manager) {
object->manager = manager;
}

Expand Down
2 changes: 1 addition & 1 deletion src/unk_02055BF0.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ BOOL sub_020562B0(TaskManager *man) {
MapObject_ClearHeldMovementIfActive(obj);
Field_PlayerAvatar_OrrTransitionFlags(fieldSystem->playerAvatar, 512);
Field_PlayerAvatar_ApplyTransitionFlags(fieldSystem->playerAvatar);
sub_0205F328(obj, FALSE);
sub_0205F328(obj, 0);
fenv->unk18 = AllocFromHeapAtEnd(HEAP_ID_FIELD, sizeof(FieldEnvSubUnk18));
fenv18 = fenv->unk18;
fenv18->state = 0;
Expand Down

0 comments on commit 557f4dd

Please sign in to comment.