Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EnterFaultInstruction.cs
Go to the documentation of this file.
2
4{
5 private static readonly EnterFaultInstruction[] s_cache = new EnterFaultInstruction[32];
6
7 public override string InstructionName => "EnterFault";
8
9 public override int ProducedStack => 2;
10
11 private EnterFaultInstruction(int labelIndex)
12 : base(labelIndex)
13 {
14 }
15
16 internal static EnterFaultInstruction Create(int labelIndex)
17 {
18 if (labelIndex < 32)
19 {
20 return s_cache[labelIndex] ?? (s_cache[labelIndex] = new EnterFaultInstruction(labelIndex));
21 }
22 return new EnterFaultInstruction(labelIndex);
23 }
24
25 public override int Run(InterpretedFrame frame)
26 {
27 frame.SetStackDepth(GetLabel(frame).StackDepth);
29 frame.RemoveContinuation();
30 return 1;
31 }
32}
static EnterFaultInstruction Create(int labelIndex)