Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [b18753cc8b]:

To Artifact [c5ee33d3db]:


107
108
109
110
111
112
113

114
115
116
117
118
119
120
  objects[n]=o;
  return n;
  bad:
  free(o);
  return VOIDLINK;
}


static void execute_program(Uint16*code,int ptr,Uint32 obj) {
  Object*o=objects[obj];
  if(StackProtection()) Throw("Call stack overflow");
  for(;;) switch(code[ptr++]) {
    case OP_GOTO: ptr=code[ptr]; break;
    case OP_CALLSUB: execute_program(code,code[ptr++],obj); break;
    case OP_RET: return;







>







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
  objects[n]=o;
  return n;
  bad:
  free(o);
  return VOIDLINK;
}

// Here is where the execution of a Free Hero Mesh bytecode subroutine is executed.
static void execute_program(Uint16*code,int ptr,Uint32 obj) {
  Object*o=objects[obj];
  if(StackProtection()) Throw("Call stack overflow");
  for(;;) switch(code[ptr++]) {
    case OP_GOTO: ptr=code[ptr]; break;
    case OP_CALLSUB: execute_program(code,code[ptr++],obj); break;
    case OP_RET: return;