Index: main.c ================================================================== --- main.c +++ main.c @@ -40,11 +40,11 @@ } KeyBinding; static const char schema[]= "PRAGMA APPLICATION_ID(1296388936);" "PRAGMA RECURSIVE_TRIGGERS(1);" - "CREATE TABLE IF NOT EXISTS `USERCACHEINDEX`(`ID` INTEGER PRIMARY KEY, `NAME` TEXT, `LVLTIME` INT, `SOLTIME` INT, `VERSION` INT);" + "CREATE TABLE IF NOT EXISTS `USERCACHEINDEX`(`ID` INTEGER PRIMARY KEY, `NAME` TEXT, `TIME` INT);" "CREATE TEMPORARY TABLE `PICTURES`(`ID` INTEGER PRIMARY KEY, `NAME` TEXT, `OFFSET` INT);" ; sqlite3*userdb; xrm_db*resourcedb; Index: picture.c ================================================================== --- picture.c +++ picture.c @@ -56,14 +56,14 @@ int usegamma=1; int i,j; SDL_Color pal[256]; FILE*fp=0; const char*v; - optionquery[2]=Q_gamma; + optionquery[1]=Q_gamma; gamma=strtod(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"0",0); if(gamma<=0.0 || gamma==1.0) usegamma=0; - optionquery[2]=Q_palette; + optionquery[1]=Q_palette; v=xrm_get_resource(resourcedb,optionquery,optionquery,2); if(v && *v) { fp=fopen(v,"r"); if(!fp) fatal("Unable to load palette file '%s'\n%m",v); } @@ -268,11 +268,11 @@ if(!curpic) fatal("Allocation failed\n"); for(i=0;i<256;i++) havesize[i]=(havesize[i]==n)?1:0; picture_size=decide_picture_size(nwantsize,wantsize,havesize); if(sqlite3_prepare_v2(userdb,"SELECT `ID`, `OFFSET` FROM `PICTURES`;",-1,&st,0)) fatal("Unable to prepare SQL statement while loading pictures: %s\n",sqlite3_errmsg(userdb)); - optionquery[2]=Q_screenFlags; + optionquery[1]=Q_screenFlags; v=xrm_get_resource(resourcedb,optionquery,optionquery,2); i=v&&strchr(v,'h'); picts=SDL_CreateRGBSurface((i?SDL_HWSURFACE:SDL_SWSURFACE)|SDL_SRCCOLORKEY,picture_size<<4,picture_size*((n+15)>>4),8,0,0,0,0); if(!picts) fatal("Error allocating surface for pictures: %s\n",SDL_GetError()); init_palette();