Free Hero Mesh

Check-in [ed2c776526]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Correct a mistake in picture importing
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ed2c776526fcd6a98d44d2c8455927c6369828c1
User & Date: user on 2021-10-29 23:07:17
Other Links: manifest | tags
Context
2021-10-29
23:44
Add conversion from DOS game "Vampiric Tower". check-in: 69ea6fbdf0 user: user tags: trunk
23:07
Correct a mistake in picture importing check-in: ed2c776526 user: user tags: trunk
21:49
A few implement of TODO and CONTRIBUTING files check-in: 3c80bf33f6 user: user tags: trunk
Changes

Modified picedit.c from [2f3a7b5478] to [be4069b047].

598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
    pic->size=buf[15];
    memset(pic->data+pic->size,0,pic->size);
  }
  q=pic->data+pic->size;
  for(y=0;y<pic->size;y++) for(x=0;x<pic->size;x++) {
    fread(buf,1,8,fp);
    if(buf[6]&0x80) {
      for(i=1;i<255;i++) if(buf[0]==pal[i].r && buf[1]==pal[i].g && buf[2]==pal[i].b) goto found;
      i=1;
      a=0x300000;
      for(j=1;j<255;j++) {
        b=abs(buf[0]-pal[j].r)+abs(buf[2]-pal[j].g)+abs(buf[4]-pal[j].b);
        if(b<=a) a=b,i=j;
      }
      found: *q++=i;







|







598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
    pic->size=buf[15];
    memset(pic->data+pic->size,0,pic->size);
  }
  q=pic->data+pic->size;
  for(y=0;y<pic->size;y++) for(x=0;x<pic->size;x++) {
    fread(buf,1,8,fp);
    if(buf[6]&0x80) {
      for(i=1;i<255;i++) if(buf[0]==pal[i].r && buf[2]==pal[i].g && buf[4]==pal[i].b) goto found;
      i=1;
      a=0x300000;
      for(j=1;j<255;j++) {
        b=abs(buf[0]-pal[j].r)+abs(buf[2]-pal[j].g)+abs(buf[4]-pal[j].b);
        if(b<=a) a=b,i=j;
      }
      found: *q++=i;