FSO.HIT.HITThread.WriteVar C# (CSharp) Method

WriteVar() public method

public WriteVar ( int location, int value ) : void
location int
value int
return void
        public void WriteVar(int location, int value)
        {
            if (location < 0x10)
            {
                Registers[location] = value;
            }
            else if (location < 0x46)
            {
                LocalVarSet(location, value); //invoke any special behaviours, like track switch for setting patch
                LocalVar[location - 0x10] = value;
            }
            else if (location < 0x64)
            {
                return; //not mapped
            }
            else if (location < 0x88)
            {
                VM.WriteGlobal(location - 0x64, value);
            }
            else if (location < 0x271a)
            {
                return; //not mapped
            }
            else if (location < 0x2737)
            {
                ObjectVar[location - 0x271a] = value; //this probably should not be valid... but if it is used it may require some reworking to get this to sync across object threads.
            }
        }

Usage Example

Ejemplo n.º 1
0
        public static HITResult NoteOnLoop(HITThread thread) //0x60
        {
            var dest = thread.ReadByte();

            thread.WriteVar(dest, thread.NoteLoop());
            return(HITResult.HALT);
        }
All Usage Examples Of FSO.HIT.HITThread::WriteVar