Overview
Comment: | Remember which levels have been solved in the user cache database |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c20acae9818fb9b3ff2f0ff0c5fcdab4 |
User & Date: | user on 2021-06-10 18:51:26 |
Other Links: | manifest | tags |
Context
2021-06-13
| ||
22:31 | Add a few more commands into the picture editor check-in: d021d4aad7 user: user tags: trunk | |
2021-06-10
| ||
18:51 | Remember which levels have been solved in the user cache database check-in: c20acae981 user: user tags: trunk | |
18:36 | Do not try to access levels past beginning or end when skipping levels check-in: b9447d4488 user: user tags: trunk | |
Changes
Modified TODO from [ade12521c4] to [6e6172910e].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 | - | * Display solution comments/timestamp * VCR mode * Command-line switch for batch import/export levels * SQL * Implement the GROUP column in the CLASSES table * Allow multiple SQL statements in one binding * Large fonts (width 8 or 16, height 8-32) |
Modified game.c from [775aabf4a7] to [75daa49f6d].
︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | + | static int exam_scroll; static Uint8*inputs; static int inputs_size,inputs_count; static Uint8 side_mode=255; static Uint8 should_record_solution; static Uint8 replay_speed; static Uint8 replay_time; static Uint8 solved; static void record_solution(void); static void setup_game(void) { const char*v; optionquery[1]=Q_showInventory; v=xrm_get_resource(resourcedb,optionquery,optionquery,2)?:""; |
︙ | |||
68 69 70 71 72 73 74 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + - + | SDL_FillRect(screen,&r,back_color); for(x=1;x<=pfwidth;x++) for(y=1;y<=pfheight;y++) draw_cell(x,y); x=y=0; SDL_GetMouseState(&x,&y); SDL_LockSurface(screen); if(left_margin>=88) { snprintf(buf,32,"%5d/%5d",level_ord,level_nindex); |
︙ | |||
239 240 241 242 243 244 245 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | - - + + + - - - + + + + + | SDL_UnlockSurface(screen); SDL_Flip(screen); } static void save_replay(void) { long sz=replay_size; if(solution_replay || !replay_list) return; |
︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | + + + + + | } } else { replay_list=read_userstate(FIL_LEVEL,level_id,&sz); if(sz>=2) { replay_size=(sz>0xFFFF?0xFFFF:sz); replay_count=(replay_list[sz-2]<<8)|replay_list[sz-1]; if(sz-replay_count>=4) replay_mark=(replay_list[replay_count]<<8)|replay_list[replay_count+1]; else replay_mark=0; if(sz-replay_count>=6) { i=(replay_list[replay_count+2]<<8)|replay_list[replay_count+3]; if(i==level_version) solved=1; } } else { notfound: replay_count=replay_mark=replay_size=0; free(replay_list); replay_list=0; } } } static void begin_level(int id) { const char*t; replay_time=0; if(replay_count) save_replay(); inputs_count=0; replay_pos=0; solved=0; t=load_level(id)?:init_level(); load_replay(); if(t) { gameover=-1; screen_message(t); } else { gameover=0; |
︙ |