mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Added queues for doors & chests
This commit is contained in:
parent
3eaafe3234
commit
b09e34cd75
3 changed files with 30 additions and 1 deletions
|
@ -1133,7 +1133,8 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) {
|
||||||
default:
|
default:
|
||||||
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
|
if (msgCtx->msgMode == MSGMODE_TEXT_DISPLAYING && i + 1 == msgCtx->textDrawPos &&
|
||||||
msgCtx->textDelayTimer == msgCtx->textDelay) {
|
msgCtx->textDelayTimer == msgCtx->textDelay) {
|
||||||
Audio_PlaySoundGeneral(0, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
|
&D_801333E8);
|
||||||
}
|
}
|
||||||
Message_DrawTextChar(globalCtx, &font->charTexBuf[charTexIdx], &gfx);
|
Message_DrawTextChar(globalCtx, &font->charTexBuf[charTexIdx], &gfx);
|
||||||
charTexIdx += FONT_CHAR_TEX_SIZE;
|
charTexIdx += FONT_CHAR_TEX_SIZE;
|
||||||
|
|
|
@ -9555,6 +9555,8 @@ static f32 D_80854784[] = { 120.0f, 240.0f, 360.0f };
|
||||||
static u8 sDiveDoActions[] = { DO_ACTION_1, DO_ACTION_2, DO_ACTION_3, DO_ACTION_4,
|
static u8 sDiveDoActions[] = { DO_ACTION_1, DO_ACTION_2, DO_ACTION_3, DO_ACTION_4,
|
||||||
DO_ACTION_5, DO_ACTION_6, DO_ACTION_7, DO_ACTION_8 };
|
DO_ACTION_5, DO_ACTION_6, DO_ACTION_7, DO_ACTION_8 };
|
||||||
|
|
||||||
|
int32_t lastAction;
|
||||||
|
|
||||||
void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) && (this->actor.category == ACTORCAT_PLAYER)) {
|
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_NONE) && (this->actor.category == ACTORCAT_PLAYER)) {
|
||||||
Actor* heldActor = this->heldActor;
|
Actor* heldActor = this->heldActor;
|
||||||
|
@ -9578,6 +9580,12 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||||
(!(this->stateFlags1 & PLAYER_STATE1_11) ||
|
(!(this->stateFlags1 & PLAYER_STATE1_11) ||
|
||||||
((heldActor != NULL) && (heldActor->id == ACTOR_EN_RU1)))) {
|
((heldActor != NULL) && (heldActor->id == ACTOR_EN_RU1)))) {
|
||||||
doAction = DO_ACTION_OPEN;
|
doAction = DO_ACTION_OPEN;
|
||||||
|
|
||||||
|
if (lastAction != doAction) {
|
||||||
|
Audio_PlaySoundGeneral(NA_SE_VO_NA_HELLO_1, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
|
&D_801333E8);
|
||||||
|
lastAction = doAction;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ((!(this->stateFlags1 & PLAYER_STATE1_11) || (heldActor == NULL)) &&
|
else if ((!(this->stateFlags1 & PLAYER_STATE1_11) || (heldActor == NULL)) &&
|
||||||
(interactRangeActor != NULL) &&
|
(interactRangeActor != NULL) &&
|
||||||
|
@ -9585,6 +9593,11 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||||
((this->getItemId < 0) && !(this->stateFlags1 & PLAYER_STATE1_27)))) {
|
((this->getItemId < 0) && !(this->stateFlags1 & PLAYER_STATE1_27)))) {
|
||||||
if (this->getItemId < 0) {
|
if (this->getItemId < 0) {
|
||||||
doAction = DO_ACTION_OPEN;
|
doAction = DO_ACTION_OPEN;
|
||||||
|
if (lastAction != doAction) {
|
||||||
|
Audio_PlaySoundGeneral(NA_SE_VO_NA_HELLO_1, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
|
&D_801333E8);
|
||||||
|
lastAction = doAction;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ((interactRangeActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT) {
|
else if ((interactRangeActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT) {
|
||||||
doAction = DO_ACTION_DROP;
|
doAction = DO_ACTION_DROP;
|
||||||
|
@ -9605,6 +9618,11 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||||
if ((this->stateFlags2 & PLAYER_STATE2_1) && (this->targetActor != NULL)) {
|
if ((this->stateFlags2 & PLAYER_STATE2_1) && (this->targetActor != NULL)) {
|
||||||
if (this->targetActor->category == ACTORCAT_NPC) {
|
if (this->targetActor->category == ACTORCAT_NPC) {
|
||||||
doAction = DO_ACTION_SPEAK;
|
doAction = DO_ACTION_SPEAK;
|
||||||
|
if (lastAction != doAction) {
|
||||||
|
Audio_PlaySoundGeneral(NA_SE_VO_NA_HELLO_0, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
|
&D_801333E8);
|
||||||
|
lastAction = doAction;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
doAction = DO_ACTION_CHECK;
|
doAction = DO_ACTION_CHECK;
|
||||||
|
@ -9628,6 +9646,11 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||||
}
|
}
|
||||||
else if (this->stateFlags2 & PLAYER_STATE2_16) {
|
else if (this->stateFlags2 & PLAYER_STATE2_16) {
|
||||||
doAction = DO_ACTION_ENTER;
|
doAction = DO_ACTION_ENTER;
|
||||||
|
if (lastAction != doAction) {
|
||||||
|
Audio_PlaySoundGeneral(NA_SE_VO_NA_HELLO_1, &D_801333D4, 4, &D_801333E0, &D_801333E0,
|
||||||
|
&D_801333E8);
|
||||||
|
lastAction = doAction;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ((this->stateFlags1 & PLAYER_STATE1_11) && (this->getItemId == GI_NONE) &&
|
else if ((this->stateFlags1 & PLAYER_STATE1_11) && (this->getItemId == GI_NONE) &&
|
||||||
(heldActor != NULL)) {
|
(heldActor != NULL)) {
|
||||||
|
@ -9695,6 +9718,10 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
||||||
else {
|
else {
|
||||||
Interface_SetNaviCall(globalCtx, 0x1F);
|
Interface_SetNaviCall(globalCtx, 0x1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (doAction == DO_ACTION_NONE) {
|
||||||
|
lastAction = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,7 @@ void FileChoose_FinishFadeIn(GameState* thisx) {
|
||||||
this->controlsAlpha = 255;
|
this->controlsAlpha = 255;
|
||||||
this->windowAlpha = 200;
|
this->windowAlpha = 200;
|
||||||
this->configMode = CM_MAIN_MENU;
|
this->configMode = CM_MAIN_MENU;
|
||||||
|
Audio_PlaySoundGeneral(NA_SE_VO_NA_HELLO_3, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue