Skip to content

Commit d8ecad2

Browse files
authored
Import NO2 common c files (Xeeynamo#2720)
Depends on Xeeynamo#2719 Import `NO2`: - header.c - e_init.c - st_update.c - collision.c - create_entity.c - st_common.c - e_collect.c - e_misc.c - e_skelerang.c
1 parent d13a1bd commit d8ecad2

40 files changed

+558
-361
lines changed

config/splat.us.stno2.yaml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,35 @@ segments:
3939
align: 4
4040
subalign: 4
4141
subsegments:
42-
- [0x0, data]
42+
- [0x0, .data, header]
43+
- [0x2C, data]
44+
- [0x71C, .data, e_init]
45+
- [0x994, data]
46+
- [0x1008, .data, st_update]
47+
- [0x1054, .data, collision]
48+
- [0x1414, data, 3AE7C]
49+
- [0x142C, .data, st_common]
50+
- [0x162C, .data, e_collect]
51+
- [0x1980, .data, e_misc]
52+
- [0x1A38, .data, e_skelerang]
53+
- [0x1B24, data]
4354
- [0x32E00, rodata]
55+
- [0x32EF4, .rodata, e_collect]
56+
- [0x32FC8, rodata]
57+
- [0x32FFC, .rodata, e_skelerang]
58+
- [0x33068, rodata]
4459
- [0x334D0, c, first_c_file]
45-
- [0x4F0F0, bss]
60+
- [0x38714, c, st_update]
61+
- [0x38B48, c, collision]
62+
- [0x3A304, c, create_entity]
63+
- [0x3AE7C, c, 3AE7C]
64+
- [0x3BB2C, c, st_common]
65+
- [0x3CFDC, c, e_collect]
66+
- [0x3F94C, c, e_misc]
67+
- [0x41CE8, c, 41CE8]
68+
- [0x42B3C, c, e_skelerang]
69+
- [0x43594, c, 43594]
70+
- [0x4F0F0, .bss, create_entity]
71+
- [0x4F100, bss]
72+
- [0x4FD7C, .bss, e_collect]
4673
- [0x4FDBC]

config/symbols.us.stno2.txt

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
NO2_spriteBanks = 0x8018002C;
2+
NO2_cluts = 0x8018010C;
3+
NO2_rooms_layers = 0x80180340;
4+
NO2_gfxBanks = 0x80180530;
5+
NO2_pStObjLayoutHorizontal = 0x80180574;
6+
NO2_pStObjLayoutVertical = 0x80180648;
7+
NO2_EntityUpdates = 0x8018071C;
8+
g_EInitObtainable = 0x8018082C;
9+
g_EInitParticle = 0x80180838;
10+
g_EInitInteractable = 0x80180850;
11+
g_EInitUnkId13 = 0x8018085C;
12+
g_EInitDamageNum = 0x80180880;
13+
g_EInitSkelerang = 0x8018088C;
14+
g_EInitSkelerangBoomerang = 0x80180898;
15+
g_EInitBloodyZombie = 0x801808E0;
16+
NO2_PrizeDrops = 0x80180FEC;
17+
UNK_Invincibility0 = 0x80181028;
18+
g_bigRedFireballAnim = 0x80181884;
19+
NO2_rooms = 0x801832A0;
20+
Random = 0x801B8714;
21+
Update = 0x801B8744;
22+
UpdateStageEntities = 0x801B8A40;
23+
HitDetection = 0x801B8B48;
24+
EntityDamageDisplay = 0x801B9C60;
25+
InitRoomEntities = 0x801BAB60;
26+
UpdateRoomPosition = 0x801BACD8;
27+
CreateEntityFromCurrentEntity = 0x801BAD8C;
28+
CreateEntityFromEntity = 0x801BAE00;
29+
DestroyEntity = 0x801BBB2C;
30+
PreventEntityFromRespawning = 0x801BBC14;
31+
AnimateEntity = 0x801BBC5C;
32+
GetDistanceToPlayerX = 0x801BBE2C;
33+
GetDistanceToPlayerY = 0x801BBE68;
34+
GetSideToPlayer = 0x801BBE9C;
35+
MoveEntity = 0x801BBEE0;
36+
UnkCollisionFunc3 = 0x801BBF3C;
37+
UnkCollisionFunc2 = 0x801BC1B4;
38+
AllocEntity = 0x801BC39C;
39+
SetEntityVelocityFromAngle = 0x801BC444;
40+
Ratan2Shifted = 0x801BC4B0;
41+
GetAngleBetweenEntitiesShifted = 0x801BC4E8;
42+
AdjustValueWithinThreshold = 0x801BC578;
43+
UnkEntityFunc0 = 0x801BC5D0;
44+
GetAngleBetweenEntities = 0x801BC68C;
45+
GetNormalizedAngle = 0x801BC70C;
46+
SetStep = 0x801BC76C;
47+
SetSubStep = 0x801BC78C;
48+
InitializeEntity = 0x801BC83C;
49+
EntityDummy = 0x801BC938;
50+
GetPlayerCollisionWith = 0x801BCBE0;
51+
ReplaceBreakableWithItemDrop = 0x801BCF24;
52+
EntityPrizeDrop = 0x801BD54C;
53+
EntityExplosion = 0x801BDDC0;
54+
EntityEquipItemDrop = 0x801BDF60;
55+
EntityRelicOrb = 0x801BE7F8;
56+
EntityHeartDrop = 0x801BF2C8;
57+
EntityMessageBox = 0x801BF3F0;
58+
CheckColliderOffsets = 0x801BF94C;
59+
EntityUnkId13 = 0x801BFA3C;
60+
EntityGreyPuffSpawner = 0x801BFC7C;
61+
EntityExplosionVariants = 0x801BFD64;
62+
EntityGreyPuff = 0x801BFE54;
63+
EntityIntenseExplosion = 0x801C07F4;
64+
EntityBigRedFireball = 0x801C0B40;
65+
PlaySfxPositional = 0x801C1BF0;
66+
EntitySkelerang = 0x801C2B3C;
67+
EntitySkelerangBoomerang = 0x801C32C4;
68+
EntitySkelerangUnknown = 0x801C3538;
69+
BottomCornerText = 0x801C7E38;
70+
g_ItemIconSlots = 0x801CFD7C;

include/stage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void InitRoomEntities(s32 objLayoutId);
3434
void UpdateRoomPosition();
3535

3636
void Update(void);
37-
37+
void UpdateStageEntities();
3838
void HitDetection(void);
3939

4040
s32 Random();

src/boss/bo4/header.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ extern u_long* OVL_EXPORT(cluts)[];
77
extern LayoutEntity* OVL_EXPORT(pStObjLayoutHorizontal)[];
88
extern RoomDef OVL_EXPORT(rooms_layers)[];
99
extern u_long** OVL_EXPORT(gfxBanks)[];
10-
void UpdateStageEntities();
1110

1211
extern u8* g_SpriteSheet[0x34C];
1312
extern u8* g_PlOvlDopBatSpritesheet[6];

src/boss/mar/header.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ extern u_long* OVL_EXPORT(cluts)[];
77
extern LayoutEntity* OVL_EXPORT(pStObjLayoutHorizontal)[];
88
extern RoomDef OVL_EXPORT(rooms_layers)[];
99
extern u_long** OVL_EXPORT(gfxBanks)[];
10-
void UpdateStageEntities();
1110

1211
AbbreviatedOverlay OVL_EXPORT(Overlay) = {
1312
.Update = Update,

src/boss/rbo5/header.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ extern u_long* OVL_EXPORT(cluts)[];
77
extern LayoutEntity* OVL_EXPORT(pStObjLayoutHorizontal)[];
88
extern RoomDef OVL_EXPORT(rooms_layers)[];
99
extern u_long** OVL_EXPORT(gfxBanks)[];
10-
void UpdateStageEntities();
1110

1211
extern u8* g_SpriteSheet[0x34C];
1312
extern u8* g_PlOvlDopBatSpritesheet[6];

src/pc/stages/stage_dummy.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ static RoomHeader rooms[] = {
2525
static u_long* sprite_banks[1] = {NULL};
2626
static u16* clut_anims[] = {empty_clut_load, NULL};
2727
static void* entity_gfxs[] = {empty_entity_gfx, NULL};
28-
static void UpdateStageEntities(void);
2928
extern s16** WRP_spriteBanks[];
3029
extern RoomDef WRP_rooms_layers[];
3130

@@ -69,5 +68,3 @@ static void MyInitRoomEntities(s32 objLayoutId) {
6968
INFOF("Stage ID: %02X", g_StageId);
7069
PlaySfx(MU_CRYSTAL_TEARDROPS);
7170
}
72-
73-
static void UpdateStageEntities(void) { NOT_IMPLEMENTED; }

src/st/cen/header.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ void Update(void);
55
void HitDetection(void);
66
void UpdateRoomPosition(void);
77
void InitRoomEntities(s32 objLayoutId);
8-
void UpdateStageEntities(void);
98

109
extern RoomHeader OVL_EXPORT(rooms)[];
1110
extern s16** OVL_EXPORT(spriteBanks)[];

src/st/chi/dt_header.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ extern u_long* OVL_EXPORT(cluts)[];
1313
extern RoomDef OVL_EXPORT(rooms_layers)[];
1414
extern GfxBank* OVL_EXPORT(gfxBanks)[];
1515

16-
void UpdateStageEntities();
17-
void HitDetection();
18-
1916
// D_80180000
2017
Overlay OVL_EXPORT(Overlay) = {
2118
.Update = Update,

src/st/collision.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// SPDX-License-Identifier: AGPL-3.0-or-later
22
#include <stage.h>
3-
#include "sfx.h"
43

54
#if defined(VERSION_US)
65
static u16 g_testCollEnemyLookup[] = {

0 commit comments

Comments
 (0)