Index: bindings.doc ================================================================== --- bindings.doc +++ bindings.doc @@ -117,15 +117,21 @@ '^x' Cancel dead animation. 'lo' - Flash the specified location briefly. + Flash the specified location briefly (same as the LocateMe instruction in + the class codes). 'ls' Load save state slot (0 to 7). +'md' + Multiple deletion. No effect if the number is zero or negative. If the + number is 1 then it is the same as the '^-' binding, while a sufficiently + large number is the same as the '^D' binding. + 'mi' Import a move list. The argument is a operating system command, that when executed will write the move list to stdout, with one byte per move (the Hero Mesh key codes). Index: default.heromeshrc ================================================================== --- default.heromeshrc +++ default.heromeshrc @@ -142,10 +142,11 @@ ?.gameKey.alt.X: ^x ?.gameKey.alt.leftbracket: select 'rs',-5; ?.gameKey.alt.rightbracket: select 'rs',+5; ?.gameKey.delete: ^- ?.gameKey.ctrl.delete: ^D +?.gameKey.shift.delete: select 'md',mark()-movenumber(); ?.gameKey.insert: ^+ ?.gameKey.alt.kp_minus: select 'go',-ord from levels where ord<$level and not solved order by ord desc limit 1; ?.gameKey.alt.kp_plus: select 'go',-ord from levels where ord>$level and not solved order by ord asc limit 1; ?.gameKey.shift.1: select 'ss',0; ?.gameKey.shift.2: select 'ss',1; Index: function.c ================================================================== --- function.c +++ function.c @@ -1812,13 +1812,15 @@ sqlite3_create_function(userdb,"LEVEL_CODE",0,SQLITE_UTF8,&level_code,fn_level,0,0); sqlite3_create_function(userdb,"LEVEL_ID",0,SQLITE_UTF8,&level_id,fn_level,0,0); sqlite3_create_function(userdb,"LEVEL_TITLE",0,SQLITE_UTF8,0,fn_level_title,0,0); sqlite3_create_function(userdb,"LEVEL_VERSION",0,SQLITE_UTF8,&level_version,fn_level,0,0); sqlite3_create_function(userdb,"LOAD_LEVEL",1,SQLITE_UTF8,0,fn_load_level,0,0); + sqlite3_create_function(userdb,"MARK",0,SQLITE_UTF8,&replay_mark,fn_level,0,0); sqlite3_create_function(userdb,"MAX_LEVEL",0,SQLITE_UTF8,0,fn_max_level,0,0); sqlite3_create_function(userdb,"MODSTATE",0,SQLITE_UTF8,0,fn_modstate,0,0); sqlite3_create_function(userdb,"MOVE_LIST",0,SQLITE_UTF8,0,fn_move_list,0,0); + sqlite3_create_function(userdb,"MOVECOUNT",0,SQLITE_UTF8,&replay_count,fn_level,0,0); sqlite3_create_function(userdb,"MOVENUMBER",0,SQLITE_UTF8,0,fn_movenumber,0,0); sqlite3_create_function(userdb,"MVALUE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_mvalue,0,0); sqlite3_create_function(userdb,"NVALUE",1,SQLITE_UTF8|SQLITE_DETERMINISTIC,0,fn_zero_extend,0,0); sqlite3_create_function(userdb,"OVALUE",1,SQLITE_UTF8,0,fn_ovalue,0,0); sqlite3_create_function(userdb,"PFHEIGHT",0,SQLITE_UTF8,&pfheight,fn_pfsize,0,0); Index: game.c ================================================================== --- game.c +++ game.c @@ -1456,10 +1456,25 @@ return -3; } number=exchange_state(number&7,'l'); if(number<0) return -3; goto restart; + case 'md': // Delete multiple moves + inputs_count=0; + if(solution_replay) { + screen_message("You cannot delete moves during the solution replay"); + return -3; + } + if(replay_pos==replay_count || number<=0) return 0; + if(number>replay_count-replay_pos) number=replay_count-replay_pos; + memmoveM(replay_list+replay_pos,replay_list+replay_pos+number,replay_count-replay_pos-number); + replay_count-=number; + if(replay_mark>replay_pos) { + replay_mark-=number; + if(replay_mark