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

To Artifact [6d33b70e63]:


900
901
902
903
904
905
906
907
908
909
910

911
912
913
914
915
916
917
  *y=strtol(p,&p,10);
  if(*p && *p!=' ' && *p!='\t') return 0;
  while(*p==' ' || *p=='\t') p++;
  return p;
}

static char*import_value(char*p,Value*v) {
  int i;
  int n=strcspn(p," \t");
  if(!p) return 0;
  while(*p==' ' || *p=='\t') p++;

  if(*p>='0' && *p<='9') {
    v->t=TY_NUMBER;
    v->u=strtol(p,&p,10)&0xFFFF;
  } else if(*p=='$') {
    v->t=TY_CLASS;
    p++; n--;
    for(i=1;i<0x4000;i++) {







|
<


>







900
901
902
903
904
905
906
907

908
909
910
911
912
913
914
915
916
917
  *y=strtol(p,&p,10);
  if(*p && *p!=' ' && *p!='\t') return 0;
  while(*p==' ' || *p=='\t') p++;
  return p;
}

static char*import_value(char*p,Value*v) {
  int i,n;

  if(!p) return 0;
  while(*p==' ' || *p=='\t') p++;
  n=strcspn(p," \t");
  if(*p>='0' && *p<='9') {
    v->t=TY_NUMBER;
    v->u=strtol(p,&p,10)&0xFFFF;
  } else if(*p=='$') {
    v->t=TY_CLASS;
    p++; n--;
    for(i=1;i<0x4000;i++) {
1074
1075
1076
1077
1078
1079
1080













1081
1082
1083
1084
1085
1086
1087
          screen_message("Duplicate D line");
          goto done;
        }
        d=1;
        annihilate();
        pfwidth=x;
        pfheight=y;













        break;
      case 'V':
        p=import_numbers(p+1,&x,0);
        if(!p || *p) goto bad;
        level_version=x;
        level_changed=0;
        break;







>
>
>
>
>
>
>
>
>
>
>
>
>







1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
          screen_message("Duplicate D line");
          goto done;
        }
        d=1;
        annihilate();
        pfwidth=x;
        pfheight=y;
        break;
      case 'F':
        if(!d) goto missd;
        v.t=0;
        p=import_value(p+1,&v);
        if(v.t!=TY_CLASS) goto bad;
        for(y=1;y<=pfheight;y++) for(x=1;x<=pfwidth;x++) {
          v.t=objalloc(v.u);
          if(v.t==VOIDLINK) goto bad;
          objects[v.t]->x=x;
          objects[v.t]->y=y;
          pflink(v.t);
        }
        break;
      case 'V':
        p=import_numbers(p+1,&x,0);
        if(!p || *p) goto bad;
        level_version=x;
        level_changed=0;
        break;