Skip to content

Commit 64668ab

Browse files
committed
Decompile mad EntityStageNamePopup
1 parent 154b610 commit 64668ab

File tree

8 files changed

+22
-25
lines changed

8 files changed

+22
-25
lines changed

config/splat.us.stmad.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ segments:
8888
- [0xD83C, .rodata, e_collect]
8989
- [0xD85C, .rodata, e_collect] # EntityEquipItemDrop
9090
- [0xD874, .rodata, e_misc]
91-
- [0xD8AC, .rodata, 17B94]
91+
- [0xD8AC, .rodata, e_stage_name]
9292
- [0xD8C0, .rodata, prim_helpers]
9393
- [0xD8C8, c]
9494
- [0xE5AC, c, e_room_bg]
@@ -101,7 +101,7 @@ segments:
101101
- [0x11D3C, c, st_common]
102102
- [0x1344C, c, e_collect]
103103
- [0x149C0, c, e_misc]
104-
- [0x17B94, c]
104+
- [0x17B94, c, e_stage_name]
105105
- [0x182BC, c, e_particles]
106106
- [0x18B00, c, e_room_fg]
107107
- [0x18BC8, c, popup]

config/symbols.beta.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ RotMatrixX = 0x80018BCC;
1717
RotMatrixY = 0x80018D6C;
1818
RotMatrixZ = 0x80018F0C;
1919
ratan2 = 0x800190AC;
20-
D_8003BE1E_mad = 0x8003BE1E;
2120
D_8003BEEC = 0x8003BEE8;
2221
D_8003BF7C = 0x8003BF08;
2322
D_8003BF28_mad = 0x8003BF28;

config/symbols.beta_fname.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ RotMatrixX = 0x80018BCC;
1818
RotMatrixY = 0x80018D6C;
1919
RotMatrixZ = 0x80018F0C;
2020
ratan2 = 0x800190AC;
21-
D_8003BE1E_mad = 0x8003BE1E;
2221
D_8003BEEC = 0x8003BEE8;
2322
D_8003BF7C = 0x8003BF08;
2423
D_8003BF28_mad = 0x8003BF28;

config/symbols.stmad.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ MAD_EntityUpdates = 0x8018049C;
77
MAD_EInitBreakable = 0x801804F0;
88
g_EInitObtainable = 0x801804FC;
99
g_EInitParticle = 0x80180508;
10+
g_EInitInteractable = 0x80180520;
1011
g_EInitUnkId13 = 0x8018052C;
1112
g_EInitLockCamera = 0x80180538;
1213
g_EInitCommon = 0x80180544;
@@ -44,8 +45,6 @@ MAD_EntityLockCamera = 0x8018E674;
4445
EntityBreakable = 0x8018E830;
4546
EntityDamageDisplay = 0x8018FEA0;
4647
MAD_EntityRedDoor = 0x80191120;
47-
DestroyEntity = 0x80191D3C;
48-
InitializeEntity = 0x80192CAC;
4948
EntityDummy = 0x80192DA8;
5049
EntityPrizeDrop = 0x801939E0;
5150
EntityExplosion = 0x80194218;
@@ -56,9 +55,7 @@ EntityUnkId13 = 0x8019572C;
5655
EntityExplosionVariants = 0x80195A54;
5756
EntityGreyPuff = 0x80195B44;
5857
EntityIntenseExplosion = 0x801964E4;
58+
EntityStageNamePopup = 0x80197B94;
5959
EntitySoulStealOrb = 0x801982BC;
6060
EntityEnemyBlood = 0x80198650;
6161
EntityRoomForeground = 0x80198B00;
62-
UnkPrimHelper = 0x80198FA0;
63-
UnkPolyFunc2 = 0x801996EC;
64-
PrimDecreaseBrightness = 0x8019976C;

include/castle_flags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ typedef enum {
4848
/* 0x35 */ IVE_BEEN_ROBBED = 53, // Set when Death takes your stuff
4949
/* 0x36 */ NO3_STAGE_FLAG = 54,
5050
/* 0x36 */ NP3_STAGE_FLAG = 54,
51+
/* 0x36 */ MAD_STAGE_FLAG = 54,
5152
/* 0x37 */ CASTLE_TURNED_ON = 55, // Sets in first NO3 Hallway
5253
/* 0x38 */ DEATH_STAIRWAY_BROKEN = 56, // Break the ledge just before Death
5354
/* 0x39 */ SLO_GAI_RETREATED = 57, // Slogra/Gaibon retreated in NP3

src/st/e_stage_name_jp.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define STAGE_NAME_BOX_RIGHT_X 248
1313
#endif
1414

15-
#ifdef VERSION_HD
15+
#if defined(VERSION_HD) || defined(VERSION_BETA)
1616
#define NUM_PRIMS 181
1717
#define TEXT_X 192
1818
#define TEXT_Y 177
@@ -79,7 +79,7 @@ static void LoadStageNameGraphics(void) {
7979
// This is the banner version which "shutter opens" and wipes away to the left.
8080
// psp prims 8-183 and hd prims 6-181 seem to be completely unused
8181
void EntityStageNamePopup(Entity* self) {
82-
#ifdef VERSION_HD
82+
#if defined(VERSION_HD) || defined(VERSION_BETA)
8383
u8 padding[0xD8];
8484
#endif
8585
Primitive* prim;
@@ -117,7 +117,7 @@ void EntityStageNamePopup(Entity* self) {
117117
self->flags |= FLAG_HAS_PRIMS;
118118
prim = &g_PrimBuf[primIndex];
119119
self->ext.stpopupj.firstTextPrim = prim;
120-
#if !defined(VERSION_HD)
120+
#if !defined(VERSION_HD) && !defined(VERSION_BETA)
121121
while (prim != NULL) {
122122
prim->drawMode = DRAW_HIDE;
123123
prim = prim->next;
@@ -135,7 +135,7 @@ void EntityStageNamePopup(Entity* self) {
135135
// This splits the two loops in the middle because that is what is happening
136136
// functionally. The two prims for psp together have the same left and right
137137
// sides (conceptually) as the single prim for hd.
138-
#if !defined(VERSION_HD)
138+
#if !defined(VERSION_HD) && !defined(VERSION_BETA)
139139
prim->x3 = prim->x1 = 128;
140140
prim->y3 = prim->y2 = 173;
141141
prim->u2 = prim->u0 = 0;
@@ -226,7 +226,7 @@ void EntityStageNamePopup(Entity* self) {
226226
prim->v2 = 255;
227227
prim->v3 = prim->v2;
228228
prim->x2 = prim->x0 = STAGE_NAME_BOX_LEFT_X;
229-
#ifdef VERSION_HD
229+
#if defined(VERSION_HD) || defined(VERSION_BETA)
230230
prim->y1 = prim->y0 = 155;
231231
prim->x3 = prim->x1 = STAGE_NAME_BOX_RIGHT_X;
232232
#else
@@ -263,7 +263,7 @@ void EntityStageNamePopup(Entity* self) {
263263
prim = prim->next;
264264
}
265265

266-
#if !defined(VERSION_HD)
266+
#if !defined(VERSION_HD) && !defined(VERSION_BETA)
267267
for (i = 0; i < 2; i++) {
268268
prim->u0 = prim->u2 = 128;
269269
prim->v0 = prim->v1 = 48;
@@ -302,11 +302,11 @@ void EntityStageNamePopup(Entity* self) {
302302

303303
if (!primsSet) {
304304
self->step_s++;
305-
#if !defined(VERSION_HD)
305+
#if !defined(VERSION_HD) && !defined(VERSION_BETA)
306306
self->ext.stpopupj.timer = 0;
307307
#endif
308308
prim = self->ext.stpopupj.firstTextPrim;
309-
#if !defined(VERSION_HD)
309+
#if !defined(VERSION_HD) && !defined(VERSION_BETA)
310310
prim = prim->next;
311311
prim->drawMode = DRAW_TRANSP | DRAW_TPAGE | DRAW_COLORS;
312312
prim = prim->next;
@@ -320,7 +320,7 @@ void EntityStageNamePopup(Entity* self) {
320320
break;
321321
case STAGE_NAME_DRAW_TEXT:
322322
prim = self->ext.stpopupj.firstTextPrim;
323-
#ifdef VERSION_HD
323+
#if defined(VERSION_HD) || defined(VERSION_BETA)
324324
for (i = 0; i < 2; i++) {
325325
prim->u0 -= 8;
326326
prim->u2 = prim->u0;
@@ -377,7 +377,7 @@ void EntityStageNamePopup(Entity* self) {
377377
} else {
378378
self->step_s = STAGE_NAME_HOLD_TEXT;
379379
}
380-
#if !defined(VERSION_HD)
380+
#if !defined(VERSION_HD) && !defined(VERSION_BETA)
381381
if (prim->y2 < i * 2 + PRIM_BOTTOM_Y) {
382382
prim->v2++;
383383
prim->v3 = prim->v2;
@@ -423,7 +423,7 @@ void EntityStageNamePopup(Entity* self) {
423423
prim->x1 -= 4; // Aligns right side of box with right side of text
424424
boxRightX = prim->x3 = prim->x1;
425425
prim = self->ext.stpopupj.firstTextPrim;
426-
#ifdef VERSION_HD
426+
#if defined(VERSION_HD) || defined(VERSION_BETA)
427427
for (i = 0; i < 2; i++) {
428428
if (prim->x1 > boxRightX) {
429429
prim->x1 -= 4;
@@ -437,7 +437,7 @@ void EntityStageNamePopup(Entity* self) {
437437
if (prim->x1 < prim->x0) {
438438
prim->drawMode = DRAW_HIDE;
439439
}
440-
#ifdef VERSION_HD
440+
#if defined(VERSION_HD) || defined(VERSION_BETA)
441441
prim->u1 -= 4;
442442
prim->u3 = prim->u1;
443443
}

src/st/mad/17B94.c

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/st/mad/e_stage_name.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// SPDX-License-Identifier: AGPL-3.0-or-later
2+
#include "mad.h"
3+
4+
#define STAGE_FLAG OVL_EXPORT(STAGE_FLAG)
5+
#include "../e_stage_name_jp.h"

0 commit comments

Comments
 (0)