Decompile func0f09b828

This commit is contained in:
Ryan Dwyer
2021-03-07 15:12:42 +10:00
parent 057e50feea
commit 15e775f88f
7 changed files with 1459 additions and 379 deletions
+1 -5
View File
@@ -2744,11 +2744,7 @@ void func0f0211a8(f32 arg0)
for (i = 0; i < g_NumChrSlots; i++) {
if (g_ChrSlots[i].model) {
#if PAL
modelSetAnimPlaySpeed(g_ChrSlots[i].model, var80062968 * 1.2f, 600);
#else
modelSetAnimPlaySpeed(g_ChrSlots[i].model, var80062968, 600);
#endif
modelSetAnimPlaySpeed(g_ChrSlots[i].model, FRAMESTOTIME60(var80062968), 600);
}
}
}
+4 -21
View File
@@ -5994,11 +5994,7 @@ bool aiSetLights(void)
roomSetLightsOn(roomnum, true);
break;
default:
#if VERSION >= VERSION_PAL_FINAL
roomSetLighting(roomnum, cmd[4], cmd[5], cmd[6], cmd[7] * 50 / 60);
#else
roomSetLighting(roomnum, cmd[4], cmd[5], cmd[6], cmd[7]);
#endif
roomSetLighting(roomnum, cmd[4], cmd[5], cmd[6], TIME60TOFRAMES(cmd[7]));
}
}
@@ -9735,19 +9731,11 @@ bool aiChrAdjustMotionBlur(void)
struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]);
if (chr) {
#if PAL
if (cmd[4] == 0) {
chr->blurdrugamount -= cmd[3] * 50 / 60;
chr->blurdrugamount -= TIME60TOFRAMES(cmd[3]);
} else {
chr->blurdrugamount += cmd[3] * 50 / 60;
chr->blurdrugamount += TIME60TOFRAMES(cmd[3]);
}
#else
if (cmd[4] == 0) {
chr->blurdrugamount -= cmd[3];
} else {
chr->blurdrugamount += cmd[3];
}
#endif
}
g_Vars.aioffset += 5;
@@ -10088,12 +10076,7 @@ bool ai0184(void)
bool aiIfSoundTimer(void)
{
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
#if PAL
s32 value = (cmd[3] | (cmd[2] << 8)) * 50 / 60;
#else
s32 value = cmd[3] | (cmd[2] << 8);
#endif
s32 value = TIME60TOFRAMES(cmd[3] | (cmd[2] << 8));
if ((g_Vars.chrdata->soundtimer > value && cmd[4] == 0) ||
(g_Vars.chrdata->soundtimer < value && cmd[4] == 1)) {
+1 -5
View File
@@ -2745,11 +2745,7 @@ void audioPlayFromProp2(s32 channelnum, s32 soundnum, s16 padnum, struct prop *p
}
if (a1) {
#if PAL
channel->unk1c = arg4 * 50 / 60;
#else
channel->unk1c = arg4;
#endif
channel->unk1c = TIME60TOFRAMES(arg4);
}
if (padnum != -1) {
+1440 -343
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -35,6 +35,14 @@
(p[1] - g_Vars.currentplayer->eraserpos.f[1]) * (p[1] - g_Vars.currentplayer->eraserpos.f[1]) + \
(p[2] - g_Vars.currentplayer->eraserpos.f[2]) * (p[2] - g_Vars.currentplayer->eraserpos.f[2]))
#if PAL
#define TIME60TOFRAMES(val) (val * 50 / 60)
#define FRAMESTOTIME60(val) (val * 1.2f)
#else
#define TIME60TOFRAMES(val) (val)
#define FRAMESTOTIME60(val) (val)
#endif
// Macro to convert an ASCII character to N64 font code.
// N64 font code uses 0x0f for space, 0x10-0x19 for 0-9 and 0x1a-0x33 for A-Z.
#define N64CHAR(c) (c == ' ' ? 0x0f : (c >= 'A' && c <= 'Z' ? c - 0x27 : c - 0x20))
+1 -1
View File
@@ -38,7 +38,7 @@ u32 func0f09afe4(void);
u32 func0f09b260(void);
s32 weaponGetMinClipQty(s32 weaponnum, s32 funcnum);
u32 func0f09b500(void);
u32 func0f09b828(void);
bool func0f09b828(struct hand *hand);
s32 func0f09b8e0(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
s32 func0f09bc2c(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate);
u32 func0f09bd58(void);
+4 -4
View File
@@ -2002,10 +2002,10 @@ struct hand {
/*0x0c34*/ u32 unk0c34;
/*0x0c38*/ u32 unk0c38;
/*0x0c3c*/ u32 unk0c3c;
/*0x0c40*/ u32 unk0c40;
/*0x0c40*/ s32 unk0c40;
/*0x0c44*/ u32 unk0c44;
/*0x0c48*/ u32 unk0c48;
/*0x0c4c*/ u32 unk0c4c;
/*0x0c4c*/ s32 unk0c4c;
/*0x0c50*/ u32 unk0c50;
/*0x0c54*/ u32 unk0c54;
/*0x0c58*/ u32 unk0c58;
@@ -2883,8 +2883,8 @@ struct weaponfunc_close {
struct weaponfunc_special {
struct weaponfunc base;
/*0x14*/ u32 specialfunc;
/*0x18*/ u32 unk18;
/*0x14*/ s32 specialfunc;
/*0x18*/ s32 unk18;
/*0x1c*/ u32 unk1c;
};