mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
ovl_player_actor: Dawn of a new PR (#1227)
* Rename Player_UpdateBottleHeld * Match func_808497A0 * func_80852290 NON_MATCHING * Match func_8083B3B4 * Params cleanup * Match func_8083FBC4 * sfxId cleanups and others * Fix declaration of functions from D_8085D990 * Change D_8085BE84 to be a 2D array * ARRAY_COUNT_2D * Match func_8085ADA0 * func_808426F0 nonmatching * Match func_80852290 * Match func_808426F0 Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * Add notes to Player_SetDoAction * Name putAwayCountdown * rebase * Match func_80856918 * format * func_8084933C nonmatching small amount of boomerang documentation * Progress on moving data near where it is used * finish moving data * format * cleanup up remaining data * more match * Some minor cleanups * PlayerCsMode enum * func_80851F18 nonmatching * Fix unk_B10 * Purge ExchangeItemID enum * Rename `targetActor` to `talkActor` * Name `targetedActor` * PLAYER_LIMB_BUF_SIZE Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * Change SkelAnime Player functions to take a void pointer for the corresponding buffers * Use PlayerAnimationFrame on Player_DrawImpl * Match func_8082F1AC * Match func_8083D23C * cleanup * Match and clean up func_808373F8 * Match and document func_8083A98C * PLAYER_PARAMS macro and PlayerInitMode enum * Preliminary names for InitMode functions * Match func_8083C8E8 * remove redundant externs * Match func_8084933C * cleanup func_8084933C * Access D_8085BE84 directly instead of using a macro * Match func_8084AC84 * Fix boomearng typo * OK boomerang * cleanup func_8083D168 * untargetedRotY * this->unk_14E = ABS_ALT(var_v1); * GIFIELD macros * sort of a match * Match func_8084C16C Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * Use the same trick to match func_808573A4 * Add note on Deku spinning * Match func_8084D18C * Match func_80850D68 * Improve func_80832660 * Match func_80854EFC Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * Rename unk_B2A to getItemDrawId * Some cleanup * fix merge issues * format * minor anim docs * Match func_808553F4 * Cleanup func_808553F4 * func_8083D860 nonmatching * Match func_8083D860 * Defake func_80859BA8 * () * Add notes to PlayerAnimGroup enum * underwaterTimer Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * some stateFlags cleaning * more stateFlags cleaning * some notes and minor cleanups * more general cleanups * Slightly less fake func_80832CAC * Document some melee weapon damage stuff * Mark lunge storage * Note PCS patch * match * add notes to bss * yeet extra indentation * add reloc as nonmatching to spec * floorSfxOffset * Player_GetFloorSfx * Player_GetFloorSfxByAge * Comments for AnimSfx dunctions * Name some AnimSfx functions * Name AnimSfx stuff * Some PlayerAgeProperties notes * use animflag defines * Player_SpawnExplosive * fix enum and some other minor fixes * Bit more misc. cleanup * Use OoT's version of func_808333CC * Note on quickspin buffer * Final nonmatching, func_80851F18 Co-authored-by: Synray <31429825+Synray@users.noreply.github.com> * RIP player.c * Name Player_StopHorizontalMovement * misc fixes * Actor_DeactivateLens * fixes * typos and tweaks * minor stuff * add names as comments on the animgoup array * Correct some function names and data type * add anim commets to ageproperties * some notes * De-fake func_80840F90 * Defake & clean up func_8085ADA0 * Improve func_80859BA8 * Enums in func_80852B28 * Name some secret-related things * 3 small things * stuff * Player_TalkWithPlayer * SurfaceType_GetFloorType * SurfaceType_GetWallFlags * and more bgcheck stuff * more bss naming * sPlayerControlInput * clean up func_80836F10 a bit * name the parameters of func_80835BF8 * door stuff * remove NON_MATCHING * remove D_8085D2B0 padding * Name some Player_Cutscene_ functions * various cleanups * format * remainingHopsCounter * some cleanups on the struct * Actor_RequestRumble * this->exchangeItemId = PLAYER_AP_NONE; * fix merge stuff * format * PlayerUnkAA5 * Name two cylinder-related functions * BSS * Add MagicConsume's enum, treat lensActive as bool * Update func_808332A0 based on better info * fix merge * fix merge issues * remove redundant comments * Name Player_AddQuake * ANIM_FLAG_UPDATE*_*Y * Format * AT_TYPE_ENEMY * fix merge issues * format * fix uintptr_ts * Rename * Name leftHandMf * fix merge issues * format * exchangeItemId <= PLAYER_IA_MINUS1 * getItemDrawIdPlusOne * currentActorCsIndex * <= PLAYER_IA_MINUS1 * fix merge issues * format * namefixer and bss * fix build * bombs parameters cleanup * bss * Fix building * fix building * Fix building * Fix building and cleanups * Pre-PR cleanup * really... * format * review * stateFlag Mistakes * 268 * 0.1f * z64door.h * fix cutscene stuff * bss * Update include/z64player.h Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Update include/z64player.h Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * reiew * PR Review * collision * review * format and a few stuff i missed * EnBomExplosiveType * weekeventregconvert and eventinfconvert * more review * review * bss * review * re format sGetItemTable * Entangle PlayerMask and PlayerItemAction * a few extra cases i missed * bss * review * EnArrow stuff * ARROW_MAGIC_DEKU_BUBBLE * minor format * merge * fix bss * review * !ARROW_IS_ARROW * review * bool cleanup * fix merge * review * Player_StopCutscene * Player_RequestQuake * quakeIndex * Player_RequestQuakeAndRumble * knobDoor and slidingDoor * bss * fix * review * dog and float --------- Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu> Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>
This commit is contained in:
co-authored by
Elliptic Ellipsis
engineer124
petrie911
petrie911
Synray
parent
20f7e2199a
commit
efc9df3f56
+38
-37
@@ -1374,7 +1374,7 @@ s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
|
||||
|
||||
player->csMode = csMode;
|
||||
player->unk_398 = actor;
|
||||
player->unk_3BA = 0;
|
||||
player->doorBgCamIndex = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1382,7 +1382,7 @@ s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (func_800B724C(play, actor, csMode)) {
|
||||
player->unk_3BA = 1;
|
||||
player->doorBgCamIndex = 1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -3490,49 +3490,50 @@ void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
|
||||
}
|
||||
|
||||
// blinking routine
|
||||
s16 func_800BBAC0(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
s16 func_800BBAC0(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(info->blinkTimer) == 0) {
|
||||
info->blinkTimer = Rand_S16Offset(arg1, arg2);
|
||||
}
|
||||
|
||||
if (arg0[1] - arg3 > 0) {
|
||||
arg0[0] = 0;
|
||||
} else if ((arg0[1] - arg3 >= -1) || (arg0[1] < 2)) {
|
||||
arg0[0] = 1;
|
||||
if (info->blinkTimer - arg3 > 0) {
|
||||
info->eyeTexIndex = 0;
|
||||
} else if ((info->blinkTimer - arg3 >= -1) || (info->blinkTimer < 2)) {
|
||||
info->eyeTexIndex = 1;
|
||||
} else {
|
||||
arg0[0] = 2;
|
||||
info->eyeTexIndex = 2;
|
||||
}
|
||||
|
||||
return arg0[0];
|
||||
return info->eyeTexIndex;
|
||||
}
|
||||
|
||||
// blinking routine
|
||||
s16 func_800BBB74(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
s16 func_800BBB74(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(info->blinkTimer) == 0) {
|
||||
info->blinkTimer = Rand_S16Offset(arg1, arg2);
|
||||
}
|
||||
|
||||
if (arg0[1] - arg3 > 0) {
|
||||
arg0[0] = 0;
|
||||
} else if (arg0[1] - arg3 == 0) {
|
||||
arg0[0] = 1;
|
||||
if (info->blinkTimer - arg3 > 0) {
|
||||
info->eyeTexIndex = 0;
|
||||
} else if (info->blinkTimer - arg3 == 0) {
|
||||
info->eyeTexIndex = 1;
|
||||
} else {
|
||||
arg0[0] = 2;
|
||||
info->eyeTexIndex = 2;
|
||||
}
|
||||
|
||||
return arg0[0];
|
||||
return info->eyeTexIndex;
|
||||
}
|
||||
|
||||
// unused blinking routine
|
||||
s16 func_800BBC20(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
arg0[0]++;
|
||||
if ((arg0[0] % 3) == 0) {
|
||||
arg0[0] = (s32)(Rand_ZeroOne() * arg3) * 3;
|
||||
s16 func_800BBC20(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(info->blinkTimer) == 0) {
|
||||
info->blinkTimer = Rand_S16Offset(arg1, arg2);
|
||||
info->eyeTexIndex++;
|
||||
if ((info->eyeTexIndex % 3) == 0) {
|
||||
info->eyeTexIndex = (s32)(Rand_ZeroOne() * arg3) * 3;
|
||||
}
|
||||
}
|
||||
return arg0[0];
|
||||
|
||||
return info->eyeTexIndex;
|
||||
}
|
||||
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 partParams, Gfx** dList) {
|
||||
@@ -3614,15 +3615,15 @@ void func_800BC154(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 act
|
||||
|
||||
// Damage flags for EnArrow
|
||||
u32 sArrowDmgFlags[] = {
|
||||
DMG_FIRE_ARROW, // ENARROW_0
|
||||
DMG_NORMAL_ARROW, // ENARROW_1
|
||||
DMG_NORMAL_ARROW, // ENARROW_2
|
||||
DMG_FIRE_ARROW, // ENARROW_3
|
||||
DMG_ICE_ARROW, // ENARROW_4
|
||||
DMG_LIGHT_ARROW, // ENARROW_5
|
||||
DMG_DEKU_NUT, // ENARROW_6
|
||||
DMG_DEKU_BUBBLE, // ENARROW_7
|
||||
DMG_DEKU_NUT, // ENARROW_8
|
||||
DMG_FIRE_ARROW, // ARROW_TYPE_NORMAL_LIT
|
||||
DMG_NORMAL_ARROW, // ARROW_TYPE_NORMAL_HORSE
|
||||
DMG_NORMAL_ARROW, // ARROW_TYPE_NORMAL
|
||||
DMG_FIRE_ARROW, // ARROW_TYPE_FIRE
|
||||
DMG_ICE_ARROW, // ARROW_TYPE_ICE
|
||||
DMG_LIGHT_ARROW, // ARROW_TYPE_LIGHT
|
||||
DMG_DEKU_NUT, // ARROW_TYPE_SLINGSHOT
|
||||
DMG_DEKU_BUBBLE, // ARROW_TYPE_DEKU_BUBBLE
|
||||
DMG_DEKU_NUT, // ARROW_TYPE_DEKU_NUT
|
||||
};
|
||||
|
||||
u32 Actor_GetArrowDmgFlags(s32 params) {
|
||||
@@ -4476,7 +4477,7 @@ s32 func_800BE184(PlayState* play, Actor* actor, f32 xzDist, s16 arg3, s16 arg4,
|
||||
s16 phi_v0 = BINANG_SUB(BINANG_ROT180(actor->yawTowardsPlayer), player->actor.shape.rot.y);
|
||||
s16 temp_t0 = actor->yawTowardsPlayer - arg5;
|
||||
|
||||
if ((actor->xzDistToPlayer <= xzDist) && (player->meleeWeaponState != 0)) {
|
||||
if ((actor->xzDistToPlayer <= xzDist) && (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0)) {
|
||||
if ((arg4 >= ABS_ALT(phi_v0)) && (arg3 >= ABS_ALT(temp_t0))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user