Document SetPlayerStep function

This commit is contained in:
Luciano Ciccariello 2023-05-17 19:09:39 +01:00
parent 22926e3dca
commit 419d098139
11 changed files with 61 additions and 35 deletions

View File

@ -355,7 +355,7 @@ func_8010C36C = 0x8010C0B0;
func_8010C9F4 = 0x8010C738;
func_8010D010 = 0x8010CD54;
func_8010D2C8 = 0x8010D00C;
func_8010D584 = 0x8010D2C8;
SetPlayerStep = 0x8010D2C8;
func_8010D59C = 0x8010D2E0;
func_8010D800 = 0x8010D544;
func_8010DA2C = 0x8010D770;

View File

@ -947,6 +947,7 @@ CopyStageOvlCallback = 0x801074BC;
CopyRicOvlCallback = 0x80107614;
CopySupportOvlCallback = 0x80107750;
UpdateEntityAlucard = 0x8010A5BC;
SetPlayerStep = 0x8010D584;
UpdateAnim = 0x8010DDA0;
AccelerateX = 0x8010E390;
GetFreeDraEntity = 0x8011879C;

View File

@ -29,4 +29,5 @@ D_80155238 = 0x80155238;
D_8015523C = 0x8015523C;
D_80155240 = 0x80155240;
UpdateEntityRichter = 0x80157BFC;
SetPlayerStep = 0x8015C908;
func_8017328C = 0x8017328C;

View File

@ -140,7 +140,7 @@ INCLUDE_ASM("asm/us/dra/nonmatchings/692E8", func_8010D010);
INCLUDE_ASM("asm/us/dra/nonmatchings/692E8", func_8010D2C8);
void func_8010D584(s16 step) {
void SetPlayerStep(PlayerSteps step) {
PLAYER.step = step;
PLAYER.step_s = 0;
}
@ -421,7 +421,7 @@ void func_8010E4D0(void) {
func_8010DA48(0xC7);
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(6);
SetPlayerStep(6);
func_80111CC0();
PlaySfx(NA_SE_VO_AL_WHAT);
return;
@ -439,7 +439,7 @@ void func_8010E6AC(s32 arg0) {
condition = ((g_Player.pl_vram_flag & 0x20) != condition);
AccelerateX(0x18000);
PLAYER.accelerationY = 0;
func_8010D584(1);
SetPlayerStep(1);
if (arg0 != 0) {
if (PLAYER.ext.generic.unkAC != 0xD) {
@ -464,7 +464,7 @@ void func_8010E6AC(s32 arg0) {
}
void func_8010E7AC(void) {
func_8010D584(3);
SetPlayerStep(3);
if (g_Player.unk50 != 1) {
func_8010DA48(0x1C);
@ -498,7 +498,7 @@ void func_8010E83C(s32 arg0) {
}
PLAYER.accelerationY = 0xFFFB0000 | 0x2000;
func_8010D584(4);
SetPlayerStep(4);
if (g_Player.unk50 == 1) {
g_Player.unk44 |= 0x10;
@ -535,7 +535,7 @@ void func_8010E9A4(void) {
}
func_8011AAFC(g_CurrentEntity, 2, 0);
func_8010D584(8);
SetPlayerStep(8);
PLAYER.accelerationY = -0xC0000;
func_8010DA48(0x21);
g_Player.unk4A = 0;
@ -588,7 +588,7 @@ INCLUDE_ASM("asm/us/dra/nonmatchings/692E8", func_8010EC8C);
void func_8010ED54(u8 arg0) {
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0xF);
SetPlayerStep(0xF);
func_8010DA48(arg0);
func_8011AAFC(g_CurrentEntity, 0x14003D, 0);
g_Player.unk48 = 0;
@ -604,7 +604,7 @@ void func_8010FAF4(void) {
void func_8010FB24(void) {
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0x22);
SetPlayerStep(0x22);
func_8010E168(1, 0x10);
func_8010E3E0();
}
@ -612,7 +612,7 @@ void func_8010FB24(void) {
void func_8010FB68(void) { // Related to Dark Methamorphosis
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0x20);
SetPlayerStep(0x20);
func_8010E3E0();
func_8010DA48(0xBA);
PlaySfx(NA_SE_VO_AL_DARK_METAMORPHOSIS);
@ -626,7 +626,7 @@ void func_8010FB68(void) { // Related to Dark Methamorphosis
void func_8010FBF4(void) { // Related to Soul Steal spell
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0x25);
SetPlayerStep(0x25);
func_8010E3E0();
func_8010DA48(0xDA);
PlaySfx(NA_SE_VO_AL_SOUL_STEAL);
@ -637,7 +637,7 @@ void func_8010FBF4(void) { // Related to Soul Steal spell
void func_8010FC50(void) {
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0x21);
SetPlayerStep(0x21);
func_8010E3E0();
func_8011AAFC(g_CurrentEntity, 0x75, 0);
func_8010DA48(0xF0);
@ -648,7 +648,7 @@ void func_8010FC50(void) {
void func_8010FCB8(void) {
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0x23);
SetPlayerStep(0x23);
func_8010E3E0();
func_8011AAFC(g_CurrentEntity, 0x10075, 0);
func_8010DA48(0xF1);
@ -659,7 +659,7 @@ void func_8010FCB8(void) {
void func_8010FD24(void) {
PLAYER.accelerationY = 0;
PLAYER.accelerationX = 0;
func_8010D584(0x27);
SetPlayerStep(0x27);
func_8010E3E0();
func_8010DA48(0xF1);
func_8011AAFC(g_CurrentEntity, 0x170028, 0);

View File

@ -106,7 +106,7 @@ s32 func_80113D7C(s16 arg0) {
temp_s1 = PLAYER.step_s;
sp10[0] = 0;
sp10[1] = 0;
func_8010D584(0x10);
SetPlayerStep(0x10);
func_80115394(&sp10[0], step, temp_s1);
return -1;
}

View File

@ -62,7 +62,7 @@ bool func_80116838(void) {
if ((g_Entities->step_s != 0) &&
((D_8009744C != 0) || (g_Player.D_80072EEC & 8) ||
(func_800FEEA4(0, 1) < 0))) {
func_8010D584(9);
SetPlayerStep(9);
func_8010DA48(0xCA);
D_800AFDA6 = 6;
g_Entities->palette = 0x810D;
@ -1366,7 +1366,7 @@ bool func_8012C88C(void) {
}
if (D_8009744C != 0 && func_800FE3A8(0xE) == 0 || g_Player.D_80072EEC & 2 ||
func_800FEEA4(2, 1) < 0) {
func_8010D584(25);
SetPlayerStep(25);
func_8010DA48(0xCA);
D_800AFDA6 = 1;
PLAYER.palette = 0x810D;

View File

@ -97,6 +97,26 @@ typedef enum {
CdCallback_Vh, // func_80107EF0
} CdCallbacks;
typedef enum {
Stand,
Walk,
Crouch,
Unk3,
Jump,
MorphBat,
Unk_6,
MorphMist,
Hit = 10,
StatusStone = 11,
KillWater = 13,
SpellDarkMetamorphosis = 32,
SpellSummonSpirit,
SpellHellfire,
SpellTetraSpirit,
Spell36,
SpellSoulSteal,
} PlayerSteps;
// Info necessary to load a file from the Cd in func_80108448
typedef struct {
s32 loc; // lba offset, might be a s32
@ -648,7 +668,7 @@ void func_80107360(POLY_GT4* poly, s32 x, s32 y, s32 width, s32 height, s32 u,
void func_801073C0(void);
void func_801092E8(s32);
void SetPolyRect(POLY_GT4* poly, s32 x, s32 y, s32 width, s32 height);
void func_8010D584(s16 arg0);
void SetPlayerStep(PlayerSteps step);
void UpdateAnim(FrameProperty* frameProps, s32*);
void func_8010DFF0(s32, s32);
void func_8010E0A8(void);

View File

@ -297,7 +297,7 @@ void func_8015AFE0(void) {
}
} else if (g_Player.unk4E != 0) {
g_Player.unk46 = 0;
func_8015C908(4);
SetPlayerStep(4);
func_8015C920(&D_80155528);
g_Player.unk44 = 0;
}

View File

@ -57,7 +57,7 @@ void func_8015C2A8(void) {
if (loadAnim) {
func_8015C920(&D_80155534);
func_8015C908(4);
SetPlayerStep(4);
}
}
@ -65,7 +65,7 @@ INCLUDE_ASM("asm/us/ric/nonmatchings/202A8", func_8015C4AC);
INCLUDE_ASM("asm/us/ric/nonmatchings/202A8", func_8015C6D4);
void func_8015C908(s32 step) {
void SetPlayerStep(PlayerSteps step) {
PLAYER.step = step;
PLAYER.step_s = 0;
}
}

View File

@ -118,7 +118,7 @@ void func_8015CC28(void) {
entity->ext.generic.unk7C.U8.unk0 = 0;
}
void func_8015CC50() { func_8015C908(0xF0); }
void func_8015CC50() { SetPlayerStep(0xF0); }
void func_8015CC70(s16 arg0) {
PLAYER.step_s = arg0;
@ -133,7 +133,7 @@ void func_8015CC70(s16 arg0) {
}
void func_8015CCC8(s32 arg0, s32 accelerationX) {
func_8015C908(2);
SetPlayerStep(2);
func_8015C920(&D_801554C0);
PLAYER.accelerationX = accelerationX;
PLAYER.accelerationY = 0;
@ -155,7 +155,7 @@ void func_8015CD98(s32 accelerationX) {
PLAYER.accelerationX = accelerationX;
PLAYER.accelerationY = 0;
g_Player.unk44 = 0;
func_8015C908(0);
SetPlayerStep(0);
func_8015C920(&D_801553BC);
}
@ -169,7 +169,7 @@ void func_8015CDE0(s32 arg0) {
g_Player.D_80072F10 = 0xC;
g_Player.D_80072F02 = 0xC;
g_Player.unk44 = 0;
func_8015C908(1);
SetPlayerStep(1);
func_8015C920(&D_80155488);
func_8015CA84(0x14000);
PLAYER.accelerationY = 0;
@ -180,7 +180,7 @@ void func_8015CE7C(void) {
func_8015CDE0(0);
} else {
g_Player.unk44 = 0;
func_8015C908(0x19);
SetPlayerStep(0x19);
func_8015C920(&D_80155670);
func_8015CA84(0x24000);
g_Player.D_80072F16 = 0x28;
@ -208,7 +208,7 @@ block_6:
block_7:
g_Player.unk44 = 0x10;
}
func_8015C908(3);
SetPlayerStep(3);
PLAYER.accelerationY = 0x20000;
g_Player.D_80072F0A = 8;
g_Player.D_80072F0C = 8;
@ -248,7 +248,7 @@ void func_8015D020(void) {
g_Player.unk44 = temp;
}
func_8015C908(4);
SetPlayerStep(4);
if (D_80154570 != 0) {
PLAYER.accelerationY = -0x4B000;
@ -258,7 +258,7 @@ void func_8015D020(void) {
}
void func_8015D120(void) {
func_8015C908(8);
SetPlayerStep(8);
PLAYER.accelerationX = 0;
func_8015CA84(0x14000);
PLAYER.accelerationY = -0x78000;
@ -282,11 +282,11 @@ INCLUDE_ASM("asm/us/ric/nonmatchings/20920", func_8015D3CC);
INCLUDE_ASM("asm/us/ric/nonmatchings/20920", func_8015D678);
void func_8015D9B4() { func_8015C908(22); }
void func_8015D9B4() { SetPlayerStep(22); }
void func_8015D9D4(void) {
func_8015C9CC();
func_8015C908(0x17);
SetPlayerStep(0x17);
func_8015C920(&D_80155750);
g_CurrentEntity->accelerationY = 0;
func_8015CA84(0x58000);
@ -298,7 +298,7 @@ void func_8015D9D4(void) {
void func_8015DA60(void) {
g_Player.unk44 = 0;
func_8015C908(0x1A);
SetPlayerStep(0x1A);
func_8015C920(&D_8015577C);
g_CurrentEntity->accelerationY = -0x20000;
func_8015CA84(0x58000);
@ -310,7 +310,7 @@ void func_8015DA60(void) {
}
void func_8015DB04(void) {
func_8015C908(0x18);
SetPlayerStep(0x18);
func_8015C920(&D_801557D8);
g_CurrentEntity->accelerationY = 0;
func_8015CA84(0x58000);

View File

@ -4,11 +4,15 @@
#include "objects.h"
#include "sfx.h"
typedef enum {
Dummy,
} PlayerSteps;
extern void func_80159C04(void);
extern void func_80156C60(Entity* entity);
extern void func_8015BB80(void);
extern void func_8015C178(void);
extern void func_8015C908(s32 step);
extern void SetPlayerStep(PlayerSteps step);
void func_8015C920(AnimationFrame* unk0);
extern void func_8015C93C(s32 speed);
extern s32 func_8015C9CC(void);