Player Docs: csMode -> csAction (#1433)

* csAction

* more cleanup

* namefixer

* simpleReplace

* fix brackets

* sneak in 2 player typos

* fix merge
This commit is contained in:
engineer124
2023-10-26 17:12:04 +11:00
committed by GitHub
parent 71fae65062
commit 7176ed4299
67 changed files with 802 additions and 803 deletions
+9 -9
View File
@@ -1393,31 +1393,31 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
s32 func_800B7200(Player* player) {
return (player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) ||
(player->csMode != PLAYER_CSMODE_NONE);
(player->csAction != PLAYER_CSACTION_NONE);
}
void Actor_SpawnHorse(PlayState* play, Player* player) {
Horse_Spawn(play, player);
}
s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
s32 func_800B724C(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
if ((player->csMode == PLAYER_CSMODE_5) ||
((csMode == PLAYER_CSMODE_END) && (player->csMode == PLAYER_CSMODE_NONE))) {
if ((player->csAction == PLAYER_CSACTION_5) ||
((csAction == PLAYER_CSACTION_END) && (player->csAction == PLAYER_CSACTION_NONE))) {
return false;
}
player->csMode = csMode;
player->csAction = csAction;
player->csActor = actor;
player->unk_3BA = false;
return true;
}
s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode) {
s32 func_800B7298(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
if (func_800B724C(play, actor, csMode)) {
if (func_800B724C(play, actor, csAction)) {
player->unk_3BA = true;
return true;
}
@@ -1939,8 +1939,8 @@ s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState) {
* - Positive values (`PLAYER_IA_NONE < exchangeItemAction < PLAYER_IA_MAX`):
* Offers the ability to initiate the conversation with an item from the player.
* Not all positive values are implemented properly for this to work.
* Working ones are PLAYER_IA_PICTO_BOX and PLAYER_IA_BOTTLE_MIN <= exchangeItemAction < PLAYER_IA_MASK_MIN
* Note: While PLAYER_IA_BEANS works, it is special cased to just plant the bean with no talking.
* Working ones are PLAYER_IA_PICTOGRAPH_BOX and PLAYER_IA_BOTTLE_MIN <= exchangeItemAction < PLAYER_IA_MASK_MIN
* Note: While PLAYER_IA_MAGIC_BEANS works, it is special cased to just plant the bean with no talking.
* - `PLAYER_IA_NONE`:
* Allows the player to speak to or check the actor (by pressing A).
* - `PLAYER_IA_MINUS1`:
+6 -6
View File
@@ -8,7 +8,7 @@ struct CutsceneCamera sCutsceneCameraInfo;
u16 sCueTypeList[10];
u8 D_801F4DDC;
static s16 sBssPad;
u8 gDisablePlayerCsModeStartPos;
u8 gDisablePlayerCsActionStartPos;
s16 gDungeonBossWarpSceneId;
#include "prevent_bss_reordering.h"
@@ -54,7 +54,7 @@ void Cutscene_InitContext(PlayState* play, CutsceneContext* csCtx) {
sCueTypeList[i] = 0;
}
gDisablePlayerCsModeStartPos = false;
gDisablePlayerCsActionStartPos = false;
Audio_SetCutsceneFlag(false);
}
@@ -346,12 +346,12 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
gSaveContext.save.playerForm = sCutsceneStoredPlayerForm;
break;
case CS_MISC_DISABLE_PLAYER_CSMODE_START_POS:
gDisablePlayerCsModeStartPos = true;
case CS_MISC_DISABLE_PLAYER_CSACTION_START_POS:
gDisablePlayerCsActionStartPos = true;
break;
case CS_MISC_ENABLE_PLAYER_CSMODE_START_POS:
gDisablePlayerCsModeStartPos = false;
case CS_MISC_ENABLE_PLAYER_CSACTION_START_POS:
gDisablePlayerCsActionStartPos = false;
break;
case CS_MISC_SAVE_ENTER_CLOCK_TOWN:
+5 -5
View File
@@ -213,7 +213,7 @@ void CutsceneManager_End(void) {
sCutsceneMgr.targetActor->flags &= ~ACTOR_FLAG_100000;
// fallthrough
case CS_START_1:
func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSMODE_END);
func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSACTION_END);
sCutsceneMgr.startMethod = CS_START_0;
break;
@@ -338,13 +338,13 @@ s16 CutsceneManager_IsNext(s16 csId) {
}
/**
* Start an actor cutscene, activate Player Cutscene Mode "Wait"
* Start an actor cutscene, activate Player Cutscene Action "Wait"
*/
s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) {
s16 startCsId = CutsceneManager_Start(csId, actor);
if (startCsId >= 0) {
func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSMODE_WAIT);
func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSACTION_WAIT);
if (sCutsceneMgr.length == 0) {
CutsceneManager_Stop(sCutsceneMgr.csId);
}
@@ -354,13 +354,13 @@ s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) {
}
/**
* Start an actor cutscene, activate Player Cutscene Mode "Wait", turn on ACTOR_FLAG_100000
* Start an actor cutscene, activate Player Cutscene Action "Wait", turn on ACTOR_FLAG_100000
*/
s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor) {
s16 startCsId = CutsceneManager_Start(csId, actor);
if (startCsId >= 0) {
func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSMODE_WAIT);
func_800B7298(sCutsceneMgr.play, NULL, PLAYER_CSACTION_WAIT);
if (sCutsceneMgr.length == 0) {
CutsceneManager_Stop(sCutsceneMgr.csId);
}
+3 -3
View File
@@ -495,7 +495,7 @@ void func_80123140(PlayState* play, Player* player) {
s32 Player_InBlockingCsMode(PlayState* play, Player* player) {
return (player->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_200 | PLAYER_STATE1_20000000)) ||
(player->csMode != PLAYER_CSMODE_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
(player->csAction != PLAYER_CSACTION_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) ||
(play->transitionMode != TRANS_MODE_OFF) || (player->stateFlags1 & PLAYER_STATE1_1) ||
(player->stateFlags3 & PLAYER_STATE3_80) || (play->actorCtx.unk268 != 0);
}
@@ -1297,9 +1297,9 @@ void func_80123C58(Player* player) {
}
void Player_SetEquipmentData(PlayState* play, Player* player) {
if (player->csMode != PLAYER_CSMODE_134) {
if (player->csAction != PLAYER_CSACTION_134) {
player->currentShield = GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD);
if ((player->transformation != PLAYER_FORM_ZORA) || (((player->currentBoots != PLAYER_BOOTS_ZORA_LAND)) &&
if ((player->transformation != PLAYER_FORM_ZORA) || ((player->currentBoots != PLAYER_BOOTS_ZORA_LAND) &&
(player->currentBoots != PLAYER_BOOTS_ZORA_UNDERWATER))) {
player->currentBoots = D_801BFF90[player->transformation];
}