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 [b062b0f69d]:

To Artifact [310c045da5]:


43
44
45
46
47
48
49

50
51
52
53
54
55
56
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57







+







xrm_quark optionquery[16];
char main_options[128];
Uint8 message_trace[0x4100/8];
Uint16 level_id,level_ord,level_version,level_code;
unsigned char*level_title;
Uint16*level_index;
int level_nindex;
char level_changed;

#ifdef __GNUC__
char stack_protect_mode=0;
void*stack_protect_mark;
void*stack_protect_low;
void*stack_protect_high;
#endif
223
224
225
226
227
228
229

230
231
232
233
234
235
236
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238







+







    lo=-lvl;
    lvl=level_index[~lvl];
    p=buf=read_lump(FIL_LEVEL,lvl,&sz);
    end=buf+sz;
  }
  if(lvl<0) return "Invalid level ID";
  if(!buf) return "Cannot find level";
  level_changed=1;
  free(level_title);
  level_title=0;
  annihilate();
  generation_number=TY_MAXTYPE+1;
  generation_number_inc=0;
  level_version=p[0]|(p[1]<<8);
  level_code=p[2]|(p[3]<<8);
347
348
349
350
351
352
353

354
355
356
357
358
359
360
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363







+







  level_ord=lo;
  if(level_index && !lo) {
    for(i=0;i<level_nindex;i++) if(level_index[i]==lvl) {
      level_ord=i+1;
      break;
    }
  }
  level_changed=0;
  return 0;
bad1:
  free(buf);
  return "Corrupted level data";
bad2:
  free(buf);
  return "Object out of bounds";