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

To Artifact [51d82ac75e]:


1720
1721
1722
1723
1724
1725
1726













1727
1728
1729
1730
1731
1732
1733
      cp[cpi].dir=d;
      cp[cpi].depth=vstackptr;
      ptr=code[ptr]+2;
      break;
    case OP_BEGIN:
      ptr++;
      break;













    case OP_CLIMB:
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)>objects[obj]->climb) goto fail;
      break;
    case OP_CLIMB_C:
      g=code[ptr++];
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)>g) goto fail;
      break;







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







1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
      cp[cpi].dir=d;
      cp[cpi].depth=vstackptr;
      ptr=code[ptr]+2;
      break;
    case OP_BEGIN:
      ptr++;
      break;
    case OP_BISHOP:
      if(cpi>=MAXCHOICE-4) Throw("Choice overflow");
      d=1;
      cpi+=3;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=ptr;
      cp[cpi-1]=cp[cpi-2]=cp[cpi];
      cp[cpi].dir=3;
      cp[cpi-1].dir=5;
      cp[cpi-2].dir=7;
      break;
    case OP_CLIMB:
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)>objects[obj]->climb) goto fail;
      break;
    case OP_CLIMB_C:
      g=code[ptr++];
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)>g) goto fail;
      break;
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
      objects[obj]->dir=d;
      break;
    case OP_DIR_EC:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      changed=1;
      objects[n]->dir=d;
      break;
    case OP_EIGHT:
      if(cpi>=MAXCHOICE-8) Throw("Choice overflow");
      d=0;
      cpi+=7;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=ptr;
      cp[cpi-1]=cp[cpi-2]=cp[cpi-3]=cp[cpi-4]=cp[cpi-5]=cp[cpi-6]=cp[cpi];
      cp[cpi].dir=1;
      cp[cpi-1].dir=2;
      cp[cpi-2].dir=3;
      cp[cpi-3].dir=4;
      cp[cpi-4].dir=5;
      cp[cpi-5].dir=6;
      cp[cpi-6].dir=7;
      break;
    case OP_ELSE:
      ptr--;
      while(code[ptr]==OP_ELSE) ptr=code[ptr+2];
      break;
    case OP_FOUR:
      if(cpi>=MAXCHOICE-4) Throw("Choice overflow");
      d=0;
      cpi+=3;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=ptr;
      cp[cpi-1]=cp[cpi-2]=cp[cpi];
      cp[cpi].dir=2;
      cp[cpi-1].dir=4;
      cp[cpi-2].dir=6;
      break;
    case OP_HEIGHT:
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=objects[obj]->climb) goto fail;
      break;
    case OP_HEIGHT_C:
      g=code[ptr++];
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=g) goto fail;
      break;







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<







1759
1760
1761
1762
1763
1764
1765

















1766
1767
1768
1769













1770
1771
1772
1773
1774
1775
1776
      objects[obj]->dir=d;
      break;
    case OP_DIR_EC:
      if(n==VOIDLINK) Throw("No object specified in pattern");
      changed=1;
      objects[n]->dir=d;
      break;

















    case OP_ELSE:
      ptr--;
      while(code[ptr]==OP_ELSE) ptr=code[ptr+2];
      break;













    case OP_HEIGHT:
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=objects[obj]->climb) goto fail;
      break;
    case OP_HEIGHT_C:
      g=code[ptr++];
      if(playfield[x+y*64-65]==VOIDLINK || height_at(x,y)<=g) goto fail;
      break;
1826
1827
1828
1829
1830
1831
1832

















1833
1834
1835
1836
1837
1838
1839
1840
1841
1842













1843
1844
1845
1846
1847
1848
1849
      break;
    case OP_OBJBOTTOMAT:
      n=obj_bottom_at(x,y);
      break;
    case OP_OBJTOPAT:
      n=obj_top_at(x,y);
      break;

















    case OP_RET:
      if(all) {
        if(vstackptr>=VSTACKSIZE-1) Throw("Stack overflow");
        if(n==VOIDLINK) n=obj_bottom_at(x,y);
        Push(OVALUE(n));
        goto fail;
      } else {
        return n==VOIDLINK?obj_bottom_at(x,y):n;
      }
      break;













    case OP_SUB:
      if(vstackptr>=VSTACKSIZE-1) Throw("Stack overflow");
      Push(NVALUE(0));
      break;
    case OP_THEN:
      // This opcode does nothing
      break;







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










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







1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
      break;
    case OP_OBJBOTTOMAT:
      n=obj_bottom_at(x,y);
      break;
    case OP_OBJTOPAT:
      n=obj_top_at(x,y);
      break;
    case OP_QUEEN:
      if(cpi>=MAXCHOICE-8) Throw("Choice overflow");
      d=0;
      cpi+=7;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=ptr;
      cp[cpi-1]=cp[cpi-2]=cp[cpi-3]=cp[cpi-4]=cp[cpi-5]=cp[cpi-6]=cp[cpi];
      cp[cpi].dir=1;
      cp[cpi-1].dir=2;
      cp[cpi-2].dir=3;
      cp[cpi-3].dir=4;
      cp[cpi-4].dir=5;
      cp[cpi-5].dir=6;
      cp[cpi-6].dir=7;
      break;
    case OP_RET:
      if(all) {
        if(vstackptr>=VSTACKSIZE-1) Throw("Stack overflow");
        if(n==VOIDLINK) n=obj_bottom_at(x,y);
        Push(OVALUE(n));
        goto fail;
      } else {
        return n==VOIDLINK?obj_bottom_at(x,y):n;
      }
      break;
    case OP_ROOK:
      if(cpi>=MAXCHOICE-4) Throw("Choice overflow");
      d=0;
      cpi+=3;
      cp[cpi].x=x;
      cp[cpi].y=y;
      cp[cpi].depth=vstackptr;
      cp[cpi].ptr=ptr;
      cp[cpi-1]=cp[cpi-2]=cp[cpi];
      cp[cpi].dir=2;
      cp[cpi-1].dir=4;
      cp[cpi-2].dir=6;
      break;
    case OP_SUB:
      if(vstackptr>=VSTACKSIZE-1) Throw("Stack overflow");
      Push(NVALUE(0));
      break;
    case OP_THEN:
      // This opcode does nothing
      break;