Skip to content

Commit

Permalink
Split RBO3
Browse files Browse the repository at this point in the history
Splits RBO3 into logical segments based on other stage overlays.

Updates key in `progress.py` to match overlay naming convention.
  • Loading branch information
hohle committed Oct 16, 2024
1 parent 6b54466 commit a106b4a
Show file tree
Hide file tree
Showing 23 changed files with 435 additions and 271 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This repo does not include any assets or assembly code necessary for compiling t
| ST/WRP/WRP.BIN | ![code coverage WRP.BIN](https://img.shields.io/endpoint?label=WRP%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dstwrp) | ![decompiled functions](https://img.shields.io/endpoint?label=WRP%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dstwrp) | Warp Room
| ST/RWRP/RWRP.BIN | ![code coverage RWRP.BIN](https://img.shields.io/endpoint?label=RWRP%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dstrwrp) | ![decompiled functions](https://img.shields.io/endpoint?label=RWRP%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dstrwrp) | Warp Room (reverse)
| BOSS/MAR/MAR.BIN | ![code coverage MAR.BIN](https://img.shields.io/endpoint?label=MAR%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dbomar) | ![decompiled functions](https://img.shields.io/endpoint?label=MAR%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dbomar) | Maria cutscene
| BOSS/RBO3/RBO3.BIN | ![code coverage RBO3.BIN](https://img.shields.io/endpoint?label=RBO3%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dborbo3) | ![decompiled functions](https://img.shields.io/endpoint?label=RBO3%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dborbo3) | Meduza boss
| BOSS/RBO3/RBO3.BIN | ![code coverage RBO3.BIN](https://img.shields.io/endpoint?label=RBO3%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dborbo3) | ![decompiled functions](https://img.shields.io/endpoint?label=RBO3%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dborbo3) | Medusa boss
| SERVANT/TT_000.BIN | ![code coverage TT_000.BIN](https://img.shields.io/endpoint?label=TT_000%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dtt_000) | ![decompiled functions](https://img.shields.io/endpoint?label=TT_000%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dtt_000) | Bat Familiar
| SERVANT/TT_001.BIN | ![code coverage TT_001.BIN](https://img.shields.io/endpoint?label=TT_001%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dtt_001) | ![decompiled functions](https://img.shields.io/endpoint?label=TT_001%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dtt_001) | Ghost Familiar

Expand Down
28 changes: 25 additions & 3 deletions config/splat.us.borbo3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,30 @@ segments:
align: 4
subalign: 4
subsegments:
- [0x0, data]
- [0x10EA8, .rodata, us]
- [0x11080, c, us]
- [0x0, data, header]
- [0x10EA8, .rodata, rbo3]
- [0x10F3C, .rodata, e_red_door]
- [0x10F54, .rodata, e_collect]
- [0x10FDC, .rodata, e_misc]
- [0x11028, .rodata, e_stage_name]
- [0x1105C, .rodata, prim_helpers]
- [0x11064, .rodata, e_life_up]
- [0x11080, c, st_debug]
- [0x11304, c, e_breakable]
- [0x11438, c, rbo3]
- [0x13198, c, st_update]
- [0x135cc, c, collision]
- [0x14d88, c, create_entity]
- [0x15978, c, e_red_door]
- [0x165b0, c, st_common]
- [0x17A60, c, e_collect]
- [0x18FCC, c, blit_char]
- [0x1927c, c, e_misc]
- [0x1c760, c, e_stage_name]
- [0x1d5b4, c, e_particles]
- [0x1DDF8, c, e_room_fg]
- [0x1DEE4, c, popup]
- [0x1E214, c, prim_helpers]
- [0x1EA44, c, e_life_up]
- [0x1F978, sbss]
- [0x20630]
6 changes: 6 additions & 0 deletions config/symbols.us.borbo3.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
g_EInitBreakable = 0x80180414;
g_eBreakableAnimations = 0x801805A0;
g_eBreakableHitboxes = 0x801805C0;
g_eBreakableExplosionTypes = 0x801805C8;
g_eBreakableanimSets = 0x801805D0;
g_eBreakableDrawModes = 0x801805E0;
func_801A7D64 = 0x80191080;
EntityUnkId12 = 0x80191148;
EntityBreakable = 0x80191304;
Expand Down
4 changes: 4 additions & 0 deletions src/boss/rbo3/blit_char.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/blit_char", BlitChar);
6 changes: 6 additions & 0 deletions src/boss/rbo3/collision.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/collision", HitDetection);

INCLUDE_ASM("boss/rbo3/nonmatchings/collision", EntityDamageDisplay);
36 changes: 36 additions & 0 deletions src/boss/rbo3/create_entity.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", CreateEntityFromLayout);

INCLUDE_ASM(
"boss/rbo3/nonmatchings/create_entity", CreateEntityWhenInHorizontalRange);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", func_us_80194F64);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", FindFirstEntityAbove);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", FindFirstEntityBelow);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", CreateEntitiesAbove);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", CreateEntitiesBelow);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", func_us_80195330);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", func_us_8019537C);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", func_us_801953D4);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", func_us_801954D0);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", InitRoomEntities);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", UpdateRoomPosition);

INCLUDE_ASM(
"boss/rbo3/nonmatchings/create_entity", CreateEntityFromCurrentEntity);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", CreateEntityFromEntity);

INCLUDE_ASM("boss/rbo3/nonmatchings/create_entity", EntityIsNearPlayer);
10 changes: 10 additions & 0 deletions src/boss/rbo3/e_breakable.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "rbo3.h"

extern u8* g_eBreakableAnimations[];
extern u8 g_eBreakableHitboxes[];
extern u8 g_eBreakableExplosionTypes[];
extern u16 g_eBreakableanimSets[];
extern u8 g_eBreakableDrawModes[];

#include "../../st/e_breakable.h"
47 changes: 47 additions & 0 deletions src/boss/rbo3/e_collect.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"
#include "rbo3.h"

#include "../../st/prize_drop_fall.h"

#include "../../st/prize_drop_fall2.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", CollectHeart);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", CollectGold);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", CollectSubweapon);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", CollectHeartVessel);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", CollectLifeVessel);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", DestroyCurrentEntity);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F54);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F5C);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F64);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F6C);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F74);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F7C);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F84);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F8C);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F94);

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_collect", D_us_80190F9C);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", EntityPrizeDrop);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", EntityExplosion);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", BlinkItem);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_collect", EntityEquipItemDrop);
6 changes: 6 additions & 0 deletions src/boss/rbo3/e_life_up.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/e_life_up", EntityLifeUpSpawn);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_life_up", func_us_8019F2F8);
46 changes: 46 additions & 0 deletions src/boss/rbo3/e_misc.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_RODATA("boss/rbo3/nonmatchings/e_misc", D_us_80190FDC);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityRelicOrb);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityHeartDrop);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityMessageBox);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", CheckColliderOffsets);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityUnkId13);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityExplosionVariantsSpawner);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityGreyPuffSpawner);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityExplosionVariants);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityGreyPuff);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityOlroxDrool);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", UnkCollisionFunc5);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", UnkCollisionFunc4);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityIntenseExplosion);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", InitializeUnkEntity);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", MakeEntityFromId);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", MakeExplosions);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", EntityBigRedFireball);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", UnkRecursivePrimFunc1);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", UnkRecursivePrimFunc2);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", ClutLerp);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_misc", PlaySfxPositional);
6 changes: 6 additions & 0 deletions src/boss/rbo3/e_particles.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/e_particles", EntitySoulStealOrb);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_particles", EntityEnemyBlood);
4 changes: 4 additions & 0 deletions src/boss/rbo3/e_red_door.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/e_red_door", EntityRedDoor);
4 changes: 4 additions & 0 deletions src/boss/rbo3/e_room_fg.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/e_room_fg", EntityRoomForeground);
6 changes: 6 additions & 0 deletions src/boss/rbo3/e_stage_name.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/e_stage_name", StageNamePopupHelper);

INCLUDE_ASM("boss/rbo3/nonmatchings/e_stage_name", EntityStageNamePopup);
4 changes: 4 additions & 0 deletions src/boss/rbo3/popup.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/popup", BottomCornerText);
22 changes: 22 additions & 0 deletions src/boss/rbo3/prim_helpers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#include "common.h"

INCLUDE_RODATA("boss/rbo3/nonmatchings/prim_helpers", D_us_8019105C);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", UnkPrimHelper);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", UpdateAnimation);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", FindFirstUnkPrim);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", FindFirstUnkPrim2);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", PrimToggleVisibility);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", PrimResetNext);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", UnkPolyFunc2);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", UnkPolyFunc0);

INCLUDE_ASM("boss/rbo3/nonmatchings/prim_helpers", PrimDecreaseBrightness);
102 changes: 102 additions & 0 deletions src/boss/rbo3/rbo3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// SPDX-License-Identifier: AGPL-3.0-or-later

#include "common.h"
#include "stage.h"

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_80191438);

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_8019179C);

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_80192020);

extern u16 D_us_8018048C;
extern s8 D_us_80180684[];
extern u8 D_us_801806B0[];

void func_us_801922EC(Entity* self) {
Entity* prev;
s32 animCurFrame;
u8* indexes;
s8* rect;

if (!self->step) {
InitializeEntity(&D_us_8018048C);
}

prev = self - 1;
animCurFrame = prev->animCurFrame;
self->posX.i.hi = prev->posX.i.hi;
self->posY.i.hi = prev->posY.i.hi;
self->facingLeft = prev->facingLeft;

if (prev->ext.GS_Props.flag) {
self->hitboxState = 1;
} else {
self->hitboxState = 2;
}

animCurFrame = prev->animCurFrame;
indexes = D_us_801806B0;
rect = D_us_80180684;
rect += indexes[animCurFrame] * 4;

self->hitboxOffX = *rect++;
self->hitboxOffY = *rect++;
self->hitboxWidth = *rect++;
self->hitboxHeight = *rect++;

if (prev->entityId != 0x17) {
DestroyEntity(self);
}
}

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_801923DC);

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_80192998);

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_80192B38);

INCLUDE_ASM("boss/rbo3/nonmatchings/rbo3", func_us_80192D64);

extern u16 D_us_80180444;

void func_us_80193050(Entity* self) {
Primitive* prim;
s16 primIndex;
s32 x;

if (self->step != 0) {
return;
}

InitializeEntity(&D_us_80180444);
primIndex = g_api.AllocPrimitives(PRIM_GT4, 5);

if (primIndex == -1) {
DestroyEntity(self);
return;
}

prim = &g_PrimBuf[primIndex];
x = 0;
self->primIndex = primIndex;
self->flags |= FLAG_HAS_PRIMS;

while (prim != NULL) {
prim->x0 = prim->x2 = x;
x += 0x3E;
prim->x1 = prim->x3 = x;
prim->tpage = 0xF;
prim->clut = 0xC5;
prim->u0 = prim->u2 = 0x41;
prim->u1 = prim->u3 = 0x7F;
prim->v0 = prim->v1 = 0xA9;
prim->v2 = prim->v3 = 0xC6;
prim->y0 = prim->y1 = 0x40;
prim->y2 = prim->y3 = 0x12;
prim->priority = 0x10;
prim->drawMode = DRAW_DEFAULT;

prim = prim->next;
}
}
15 changes: 15 additions & 0 deletions src/boss/rbo3/rbo3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
#ifndef RBO3_H
#define RBO3_H

#include <stage.h>

#define OVL_EXPORT(x) RBO3_##x

typedef enum {
/* 0x00 */ E_NONE,
/* 0x01 */ E_BREAKABLE,
/* 0x02 */ E_EXPLOSION,
} EntityIDs;

#endif // RBO3_H
Loading

0 comments on commit a106b4a

Please sign in to comment.