@@ -77,16 +77,15 @@ public:
77
77
BaseNote& operator =(BaseNote&&) noexcept = default ;
78
78
virtual ~BaseNote () noexcept = default ;
79
79
template <typename IO>
80
- static BaseNote*
81
- read (std::istream& in, int sonicver, int offset,
82
- std::string const & projname, LocTraits::LocType tracktype,
83
- std::multimap<int , std::string>& labels, int & last_voc,
84
- uint8_t keydisp);
85
- void write (std::ostream& out, int sonicver, size_t offset) const ;
86
- virtual void
87
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
88
- std::multimap<int , std::string>& labels,
89
- bool s3kmode) const = 0 ;
80
+ static BaseNote* read (
81
+ std::istream& in, int sonicver, int offset,
82
+ std::string const & projname, LocTraits::LocType tracktype,
83
+ std::multimap<int , std::string>& labels, int & last_voc,
84
+ uint8_t keydisp);
85
+ void write (std::ostream& out, int sonicver, size_t offset) const ;
86
+ virtual void print (
87
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
88
+ std::multimap<int , std::string>& labels, bool s3kmode) const = 0;
90
89
static void force_linebreak (std::ostream& out, bool force = false );
91
90
static void print_psg_tone (
92
91
std::ostream& out, int tone, int sonicver, bool last);
@@ -118,19 +117,17 @@ public:
118
117
class Duration : public BaseNote {
119
118
public:
120
119
Duration (uint8_t v, uint8_t k) : BaseNote(v, k) {}
121
- void
122
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
123
- std::multimap<int , std::string>& labels,
124
- bool s3kmode) const final ;
120
+ void print (
121
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
122
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
125
123
};
126
124
127
125
class NullNote final : public BaseNote {
128
126
public:
129
127
NullNote () : BaseNote(0 , 0 ) {}
130
- void
131
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
132
- std::multimap<int , std::string>& labels,
133
- bool s3kmode) const final {
128
+ void print (
129
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
130
+ std::multimap<int , std::string>& labels, bool s3kmode) const final {
134
131
ignore_unused_variable_warning (
135
132
out, sonicver, tracktype, labels, s3kmode);
136
133
}
@@ -142,39 +139,35 @@ class FMVoice final : public BaseNote {
142
139
143
140
public:
144
141
FMVoice (std::istream& in, int sonicver, int n);
145
- void
146
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
147
- std::multimap<int , std::string>& labels,
148
- bool s3kmode) const final ;
142
+ void print (
143
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
144
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
149
145
};
150
146
151
147
class DACNote : public RealNote {
152
148
public:
153
149
DACNote (uint8_t v, uint8_t k) : RealNote(v, k) {}
154
- void
155
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
156
- std::multimap<int , std::string>& labels,
157
- bool s3kmode) const final ;
150
+ void print (
151
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
152
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
158
153
};
159
154
160
155
class FMPSGNote : public RealNote {
161
156
public:
162
157
FMPSGNote (uint8_t v, uint8_t k) : RealNote(v, k) {}
163
- void
164
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
165
- std::multimap<int , std::string>& labels,
166
- bool s3kmode) const final ;
158
+ void print (
159
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
160
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
167
161
};
168
162
169
163
template <bool noret>
170
164
class CoordFlagNoParams : public BaseNote {
171
165
public:
172
166
CoordFlagNoParams (uint8_t v, uint8_t k) : BaseNote(v, k) {}
173
- void
174
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
175
- std::multimap<int , std::string>& labels,
176
- bool s3kmode) const final ;
177
- bool ends_track () const final {
167
+ void print (
168
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
169
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
170
+ bool ends_track () const final {
178
171
return noret;
179
172
}
180
173
};
@@ -187,11 +180,10 @@ private:
187
180
public:
188
181
CoordFlag1ParamByte (uint8_t v, uint8_t k, uint8_t p)
189
182
: BaseNote(v, k), param(p) {}
190
- void
191
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
192
- std::multimap<int , std::string>& labels,
193
- bool s3kmode) const final ;
194
- bool ends_track () const final {
183
+ void print (
184
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
185
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
186
+ bool ends_track () const final {
195
187
return noret;
196
188
}
197
189
};
@@ -203,10 +195,9 @@ private:
203
195
public:
204
196
CoordFlagChgKeydisp (uint8_t v, uint8_t k, uint8_t p)
205
197
: BaseNote(v, k), param(p) {}
206
- void
207
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
208
- std::multimap<int , std::string>& labels,
209
- bool s3kmode) const final ;
198
+ void print (
199
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
200
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
210
201
uint8_t get_keydisp () const final {
211
202
return get_base_keydisp () + param;
212
203
}
@@ -220,11 +211,10 @@ private:
220
211
public:
221
212
CoordFlag2ParamBytes (uint8_t v, uint8_t k, uint8_t p1, uint8_t p2)
222
213
: BaseNote(v, k), param1(p1), param2(p2) {}
223
- void
224
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
225
- std::multimap<int , std::string>& labels,
226
- bool s3kmode) const final ;
227
- bool ends_track () const final {
214
+ void print (
215
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
216
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
217
+ bool ends_track () const final {
228
218
return noret;
229
219
}
230
220
};
@@ -238,11 +228,10 @@ public:
238
228
CoordFlag3ParamBytes (
239
229
uint8_t v, uint8_t k, uint8_t p1, uint8_t p2, uint8_t p3)
240
230
: BaseNote(v, k), param1(p1), param2(p2), param3(p3) {}
241
- void
242
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
243
- std::multimap<int , std::string>& labels,
244
- bool s3kmode) const final ;
245
- bool ends_track () const final {
231
+ void print (
232
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
233
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
234
+ bool ends_track () const final {
246
235
return noret;
247
236
}
248
237
};
@@ -257,11 +246,10 @@ public:
257
246
uint8_t v, uint8_t k, uint8_t p1, uint8_t p2, uint8_t p3,
258
247
uint8_t p4)
259
248
: BaseNote(v, k), param1(p1), param2(p2), param3(p3), param4(p4) {}
260
- void
261
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
262
- std::multimap<int , std::string>& labels,
263
- bool s3kmode) const final ;
264
- bool ends_track () const final {
249
+ void print (
250
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
251
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
252
+ bool ends_track () const final {
265
253
return noret;
266
254
}
267
255
};
@@ -277,11 +265,10 @@ public:
277
265
uint8_t p4, uint8_t p5)
278
266
: BaseNote(v, k), param1(p1), param2(p2), param3(p3), param4(p4),
279
267
param5 (p5) {}
280
- void
281
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
282
- std::multimap<int , std::string>& labels,
283
- bool s3kmode) const final ;
284
- bool ends_track () const final {
268
+ void print (
269
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
270
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
271
+ bool ends_track () const final {
285
272
return noret;
286
273
}
287
274
};
@@ -294,11 +281,10 @@ private:
294
281
public:
295
282
CoordFlagPointerParam (uint8_t v, uint8_t k, int p)
296
283
: BaseNote(v, k), jumptarget(p) {}
297
- void
298
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
299
- std::multimap<int , std::string>& labels,
300
- bool s3kmode) const final ;
301
- bool ends_track () const final {
284
+ void print (
285
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
286
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
287
+ bool ends_track () const final {
302
288
return noret;
303
289
}
304
290
bool has_pointer () const final {
@@ -318,11 +304,10 @@ private:
318
304
public:
319
305
CoordFlagPointer1ParamByte (uint8_t v, uint8_t k, uint8_t p1, int ptr)
320
306
: BaseNote(v, k), jumptarget(ptr), param1(p1) {}
321
- void
322
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
323
- std::multimap<int , std::string>& labels,
324
- bool s3kmode) const final ;
325
- bool ends_track () const final {
307
+ void print (
308
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
309
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
310
+ bool ends_track () const final {
326
311
return noret;
327
312
}
328
313
bool has_pointer () const final {
@@ -343,11 +328,10 @@ public:
343
328
CoordFlagPointer2ParamBytes (
344
329
uint8_t v, uint8_t k, uint8_t p1, uint8_t p2, int ptr)
345
330
: BaseNote(v, k), jumptarget(ptr), param1(p1), param2(p2) {}
346
- void
347
- print (std::ostream& out, int sonicver, LocTraits::LocType tracktype,
348
- std::multimap<int , std::string>& labels,
349
- bool s3kmode) const final ;
350
- bool ends_track () const final {
331
+ void print (
332
+ std::ostream& out, int sonicver, LocTraits::LocType tracktype,
333
+ std::multimap<int , std::string>& labels, bool s3kmode) const final ;
334
+ bool ends_track () const final {
351
335
return noret;
352
336
}
353
337
bool has_pointer () const final {
0 commit comments