Overview
Comment: | Set the correct name of the DIVISION.IDX lump when creating it. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1d52f98ea277e8500051571df1455453 |
User & Date: | user on 2022-01-05 03:59:01 |
Other Links: | manifest | tags |
Context
2022-01-07
| ||
05:46 | Implement divisions of levels in the list of levels menu in the game (only for puzzle sets that have any divisions). check-in: 5c59b19d96 user: user tags: trunk | |
2022-01-05
| ||
03:59 | Set the correct name of the DIVISION.IDX lump when creating it. check-in: 1d52f98ea2 user: user tags: trunk | |
2022-01-04
| ||
06:02 | Change documentation about code page numbers (the effectiveness is the same as before), and treat code page 367 the same as 437 (which is a superset of 367 anyways, so it is OK). check-in: 561f982c9c user: user tags: trunk | |
Changes
Modified main.c from [9e06dc1a0b] to [1f3827f98d].
︙ | ︙ | |||
256 257 258 259 260 261 262 | // The actual Hamster archive files will be updated when the program terminates. sqlite3_stmt*st; int e; if(e=sqlite3_prepare_v2(userdb,"INSERT INTO `USERCACHEDATA`(`FILE`,`LEVEL`,`NAME`,`DATA`) VALUES(?1,?2,CASE WHEN ?2 < 0 THEN ?3 ELSE ?2 || ?3 END,?4)" " ON CONFLICT(`FILE`,`LEVEL`) DO UPDATE SET `DATA` = ?4;",-1,&st,0)) fatal("SQL error (%d): %s\n",e,sqlite3_errmsg(userdb)); sqlite3_bind_int64(st,1,sol?solutionuc:leveluc); sqlite3_bind_int(st,2,lvl); | | | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | // The actual Hamster archive files will be updated when the program terminates. sqlite3_stmt*st; int e; if(e=sqlite3_prepare_v2(userdb,"INSERT INTO `USERCACHEDATA`(`FILE`,`LEVEL`,`NAME`,`DATA`) VALUES(?1,?2,CASE WHEN ?2 < 0 THEN ?3 ELSE ?2 || ?3 END,?4)" " ON CONFLICT(`FILE`,`LEVEL`) DO UPDATE SET `DATA` = ?4;",-1,&st,0)) fatal("SQL error (%d): %s\n",e,sqlite3_errmsg(userdb)); sqlite3_bind_int64(st,1,sol?solutionuc:leveluc); sqlite3_bind_int(st,2,lvl); sqlite3_bind_text(st,3,lvl==LUMP_CLASS_DEF?"CLASS.DEF":lvl==LUMP_LEVEL_IDX?"LEVEL.IDX":lvl==LUMP_DIVISION_IDX?"DIVISION.IDX":sol?".SOL":".LVL",-1,SQLITE_STATIC); sqlite3_bind_blob64(st,4,data,sz,0); while((e=sqlite3_step(st))==SQLITE_ROW); if(e!=SQLITE_DONE) fatal("SQL error (%d): %s\n",e,sqlite3_errmsg(userdb)); sqlite3_finalize(st); } void write_userstate(int sol,int lvl,long sz,const unsigned char*data) { |
︙ | ︙ |