void SaveRestoreVerbs()
{
int a, b, c, slot, slot2;
_opCode = ReadByte();
a = GetVarOrDirectByte(OpCodeParameter.Param1);
b = GetVarOrDirectByte(OpCodeParameter.Param2);
c = GetVarOrDirectByte(OpCodeParameter.Param3);
switch (_opCode)
{
case 1: // SO_SAVE_VERBS
while (a <= b)
{
slot = GetVerbSlot(a, 0);
if (slot != 0 && Verbs[slot].SaveId == 0)
{
Verbs[slot].SaveId = (ushort)c;
DrawVerb(slot, 0);
VerbMouseOver(0);
}
a++;
}
break;
case 2: // SO_RESTORE_VERBS
while (a <= b)
{
slot = GetVerbSlot(a, c);
if (slot != 0)
{
slot2 = GetVerbSlot(a, 0);
if (slot2 != 0)
KillVerb(slot2);
slot = GetVerbSlot(a, c);
Verbs[slot].SaveId = 0;
DrawVerb(slot, 0);
VerbMouseOver(0);
}
a++;
}
break;
case 3: // SO_DELETE_VERBS
while (a <= b)
{
slot = GetVerbSlot(a, c);
if (slot != 0)
KillVerb(slot);
a++;
}
break;
default:
throw new NotImplementedException();
}
}