Free Hero Mesh

Check-in [ceadd9ba47]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview
Comment:Add key names to names.js and names.h
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ceadd9ba47a6b1b3e2ea3e107abfc161915de963
User & Date: user on 2018-03-09 01:33:11
Other Links: manifest | tags
Context
2018-03-09
06:00
Add smallxrm check-in: f6f1c94d23 user: user tags: trunk
01:33
Add key names to names.js and names.h check-in: ceadd9ba47 user: user tags: trunk
2018-03-08
05:50
A change in file format, and notes about a hybrid approach check-in: a4f844ac56 user: user tags: trunk
Changes

Modified names.h from [e0fea38138] to [1e2e8b5b84].

140
141
142
143
144
145
146






















































































147
 "GLISSANT",
 "BUZZER",
 "FAROUT",
 "KEWEL",
 "WHACK",
 "STEAM",
 "HAWK",






















































































};







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

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
231
232
233
 "GLISSANT",
 "BUZZER",
 "FAROUT",
 "KEWEL",
 "WHACK",
 "STEAM",
 "HAWK",
};
static const char*const heromesh_key_names[256]={
 [8]="BACK",
 [9]="TAB",
 [12]="CENTER",
 [13]="ENTER",
 [16]="SHIFT",
 [17]="CTRL",
 [19]="BREAK",
 [20]="CAPSLOCK",
 [32]="SPACE",
 [33]="PGUP",
 [34]="PGDN",
 [35]="END",
 [36]="HOME",
 [37]="LEFT",
 [38]="UP",
 [39]="RIGHT",
 [40]="DOWN",
 [46]="DELETE",
 [48]="0",
 [49]="1",
 [50]="2",
 [51]="3",
 [52]="4",
 [53]="5",
 [54]="6",
 [55]="7",
 [56]="8",
 [57]="9",
 [65]="A",
 [66]="B",
 [67]="C",
 [68]="D",
 [69]="E",
 [70]="F",
 [71]="G",
 [72]="H",
 [73]="I",
 [74]="J",
 [75]="K",
 [76]="L",
 [77]="M",
 [78]="N",
 [79]="O",
 [80]="P",
 [81]="Q",
 [82]="R",
 [83]="S",
 [84]="T",
 [85]="U",
 [86]="V",
 [87]="W",
 [88]="X",
 [89]="Y",
 [90]="Z",
 [96]="NUMPAD0",
 [97]="NUMPAD1",
 [98]="NUMPAD2",
 [99]="NUMPAD3",
 [100]="NUMPAD4",
 [101]="NUMPAD5",
 [102]="NUMPAD6",
 [103]="NUMPAD7",
 [104]="NUMPAD8",
 [105]="NUMPAD9",
 [106]="MULTIPLY",
 [110]="DECIMAL",
 [111]="DIVIDE",
 [120]="F9",
 [121]="F10",
 [122]="F11",
 [123]="F12",
 [144]="NUMLOCK",
 [145]="SCRLOCK",
 [186]="SEMICOLON",
 [187]="EQUALS",
 [188]="COMMA",
 [189]="MINUS",
 [190]="PERIOD",
 [191]="SLASH",
 [192]="TILDE",
 [219]="OBRACKET",
 [220]="BACKSLASH",
 [221]="CBRACKET",
 [222]="QUOTE",
};

Modified names.js from [db084a2327] to [3fa560a1f1].

75
76
77
78
79
80
81
























































82
83
84
85
86
87
88
89
90



 BUZZER
 FAROUT
 KEWEL
 WHACK
 STEAM
 HAWK
`.replace(/[A-Za-z_0-9]+/g,x=>standard_sound_names.push(x));
























































console.log("// Auto-generated! Do not modify directly!");
standard_message_names.forEach(([a,b,c])=>console.log("#define MSG_"+c+" "+b));
console.log("static const char*const standard_message_names[]={");
standard_message_names.forEach(([a,b,c])=>console.log(" \""+c+"\","));
console.log("};");
standard_sound_names.forEach((x,y)=>console.log("#define SND_"+x+" "+y));
console.log("static const char*const standard_sound_names[]={");
standard_sound_names.forEach(x=>console.log(" \""+x+"\","));
console.log("};");










>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









>
>
>
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
 BUZZER
 FAROUT
 KEWEL
 WHACK
 STEAM
 HAWK
`.replace(/[A-Za-z_0-9]+/g,x=>standard_sound_names.push(x));
const heromesh_key_names=Object.create(null);
`
   8  BACK
   9  TAB
  12  CENTER
  13  ENTER
  16  SHIFT
  17  CTRL
  19  BREAK
  20  CAPSLOCK
  32  SPACE
  33  PGUP
  34  PGDN
  35  END
  36  HOME
  37  LEFT
  38  UP
  39  RIGHT
  40  DOWN
  46  DELETE
  96  NUMPAD0
  97  NUMPAD1
  98  NUMPAD2
  99  NUMPAD3
 100  NUMPAD4
 101  NUMPAD5
 102  NUMPAD6
 103  NUMPAD7
 104  NUMPAD8
 105  NUMPAD9
 106  MULTIPLY
 110  DECIMAL
 111  DIVIDE
 120  F9
 121  F10
 122  F11
 123  F12
 144  NUMLOCK
 145  SCRLOCK
 186  SEMICOLON
 187  EQUALS
 188  COMMA
 189  MINUS
 190  PERIOD
 191  SLASH
 192  TILDE
 219  OBRACKET
 220  BACKSLASH
 221  CBRACKET
 222  QUOTE
`.replace(/([0-9]+) +([A-Z][A-Z0-9_]*)/g,(x,y,z)=>{
  heromesh_key_names[y]=z;
});
[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"].forEach(x=>{
  heromesh_key_names[x.charCodeAt()]=x;
});
console.log("// Auto-generated! Do not modify directly!");
standard_message_names.forEach(([a,b,c])=>console.log("#define MSG_"+c+" "+b));
console.log("static const char*const standard_message_names[]={");
standard_message_names.forEach(([a,b,c])=>console.log(" \""+c+"\","));
console.log("};");
standard_sound_names.forEach((x,y)=>console.log("#define SND_"+x+" "+y));
console.log("static const char*const standard_sound_names[]={");
standard_sound_names.forEach(x=>console.log(" \""+x+"\","));
console.log("};");
console.log("static const char*const heromesh_key_names[256]={");
Object.keys(heromesh_key_names).forEach(x=>console.log(" ["+x+"]=\""+heromesh_key_names[x]+"\","));
console.log("};");

Modified notes from [4f8ea813c9] to [edd6349237].

43
44
45
46
47
48
49
50

51
* User session data can be recorded.

Disadvantages of hybrid:
* SQLite must be included in this program.
* Level/solution files must still be rewritten entirely when it changes.

Hero Mesh will rewrite the puzzle set file only on exit, so it is possible
to do the similar thing in this case, by using the session database.









|
>

43
44
45
46
47
48
49
50
51
52
* User session data can be recorded.

Disadvantages of hybrid:
* SQLite must be included in this program.
* Level/solution files must still be rewritten entirely when it changes.

Hero Mesh will rewrite the puzzle set file only on exit, so it is possible
to do the similar thing in this case, by using the session database. A way
of incrementally storing and then "vacuuming" the file may also work.