I see wiki misses this two opcodes.
I disasmed them to help Synergy Blades understand it better:
////////////////////////////////////////////////////////
// 0x2E WCLS
v0 = [8009d820] = 0;
v0 = v0 & 3;
if (v0 != 0)
{
800CAF7C lui a0, $800a
800CAF80 addiu a0, a0, $0aa8
800CAF84 jal funcbead4 [$800bead4]
800CAF88 ori a1, zero, $0002
}
s0 = window_id; // window id from opcode
if ([8008326C + s0] != FF) // if window already shown
{
v0 = 0;
a0 = s0;
set_state_to_close
a0 = s0;
a1 = 0;
set_display_window
v0 = 1;
}
else
{
v0 = 0;
move script pointer by 2
}
////////////////////////////////////////////////////////
First there are standart check for all opcodes. Don't know what are they check anyway.
[8008326C + s0] - id of entity that called this window. If window is not called this is 0xFF
As I understand - this opcode set given entity to close (set WINDOW STATE = 7)
And open new window with dialog id == 0
Next:
////////////////////////////////////////////////////////
// 0x54 WCLSE
v0 = [8009d820] = 0;
v0 = v0 & 3;
if (v0 != 0)
{
800CAF7C lui a0, $800a
800CAF80 addiu a0, a0, $0aa8
800CAF84 jal funcbead4 [$800bead4]
800CAF88 ori a1, zero, $0002
}
a0 = param1;
set_state_to_close
if (v0 == 0)
{
v0 = 1;
}
else
{
v0 = 0;
move script pointer by 2
}
////////////////////////////////////////////////////////
This simply close window with given id.
And function
////////////////////////////////////////////////////////
set_state_to_close
a0 = window id
get window state
if ((window state - 1 >= D) || (window state - 1 == 0))
{
return 0;
}
if (window state - 1 == {2, 4, 6, 8, 9, B})
{
return 1;
}
if (window state - 1 == {1, 3, 5, 7, A, C})
{
set window state to 7;
return 0;
}
////////////////////////////////////////////////////////
Does this makes sence?