Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
OffsetInstruction.cs
Go to the documentation of this file.
2
4
5internal abstract class OffsetInstruction : Instruction
6{
7 protected int _offset = int.MinValue;
8
9 public abstract Instruction[] Cache { get; }
10
12 {
15 if (cache != null && offset >= 0 && offset < cache.Length)
16 {
17 return cache[offset] ?? (cache[offset] = this);
18 }
19 return this;
20 }
21
23 {
24 return ToString() + ((_offset != int.MinValue) ? (" -> " + (instructionIndex + _offset)) : "");
25 }
26
27 public override string ToString()
28 {
29 return InstructionName + ((_offset == int.MinValue) ? "(?)" : ("(" + _offset + ")"));
30 }
31}
override string ToDebugString(int instructionIndex, object cookie, Func< int, int > labelIndexer, IReadOnlyList< object > objects)