WRP PSP e_particles (#1227)

Quite a big one. I merged `EntitySoulStealOrb` across all overlays by
normalising the symbol names. The symbol types was all over the place,
so I had to fix that as well.

I solved the s16/u16 ifdef between PSX and PSP. The only part I couldn't
match without a ifdef was `angle = (angle - 1) * 8;` and `angle = (angle
* 8) - 8;`.

I also decompiled the exclusive PSP functions `func_psp_0923AD68` and
`func_psp_0923B2F0` and merged the PSX and PSP `e_particles.c` code. The
exclusive functions required a file split.
This commit is contained in:
Luciano Ciccariello 2024-06-01 20:32:59 +01:00 committed by GitHub
parent ea0134f497
commit a221c614be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
50 changed files with 342 additions and 904 deletions

View File

@ -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 e_room_fg st_common st_debug e_breakable
ST_WRP_MERGE = st_update e_particles 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,$@)

View File

@ -47,7 +47,9 @@ segments:
- [0x1028, c, wrp_psp/e_stage_name]
- [0x1EA8, c, wrp_psp/e_red_door]
- [0x31B0, c, wrp/st_update]
- [0x36E8, c, wrp_psp/e_particles]
- [0x36E8, c, wrp_psp/e_particles_maria1]
- [0x3C70, c, wrp_psp/e_particles_maria2]
- [0x4100, c, wrp/e_particles]
- [0x4C78, c, wrp_psp/blit_char]
- [0x5308, c, wrp_psp/e_collect]
- [0x7448, c, wrp_psp/e_misc]

View File

@ -54,8 +54,8 @@ MoveEntity = 0x09243850;
FallEntity = 0x092438a0;
AllocEntity = 0x092438d8;
UnkEntityFunc0 = 0x09243948;
func_8018C160 = 0x092439f0;
func_8018C1E0 = 0x09243a70;
GetAngleBetweenEntities = 0x092439f0;
GetNormalizedAngle = 0x09243a70;
SetStep = 0x09243b68;
InitializeEntity = 0x09243bb8;
EntityDummy = 0x09243d60;
@ -71,9 +71,9 @@ EntityWarpRoom = 0x09244d28;
EntityWarpSmallRocks = 0x09245c50;
g_eRedDoorUV = 0x09246080;
UNK_Invincibility0 = 0x09246098;
D_801810A0 = 0x092460C8;
D_801810B0 = 0x092460D8;
D_80181110 = 0x09246138;
g_ESoulStealOrbAngles = 0x092460C8;
g_ESoulStealOrbSprt = 0x092460D8;
g_ESoulStealOrbAnim = 0x09246138;
g_goldCollectTexts = 0x092464A8;
c_GoldPrizes = 0x092464D0;
c_HeartPrizes = 0x09246500;

View File

@ -21,10 +21,15 @@ g_unkGraphicsStruct = 0x091CE5F8;
g_randomNext = 0x091CE6B0;
g_PlayableCharacter = 0x091CF020;
g_Servant = 0x091CF028;
g_Player = 0x91CF030;
g_Player_pl_vram_flag = 0x91CF380;
g_Player_unk50 = 0x91CF3D0;
g_Player_unk52 = 0x91CF3D2;
g_Player = 0x091CF030;
g_Player_pl_vram_flag = 0x091CF380;
D_psp_091CF3A0 = 0x091CF3A0;
D_psp_091CF3A4 = 0x091CF3A4;
D_psp_091CF3A8 = 0x091CF3A8;
D_psp_091CF3AC = 0x091CF3AC;
g_Player_unk50 = 0x091CF3D0;
g_Player_unk52 = 0x091CF3D2;
D_psp_091CF3DC = 0x091CF3DC;
g_Status = 0x091CF400;
g_api = 0x91CF738;
g_api_FreePrimitives = 0x091cf778;

View File

@ -92,3 +92,6 @@ g_LayoutObjVertical = 0x801997DC;
g_LayoutObjPosVertical = 0x801997E4;
UpdateRoomPosition = 0x80190F04;
g_pStObjLayoutVertical = 0x801803C8;
g_ESoulStealOrbAngles = 0x80181068;
g_ESoulStealOrbAnim = 0x801810D8;
g_ESoulStealOrbSprt = 0x80181078;

View File

@ -28,6 +28,9 @@ unk14_yVel = 0x80181148;
unk14_startFrame = 0x80181160;
unk14_lifetime = 0x80181164;
g_olroxDroolCollOffsets = 0x8018116C;
g_ESoulStealOrbAngles = 0x801811C8;
g_ESoulStealOrbSprt = 0x801811D8;
g_ESoulStealOrbAnim = 0x80181238;
g_Rooms = 0x801812D4;
g_UnkPrimHelperRot = 0x8018D5F8;
EntityBackgroundBlock = 0x8018D600;

View File

@ -35,6 +35,9 @@ unk14_yVel = 0x8018130C;
unk14_startFrame = 0x80181324;
unk14_lifetime = 0x80181328;
g_olroxDroolCollOffsets = 0x80181330;
g_ESoulStealOrbAngles = 0x8018138C;
g_ESoulStealOrbSprt = 0x8018139C;
g_ESoulStealOrbAnim = 0x801813FC;
g_Rooms = 0x80181498;
g_UnkPrimHelperRot = 0x80191A5C;
EntityUnkId11 = 0x80191A64;

View File

@ -35,6 +35,9 @@ unk14_yVel = 0x80182650;
unk14_startFrame = 0x80182668;
unk14_lifetime = 0x8018266C;
g_olroxDroolCollOffsets = 0x80182674;
g_ESoulStealOrbAngles = 0x801826D0;
g_ESoulStealOrbSprt = 0x801826E0;
g_ESoulStealOrbAnim = 0x80182740;
g_Rooms = 0x80183CC4;
g_UnkPrimHelperRot = 0x801B77CC;
EntityCavernDoorVase = 0x801B77D4;

View File

@ -35,6 +35,9 @@ unk14_yVel = 0x80181FDC;
unk14_startFrame = 0x80181FF4;
unk14_lifetime = 0x80181FF8;
g_olroxDroolCollOffsets = 0x80182000;
g_ESoulStealOrbAngles = 0x8018205C;
g_ESoulStealOrbSprt = 0x8018206C;
g_ESoulStealOrbAnim = 0x801820CC;
g_Rooms = 0x80183A7C;
g_UnkPrimHelperRot = 0x801B2464;
EntityBreakable = 0x801B26FC;

View File

@ -35,6 +35,9 @@ unk14_yVel = 0x80181F04;
unk14_startFrame = 0x80181F1C;
unk14_lifetime = 0x80181F20;
g_olroxDroolCollOffsets = 0x80181F28;
g_ESoulStealOrbAngles = 0x80181F80;
g_ESoulStealOrbSprt = 0x80181F90;
g_ESoulStealOrbAnim = 0x80181FF0;
g_Rooms = 0x8018272C;
g_UnkPrimHelperRot = 0x801B0934;
EntityBreakable = 0x801B0EEC;

View File

@ -23,6 +23,9 @@ unk14_yVel = 0x80181020;
unk14_startFrame = 0x80181038;
unk14_lifetime = 0x8018103C;
g_olroxDroolCollOffsets = 0x80181044;
g_ESoulStealOrbAngles = 0x801810A0;
g_ESoulStealOrbSprt = 0x801810B0;
g_ESoulStealOrbAnim = 0x80181110;
g_Rooms = 0x801811AC;
g_UnkPrimHelperRot = 0x80188DE8;
EntityBreakable = 0x8018908C;
@ -42,7 +45,7 @@ GetSideToPlayer = 0x8018D8F0;
MoveEntity = 0x8018D934;
FallEntity = 0x8018D964;
AllocEntity = 0x8018DDF0;
SetStep = 0x8018E1C0;
SetStep = 0x8018e1c0;
InitializeEntity = 0x8018E290;
EntityDummy = 0x8018E38C;
GetPlayerCollisionWith = 0x8018E634;

View File

@ -24,6 +24,9 @@ unk14_yVel = 0x80181ED8;
unk14_startFrame = 0x80181EF0;
unk14_lifetime = 0x80181EF4;
g_olroxDroolCollOffsets = 0x80181EFC;
g_ESoulStealOrbAngles = 0x80181F54;
g_ESoulStealOrbSprt = 0x80181F64;
g_ESoulStealOrbAnim = 0x80181FC4;
g_Rooms = 0x80182060;
D_80183D1C = 0x80183D1C;
D_80197F80 = 0x80197F80;

View File

@ -8,6 +8,11 @@ g_ScrollDeltaX = 0x091CE698;
g_ScrollDeltaY = 0x091CE690;
g_Servant = 0x091CF028;
g_Player = 0x091CF030;
D_psp_091CF3A0 = 0x091CF3A0;
D_psp_091CF3A4 = 0x091CF3A4;
D_psp_091CF3A8 = 0x091CF3A8;
D_psp_091CF3AC = 0x091CF3AC;
D_psp_091CF3DC = 0x091CF3DC;
g_api = 0x091CF738;
g_PrimBuf = 0x091CFAF8;
D_8003C708 = 0x091E1308;
@ -22,7 +27,6 @@ PfnEntityUpdates = 0x08C6BC30;
g_PlayableCharacter = 0x091CF020;
D_8018047C = 0x09246ED0;
g_ItemIconSlots = 0x0924BC20;
D_091CF020 = 0x091CF020;
g_PlayableCharacter = 0x091CF020;
D_091CF6DC = 0x091CF6DC;
D_091CF698 = 0x091CF698;
D_091CF3A8 = 0x091CF3A8;

View File

@ -250,11 +250,7 @@ typedef struct {
} ET_GaibonSlogra;
typedef struct {
#if defined(VERSION_PSP)
/* 0x7C */ u16 angle;
#else
/* 0x7C */ s16 angle;
#endif
/* 0x7E */ u16 unk7E;
/* 0x80 */ u16 unk80;
/* 0x82 */ s16 unk82;

View File

@ -166,6 +166,7 @@ typedef struct Prim {
#define RENDERFLAGS_NOSHADOW 2
#define PLAYER_ALUCARD 0
#define PLAYER_RICHTER 1
#define PLAYER_MARIA 2
#define MAX_GOLD 999999
#define HEART_VESSEL_INCREASE 5
#define HEART_VESSEL_RICHTER 30
@ -1548,7 +1549,14 @@ typedef struct {
/* 80072F34 */ u32 unk14;
/* 80072F38 */ s32 unk18;
/* 80072F3C */ s32 unk1C;
/* 80072F40 */ s32 unk20[8];
/* 80072F40 */ s32 unk20;
/* 80072F44 */ s32 unk24;
/* 80072F48 */ s32 unk28;
/* 80072F4C */ s32 unk2C;
/* 80072F50 */ s32 unk30;
/* 80072F54 */ s32 unk34;
/* 80072F58 */ s32 unk38;
/* 80072F5C */ s32 unk3C;
/* 80072F60 */ u16 unk40;
/* 80072F62 */ u16 pl_high_jump_timer;
/* 80072F64 */ u16 unk44;
@ -1680,6 +1688,12 @@ extern u32 D_80070BCC; // part of g_Clut
extern PlayerState g_Player;
extern u16 g_Player_D_80072EF6; // TODO merge with g_Player
// the following are most likely part of g_Player
extern Entity* D_psp_091CF3A0;
extern s32 D_psp_091CF3A4; // maybe not s32 but a pointer?
extern void (*D_psp_091CF3A8)(Entity*);
extern s32 D_psp_091CF3AC; // maybe not s32 but a pointer?
extern u16 D_psp_091CF3DC;
extern GfxLoad g_GfxLoad[0x10];
extern u32 g_GameStep;

View File

@ -129,7 +129,7 @@ void func_80109594() {
func_801093C4();
#if defined(VERSION_US)
g_Player.unk20[0] = 0x10;
g_Player.unk20 = 0x10;
g_Player.D_80072EFC = 0x10;
g_Player.padSim = 0;
D_80137FB8 = 0;
@ -608,7 +608,7 @@ void EntityAlucard(void) {
specialmove:
CheckSpecialMoveInputs();
#if defined(VERSION_US)
if (g_Player.unk20[0] == 0 || --g_Player.unk20[0] == 0) {
if (g_Player.unk20 == 0 || --g_Player.unk20 == 0) {
#elif defined(VERSION_HD)
if (D_800ACEDC_hd == 0 || --D_800ACEDC_hd == 0) {
#endif

View File

@ -824,7 +824,7 @@ void func_801177A0(void) {
}
PLAYER.palette = 0x8100;
#if defined(VERSION_US)
g_Player.unk20[0] = 0x18;
g_Player.unk20 = 0x18;
#elif defined(VERSION_HD)
D_800ACEDC_hd = 0x18;
#endif
@ -1172,7 +1172,7 @@ void func_801182F8(void) {
PLAYER.velocityY = -0x10000;
}
#if defined(VERSION_US)
g_Player.unk20[0] = 0x18;
g_Player.unk20 = 0x18;
#elif defined(VERSION_HD)
D_800ACEDC_hd = 0x18;
#endif

View File

@ -610,7 +610,7 @@ void func_8012EAD0(void) {
}
PLAYER.palette = 0x8100;
#if defined(VERSION_US)
g_Player.unk20[0] = 0x18;
g_Player.unk20 = 0x18;
#elif defined(VERSION_HD)
D_800ACEDC_hd = 0x18;
#endif

View File

@ -228,7 +228,7 @@ u16 func_80194C68(s16 x, s16 y) {
u16 func_80194D94(s16 arg0, s16 arg1) { return ratan2(arg1, arg0); }
u16 func_80194DC4(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -240,7 +240,7 @@ u16 func_80194DFC(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
u16 func_80194E44(u16 arg0, u16 arg1, u16 arg2) {
u16 GetNormalizedAngle(u16 arg0, u16 arg1, u16 arg2) {
u16 var_v0 = arg1;
u16 temp_a2 = arg2 - arg1;
u16 var_v0_2;

View File

@ -1,90 +1,6 @@
#include "cen.h"
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_80194DC4(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_801811C8[Random() & 7];
} else {
angle += D_801811C8[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_80194E44(
self->ext.soulStealOrb.unk7E, self->ext.soulStealOrb.angle,
func_80194DC4(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80181238, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_801811D8[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -45,7 +45,7 @@ typedef enum {
void CreateEntityFromCurrentEntity(u16 entityId, Entity* entity);
void CreateEntityFromLayout(Entity*, LayoutEntity*);
extern u16 func_80194E44(u16 arg0, u16 arg1, u16 arg2);
extern u16 GetNormalizedAngle(u16 arg0, u16 arg1, u16 arg2);
void EntityUnkId14(Entity* entity);
void EntityUnkId15(Entity* entity);
@ -75,9 +75,9 @@ extern s16 D_80180BBC[];
extern u16 D_80180EEC[];
extern u16 D_80180F1C[];
extern s8 c_HeartPrizes[];
extern u16 D_801811C8[];
extern u16 D_801811D8[];
extern u8 D_80181238;
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
extern ObjInit2 D_8018125C[];
extern s16 D_8019D37E;

View File

@ -238,7 +238,7 @@ u8 func_8019ADAC(s16 arg0, s16 arg1) {
u16 func_8019AED8(s16 arg0, s16 arg1) { return ratan2(arg1, arg0); }
u16 func_8019AF08(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -250,7 +250,7 @@ u16 func_8019AF40(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
u16 func_8019AF88(u16 arg0, s16 arg1, s16 arg2) {
u16 GetNormalizedAngle(u16 arg0, s16 arg1, s16 arg2) {
u16 var_v0 = arg1;
u16 temp_a2 = arg2 - arg1;
u16 var_v0_2;

View File

@ -382,93 +382,8 @@ void func_801A046C(s16 sfxId) {
#include "../entity_stage_name_popup.h"
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
#include "../entity_soul_steal_orb.h"
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_8019AF08(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_8018138C[Random() & 7];
} else {
angle += D_8018138C[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_8019AF88(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_8019AF08(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_801813FC, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_8018139C[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
// ID 0x0D
#include "../entity_enemy_blood.h"
extern ObjInit2 D_80181420[];

View File

@ -119,9 +119,9 @@ extern u16 D_801810E0[];
// *** EntitySoulStealOrb properties START ***
extern u16 D_8018138C[]; // NOTE(sestren): Random angle offsets?
extern u16 D_8018139C[]; // NOTE(sestren): Animation frame properties?
extern u8 D_801813FC;
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***

View File

@ -1215,8 +1215,8 @@ void EntityPinkBallProjectile(Entity* self) {
case 3:
AnimateEntity(D_80180794, self);
MoveEntity();
temp_v0 = func_8019AF08(self, g_Entities);
temp_s0 = func_8019AF88(0x10, self->ext.succubus.unkA2, temp_v0);
temp_v0 = GetAngleBetweenEntities(self, g_Entities);
temp_s0 = GetNormalizedAngle(0x10, self->ext.succubus.unkA2, temp_v0);
self->velocityX = rcos(temp_s0) * 0x38;
self->velocityY = rsin(temp_s0) * 0x38;
self->ext.succubus.unkA2 = temp_s0;

View File

@ -1,38 +1,22 @@
#include "../wrp/wrp.h"
INCLUDE_ASM("st/wrp_psp/psp/wrp_psp/e_particles", func_psp_0923AD68);
void func_psp_0923B2F0();
INCLUDE_ASM("st/wrp_psp/psp/wrp_psp/e_particles", func_psp_0923B2F0);
extern u16 g_InitializeData0[];
extern u16 D_801810A0[];
extern u32 D_80181110[];
extern s16 D_801810B0[];
extern void (*D_091CF3A8)(int);
extern s32 D_091CF020;
void func_psp_0923AD68(Entity*);
s32 func_8018C160(Entity*, Entity*);
// worse with prototype
// u16 func_8018C1E0(u16 arg0, u16 arg1, u16 arg2);
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
u16 angle;
Primitive* prim;
s32 primIndex;
s16* temp_d;
u16 temp_a;
s16* spr;
u16 direction;
Entity* player;
if (D_091CF020 == 2) {
D_091CF3A8 = &func_psp_0923B2F0;
#ifdef VERSION_PSP
if (g_PlayableCharacter == PLAYER_MARIA) {
D_psp_091CF3A8 = &func_psp_0923B2F0;
func_psp_0923AD68(self);
return;
}
player = &PLAYER;
#endif
player = &PLAYER;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
@ -43,18 +27,18 @@ void EntitySoulStealOrb(Entity* self) {
self->flags |= FLAG_HAS_PRIMS;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
angle = func_8018C160(self, &PLAYER);
temp_a = 0;
angle = GetAngleBetweenEntities(self, &PLAYER);
direction = 0;
if (self->posY.i.hi > 112) {
temp_a = 1;
direction = 1;
}
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_a ^= 1;
direction ^= 1;
}
if (temp_a) {
angle -= D_801810A0[Random() & 7];
if (direction) {
angle -= g_ESoulStealOrbAngles[Random() & 7];
} else {
angle += D_801810A0[Random() & 7];
angle += g_ESoulStealOrbAngles[Random() & 7];
}
self->ext.soulStealOrb.angle = angle;
self->ext.soulStealOrb.unk80 = 0x400;
@ -88,30 +72,32 @@ void EntitySoulStealOrb(Entity* self) {
self->ext.soulStealOrb.unk80 += 4;
}
// soulStealOrb.angle changed to u16
angle = func_8018C160(self, &PLAYER);
self->ext.soulStealOrb.angle = angle = func_8018C1E0(
angle = GetAngleBetweenEntities(self, &PLAYER);
self->ext.soulStealOrb.angle = angle = GetNormalizedAngle(
self->ext.soulStealOrb.unk7E, self->ext.soulStealOrb.angle, angle);
UnkEntityFunc0(angle, self->ext.soulStealOrb.unk80);
MoveEntity(self);
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80181110, self);
AnimateEntity(g_ESoulStealOrbAnim, self);
prim->tpage = 0x18;
prim->clut = 0x194;
angle = self->animCurFrame;
#ifdef VERSION_PSP
angle = (angle - 1) * 8;
temp_d = &D_801810B0[angle];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *temp_d;
#else
angle = (angle * 8) - 8;
#endif
spr = &g_ESoulStealOrbSprt[angle];
prim->x0 = prim->x2 = self->posX.i.hi + *spr++;
prim->y0 = prim->y1 = self->posY.i.hi + *spr++;
prim->x1 = prim->x3 = prim->x0 + *spr++;
prim->y2 = prim->y3 = prim->y0 + *spr++;
prim->u0 = prim->u2 = *spr++;
prim->v0 = prim->v1 = *spr++;
prim->u1 = prim->u3 = *spr++;
prim->v2 = prim->v3 = *spr;
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_enemy_blood.h"

View File

@ -432,91 +432,7 @@ void func_80197A9C(s16 sfxId) {
INCLUDE_ASM("asm/us/st/mad/nonmatchings/15520", func_80197B94);
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_80192AF0(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_80181068[Random() & 7];
} else {
angle += D_80181068[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_80192B70(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_80192AF0(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_801810D8, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_80181078[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -793,7 +793,7 @@ u8 func_80192994(s32 x, s32 y) {
u16 func_80192AC0(s16 x, s16 y) { return ratan2(y, x); }
u16 func_80192AF0(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -805,7 +805,7 @@ u16 func_80192B28(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
u16 func_80192B70(u16 arg0, u16 arg1, u16 arg2) {
u16 GetNormalizedAngle(u16 arg0, u16 arg1, u16 arg2) {
u16 var_v0 = arg1;
u16 temp_a2 = arg2 - arg1;
u16 var_v0_2;

View File

@ -85,9 +85,9 @@ extern u8 g_eBreakableDrawModes[];
// *** EntitySoulStealOrb properties START ***
extern u16 D_80181068[]; // NOTE(sestren): Random angle offsets?
extern u16 D_80181078[]; // NOTE(sestren): Animation frame properties?
extern u8 D_801810D8;
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***

View File

@ -225,7 +225,7 @@ u8 func_801C5668(s32 arg0, s32 arg1) {
u16 func_801C5794(s16 arg0, s16 arg1) { return ratan2(arg1, arg0); }
u16 func_801C57C4(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -237,7 +237,7 @@ u16 func_801C57FC(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
u16 func_801C5844(u16 arg0, u16 arg1, u16 arg2) {
u16 GetNormalizedAngle(u16 arg0, u16 arg1, u16 arg2) {
u16 var_v0 = arg1;
u16 temp_a2 = arg2 - arg1;
u16 var_v0_2;

View File

@ -365,92 +365,7 @@ void func_801CAD28(s16 sfxId) {
#include "../entity_stage_name_popup.h"
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16* temp_d;
u16 temp_e;
s32 temp_a;
s32 temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_801C57C4(self, &g_Entities[PLAYER_CHARACTER]);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < g_Entities[PLAYER_CHARACTER].posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_801826D0[Random() & 7];
} else {
angle += D_801826D0[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = (self->rotY += 0x10);
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_801C5844(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_801C57C4(self, &g_Entities[PLAYER_CHARACTER]));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self);
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80182740, self);
angle = (float)((u32)self);
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_801826E0[(u16)((8 * ((u16)self->animCurFrame)) - 8)];
prim->x0 = (prim->x2 = self->posX.i.hi + (*(temp_d++)));
prim->y0 = (prim->y1 = self->posY.i.hi + (*(temp_d++)));
prim->x1 = (prim->x3 = prim->x0 + (*(temp_d++)));
prim->y2 = (prim->y3 = prim->y0 + (*(temp_d++)));
prim->u0 = (prim->u2 = *(temp_d++));
prim->v0 = (prim->v1 = *(temp_d++));
prim->u1 = (prim->u3 = *(temp_d++));
prim->v2 = (prim->v3 = *(temp_d++));
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -246,9 +246,9 @@ extern PfnEntityUpdate PfnEntityUpdates[];
// *** EntitySoulStealOrb properties START ***
extern u16 D_801826D0[]; // NOTE(sestren): Random angle offsets?
extern u16 D_801826E0[]; // NOTE(sestren): Animation frame properties?
extern u16 D_80182740[];
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***

View File

@ -224,7 +224,7 @@ u8 func_801BCED8(s32 x, s32 y) {
u16 func_801BD004(s16 x, s16 y) { return ratan2(y, x); }
u16 func_801BD034(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -236,7 +236,7 @@ u16 func_801BD06C(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
u16 func_801BD0B4(u16 arg0, s16 arg1, s16 arg2) {
u16 GetNormalizedAngle(u16 arg0, s16 arg1, s16 arg2) {
u16 var_v0 = arg1;
u16 temp_a2 = arg2 - arg1;
u16 var_v0_2;

View File

@ -377,92 +377,7 @@ void func_801C2598(s16 sfxId) {
#include "../entity_stage_name_popup.h"
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16* temp_d;
u16 temp_e;
s32 temp_a;
s32 temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_801BD034(self, &g_Entities[PLAYER_CHARACTER]);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < g_Entities[PLAYER_CHARACTER].posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_8018205C[Random() & 7];
} else {
angle += D_8018205C[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = (self->rotY += 0x10);
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_801BD0B4(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_801BD034(self, &g_Entities[PLAYER_CHARACTER]));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self);
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_801820CC, self);
angle = (float)((u32)self);
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_8018206C[(u16)((8 * ((u16)self->animCurFrame)) - 8)];
prim->x0 = (prim->x2 = self->posX.i.hi + (*(temp_d++)));
prim->y0 = (prim->y1 = self->posY.i.hi + (*(temp_d++)));
prim->x1 = (prim->x3 = prim->x0 + (*(temp_d++)));
prim->y2 = (prim->y3 = prim->y0 + (*(temp_d++)));
prim->u0 = (prim->u2 = *(temp_d++));
prim->v0 = (prim->v1 = *(temp_d++));
prim->u1 = (prim->u3 = *(temp_d++));
prim->v2 = (prim->v3 = *(temp_d++));
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -304,9 +304,9 @@ extern u8 D_80182935[];
// *** EntitySoulStealOrb properties START ***
extern u16 D_8018205C[]; // NOTE(sestren): Random angle offsets?
extern u16 D_8018206C[]; // NOTE(sestren): Animation frame properties?
extern u16 D_801820CC[];
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***

View File

@ -229,7 +229,7 @@ u8 func_801BD2F0(s16 arg0, s16 arg1) {
u16 func_801BD41C(s16 x, s16 y) { return ratan2(y, x); }
u16 func_801BD44C(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -241,8 +241,8 @@ u16 func_801BD484(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
// TODO(sestren): Reconcile this func_801BD4CC with the one in 3E30C.c
u16 func_801BD4CC(u16 arg0, s16 arg1, s16 arg2) {
// TODO(sestren): Reconcile this GetNormalizedAngle with the one in 3E30C.c
u16 GetNormalizedAngle(u16 arg0, s16 arg1, s16 arg2) {
u16 var_v0 = arg1;
u16 temp_a2 = arg2 - arg1;
u16 var_v0_2;

View File

@ -409,93 +409,7 @@ void func_801C29B0(s16 sfxId) {
}
}
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
// TODO(sestren): Reconcile this func_801BD4CC with the one in 36DE4.c
s16 func_801BD4CC(u16, u16, s32); /* extern */
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_801BD44C(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_80181F80[Random() & 7];
} else {
angle += D_80181F80[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_801BD4CC(
self->ext.soulStealOrb.unk7E, self->ext.soulStealOrb.angle,
0xffff & func_801BD44C(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80181FF0, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_80181F90[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -359,9 +359,9 @@ extern u16 D_801CB736[];
// *** EntitySoulStealOrb properties START ***
extern u16 D_80181F80[]; // NOTE(sestren): Random angle offsets?
extern u16 D_80181F90[]; // NOTE(sestren): Animation frame properties?
extern u8 D_80181FF0;
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***

View File

@ -1,90 +1,6 @@
#include "rwrp.h"
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_8018E0E0(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_801810A0[Random() & 7];
} else {
angle += D_801810A0[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_8018E160(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_8018E0E0(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80181110, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_801810B0[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -176,7 +176,7 @@ s32 func_8018DF84(s32 arg0, s32 arg1) {
u16 func_8018E0B0(s16 arg0, s16 arg1) { return ratan2(arg1, arg0); }
u16 func_8018E0E0(Entity* arg0, Entity* arg1) {
u16 GetAngleBetweenEntities(Entity* arg0, Entity* arg1) {
s32 x = arg1->posX.i.hi - arg0->posX.i.hi;
s32 y = arg1->posY.i.hi - arg0->posY.i.hi;
@ -190,7 +190,7 @@ u16 func_8018E118(s32 arg0, s32 arg1) {
return ratan2(y, x);
}
u16 func_8018E160(u16 arg0, s16 arg1, s16 arg2) {
u16 GetNormalizedAngle(u16 arg0, s16 arg1, s16 arg2) {
u16 var_v0;
u16 var_v0_2;
u16 temp_a2 = arg2 - arg1;

View File

@ -19,10 +19,10 @@ void CreateEntityFromLayout(Entity*, LayoutEntity*);
// *** EntitySoulStealOrb properties START ***
extern u16 D_801810A0[]; // NOTE(sestren): Random angle offsets?
extern u16 D_801810B0[]; // NOTE(sestren): Animation frame properties?
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u16 g_InitializeData0[];
extern u16 D_80181110[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***
extern u16 D_80180DC4[];

View File

@ -611,7 +611,7 @@ u8 func_801B5560(s32 arg0, s32 arg1) {
u16 func_801B568C(s16 x, s16 y) { return ratan2(y, x); }
u16 func_801B56BC(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -623,7 +623,7 @@ u16 func_801B56F4(s32 x, s32 y) {
return ratan2(diffY, diffX);
}
u16 func_801B573C(u16 arg0, s16 arg1, s16 arg2) {
u16 GetNormalizedAngle(u16 arg0, s16 arg1, s16 arg2) {
u16 temp_a2 = arg2 - arg1;
u16 ret;

View File

@ -828,91 +828,7 @@ void func_801B9DB0(s16 sfxId) {
}
}
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_801B56BC(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_80181F54[Random() & 7];
} else {
angle += D_80181F54[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_801B573C(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_801B56BC(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80181FC4, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_80181F64[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -175,9 +175,9 @@ extern s32 D_801C2580;
// *** EntitySoulStealOrb properties START ***
extern u16 D_80181F54[]; // NOTE(sestren): Random angle offsets?
extern u16 D_80181F64[]; // NOTE(sestren): Animation frame properties?
extern u8 D_80181FC4;
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
// *** EntitySoulStealOrb properties END ***

View File

@ -1,6 +1,7 @@
#include "wrp.h"
u16 D_801810A0[] = {
#ifndef VERSION_PSP
u16 g_ESoulStealOrbAngles[] = {
/* 10A0 */ 0x0820,
/* 10A2 */ 0x0840,
/* 10A4 */ 0x0860,
@ -11,7 +12,7 @@ u16 D_801810A0[] = {
/* 10AE */ 0x0A00,
};
u16 D_801810B0[] = {
s16 g_ESoulStealOrbSprt[] = {
0xFFFD, 0xFFFD, 0x0008, 0x0008, 0x00D0, 0x0068, 0x00D8, 0x0070,
0xFFFD, 0xFFFD, 0x0008, 0x0008, 0x00C8, 0x0068, 0x00D0, 0x0070,
0xFFF9, 0xFFF9, 0x0010, 0x000F, 0x00C8, 0x0070, 0x00D8, 0x007F,
@ -20,96 +21,17 @@ u16 D_801810B0[] = {
0xFFF5, 0xFFF5, 0x0018, 0x0017, 0x00B0, 0x0068, 0x00C8, 0x007F,
};
u32 D_80181110[] = {
/* 1110 */ 0x03030204,
/* 1114 */ 0x05030403,
/* 1118 */ 0x03030603,
/* 111C */ 0x00000000,
u8 g_ESoulStealOrbAnim[] = {
0x04, 0x02, 0x03, 0x03, 0x03, 0x04, 0x03,
0x05, 0x03, 0x06, 0x03, 0x03, 0x00,
};
// The white flying orbs of energy that Alucard summons as part of the Soul
// Steal spell
void EntitySoulStealOrb(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 *temp_d, temp_e;
s32 temp_a, temp_b;
u16 angle;
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex == -1) {
DestroyEntity(self);
return;
}
InitializeEntity(g_InitializeData0);
g_PrimBuf[primIndex].drawMode = DRAW_HIDE;
self->primIndex = primIndex;
self->animSet = ANIMSET_DRA(0);
self->flags |= FLAG_HAS_PRIMS;
angle = func_8018C160(self, &PLAYER);
temp_a = self->posY.i.hi < 113;
temp_b = temp_a ^ 1;
if (self->posX.i.hi < PLAYER.posX.i.hi) {
temp_b = temp_a;
}
if (temp_b & 0xFFFF) {
self->ext.soulStealOrb.angle = angle - D_801810A0[Random() & 7];
} else {
angle += D_801810A0[Random() & 7];
self->ext.soulStealOrb.angle = angle;
}
self->ext.soulStealOrb.unk80 = 0x400;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
break;
#else
void func_psp_0923AD68(Entity*);
void func_psp_0923B2F0(Entity*);
case 1:
self->ext.soulStealOrb.unk82++;
if (self->ext.soulStealOrb.unk82 == 16) {
self->hitboxState = 1;
}
if (self->hitFlags != 0) {
if (g_Player.unk56 == 0) {
g_Player.unk56 = 1;
g_Player.unk58 = 8;
}
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 2;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 4;
}
self->ext.soulStealOrb.angle = func_8018C1E0(
self->ext.soulStealOrb.unk7E, (u16)self->ext.soulStealOrb.angle,
0xffff & func_8018C160(self, &PLAYER));
UnkEntityFunc0(self->ext.soulStealOrb.angle & 0xFFFF,
self->ext.soulStealOrb.unk80);
MoveEntity(self); // argument pass necessary to match
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(&D_80181110, self);
angle = (float)(u32)self; // !FAKE
prim->tpage = 0x18;
prim->clut = 0x194;
temp_d = &D_801810B0[(u16)((8 * (u16)self->animCurFrame) - 8)];
prim->x0 = prim->x2 = self->posX.i.hi + *(temp_d++);
prim->y0 = prim->y1 = self->posY.i.hi + *(temp_d++);
prim->x1 = prim->x3 = prim->x0 + *(temp_d++);
prim->y2 = prim->y3 = prim->y0 + *(temp_d++);
prim->u0 = prim->u2 = *(temp_d++);
prim->v0 = prim->v1 = *(temp_d++);
prim->u1 = prim->u3 = *(temp_d++);
prim->v2 = prim->v3 = *(temp_d++);
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}
#endif
#include "../entity_soul_steal_orb.h"
#include "../entity_enemy_blood.h"

View File

@ -240,7 +240,7 @@ u8 func_8018C004(s32 x, s32 y) {
u16 func_8018C130(s16 x, s16 y) { return ratan2(y, x); }
#endif
u16 func_8018C160(Entity* a, Entity* b) {
u16 GetAngleBetweenEntities(Entity* a, Entity* b) {
s32 diffX = b->posX.i.hi - a->posX.i.hi;
s32 diffY = b->posY.i.hi - a->posY.i.hi;
return ratan2(diffY, diffX);
@ -254,7 +254,7 @@ u16 func_8018C198(s32 x, s32 y) {
}
#endif
u16 func_8018C1E0(u16 arg0, u16 arg1, u16 arg2) {
u16 GetNormalizedAngle(u16 arg0, u16 arg1, u16 arg2) {
u16 temp_a2;
u16 var_v0;

View File

@ -51,13 +51,9 @@ extern u32 D_80180648;
extern WarpCoord D_8018065C[];
extern u8 g_eRedDoorUV[3][8];
extern u16 g_eUnk14SpawnRots[];
extern u16 D_801810A0[]; // sestren: soul steal random angle offsets?
#if defined(VERSION_PSP)
extern s16 D_801810B0[]; // sestren: soul steal animation frame properties?
#else
extern u16 D_801810B0[];
#endif
extern u32 D_80181110[];
extern u16 g_ESoulStealOrbAngles[];
extern s16 g_ESoulStealOrbSprt[];
extern u8 g_ESoulStealOrbAnim[];
extern s32 D_80193AA0; // rename into move_room?
extern s32 D_80193AA4;

View File

@ -65,7 +65,6 @@ extern s8 c_HeartPrizes[];
extern u16 D_80180DC4[];
extern u16 D_80180DF4[];
extern s32 D_091CF020;
extern u32 D_091CF6DC;
extern u32 D_091CF698;
extern u16 D_psp_09246370[];
@ -78,25 +77,25 @@ void CollectSubweapon(u16 subWeaponIdx) {
g_api.PlaySfx(NA_SE_PL_IT_PICKUP);
if (D_091CF020 == 2) {
if (g_PlayableCharacter == PLAYER_MARIA) {
subWeapon = D_091CF6DC;
} else {
subWeapon = D_091CF698;
}
if (D_091CF020 == 2) {
if (g_PlayableCharacter == PLAYER_MARIA) {
D_091CF6DC = D_psp_09246370[subWeaponIdx - 0xe];
func_90E4C90();
} else {
D_091CF698 = D_psp_092462E0[subWeaponIdx - 0xe];
}
if (D_091CF020 != 2 && subWeapon == D_091CF698 ||
D_091CF020 == 2 && subWeapon == D_091CF6DC) {
if (g_PlayableCharacter != PLAYER_MARIA && subWeapon == D_091CF698 ||
g_PlayableCharacter == PLAYER_MARIA && subWeapon == D_091CF6DC) {
subWeapon = 1;
g_CurrentEntity->unk6D[0] = 0x10;
} else {
if (D_091CF020 == 2) {
if (g_PlayableCharacter == PLAYER_MARIA) {
subWeapon = D_psp_09246388[subWeapon];
} else {
subWeapon = D_psp_092462F8[subWeapon];

View File

@ -0,0 +1,91 @@
#include "../wrp/wrp.h"
void func_psp_0923AD68(Entity* self) {
u16 angle;
Primitive* prim;
s32 primIndex;
s16* spr;
u16 direction;
Entity* pl;
if (D_psp_091CF3DC && D_psp_091CF3A0) {
pl = D_psp_091CF3A0;
} else {
pl = &PLAYER;
}
switch (self->step) {
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex != -1) {
InitializeEntity(g_InitializeData0);
prim = &g_PrimBuf[primIndex];
prim->drawMode = DRAW_HIDE;
self->flags |= FLAG_HAS_PRIMS;
self->primIndex = primIndex;
self->animSet = 0;
angle = GetAngleBetweenEntities(self, pl);
direction = 0;
if (self->posY.i.hi > 0x70) {
direction = 1;
}
if (self->posX.i.hi < PLAYER.posX.i.hi) {
direction ^= 1;
}
if (direction) {
angle -= g_ESoulStealOrbAngles[Random() & 7];
} else {
angle += g_ESoulStealOrbAngles[Random() & 7];
}
self->ext.soulStealOrb.angle = angle;
self->ext.soulStealOrb.unk80 = 0x200;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
} else {
DestroyEntity(self);
}
break;
case 1:
self->ext.soulStealOrb.unk82 += 1;
if (self->ext.soulStealOrb.unk82 == 0x10) {
self->hitboxState = 1;
}
if (abs(pl->posX.i.hi - self->posX.i.hi) < 8 &&
abs(pl->posY.i.hi - self->posY.i.hi) < 8) {
D_psp_091CF3A4 += 4;
DestroyEntity(self);
return;
}
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 4;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 0x10;
}
angle = GetAngleBetweenEntities(self, pl);
self->ext.soulStealOrb.angle = angle = GetNormalizedAngle(
self->ext.soulStealOrb.unk7E, self->ext.soulStealOrb.angle, angle);
UnkEntityFunc0(angle, self->ext.soulStealOrb.unk80);
MoveEntity(self);
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(g_ESoulStealOrbAnim, self);
prim->tpage = 0x18;
prim->clut = 0x194;
angle = self->animCurFrame;
angle = (angle - 1) * 8;
spr = &g_ESoulStealOrbSprt[angle];
prim->x0 = prim->x2 = self->posX.i.hi + *spr++;
prim->y0 = prim->y1 = self->posY.i.hi + *spr++;
prim->x1 = prim->x3 = prim->x0 + *spr++;
prim->y2 = prim->y3 = prim->y0 + *spr++;
prim->u0 = prim->u2 = *spr++;
prim->v0 = prim->v1 = *spr++;
prim->u1 = prim->u3 = *spr++;
prim->v2 = prim->v3 = *spr;
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
break;
}
}

View File

@ -0,0 +1,76 @@
#include "../wrp/wrp.h"
void func_psp_0923B2F0(Entity* self) {
Primitive* prim;
s32 primIndex;
u16 angle;
s16* spr;
u16 direction;
Entity* pl;
pl = g_Entities;
switch (self->step) {
default:
return;
case 0:
primIndex = g_api.AllocPrimitives(PRIM_GT4, 1);
if (primIndex != -1) {
InitializeEntity(g_InitializeData0);
prim = &g_PrimBuf[primIndex];
prim->drawMode = DRAW_HIDE;
self->flags |= FLAG_HAS_PRIMS;
self->primIndex = primIndex;
self->animSet = 0;
self->ext.soulStealOrb.angle = rand() % 0x1000;
self->ext.soulStealOrb.unk80 = 0x200;
self->ext.soulStealOrb.unk7E = 0;
self->hitboxState = 0;
return;
}
break;
case 1:
self->ext.soulStealOrb.unk82 += 1;
if (self->ext.soulStealOrb.unk82 == 0x10) {
self->hitboxState = 1;
}
if (abs(pl->posX.i.hi - self->posX.i.hi) >= 8 ||
abs(pl->posY.i.hi - self->posY.i.hi) >= 8) {
if (self->rotX < 0x100) {
self->rotX = self->rotY += 0x10;
}
if (self->ext.soulStealOrb.unk7E < 0x200) {
self->ext.soulStealOrb.unk7E += 4;
}
if (self->ext.soulStealOrb.unk80 < 0x800) {
self->ext.soulStealOrb.unk80 += 0x10;
}
angle = GetAngleBetweenEntities(self, pl);
self->ext.soulStealOrb.angle = angle = GetNormalizedAngle(
self->ext.soulStealOrb.unk7E, self->ext.soulStealOrb.angle,
angle);
UnkEntityFunc0(angle, self->ext.soulStealOrb.unk80);
MoveEntity(self);
prim = &g_PrimBuf[self->primIndex];
AnimateEntity(g_ESoulStealOrbAnim, self);
prim->tpage = 0x18;
prim->clut = 0x194;
angle = self->animCurFrame;
angle = (angle - 1) * 8;
spr = &g_ESoulStealOrbSprt[angle];
prim->x0 = prim->x2 = self->posX.i.hi + *spr++;
prim->y0 = prim->y1 = self->posY.i.hi + *spr++;
prim->x1 = prim->x3 = prim->x0 + *spr++;
prim->y2 = prim->y3 = prim->y0 + *spr++;
prim->u0 = prim->u2 = *spr++;
prim->v0 = prim->v1 = *spr++;
prim->u1 = prim->u3 = *spr++;
prim->v2 = prim->v3 = *spr;
prim->priority = self->zPriority;
prim->drawMode = DRAW_DEFAULT;
return;
}
break;
}
D_psp_091CF3AC = 0;
DestroyEntity(self);
}