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 [69d6373aa3]:

To Artifact [f3693b1dc0]:


1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
}

static void class_definition(int cla,sqlite3_stmt*vst) {
  Hash*hash=calloc(LOCAL_HASH_SIZE,sizeof(Hash));
  Class*cl=classes[cla];
  int ptr=0;
  int compat=0;
  int i;
  char disp=0;
  if(!hash) fatal("Allocation failed\n");
  if(!cl) fatal("Confusion of class definition somehow\n");
  if(cl->cflags&(CF_NOCLASS1|CF_NOCLASS2)) {
    cl->cflags=0;
  } else {
    ParseError("Duplicate definition of class $%s\n",cl->name);







|







1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
}

static void class_definition(int cla,sqlite3_stmt*vst) {
  Hash*hash=calloc(LOCAL_HASH_SIZE,sizeof(Hash));
  Class*cl=classes[cla];
  int ptr=0;
  int compat=0;
  int i,j;
  char disp=0;
  if(!hash) fatal("Allocation failed\n");
  if(!cl) fatal("Confusion of class definition somehow\n");
  if(cl->cflags&(CF_NOCLASS1|CF_NOCLASS2)) {
    cl->cflags=0;
  } else {
    ParseError("Duplicate definition of class $%s\n",cl->name);
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149


2150










2151
2152
2153
2154
2155
2156
2157
              cl->codes[cl->messages[MSG_KEY]+i]=ptr;
              if(cl->cflags&CF_INPUT) keymask[i>>3]|=1<<(i&7);
            }
            cl->codes[ptr++]=OP_QUEEN;
            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);
            break;
          default: ParseError("Invalid directly inside of a class definition\n");
        }
      } else {
        ParseError("Invalid directly inside of a class definition\n");
      }







|
<
|

>
>
|
>
>
>
>
>
>
>
>
>
>







2139
2140
2141
2142
2143
2144
2145
2146

2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
              cl->codes[cl->messages[MSG_KEY]+i]=ptr;
              if(cl->cflags&CF_INPUT) keymask[i>>3]|=1<<(i&7);
            }
            cl->codes[ptr++]=OP_QUEEN;
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          case 0x0200 ... 0x02FF:
            i=tokenv&255;

            goto message;
          case 0xC000 ... 0xFFFF:
            i=tokenv+256-0xC000;
          message:
            set_message_ptr(cla,i,ptr);
            nxttok();
            pushback=1;
            if(tokenv==OP_LABEL && tokent==(TF_NAME|TF_ABNORMAL|TF_EQUAL)) {
              j=look_hash(hash,LOCAL_HASH_SIZE,0x8000,0xFFFF,*labelptr,"labels");
              if(!j) j=*labelptr,++*labelptr;
              if(labelptr[j-0x8000]!=0xFFFF) {
                set_message_ptr(cla,i,labelptr[j-0x8000]);
                pushback=0;
              }
            }
            ptr=parse_instructions(cla,ptr,hash,compat);
            break;
          default: ParseError("Invalid directly inside of a class definition\n");
        }
      } else {
        ParseError("Invalid directly inside of a class definition\n");
      }