Skip to content

Commit

Permalink
g_ItemIconSlots to e_collect
Browse files Browse the repository at this point in the history
  • Loading branch information
hohle committed Aug 9, 2024
1 parent 02f9cbd commit ba9a0f6
Show file tree
Hide file tree
Showing 28 changed files with 58 additions and 36 deletions.
4 changes: 2 additions & 2 deletions config/splat.us.stcen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ segments:
- [0x1B274, c]
- [0x1BED4, c, prim_helpers]
- [0x1C704, .bss, header]
- [0x1C718, .bss, create_entity]
- [0x1C71C, .bss, holyglassescutscene]
- [0x1C764, .bss, create_entity]
- [0x1C774, .bss, holyglassescutscene]
- [0x1C7C0, .bss, 15C84]
- [0x1D46C]
3 changes: 2 additions & 1 deletion config/splat.us.stdre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ segments:
- [0x22018, c, prim_helpers]
- [0x22848, c]
- [0x23264, .bss, create_entity]
- [0x2330A, .bss, bss]
- [0x232CA, .bss, bss]
- [0x23FB6, .bss, 1C7DC]
- [0x23FCC]
1 change: 1 addition & 0 deletions config/splat.us.stmad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ segments:
- [0x18FA0, c, prim_helpers]
- [0x197D8, .bss, create_entity]
- [0x197ED, .bss, bss]
- [0x19E7E, .bss, 139E0]
- [0x19E94]
1 change: 1 addition & 0 deletions config/splat.us.stno3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,5 @@ segments:
- [0x56880, c, prim_helpers]
- [0x570B0, .bss, create_entity]
- [0x57120, .bss, bss]
- [0x57DD8, .bss, 46684]
- [0x57E18]
2 changes: 2 additions & 0 deletions config/splat.us.stnp3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,6 @@ segments:
- [0x51F38, c, prim_helpers]
- [0x52768, .bss, create_entity]
- [0x5277D, .bss, bss]
- [0x53378, .bss, 4D540]
- [0x533F4, .bss, e_collect]
- [0x53434]
3 changes: 2 additions & 1 deletion config/splat.us.stnz0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@ segments:
- [0x49930, c, prim_helpers]
- [0x4A160, c, lifeupspawn]
- [0x4AA14, .bss, create_entity]
- [0x4AA84, .bss, bss]
- [0x4AA24, .bss, bss]
- [0x4B740, .bss, e_collect]
- [0x4B780]
1 change: 1 addition & 0 deletions config/splat.us.strwrp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ segments:
- [0x151F0, c, wrp/prim_helpers]
- [0x15A20, .bss, wrp/create_entity]
- [0x15A36, .bss, rwrp/bss]
- [0x166A8, .bss, wrp/e_collect]
- [0x166E8]
1 change: 1 addition & 0 deletions config/splat.us.stst0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@ segments:
- [0x3D8F0, c]
- [0x3EB00, .bss, create_entity]
- [0x400B6, .bss, bss]
- [0x42584, .bss, 36358]
- [0x425C4]
1 change: 1 addition & 0 deletions config/splat.us.stwrp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ segments:
- [0x13270, c, prim_helpers]
- [0x13AB0, .bss, create_entity]
- [0x13AC6, .bss, bss]
- [0x14728, .bss, e_collect]
- [0x14768]
2 changes: 1 addition & 1 deletion src/st/cen/15C84.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void EntityPrizeDrop(Entity* self) {

#include "../blink_item.h"

u16 g_ItemIconSlots[32];
static u16 g_ItemIconSlots[ICON_SLOT_NUM];

extern s32 D_80097410;
extern s32 D_80097414;
Expand Down
8 changes: 8 additions & 0 deletions src/st/create_entity.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
//
// Section Sizes:
//
// | Data | RO Data | Text | BSS |
// +-------+---------+--------+------+
// PSX US | TBD | TBD | 0xB788 | 0x10 |
//

#include <common.h>

// TODO: should this be it's own header?
Expand Down
2 changes: 2 additions & 0 deletions src/st/dre/1C7DC.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "dre.h"
#include "sfx.h"

static u16 g_ItemIconSlots[ICON_SLOT_NUM];

void EntityEquipItemDrop(Entity* self) {
u16 itemId = self->params & 0x7FFF;
s32 primIndex;
Expand Down
3 changes: 1 addition & 2 deletions src/st/dre/bss.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <game.h>
#include <common.h>

STATIC_PAD_BSS(3072);
u32 D_801A3ED4;
Expand Down Expand Up @@ -28,4 +28,3 @@ u16 D_801A3F16;
u32 D_801A3F18[27];
u32 D_801A3F84;
u32 D_801A3F88;
u16 g_ItemIconSlots[ICON_SLOT_NUM];
12 changes: 9 additions & 3 deletions src/st/e_collect.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Section Sizes:
//
// | Data | RO Data | Text | BSS |
// +-------+---------+--------+------+
// PSX US | 0x2F0 | 0x88 | 0x1AC0 | 0x40 |
//
#include <stage.h>
#include "sfx.h"

Expand Down Expand Up @@ -91,9 +98,6 @@ static u8* g_ExplosionAnimations[] = {
D_80180ED8, g_bigRedFireballAnim, D_80180F08, D_80180F38, D_80180F6C,
};

// TODO BSS
extern u16 g_ItemIconSlots[];

// from another file
extern u16 g_InitializeData0[];

Expand Down Expand Up @@ -476,6 +480,8 @@ extern u16 g_InitializeEntityData0[];

#include "blink_item.h"

static u16 g_ItemIconSlots[ICON_SLOT_NUM];

void EntityEquipItemDrop(Entity* self) {
Collider collider;
Primitive* prim;
Expand Down
2 changes: 2 additions & 0 deletions src/st/mad/139E0.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ extern u16 D_80180D4C[];
extern u8* D_80180DB0[];
extern u16 D_80180E10[];

static u16 g_ItemIconSlots[ICON_SLOT_NUM];

void EntityPrizeDrop(Entity* self) {
Collider collider;
Primitive* prim;
Expand Down
3 changes: 1 addition & 2 deletions src/st/mad/bss.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <game.h>
#include <types.h>

u16 D_801997E8[768];
u32 D_80199DE8[27];
u16 g_ItemIconSlots[ICON_SLOT_NUM];
2 changes: 2 additions & 0 deletions src/st/no3/46684.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "no3.h"
#include "sfx.h"

static u16 g_ItemIconSlots[ICON_SLOT_NUM];

void EntityPrizeDrop(Entity* self) {
Collider collider;
Primitive* prim;
Expand Down
4 changes: 2 additions & 2 deletions src/st/no3/bss.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <game.h>
#include <common.h>

STATIC_PAD_BSS(3072);

u32 D_801D7D20;
u32 g_Dialogue;
u16 D_801D7D28;
Expand Down Expand Up @@ -28,4 +29,3 @@ u16 D_801D7D62;
u32 D_801D7D64[27];
u32 D_801D7DD0;
u32 D_801D7DD4;
u16 g_ItemIconSlots[ICON_SLOT_NUM];
1 change: 0 additions & 1 deletion src/st/no3/no3.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ extern s32 D_801D7D20;
extern s32 D_801D7D54;
extern s32 D_801D7D58;
extern u32 D_801D7DD0;
extern u16 g_ItemIconSlots[0x20];

extern PfnEntityUpdate PfnEntityUpdates[];

Expand Down
7 changes: 7 additions & 0 deletions src/st/np3/4D540.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ void func_801CD620(Entity* self) {
}
}

static s32 D_801D3378;
static s32 D_801D337C;
static s32 D_801D3380;
static s32 D_801D3384;
static s32 D_801D3388;
STATIC_PAD_BSS(104);

void func_801CD658(void) {
g_CurrentBuffer = g_CurrentBuffer->next;
FntPrint("a:%x\n", D_801D3378);
Expand Down
8 changes: 1 addition & 7 deletions src/st/np3/bss.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#include <game.h>
#include <common.h>

STATIC_PAD_BSS(3072);
u32 D_801D3378;
u32 D_801D337C;
u32 D_801D3380;
u32 D_801D3384;
u32 D_801D3388[27];
u16 g_ItemIconSlots[ICON_SLOT_NUM];
2 changes: 2 additions & 0 deletions src/st/np3/e_collect.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ void EntityPrizeDrop(Entity* self) {

#include "../blink_item.h"

static u16 g_ItemIconSlots[ICON_SLOT_NUM];

void EntityEquipItemDrop(Entity* self) {
u16 itemId = self->params & 0x7FFF;
s32 primIndex;
Expand Down
5 changes: 0 additions & 5 deletions src/st/np3/np3.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@ extern s32 D_80182530;
// *** EntityBloodyZombie properties START ***

extern u16 D_80180B38[]; // InitProps
extern s32 D_801D3378;
extern s32 D_801D337C;
extern s32 D_801D3380;
extern s32 D_801D3384;
extern s32 D_801D3388;
extern s32 D_801825D4;
extern u16 D_801825E4[];
extern u8 D_801825EC[]; // Animation: Walking
Expand Down
3 changes: 1 addition & 2 deletions src/st/nz0/bss.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <game.h>
#include <common.h>

STATIC_PAD_BSS(3072);
u32 D_801CB684;
Expand Down Expand Up @@ -29,4 +29,3 @@ u32 D_801CB6C8[27];
u16 g_mariaCutsceneFlags;
u16 D_801CB736[3];
u32 D_801CB73C;
u16 g_ItemIconSlots[ICON_SLOT_NUM];
3 changes: 1 addition & 2 deletions src/st/rwrp/bss.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <game.h>
#include <common.h>

STATIC_PAD_BSS(0xC68);
u16 g_ItemIconSlots[ICON_SLOT_NUM];
2 changes: 2 additions & 0 deletions src/st/st0/36358.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ extern u16 g_InitializeData0[];
extern u8* D_80181D18[];
extern u16 D_80181D74[];

static u16 g_ItemIconSlots[ICON_SLOT_NUM];

// if self->params & 0x8000 then the item will not disappear
// self->ext.generic.unk80.modeS8.unk0: frames left before the prize disappear
void EntityPrizeDrop(Entity* self) {
Expand Down
3 changes: 1 addition & 2 deletions src/st/st0/bss.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common.h"
#include <types.h>

u16 D_801C00B0[768];
u32 D_801C06B0[4];
Expand Down Expand Up @@ -36,4 +36,3 @@ u32 D_801C250C[27];
u32 D_801C2578;
u32 D_801C257C;
u32 D_801C2580;
u16 g_ItemIconSlots[32];
5 changes: 2 additions & 3 deletions src/st/wrp/bss.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <game.h>
#include <common.h>

u16 D_801997E8[0x600];
static s32 pad2[0x1A];
u16 g_ItemIconSlots[ICON_SLOT_NUM];
STATIC_PAD_BSS(104);

0 comments on commit ba9a0f6

Please sign in to comment.