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 [75af1cacc3]:

To Artifact [ea176bca7b]:


942
943
944
945
946
947
948








949
950
951
952
953
954
955
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963







+
+
+
+
+
+
+
+







  fread(mru,1,32,stdin); // Skip border colours
  fread(buf,1,2,stdin); // Skip border colours
  mru[0x04]=mru[0x14]=255;
  n=fgetc(stdin);
  n|=fgetc(stdin)<<8;
  x=q=r=0;
  y=1;
  // Hero Mesh level format for objects:
  //   0-1    Class
  //   2-3    CurImage
  //   4      LastDir
  //   5      Misc Types
  //   6-7    X
  //   8-9    Y
  //   10-15  Misc1,Misc2,Misc3
  // Free Hero Mesh level format for objects:
  //   * bit flags (or 0xFF for end):
  //     bit7 = MRU (omit everything but position)
  //     bit6 = Next position
  //     bit5 = New X position
  //     bit4 = New Y position
  //     bit3 = Has MiscVars (RLE in case of MRU)
969
970
971
972
973
974
975
976

977
978
979
980
981
982
983
977
978
979
980
981
982
983

984
985
986
987
988
989
990
991







-
+







    ++*buf;
    if(!*buf) ++buf[1];
    mru[0x06]=mru[0x16]=buf[6];
    mru[0x08]=mru[0x18]=buf[8];
    i=0;
    if(buf[6]==x+1) i|=0x40; else if(buf[6]!=x) i|=0x20;
    if(buf[8]!=y) i|=0x10;
    if(x==buf[6] && y==buf[8]) q+=16; else q=0;
    q=i&0x70?0:16;
    if(q<32 && !memcmp(mru+q,buf,16)) {
      i|=0x80;
    } else {
      i|=buf[4]&7;
      if(buf[5] || memcmp(buf+10,"\0\0\0\0\0\0",6)) i|=0x08;
      if(q<32) memcpy(mru+q,buf,16);
    }