Free Hero Mesh

Check-in [ea3817b085]
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 the OBJECTS virtual table causing it to sometimes miss one object
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ea3817b085ddd226bf1ef1e7d7343fec7a9d54c3
User & Date: user on 2021-03-06 04:52:09
Other Links: manifest | tags
Context
2021-03-06
05:22
Add the global examine command check-in: c1b51c9521 user: user tags: trunk
04:52
Correct a mistake in the OBJECTS virtual table causing it to sometimes miss one object check-in: ea3817b085 user: user tags: trunk
2021-03-05
06:57
When you toggle solution replay, ensure that the user replay is saved (if any) check-in: 3c53032e2c user: user tags: trunk
Changes

Modified function.c from [a27d6bc1ae] to [8935f5b923].

364
365
366
367
368
369
370


371
372
373
374
375
376
377
  int i;
  if(info->nOrderBy==1 && (info->aOrderBy->iColumn==-1 || !info->aOrderBy->iColumn) && !info->aOrderBy->desc) info->orderByConsumed=1;
  for(i=0;i<info->nConstraint;i++) {
    if((info->aConstraint[i].iColumn==-1 || !info->aConstraint[i].iColumn) && info->aConstraint[i].op==SQLITE_INDEX_CONSTRAINT_EQ && info->aConstraint[i].usable) {
      info->aConstraintUsage[i].argvIndex=1;
      info->aConstraintUsage[i].omit=1;
      info->idxFlags=SQLITE_INDEX_SCAN_UNIQUE;


      break;
    }
  }
  return SQLITE_OK;
}

static int vt0_open(sqlite3_vtab*vt,sqlite3_vtab_cursor**cur) {







>
>







364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
  int i;
  if(info->nOrderBy==1 && (info->aOrderBy->iColumn==-1 || !info->aOrderBy->iColumn) && !info->aOrderBy->desc) info->orderByConsumed=1;
  for(i=0;i<info->nConstraint;i++) {
    if((info->aConstraint[i].iColumn==-1 || !info->aConstraint[i].iColumn) && info->aConstraint[i].op==SQLITE_INDEX_CONSTRAINT_EQ && info->aConstraint[i].usable) {
      info->aConstraintUsage[i].argvIndex=1;
      info->aConstraintUsage[i].omit=1;
      info->idxFlags=SQLITE_INDEX_SCAN_UNIQUE;
      info->estimatedCost=1.0;
      info->estimatedRows=1;
      break;
    }
  }
  return SQLITE_OK;
}

static int vt0_open(sqlite3_vtab*vt,sqlite3_vtab_cursor**cur) {
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
          cur->eof=1;
          break;
        }
        if(objects[cur->rowid]) break;
      }
    }
    cur->arg[1]=1;
  } else if((cur->arg[0]&0x0006) && !cur->arg[1]) {
    // Find top/bottom at location
    cur->arg[1]=1;
    atxy:
    cur->rowid=playfield[cur->arg[2]+cur->arg[3]*64-65];
    if(cur->rowid==VOIDLINK) goto nextxy;
    if(cur->arg[0]&0x0020) {
      while(cur->rowid!=VOIDLINK && objects[cur->rowid]->up!=VOIDLINK) cur->rowid=objects[cur->rowid]->up;







|







636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
          cur->eof=1;
          break;
        }
        if(objects[cur->rowid]) break;
      }
    }
    cur->arg[1]=1;
  } else if((cur->arg[0]&0x0066) && !cur->arg[1]) {
    // Find top/bottom at location
    cur->arg[1]=1;
    atxy:
    cur->rowid=playfield[cur->arg[2]+cur->arg[3]*64-65];
    if(cur->rowid==VOIDLINK) goto nextxy;
    if(cur->arg[0]&0x0020) {
      while(cur->rowid!=VOIDLINK && objects[cur->rowid]->up!=VOIDLINK) cur->rowid=objects[cur->rowid]->up;
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
          info->aConstraintUsage[i].omit=1;
          info->aConstraintUsage[i].argvIndex=++arg;
          info->idxFlags=SQLITE_INDEX_SCAN_UNIQUE;
          sqlite3_str_appendchar(str,1,'a');
          info->estimatedCost/=10000.0;
        } else if(j==SQLITE_INDEX_CONSTRAINT_GT || j==SQLITE_INDEX_CONSTRAINT_GE) {
          info->idxNum|=0x0008;
          info->aConstraintUsage[i].omit=1;
          info->aConstraintUsage[i].argvIndex=++arg;
          sqlite3_str_appendchar(str,1,j==SQLITE_INDEX_CONSTRAINT_GT?'b':'c');
          info->estimatedCost/=1200.0;
        }
        break;
      case 7: // X
        if(info->idxNum&0x0013) break;







|







783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
          info->aConstraintUsage[i].omit=1;
          info->aConstraintUsage[i].argvIndex=++arg;
          info->idxFlags=SQLITE_INDEX_SCAN_UNIQUE;
          sqlite3_str_appendchar(str,1,'a');
          info->estimatedCost/=10000.0;
        } else if(j==SQLITE_INDEX_CONSTRAINT_GT || j==SQLITE_INDEX_CONSTRAINT_GE) {
          info->idxNum|=0x0008;
          //info->aConstraintUsage[i].omit=1;
          info->aConstraintUsage[i].argvIndex=++arg;
          sqlite3_str_appendchar(str,1,j==SQLITE_INDEX_CONSTRAINT_GT?'b':'c');
          info->estimatedCost/=1200.0;
        }
        break;
      case 7: // X
        if(info->idxNum&0x0013) break;