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 [849ea4a56a]:

To Artifact [ed615d969f]:


1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
    } else if(Tokenf(TF_OPEN)) {
      nxttok();
      if(Tokenf(TF_KEY)) {
        if(!disp) {
          cl->codes=realloc(cl->codes,0x10000*sizeof(Uint16));
          if(!cl->codes) fatal("Allocation failed\n");
          if(get_message_ptr(cla,MSG_KEY)!=0xFFFF) ParseError("Class $%s has a KEY message already\n",cl->name);
          if(ptr>0xFDFF) ParseError("Out of code space\n");
          disp=1;
          set_message_ptr(cla,MSG_KEY,ptr);
          cl->codes[ptr]=OP_DISPATCH;
          for(i=1;i<256;i++) cl->codes[ptr+i]=0;
          ptr+=256;
        }
        i=tokenv&255;
        cl->codes[cl->messages[MSG_KEY]+i]=ptr;
        if(cl->cflags&CF_INPUT) {
          nxttok();
          if(tokent!=TF_NAME || tokenv!=OP_IGNOREKEY) keymask[i>>3]|=1<<(i&7);
          pushback=1;







|



|
|







1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
    } else if(Tokenf(TF_OPEN)) {
      nxttok();
      if(Tokenf(TF_KEY)) {
        if(!disp) {
          cl->codes=realloc(cl->codes,0x10000*sizeof(Uint16));
          if(!cl->codes) fatal("Allocation failed\n");
          if(get_message_ptr(cla,MSG_KEY)!=0xFFFF) ParseError("Class $%s has a KEY message already\n",cl->name);
          if(ptr>0xFDFE) ParseError("Out of code space\n");
          disp=1;
          set_message_ptr(cla,MSG_KEY,ptr);
          cl->codes[ptr]=OP_DISPATCH;
          for(i=1;i<257;i++) cl->codes[ptr+i]=0;
          ptr+=257;
        }
        i=tokenv&255;
        cl->codes[cl->messages[MSG_KEY]+i]=ptr;
        if(cl->cflags&CF_INPUT) {
          nxttok();
          if(tokent!=TF_NAME || tokenv!=OP_IGNOREKEY) keymask[i>>3]|=1<<(i&7);
          pushback=1;
1847
1848
1849
1850
1851
1852
1853






1854
1855
1856
1857
1858
1859
1860
            pushback=1;
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          case OP_COLLISIONLAYERS:
            cl->collisionLayers=i=class_def_misc();
            if(i&~255) ParseError("CollisionLayers out of range\n");
            break;






          case 0x0200 ... 0x02FF:
            set_message_ptr(cla,tokenv&255,ptr);
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          case 0xC000 ... 0xFFFF:
            set_message_ptr(cla,tokenv+256-0xC000,ptr);
            ptr=parse_instructions(cla,ptr,hash,compat);







>
>
>
>
>
>







1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
            pushback=1;
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          case OP_COLLISIONLAYERS:
            cl->collisionLayers=i=class_def_misc();
            if(i&~255) ParseError("CollisionLayers out of range\n");
            break;
          case OP_OTHERS:
            if(!disp) ParseError("Others block without key dispatch block\n");
            if(!(cl->cflags&CF_INPUT)) ParseError("Others block without Input flag\n");
            cl->codes[cl->messages[MSG_KEY]+256]=ptr;
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          case 0x0200 ... 0x02FF:
            set_message_ptr(cla,tokenv&255,ptr);
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          case 0xC000 ... 0xFFFF:
            set_message_ptr(cla,tokenv+256-0xC000,ptr);
            ptr=parse_instructions(cla,ptr,hash,compat);