Primitive 0x0007 - Refresh

This primitive refreshes one of several attributes for the choosen target.


Use

There is no SimPe wizard for this instruction, so the following table details the meaning of each of the operands.

Note: The page at MTS does not agree with the code in SimPe.

OperandDescriptionOperand Values
0 & 1 Target 0x0000: Me
0x0001: Stack Object
2 & 3 Attribute 0x0000: graphic
0x0001: lighting contribution
0x0002: room score contribution
4 thru 15 Unused

See Also


SimPe Code

// Decompiled with JetBrains decompiler
// Type: pjse.BhavNameWizards.WizPrim0x0007
// Assembly: pjse.coder.plugin, Version=4.0.3349.37576, Culture=neutral, PublicKeyToken=null

using SimPe.PackedFiles.Wrapper;
using System;
using whse.PrimitiveWizards;

namespace pjse.BhavNameWizards
{
  public class WizPrim0x0007 : BhavWizPrim
  {
    public WizPrim0x0007(Instruction i)
      : base(i)
    {
    }

    public override ABhavOperandWiz Wizard() => (ABhavOperandWiz) new BhavOperandWiz0x0007(this.instruction);

    protected override string Operands(bool lng)
    {
      byte[] numArray = new byte[16];
      ((byte[]) this.instruction.Operands).CopyTo((Array) numArray, 0);
      ((byte[]) this.instruction.Reserved1).CopyTo((Array) numArray, 8);
      return "" + BhavWiz.readStr(GS.BhavStr.UpdateWho, BhavWiz.ToShort(numArray[0], numArray[1])) + " " + BhavWiz.readStr(GS.BhavStr.UpdateWhat, BhavWiz.ToShort(numArray[2], numArray[3]));
    }
  }
}