コード例 #1
0
        public void AddExternCall(string externCall, string comment = "")
        {
            externStringSet.Add(externCall);

            AppendCommentedLine($"EXTERN, \"{externCall}\"", comment);
            programCounter += UdonSharpUtils.GetUdonInstructionSize("EXTERN");
        }
コード例 #2
0
        public void AddJumpIfFalse(JumpLabel jumpTarget, string comment = "")
        {
#if USE_UDON_LABELS
            AppendCommentedLine($"JUMP_IF_FALSE, {jumpTarget.uniqueName}", comment);
#else
            if (jumpTarget.IsResolved)
            {
                AppendCommentedLine($"JUMP_IF_FALSE, {jumpTarget.AddresStr()}", comment);
            }
            else
            {
                AppendCommentedLine($"JUMP_IF_FALSE_LABEL, [{jumpTarget.uniqueName}]", comment);
            }
#endif

            programCounter += UdonSharpUtils.GetUdonInstructionSize("JUMP_IF_FALSE");
        }
コード例 #3
0
 public void AddCopy(string comment = "")
 {
     AppendCommentedLine("COPY", comment);
     programCounter += UdonSharpUtils.GetUdonInstructionSize("COPY");
 }
コード例 #4
0
 public void AddJumpIndirect(SymbolDefinition addressSymbol, string comment = "")
 {
     AppendCommentedLine($"JUMP_INDIRECT, {addressSymbol.symbolUniqueName}", comment);
     programCounter += UdonSharpUtils.GetUdonInstructionSize("JUMP_INDIRECT");
 }
コード例 #5
0
 public void AddJumpToExit()
 {
     AppendCommentedLine($"JUMP, 0xFFFFFFFF", "");
     programCounter += UdonSharpUtils.GetUdonInstructionSize("JUMP");
 }
コード例 #6
0
 private void AddPush(string heapAddress, string comment)
 {
     AppendCommentedLine($"PUSH, {heapAddress}", comment);
     programCounter += UdonSharpUtils.GetUdonInstructionSize("PUSH");
 }