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

To Artifact [7677516cfd]:


161
162
163
164
165
166
167

168
169
170
171
172
173
174
175
176
177
178
179
180
  const UserCommand*cmd=find_key_binding(ev,editing);
  int prev=0;
  int i,j,k;
  const char*name;
  if(ev->type==SDL_MOUSEBUTTONDOWN && !x && !y && ev->button.x>=left_margin) {
    x=(ev->button.x-left_margin)/picture_size+1;
    y=ev->button.y/picture_size+1;

  }
  switch(cmd->cmd) {
    case 0:
      return 0;
    case '^':
      return cb(0,cmd->n*'\0\1'+'^\0',0,0,0,aux);
    case '=': case '-': case '+':
      return cb(0,cmd->cmd*'\1\0'+'\0 ',cmd->n,0,0,aux);
    case '\'':
      return cb(0,'\' ',cmd->n,0,0,aux);
    case '!':
      i=system(cmd->txt);
      return 0;







>





|







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
  const UserCommand*cmd=find_key_binding(ev,editing);
  int prev=0;
  int i,j,k;
  const char*name;
  if(ev->type==SDL_MOUSEBUTTONDOWN && !x && !y && ev->button.x>=left_margin) {
    x=(ev->button.x-left_margin)/picture_size+1;
    y=ev->button.y/picture_size+1;
    if(x<1 || y<1 || x>pfwidth || y>pfheight) return 0;
  }
  switch(cmd->cmd) {
    case 0:
      return 0;
    case '^':
      return cb(0,cmd->n*'\0\1'+'^\0',y*64+x,0,0,aux);
    case '=': case '-': case '+':
      return cb(0,cmd->cmd*'\1\0'+'\0 ',cmd->n,0,0,aux);
    case '\'':
      return cb(0,'\' ',cmd->n,0,0,aux);
    case '!':
      i=system(cmd->txt);
      return 0;
201
202
203
204
205
206
207

208
209
210
211
212
213
214
        }
      }
      while((i=sqlite3_step(cmd->stmt))==SQLITE_ROW) {
        if(i=sqlite3_data_count(cmd->stmt)) {
          j=i>1?sqlite3_column_int(cmd->stmt,1):0;
          if((name=sqlite3_column_text(cmd->stmt,0)) && *name) {
            k=name[0]*'\1\0'+name[1]*'\0\1';

            prev=cb(prev,k,j,i,cmd->stmt,aux);
            if(prev<0) {
              i=SQLITE_DONE;
              break;
            }
          }
        }







>







202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
        }
      }
      while((i=sqlite3_step(cmd->stmt))==SQLITE_ROW) {
        if(i=sqlite3_data_count(cmd->stmt)) {
          j=i>1?sqlite3_column_int(cmd->stmt,1):0;
          if((name=sqlite3_column_text(cmd->stmt,0)) && *name) {
            k=name[0]*'\1\0'+name[1]*'\0\1';
            while(i && sqlite3_column_type(cmd->stmt,i-1)==SQLITE_NULL) i--;
            prev=cb(prev,k,j,i,cmd->stmt,aux);
            if(prev<0) {
              i=SQLITE_DONE;
              break;
            }
          }
        }