Merge pull request #400 from SethBarberee/jun_2025
Some checks failed
GithubCI / build (push) Has been cancelled

Ground Object
This commit is contained in:
AnonymousRandomPerson
2025-06-28 15:30:20 -04:00
committed by GitHub
6 changed files with 948 additions and 2146 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2,142 +2,7 @@
.align 2
.string "pksdir0\0"
.align 2,0
.global gGroundObjectCallbacks
gGroundObjectCallbacks: @ 81182A0
@ replacing .incbin "baserom.gba", 0x1182A0, 0x54
.byte 0x02, 0x00, 0x00, 0x00
.4byte CallbackObjectGetIndex
.4byte CallbackObjectGetSize
.4byte CallbackObjectGetHitboxCenter
.4byte CallbackObjectGetPosHeightAndUnk
.4byte CallbackObjectGetDirection
.4byte CallbackObjectGetFlags
.4byte CallbackObjectSetHitboxPos
.4byte CallbackObjectSetPositionBounds
.4byte CallbackObjectMoveReal
.4byte CallbackObjectSetPosHeight
.4byte CallbackObjectSetDirection
.4byte CallbackObjectSetEventIndex
.byte 0x00, 0x00, 0x00, 0x00
.4byte CallbackObjectSetUnk_80AC998
.4byte CallbackObjectSetFlags
.4byte CallbackObjectClearFlags
.byte 0x00, 0x00, 0x00, 0x00
.4byte CallbackObjectMoveRelative
.4byte CallbackObjectSpriteRelatedCheck_80AC9B8
.4byte CallbackObjectSpriteRelated_80AC9DC
.global gUnknown_81182F4
gUnknown_81182F4: @ 81182F4
.byte 0xF6, 0x0, 0x9F, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x34, 0x83, 0x11, 0x8, 0xF4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xDB, 0x0, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xE7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
.global GroundObjectFile_Text
GroundObjectFile_Text: @ Text
.global gUnknown_8118334
gUnknown_8118334: @ 8118334
.string "../ground/ground_object.c"
.align 2,0
.global gUnknown_8118350
gUnknown_8118350: @ 8118350
@ replacing .incbin "baserom.gba", 0x118350, 0x50
.byte 0xf6, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.4byte gUnknown_8118334
.byte 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xdb, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.global gUnknown_81183A0
gUnknown_81183A0: @ 81183A0
.byte 0xFF, 0xFF, 0x0, 0x8, 0x1, 0x8, 0x0, 0x10, 0x1, 0x10, 0x2, 0x10, 0x3, 0x10, 0x0, 0x8, 0x1, 0x8, 0x2, 0x8, 0x3, 0x8, 0x4, 0x8, 0x5, 0x8, 0x6, 0x8, 0x7, 0x8, 0x8, 0x8, 0x9, 0x8, 0xA, 0x8, 0xB, 0x8, 0xC, 0x8, 0xD, 0x8, 0xE, 0x8, 0xF, 0x8, 0x0, 0x0
.global GroundObject_Select_Text
GroundObject_Select_Text: @ Select
.string "GroundObject_Select"
.align 2,0
.global gUnknown_81183E4
gUnknown_81183E4: @ 81183E4
.4byte GroundObjectFile_Text
.4byte 0x126
.4byte GroundObject_Select_Text
.global gUnknown_81183F0
gUnknown_81183F0: @ 81183F0
.string "GroundObject Select %3d %3d %3d\0"
.align 2,0
.global gUnknown_8118414
gUnknown_8118414: @ 8118414
.string "GroundObject Cancel %3d\0"
.align 2,0
.global gUnknown_811842C
gUnknown_811842C: @ 811842C
.string "GroundObject CancelBlank\0"
.align 2,0
.global gUnknown_8118448
gUnknown_8118448: @ 8118448
.string "GroundObject Add id %3d kind %3d[%3d] type %3d group %3d sector %3d\0"
.align 2,0
.global GroundObject_AddText
GroundObject_AddText: @ AddText
.string "GroundObject_Add\0"
.align 2,0
.global gUnknown_81184A4
gUnknown_81184A4: @ 81184A4
.4byte GroundObjectFile_Text
.4byte 0x283
.4byte GroundObject_AddText
.global gUnknown_81184B0
gUnknown_81184B0: @ 81184B0
.string "GroundObject Delete id %3d\0"
.align 2,0
.global gUnknown_81184CC
gUnknown_81184CC: @ 81184CC
.string "GroundObject Execute %3d \0"
.align 2,0
.global GroundObject_ExecuteScript_Text
GroundObject_ExecuteScript_Text: @ ExecuteScript
.string "GroundObject_ExecuteScript\0"
.align 2,0
.global gUnknown_8118504
gUnknown_8118504: @ 8118504
.4byte GroundObjectFile_Text
.4byte 0x303
.4byte GroundObject_ExecuteScript_Text
.global GroundObject_Action_Text
GroundObject_Action_Text: @ Action
.string "GroundObject_Action\0"
.align 2,0
.global gUnknown_8118524
gUnknown_8118524: @ 8118524
.4byte GroundObjectFile_Text
.4byte 0x60D
.4byte GroundObject_Action_Text
.global gUnknown_8118530
gUnknown_8118530: @ 8118530
.4byte GroundObjectFile_Text
.4byte 0x617
.4byte GroundObject_Action_Text
@ ground_effect.c
.string "pksdir0\0"
.align 2,0

View File

@@ -356,7 +356,6 @@ SECTIONS {
src/ground_script_file.o(.text);
src/ground_lives.o(.text);
src/ground_object.o(.text);
asm/ground_object.o(.text);
src/ground_effect.o(.text);
asm/ground_effect.o(.text);
src/ground_link.o(.text);
@@ -737,6 +736,7 @@ SECTIONS {
data/pksdir_6.o(.rodata);
src/ground_script_file.o(.rodata);
src/ground_lives.o(.rodata);
src/ground_object.o(.rodata);
data/data_8115F5C_1.o(.rodata);
src/ground_link.o(.rodata);
src/ground_event.o(.rodata);

View File

@@ -114,7 +114,7 @@ extern void sub_80A6EC8(struct UnkGroundSpriteStruct *ptr, s32 a1);
extern s32 sub_80AC554(u32 a0, PixelPos *pixelPosArg1, PixelPos *pixelPosArg2);
extern s32 sub_80AC448(s32 id_, PixelPos *pixelPos);
extern bool8 sub_80A595C(u32 a0, PixelPos *pixelPosArg1, PixelPos *pixelPosArg2);
extern void sub_80AC3E0(s32 id, s32 *a1);
extern void GroundObject_GetFlags(s32 id, s32 *a1);
extern PixelPos SetVecFromDirectionSpeed(s32 r1, u32 r2);
extern u8 sub_80A5934(s32 param_1, PixelPos *, PixelPos *);
extern bool8 CheckMapCollision_80A585C(PixelPos *, PixelPos *);
@@ -123,7 +123,7 @@ extern s32 sub_80AC4C8(u32 a0, PixelPos *, PixelPos *);
extern bool8 sub_809B1C0(s32 a0, u32 kind, Pokemon *a2);
extern bool8 GetPredefinedScript(Action *param_1, ScriptInfoSmall *script, s32 _index);
extern bool8 sub_809D678(Action *action);
extern bool8 sub_80AC274(s32 a0, ScriptInfoSmall *scriptInfo, s32 a2);
extern bool8 GroundObject_GetScript(s32 a0, ScriptInfoSmall *scriptInfo, s32 a2);
extern void GroundObject_ExecuteScript(s32, void *, ScriptInfoSmall *);
extern bool8 sub_80ADC64(s32 id, ScriptInfoSmall *dst);
extern bool8 GroundScriptNotify(Action *param_1, s32 param_2);
@@ -1132,11 +1132,11 @@ bool8 sub_80A8A5C(s32 id1_, s32 id2_)
ScriptInfoSmall scriptInfo1;
struct GroundLive *livesPtr1 = &gGroundLives->array[id1];
if (sub_80AC274(id2, &scriptInfo1, 2)) {
if (GroundObject_GetScript(id2, &scriptInfo1, 2)) {
ScriptInfoSmall scriptInfo2;
ActionUnkIds sp = {2, id2};
sub_80AC274(id2, &scriptInfo2, 3);
GroundObject_GetScript(id2, &scriptInfo2, 3);
GroundObject_ExecuteScript(id2, &livesPtr1->action.unk8, &scriptInfo2);
return _ExecutePlayerScript(livesPtr1, &sp, &scriptInfo1);
}
@@ -1695,7 +1695,7 @@ s32 sub_80A95AC(struct GroundLive *livesPtr, PixelPos *posArg1, PixelPos *posArg
if (id2 >= 0) {
s32 sp;
sub_80AC3E0(id2, &sp);
GroundObject_GetFlags(id2, &sp);
if ((sp & 0x40) && sub_80A8A5C(livesPtr->id, id2))
return 2;
return 1;

File diff suppressed because it is too large Load Diff

View File

@@ -128,13 +128,13 @@ bool8 sub_809D234(void);
s32 sub_80A14E8(Action *, u8, u32, s32);
u8 sub_80990EC(struct DungeonSetupInfo *param_1, s32 param_2);
extern u8 GroundObjectsCancellAll(void);
extern u8 GroundObjectsCancelAll(void);
extern u8 GroundEffectsCancelAll(void);
extern u8 GroundLivesCancelAll(void);
extern u8 IsTextboxOpen_809A750(void);
extern Action *sub_80A882C(s16);
extern Action *sub_80AC240(s16);
extern Action *sub_80AD158(s16);
extern Action *sub_80A882C(s32);
extern Action *GroundObject_GetAction(s32);
extern Action *sub_80AD158(s32);
extern void sub_809AB4C(s32, s32);
extern void sub_809ABB4(s32, s32);
extern void sub_809AC18(s32, s32);
@@ -265,7 +265,7 @@ static Action *sub_809D52C(ActionUnkIds *a0)
switch (a0->unk0) {
case 0: return 0;
case 1: return sub_80A882C(a0->unk2);
case 2: return sub_80AC240(a0->unk2);
case 2: return GroundObject_GetAction(a0->unk2);
case 3: return sub_80AD158(a0->unk2);
}
return NULL;
@@ -528,7 +528,7 @@ u8 GroundCancelAllEntities(void)
u8 ret;
ret = GroundLivesCancelAll();
ret |= GroundObjectsCancellAll();
ret |= GroundObjectsCancelAll();
ret |= GroundEffectsCancelAll();
return ret;
}