Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CoalescingBranchInstruction.cs
Go to the documentation of this file.
2
4{
5 private static Instruction[] s_cache;
6
7 public override Instruction[] Cache
8 {
9 get
10 {
11 if (s_cache == null)
12 {
13 s_cache = new Instruction[32];
14 }
15 return s_cache;
16 }
17 }
18
19 public override string InstructionName => "CoalescingBranch";
20
21 public override int ConsumedStack => 1;
22
23 public override int ProducedStack => 1;
24
25 public override int Run(InterpretedFrame frame)
26 {
27 if (frame.Peek() != null)
28 {
29 return _offset;
30 }
31 return 1;
32 }
33}