-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.heromeshrc
231 lines (224 loc) · 7.43 KB
/
default.heromeshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
! Hero Mesh configuration settings
?.screenWidth: 800
?.screenHeight: 600
?.imageSize: 24
?.traceAll: false
?.showInventory: 0
?.maxTrigger: 32767
?.pasteCommand: xclip -o
?.codepage: /home/user/freeheromesh/codepage.har
?.saveSolutions.private: true
! Game inputs
?.gameKey.A: 'A
?.gameKey.B: 'B
?.gameKey.C: 'C
?.gameKey.D: 'D
?.gameKey.E: 'E
?.gameKey.F: 'F
?.gameKey.G: 'G
?.gameKey.H: 'H
?.gameKey.I: 'I
?.gameKey.J: 'J
?.gameKey.K: 'K
?.gameKey.L: 'L
?.gameKey.M: 'M
?.gameKey.N: 'N
?.gameKey.O: 'O
?.gameKey.P: 'P
?.gameKey.Q: 'Q
?.gameKey.R: 'R
?.gameKey.S: 'S
?.gameKey.T: 'T
?.gameKey.U: 'U
?.gameKey.V: 'V
?.gameKey.W: 'W
?.gameKey.X: 'X
?.gameKey.Y: 'Y
?.gameKey.Z: 'Z
?.gameKey.0: '0
?.gameKey.1: '1
?.gameKey.2: '2
?.gameKey.3: '3
?.gameKey.4: '4
?.gameKey.5: '5
?.gameKey.6: '6
?.gameKey.7: '7
?.gameKey.8: '8
?.gameKey.9: '9
?.gameKey.backquote: 'TILDE
?.gameKey.backslash: 'BACKSLASH
?.gameKey.backspace: 'BACK
?.gameKey.comma: 'COMMA
?.gameKey.down: 'DOWN
?.gameKey.end: 'END
?.gameKey.equals: 'EQUALS
?.gameKey.home: 'HOME
?.gameKey.kp1: 'END
?.gameKey.kp2: 'DOWN
?.gameKey.kp3: 'PGDN
?.gameKey.kp4: 'LEFT
?.gameKey.kp5: 'CENTER
?.gameKey.kp6: 'RIGHT
?.gameKey.kp7: 'HOME
?.gameKey.kp8: 'UP
?.gameKey.kp9: 'PGUP
?.gameKey.kp_divide: 'DIVIDE
?.gameKey.kp_multiply: 'MULTIPLY
?.gameKey.left: 'LEFT
?.gameKey.leftbracket: 'OBRACKET
?.gameKey.minus: 'MINUS
?.gameKey.numLock.kp0: 'NUMPAD0
?.gameKey.numLock.kp1: 'NUMPAD1
?.gameKey.numLock.kp2: 'NUMPAD2
?.gameKey.numLock.kp3: 'NUMPAD3
?.gameKey.numLock.kp4: 'NUMPAD4
?.gameKey.numLock.kp5: 'NUMPAD5
?.gameKey.numLock.kp6: 'NUMPAD6
?.gameKey.numLock.kp7: 'NUMPAD7
?.gameKey.numLock.kp8: 'NUMPAD8
?.gameKey.numLock.kp9: 'NUMPAD9
?.gameKey.numLock.kp_period: 'DECIMAL
?.gameKey.pagedown: 'PGDN
?.gameKey.pageup: 'PGUP
?.gameKey.period: 'PERIOD
?.gameKey.quote: 'QUOTE
?.gameKey.return: 'ENTER
?.gameKey.right: 'RIGHT
?.gameKey.rightbracket: 'CBRACKET
?.gameKey.semicolon: 'SEMICOLON
?.gameKey.slash: 'SLASH
?.gameKey.space: 'SPACE
?.gameKey.up: 'UP
! Game inputs with alt
?.gameKey.alt.9: 'F9
?.gameKey.alt.0: 'F10
?.gameKey.alt.minus: 'F11
?.gameKey.alt.equals: 'F12
?.gameKey.alt.B: 'BREAK
?.gameKey.alt.C: 'CAPSLOCK
?.gameKey.alt.D: 'DELETE
?.gameKey.alt.N: 'NUMLOCK
?.gameKey.alt.O: 'SCRLOCK
?.gameKey.alt.S: 'SHIFT
?.gameKey.alt.T: 'TAB
?.gameKey.alt.Z: 'CTRL
! Game key bindings
?.gameClick.left: select 'xy',$X,$Y where has_xy_input();
?.gameClick.shift.left: with p(x,y) as materialized (select o.x,o.y from objects o,classes c on(o.class=c.id) where c.player limit 1), n(n) as (select max(1,abs($X-x),abs($Y-y)) n from p union all select n-1 m from n where m) select ''' ',case sign($X-p.x)*3+sign($Y-p.y) when -4 then 36 when -3 then 37 when -2 then 35 when -1 then 38 when 0 then 12 when 1 then 40 when 2 then 33 when 3 then 39 when 4 then 34 end from p,n where abs($X-p.x)=abs($Y-p.y) or $X=p.x or $Y=p.y;
?.gameKey.ctrl.D: select '^d',$key_xy;
?.gameKey.ctrl.E: ^E
?.gameKey.ctrl.I: select 'mi',:import_move_list;
?.gameKey.ctrl.K: with a(x,y,z) as (select count() filter (where solved),count() filter (where solved or solvable),count() from levels) select ':m',x||'/'||y||' ('||(100*x/y)||'%)'||iif(z-y,' + '||(z-y),'') from a;
?.gameKey.ctrl.L: ^L
?.gameKey.ctrl.R: select 'go',id from levels order by random() limit 1;
?.gameKey.ctrl.X: select 'mx',:export_move_list;
?.gameClick.right: ^o
?.gameClick.shift.right: ^n
?.gameClick.middle: ^d
?.gameKey.kp_enter: =0
?.gameKey.escape: =0
?.gameKey.f1: +1
?.gameKey.f2: +10
?.gameKey.f3: +100
?.gameKey.f4: +1000
?.gameKey.shift.f1: -1
?.gameKey.shift.f2: -10
?.gameKey.shift.f3: -100
?.gameKey.shift.f4: -1000
?.gameKey.f5: ^M
?.gameKey.f6: ^<
?.gameKey.f7: ^>
?.gameKey.f8: ^s
?.gameKey.shift.f8: select 'ml',solution_move_list(1);
?.gameKey.ctrl.f8: select 'ml',best_move_list();
?.gameKey.f9: select 'lo',xy(o.x,o.y) from objects o,classes c on(o.class=c.id) where c.player;
?.gameKey.tab: ^I
?.gameKey.alt.G: ^g
?.gameKey.alt.P: ^p
?.gameKey.alt.R: select 'go',id from levels where not solved order by random() limit 1;
?.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;
?.gameKey.shift.3: select 'ss',2;
?.gameKey.shift.4: select 'ss',3;
?.gameKey.shift.5: select 'ss',4;
?.gameKey.shift.6: select 'ss',5;
?.gameKey.shift.7: select 'ss',6;
?.gameKey.shift.8: select 'ss',7;
?.gameKey.ctrl.1: select 'ls',0;
?.gameKey.ctrl.2: select 'ls',1;
?.gameKey.ctrl.3: select 'ls',2;
?.gameKey.ctrl.4: select 'ls',3;
?.gameKey.ctrl.5: select 'ls',4;
?.gameKey.ctrl.6: select 'ls',5;
?.gameKey.ctrl.7: select 'ls',6;
?.gameKey.ctrl.8: select 'ls',7;
?.gameKey.alt.1: select 'xs',0;
?.gameKey.alt.2: select 'xs',1;
?.gameKey.alt.3: select 'xs',2;
?.gameKey.alt.4: select 'xs',3;
?.gameKey.alt.5: select 'xs',4;
?.gameKey.alt.6: select 'xs',5;
?.gameKey.alt.7: select 'xs',6;
?.gameKey.alt.8: select 'xs',7;
! Editor key bindings
?.editKey.1: select 'mr',0;
?.editKey.2: select 'mr',1;
?.editKey.3: select 'mr',2;
?.editKey.4: select 'mr',3;
?.editKey.5: select 'mr',4;
?.editKey.6: select 'mr',5;
?.editKey.7: select 'mr',6;
?.editKey.8: select 'mr',7;
?.editKey.9: select 'mr',8;
?.editKey.up: select 'mR',-1;
?.editKey.down: select 'mR',+1;
?.editKey.C: select 'lc',:level_code where :level_code=cast(:level_code as int);
?.editKey.E: ^s
?.editKey.F: with n(n) as (select 65 union all select n+1 h from n where h<=64*pfheight()+65) select '^a',n from n;
?.editKey.R: select 're',substr(:resize,1,instr(:resize,'x')-1),substr(:resize,instr(:resize,'x')+1) where length(:resize);
?.editKey.W: ^w
?.editKey.ctrl.I: ^I
?.editKey.ctrl.N: ^N
?.editKey.ctrl.P: ^P
?.editKey.ctrl.X: select 're',pfwidth(),pfheight();
?.editKey.space: ^c
?.editKey.return: ^e
?.editKey.f1: select 'im',:Import_Level;
?.editKey.f2: select 'ex',:Export_Level;
?.editKey.escape: ^Z
?.editKey.shift.B: select '^a',xy(x,y) from playfield where inrect(x,y) and (rect_x0()=x or rect_x1()=x or rect_y0()=y or rect_y1()=y);
?.editKey.shift.D: delete from objects where inrect(x,y);
?.editKey.shift.F: select '^a',xy(x,y) from playfield where inrect(x,y);
?.editClick.left: ^a
?.editClick.ctrl.left: select 'em',id from objects where x=$X and y=$Y and up is null;
?.editClick.alt.left: ^u
?.editClick.right: delete from objects where x=$X and y=$Y and up is null;
?.editClick.ctrl.right: select 'am',class,image,misc1,misc2,misc3,dir from objects where x=$X and y=$Y and up is null;
?.editClick.shift.left: ^<
?.editClick.shift.middle: values('^Z',null),('^<',xy($X,$Y));
?.editClick.shift.right: ^>
?.editClick.alt.middle: select 'mm',null,null,null,$X,$Y,null;
! Global key bindings
?.?.kp_minus: select 'go',-(level()-1) where level()>1;
?.?.kp_plus: select 'go',-(level()+1) where level()<max_level();
?.?.shift.kp_minus: select 'go',-1;
?.?.shift.kp_plus: select 'go',-max_level();
?.?.ctrl.G: select 'go',-:Go_To_Level where :Go_To_Level=cast(:Go_To_Level as int) and cast(:Go_To_Level as int)>0;
?.?.ctrl.Q: ^Q
?.?.ctrl.S: ^S
?.?.ctrl.T: ^T
?.?.ctrl.Y: ^Y
?.?.shift.ctrl.M: select ':s';
?.?.f10: select ':x';
?.?.ctrl.middle: ^l
! Picture editor macros
?.picedit.macro.M: insert into graph(x,y,c) select s-x-1,y,c from graph where x<s/2;