PSP WRP data (#1249)

This commit is contained in:
sozud 2024-06-03 10:08:38 -07:00 committed by GitHub
parent ea4d75ef19
commit 0be3e44634
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 89 additions and 51 deletions

View File

@ -87,8 +87,8 @@ segments:
- [0xEE00, data] # D_psp_09246480
- [0xEE10, data] # D_psp_09246490
- [0xEE20, data] # D_psp_092464A0
- [0xEE50, data] # c_GoldPrizes
- [0xEE80, data] # c_HeartPrizes
- [0xEE50, .data, wrp_psp/wrp_data_EE50] # c_GoldPrizes
- [0xEE80, .data, wrp_psp/wrp_data_EE50] # c_HeartPrizes
- [0xEEA0, data] # D_psp_09246520
- [0xEF40, data] # D_psp_092465C0
- [0xEF60, data] # D_psp_092465E0
@ -100,9 +100,9 @@ segments:
- [0xEFC0, data] # D_psp_09246640
- [0xEFD0, data] # D_psp_09246650
- [0xEFE0, data] # D_psp_09246660
- [0xF010, data] # D_80180FF8
- [0xF020, data] # D_80181008
- [0xF050, data] # D_80181038
- [0xF010, .data, wrp_psp/wrp_data_F010] # D_80180FF8
- [0xF020, .data, wrp_psp/wrp_data_F010] # D_80181008
- [0xF050, .data, wrp_psp/wrp_data_F010] # D_80181038
- [0xF060, data] # D_psp_092466E0
- [0xF390, data] # D_psp_09246A10
- [0xF3A0, data] # D_psp_09246A20

View File

@ -38,7 +38,7 @@ EntityRelicOrb = 0x0923eac8;
EntityHeartDrop = 0x0923fc00;
EntityMessageBox = 0x0923fdd0;
func_8018F510 = 0x09240548;
func_8018F838 = 0x09240690;
EntityUnkId14 = 0x09240690;
EntityUnkId15 = 0x09240808;
EntityIntenseExplosion = 0x09240988;
func_801916C4 = 0x09240af8;
@ -81,9 +81,9 @@ D_80180EC4 = 0x09246508;
D_80180F70 = 0x092465C8;
D_80180FF8 = 0x09246690;
D_80181008 = 0x092466A0;
D_80181020 = 0x092466B8;
D_80181038 = 0x092466D0;
D_8018103C = 0x092466D8;
unk14_yVel = 0x092466B8;
unk14_startFrame = 0x092466D0;
unk14_lifetime = 0x092466D8;
D_80181134 = 0x09246AE0;
g_eRedDoorTiles = 0x09246E10;
g_eBreakableInit = 0x09246E90;

View File

@ -4,25 +4,24 @@ extern u16 unk14_lifetime[];
// Appears to be related to some sort of explosion or puff of smoke.
// ID is 0x14.
void EntityUnkId14(Entity* entity) {
if (entity->step == 0) {
entity->velocityY = unk14_yVel[entity->ext.generic.unk94];
entity->flags = FLAG_UNK_2000 | FLAG_UNK_04000000 | FLAG_UNK_08000000;
entity->palette = 0x8195;
entity->animSet = ANIMSET_DRA(2);
entity->animCurFrame = unk14_startFrame[entity->params];
entity->drawMode = DRAW_TPAGE;
entity->step++;
void EntityUnkId14(Entity* self) {
if (!self->step) {
self->velocityY = unk14_yVel[self->ext.generic.unk94];
self->flags = FLAG_UNK_2000 | FLAG_UNK_04000000 | FLAG_UNK_08000000;
self->palette = PAL_OVL(0x195);
self->animSet = ANIMSET_DRA(2);
self->animCurFrame = unk14_startFrame[self->params];
self->drawMode = DRAW_TPAGE;
self->step++;
} else {
entity->animFrameDuration++;
entity->posY.val -= entity->velocityY;
if (!(entity->animFrameDuration & 1)) {
entity->animCurFrame++;
self->posY.val -= self->velocityY;
++self->animFrameDuration;
if (!(self->animFrameDuration % 2)) {
self->animCurFrame++;
}
// Once the entity has outlived its lifetime, destroy it
if (entity->animFrameDuration > unk14_lifetime[entity->params]) {
DestroyEntity(entity);
if (self->animFrameDuration > unk14_lifetime[self->params]) {
DestroyEntity(self);
}
}
}

View File

@ -70,31 +70,7 @@ void func_8018F510(Entity* entity) {
}
}
extern s32 D_80181020[];
extern u8 D_80181038[];
extern u16 D_8018103C[];
void func_8018F838(Entity* self) {
if (!self->step) {
self->velocityY = D_80181020[self->ext.generic.unk94];
self->flags = FLAG_UNK_2000 | FLAG_UNK_04000000 | FLAG_UNK_08000000;
self->palette = PAL_OVL(0x195);
self->animSet = ANIMSET_DRA(2);
self->animCurFrame = D_80181038[self->params];
self->drawMode = DRAW_TPAGE;
self->step++;
} else {
self->posY.val -= self->velocityY;
++self->animFrameDuration;
if (!(self->animFrameDuration % 2)) {
self->animCurFrame++;
}
if (self->animFrameDuration > D_8018103C[self->params]) {
DestroyEntity(self);
}
}
}
#include "../entity_unkId14.h"
extern s16 D_80180FF8[];
extern s32 D_80181008[];

View File

@ -0,0 +1,17 @@
#include "../wrp/wrp.h"
u32 c_GoldPrizes[] = {
1, 25, 50, 100, 250, 400, 700, 1000, 2000, 5000,
};
u32 D_psp_092464F8[] = {0x0004FFFA, 0xFFF80000};
s8 c_HeartPrizes[] = {1, 5};
s32 D_80180EC4[] = {
/* EC4 */ 0xFFFF0000,
/* EC8 */ 0xFFFE8000,
/* ECC */ 0xFFFE8000,
/* ED0 */ 0xFFFE8000,
/* ED4 */ 0xFFFD0000,
};

View File

@ -0,0 +1,46 @@
#include "../wrp/wrp.h"
u16 D_80180FF8[] = {
/* FF8 */ 0x0030,
/* FFA */ 0x0050,
/* FFC */ 0x0080,
/* FFE */ 0x00B0,
/* 1000 */ 0x00D0,
/* 1002 */ 0x0100,
/* 1004 */ 0x0100,
/* 1006 */ 0x0000,
};
s32 D_80181008[] = {
/* 1008 */ 0x00000400,
/* 100C */ 0x00002400,
/* 1010 */ 0x00003C00,
/* 1014 */ 0x00006000,
/* 1018 */ 0x00007800,
/* 101C */ 0x0000C000,
};
s32 unk14_yVel[] = {
/* 1020 */ 0x00000800,
/* 1024 */ 0x00002800,
/* 1028 */ 0x00004800,
/* 102C */ 0x00007000,
/* 1030 */ 0x0000E000,
/* 1034 */ 0x00012000,
};
u8 unk14_startFrame[] = {
/* 1038 */ 0x01,
/* 1039 */ 0x09,
/* 103A */ 0x15,
/* 103B */ 0x2B,
};
u8 pad[] = {0, 0, 0, 0};
u16 unk14_lifetime[] = {
/* 103C */ 0x0010,
/* 103E */ 0x0018,
/* 1040 */ 0x002A,
/* 1042 */ 0x002F,
};