Skip to content

Commit

Permalink
Fix GuiImpl::RunMsg to match
Browse files Browse the repository at this point in the history
  • Loading branch information
KSSBrawl committed Nov 13, 2024
1 parent 08ebd8b commit 3bb654a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/GuiImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ ZunResult GuiImpl::RunMsg()
return ZUN_ERROR;
case MSG_OPCODE_PORTRAITANMSCRIPT:
args = &this->msg.currentInstr->args;
g_AnmManager->SetAndExecuteScriptIdx(&this->msg.portraits[args->portraitAnmScript.portraitIdx],
ANM_SCRIPT_FACE_START + args->portraitAnmScript.anmScriptIdx +
(args->portraitAnmScript.portraitIdx == 0 ? 0 : 2));
g_AnmManager->SetAndExecuteScriptIdx(
&this->msg.portraits[args->portraitAnmScript.portraitIdx],
args->portraitAnmScript.anmScriptIdx +
(args->portraitAnmScript.portraitIdx == 0 ? ANM_SCRIPT_FACE_START : ANM_SCRIPT_FACE_START + 2));
break;
case MSG_OPCODE_PORTRAITANMSPRITE:
args = &this->msg.currentInstr->args;
g_AnmManager->SetActiveSprite(&this->msg.portraits[args->portraitAnmScript.portraitIdx],
ANM_SCRIPT_FACE_START + args->portraitAnmScript.anmScriptIdx +
(args->portraitAnmScript.portraitIdx == 0 ? 0 : 8));
g_AnmManager->SetActiveSprite(
&this->msg.portraits[args->portraitAnmScript.portraitIdx],
args->portraitAnmScript.anmScriptIdx +
(args->portraitAnmScript.portraitIdx == 0 ? ANM_SCRIPT_FACE_START : ANM_SCRIPT_FACE_START + 8));
break;
case MSG_OPCODE_TEXTDIALOGUE:
args = &this->msg.currentInstr->args;
Expand Down

0 comments on commit 3bb654a

Please sign in to comment.