mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-26 22:40:33 +00:00
WRP PSP merge e_room_fg.c (#1221)
Straightforward PR. Interestingly importing the data doesn't seem to result to a match ad there's some `0x10` aligned padding added. Either we know too little about importing data with MWCC or the file split was wrong and the data belonged together with other functions in another C file. For now I had to use a `#ifdef`. It will probably get forgotten until we decide to import the data from WRP PSP.
This commit is contained in:
parent
7b8e97898f
commit
cec8424a09
@ -74,6 +74,6 @@ $(PSP_BUILD_DIR)/tt_%.ld: $(CONFIG_DIR)/splat.pspeu.tt_%.yaml $(PSX_BASE_SYMS) $
|
||||
$(PSP_BUILD_DIR)/tt_%.elf: $(PSP_BUILD_DIR)/tt_%.ld $$(call list_o_files_psp,servant/tt_$$*) $(PSP_BUILD_DIR)/assets/servant/tt_%/mwo_header.bin.o
|
||||
$(call link,tt_$*,$@)
|
||||
|
||||
ST_WRP_MERGE = st_update st_common st_debug e_breakable
|
||||
ST_WRP_MERGE = st_update e_room_fg st_common st_debug e_breakable
|
||||
$(PSP_BUILD_DIR)/stwrp.elf: $(PSP_BUILD_DIR)/stwrp.ld $(addprefix $(PSP_BUILD_DIR)/src/st/wrp/,$(addsuffix .c.o,$(ST_WRP_MERGE))) $$(call list_o_files_psp,st/wrp_psp) $(PSP_BUILD_DIR)/assets/st/wrp/mwo_header.bin.o
|
||||
$(call link,stwrp,$@)
|
||||
|
@ -53,7 +53,7 @@ segments:
|
||||
- [0x7448, c, wrp_psp/e_misc]
|
||||
- [0x95D0, c, wrp_psp/collision]
|
||||
- [0xB7A8, c, wrp_psp/popup]
|
||||
- [0xBDA0, c, wrp_psp/e_room_fg]
|
||||
- [0xBDA0, c, wrp/e_room_fg]
|
||||
- [0xBEB8, c, wrp/st_common]
|
||||
- [0xC9A0, c, wrp_psp/stage_name_new]
|
||||
- [0xCEA0, c, wrp_psp/prim_helpers]
|
||||
|
@ -81,7 +81,7 @@ D_80181008 = 0x092466A0;
|
||||
D_80181020 = 0x092466B8;
|
||||
D_80181038 = 0x092466D0;
|
||||
D_8018103C = 0x092466D8;
|
||||
D_80181420 = 0x09246AE0;
|
||||
D_80181134 = 0x09246AE0;
|
||||
g_eRedDoorTiles = 0x09246E10;
|
||||
g_eBreakableInit = 0x09246E90;
|
||||
g_InitializeData0 = 0x09246EA0;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "wrp.h"
|
||||
|
||||
#if !defined(VERSION_PSP)
|
||||
u8 D_80181120[] = {0x40, 0x01, 0xFF, 0x00};
|
||||
u8 D_80181124[] = {0x40, 0x02, 0xFF, 0x00};
|
||||
u8 D_80181128[] = {0x40, 0x02, 0xFF, 0x00};
|
||||
@ -13,22 +14,29 @@ ObjInit2 D_80181134[] = {
|
||||
{0x000C, 0x01EC, 0x0000, 0x0000, 0x00, 0x10, 0, D_80181130},
|
||||
{0x000C, 0x0080, 0x0000, 0x0000, 0x00, 0x10, 0, D_8018112C},
|
||||
};
|
||||
|
||||
#else
|
||||
extern ObjInit2 D_80181134[];
|
||||
|
||||
#endif
|
||||
|
||||
void EntityRoomForeground(Entity* entity) {
|
||||
ObjInit2* objInit = &D_80181134[entity->params];
|
||||
if (entity->step == 0) {
|
||||
|
||||
if (!entity->step) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
entity->animSet = objInit->animSet;
|
||||
entity->zPriority = objInit->zPriority;
|
||||
entity->unk5A = objInit->unk4.s;
|
||||
entity->unk5A = objInit->unk4.u;
|
||||
entity->palette = objInit->palette;
|
||||
entity->drawFlags = objInit->drawFlags;
|
||||
entity->drawMode = objInit->drawMode;
|
||||
if (objInit->unkC != 0) {
|
||||
entity->flags = objInit->unkC;
|
||||
}
|
||||
if (entity->params >= 5) {
|
||||
if (entity->params > 4) {
|
||||
entity->drawFlags |= DRAW_COLORS;
|
||||
entity->rotZ = 0x800;
|
||||
entity->drawFlags |= 4;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
|
@ -1,24 +0,0 @@
|
||||
#include "../wrp/wrp.h"
|
||||
|
||||
extern ObjInit2 D_80181420[];
|
||||
void EntityRoomForeground(Entity* entity) {
|
||||
ObjInit2* objInit = &D_80181420[entity->params];
|
||||
|
||||
if (!entity->step) {
|
||||
InitializeEntity(g_eInitGeneric2);
|
||||
entity->animSet = objInit->animSet;
|
||||
entity->zPriority = objInit->zPriority;
|
||||
entity->unk5A = objInit->unk4.u;
|
||||
entity->palette = objInit->palette;
|
||||
entity->drawFlags = objInit->drawFlags;
|
||||
entity->drawMode = objInit->drawMode;
|
||||
if (objInit->unkC != 0) {
|
||||
entity->flags = objInit->unkC;
|
||||
}
|
||||
if (entity->params > 4) {
|
||||
entity->drawFlags |= DRAW_COLORS;
|
||||
entity->rotZ = 0x800;
|
||||
}
|
||||
}
|
||||
AnimateEntity(objInit->unk10, entity);
|
||||
}
|
Loading…
Reference in New Issue
Block a user