Skip to content

Commit ba4aa07

Browse files
committed
Some reformatting and spelling
1 parent 9955c39 commit ba4aa07

File tree

6 files changed

+70
-86
lines changed

6 files changed

+70
-86
lines changed

include/mdtools/singlemapping.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public:
4444
void read(std::istream& in, int ver);
4545
void write(std::ostream& out, int ver) const;
4646
void print() const;
47-
void
48-
split(single_mapping const& src, single_dplc& dplc,
49-
std::map<size_t, size_t>& vram_map);
47+
void split(
48+
single_mapping const& src, single_dplc& dplc,
49+
std::map<size_t, size_t>& vram_map);
5050
void merge(single_mapping const& src, std::map<size_t, size_t>& vram_map);
5151
void change_pal(uint32_t srcpal, uint32_t dstpal);
5252

include/mdtools/songtrack.hh

Lines changed: 63 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,15 @@ public:
7777
BaseNote& operator=(BaseNote&&) noexcept = default;
7878
virtual ~BaseNote() noexcept = default;
7979
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;
9089
static void force_linebreak(std::ostream& out, bool force = false);
9190
static void print_psg_tone(
9291
std::ostream& out, int tone, int sonicver, bool last);
@@ -118,19 +117,17 @@ public:
118117
class Duration : public BaseNote {
119118
public:
120119
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;
125123
};
126124

127125
class NullNote final : public BaseNote {
128126
public:
129127
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 {
134131
ignore_unused_variable_warning(
135132
out, sonicver, tracktype, labels, s3kmode);
136133
}
@@ -142,39 +139,35 @@ class FMVoice final : public BaseNote {
142139

143140
public:
144141
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;
149145
};
150146

151147
class DACNote : public RealNote {
152148
public:
153149
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;
158153
};
159154

160155
class FMPSGNote : public RealNote {
161156
public:
162157
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;
167161
};
168162

169163
template <bool noret>
170164
class CoordFlagNoParams : public BaseNote {
171165
public:
172166
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 {
178171
return noret;
179172
}
180173
};
@@ -187,11 +180,10 @@ private:
187180
public:
188181
CoordFlag1ParamByte(uint8_t v, uint8_t k, uint8_t p)
189182
: 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 {
195187
return noret;
196188
}
197189
};
@@ -203,10 +195,9 @@ private:
203195
public:
204196
CoordFlagChgKeydisp(uint8_t v, uint8_t k, uint8_t p)
205197
: 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;
210201
uint8_t get_keydisp() const final {
211202
return get_base_keydisp() + param;
212203
}
@@ -220,11 +211,10 @@ private:
220211
public:
221212
CoordFlag2ParamBytes(uint8_t v, uint8_t k, uint8_t p1, uint8_t p2)
222213
: 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 {
228218
return noret;
229219
}
230220
};
@@ -238,11 +228,10 @@ public:
238228
CoordFlag3ParamBytes(
239229
uint8_t v, uint8_t k, uint8_t p1, uint8_t p2, uint8_t p3)
240230
: 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 {
246235
return noret;
247236
}
248237
};
@@ -257,11 +246,10 @@ public:
257246
uint8_t v, uint8_t k, uint8_t p1, uint8_t p2, uint8_t p3,
258247
uint8_t p4)
259248
: 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 {
265253
return noret;
266254
}
267255
};
@@ -277,11 +265,10 @@ public:
277265
uint8_t p4, uint8_t p5)
278266
: BaseNote(v, k), param1(p1), param2(p2), param3(p3), param4(p4),
279267
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 {
285272
return noret;
286273
}
287274
};
@@ -294,11 +281,10 @@ private:
294281
public:
295282
CoordFlagPointerParam(uint8_t v, uint8_t k, int p)
296283
: 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 {
302288
return noret;
303289
}
304290
bool has_pointer() const final {
@@ -318,11 +304,10 @@ private:
318304
public:
319305
CoordFlagPointer1ParamByte(uint8_t v, uint8_t k, uint8_t p1, int ptr)
320306
: 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 {
326311
return noret;
327312
}
328313
bool has_pointer() const final {
@@ -343,11 +328,10 @@ public:
343328
CoordFlagPointer2ParamBytes(
344329
uint8_t v, uint8_t k, uint8_t p1, uint8_t p2, int ptr)
345330
: 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 {
351335
return noret;
352336
}
353337
bool has_pointer() const final {

src/lib/framemapping.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct SingleDPLCCmp {
8383
};
8484

8585
void frame_mapping::split(frame_mapping const& src, frame_dplc& dplc) {
86-
// Coalesce the mappings tiles into tile ranges, reodering adjacent DPLCs
86+
// Coalesce the mappings tiles into tile ranges, reordering adjacent DPLCs
8787
// that are neighbours in art to coalesce the ranges as needed.
8888
vector<pair<size_t, size_t>> ranges;
8989
for (auto const& sd : src.maps) {

src/tools/smps2asm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
# pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3939
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
4040
#endif
41-
#define FMT_HEADER_ONLY 1
41+
#define FMT_HEADER_ONLY 1
4242
#include <fmt/format.h>
4343
#ifdef __GNUG__
4444
# pragma GCC diagnostic pop

src/tools/songtrack.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3131
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
3232
#endif
33-
#define FMT_HEADER_ONLY 1
33+
#define FMT_HEADER_ONLY 1
3434
#include <fmt/format.h>
3535
#ifdef __GNUG__
3636
# pragma GCC diagnostic pop

src/tools/voice_dumper.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void usage() {
4444
cerr << "\t-x,--extract \tExtract {num_voices} from {pointer} address in "
4545
"{input_filename}."
4646
<< endl
47-
<< "\t \tIf ommitted, {pointer} is assumed to be zero."
47+
<< "\t \tIf omitted, {pointer} is assumed to be zero."
4848
<< endl;
4949
cerr << "\t-v,--sonicver\tSets Sonic version to {version}. This also sets "
5050
"underlying"

0 commit comments

Comments
 (0)