Skip to content

Commit 21e0f05

Browse files
committed
Correct typos in the function names in the loads of GSF and SNSF.
(This probably came about from copying the code from the 2SF player and not fixing the names.)
1 parent 3d4720f commit 21e0f05

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/in_gsf/XSFPlayer_GSF.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ SoundDriver *systemSoundInit()
119119
return new GSFSoundDriver();
120120
}
121121

122-
static void Map2SFSection(const std::vector<uint8_t> &section, int level)
122+
static void MapGSFSection(const std::vector<uint8_t> &section, int level)
123123
{
124124
auto &data = loaderwork.rom;
125125

@@ -134,20 +134,20 @@ static void Map2SFSection(const std::vector<uint8_t> &section, int level)
134134
memcpy(&data[offset], &section[12], size);
135135
}
136136

137-
static bool Map2SF(XSFFile *xSF, int level)
137+
static bool MapGSF(XSFFile *xSF, int level)
138138
{
139139
if (!xSF->IsValidType(0x22))
140140
return false;
141141

142142
auto &programSection = xSF->GetProgramSection();
143143

144144
if (!programSection.empty())
145-
Map2SFSection(programSection, level);
145+
MapGSFSection(programSection, level);
146146

147147
return true;
148148
}
149149

150-
static bool RecursiveLoad2SF(XSFFile *xSF, int level)
150+
static bool RecursiveLoadGSF(XSFFile *xSF, int level)
151151
{
152152
if (level <= 10 && xSF->GetTagExists("_lib"))
153153
{
@@ -156,11 +156,11 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
156156
#else
157157
auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue("_lib"), 8, 12));
158158
#endif
159-
if (!RecursiveLoad2SF(libxSF.get(), level + 1))
159+
if (!RecursiveLoadGSF(libxSF.get(), level + 1))
160160
return false;
161161
}
162162

163-
if (!Map2SF(xSF, level))
163+
if (!MapGSF(xSF, level))
164164
return false;
165165

166166
unsigned n = 2;
@@ -177,20 +177,20 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
177177
#else
178178
auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue(libTag), 8, 12));
179179
#endif
180-
if (!RecursiveLoad2SF(libxSF.get(), level + 1))
180+
if (!RecursiveLoadGSF(libxSF.get(), level + 1))
181181
return false;
182182
}
183183
} while (found);
184184

185185
return true;
186186
}
187187

188-
static bool Load2SF(XSFFile *xSF)
188+
static bool LoadGSF(XSFFile *xSF)
189189
{
190190
loaderwork.rom.clear();
191191
loaderwork.entry = 0;
192192

193-
return RecursiveLoad2SF(xSF, 1);
193+
return RecursiveLoadGSF(xSF, 1);
194194
}
195195

196196
XSFPlayer_GSF::XSFPlayer_GSF(const std::string &filename) : XSFPlayer()
@@ -207,7 +207,7 @@ XSFPlayer_GSF::XSFPlayer_GSF(const std::wstring &filename) : XSFPlayer()
207207

208208
bool XSFPlayer_GSF::Load()
209209
{
210-
if (!Load2SF(this->xSF.get()))
210+
if (!LoadGSF(this->xSF.get()))
211211
return false;
212212

213213
cpuIsMultiBoot = (loaderwork.entry >> 24) == 2;

src/in_snsf/XSFPlayer_SNSF.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bool S9xOpenSoundDevice()
106106
return true;
107107
}
108108

109-
static void Map2SFSection(const std::vector<uint8_t> &section)
109+
static void MapSNSFSection(const std::vector<uint8_t> &section)
110110
{
111111
auto &data = loaderwork.rom;
112112

@@ -126,7 +126,7 @@ static void Map2SFSection(const std::vector<uint8_t> &section)
126126
std::copy_n(&section[8], size, &data[offset]);
127127
}
128128

129-
static bool Map2SF(XSFFile *xSF)
129+
static bool MapSNSF(XSFFile *xSF)
130130
{
131131
if (!xSF->IsValidType(0x23))
132132
return false;
@@ -157,12 +157,12 @@ static bool Map2SF(XSFFile *xSF)
157157
}
158158

159159
if (!programSection.empty())
160-
Map2SFSection(programSection);
160+
MapSNSFSection(programSection);
161161

162162
return true;
163163
}
164164

165-
static bool RecursiveLoad2SF(XSFFile *xSF, int level)
165+
static bool RecursiveLoadSNSF(XSFFile *xSF, int level)
166166
{
167167
if (level <= 10 && xSF->GetTagExists("_lib"))
168168
{
@@ -171,11 +171,11 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
171171
#else
172172
auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue("_lib"), 4, 8));
173173
#endif
174-
if (!RecursiveLoad2SF(libxSF.get(), level + 1))
174+
if (!RecursiveLoadSNSF(libxSF.get(), level + 1))
175175
return false;
176176
}
177177

178-
if (!Map2SF(xSF))
178+
if (!MapSNSF(xSF))
179179
return false;
180180

181181
unsigned n = 2;
@@ -192,22 +192,22 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
192192
#else
193193
auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue(libTag), 4, 8));
194194
#endif
195-
if (!RecursiveLoad2SF(libxSF.get(), level + 1))
195+
if (!RecursiveLoadSNSF(libxSF.get(), level + 1))
196196
return false;
197197
}
198198
} while (found);
199199

200200
return true;
201201
}
202202

203-
static bool Load2SF(XSFFile *xSF)
203+
static bool LoadSNSF(XSFFile *xSF)
204204
{
205205
loaderwork.rom.clear();
206206
loaderwork.sram.clear();
207207
loaderwork.first = false;
208208
loaderwork.base = 0;
209209

210-
return RecursiveLoad2SF(xSF, 1);
210+
return RecursiveLoadSNSF(xSF, 1);
211211
}
212212

213213
XSFPlayer_SNSF::XSFPlayer_SNSF(const std::string &filename) : XSFPlayer()
@@ -224,7 +224,7 @@ XSFPlayer_SNSF::XSFPlayer_SNSF(const std::wstring &filename) : XSFPlayer()
224224

225225
bool XSFPlayer_SNSF::Load()
226226
{
227-
if (!Load2SF(this->xSF.get()))
227+
if (!LoadSNSF(this->xSF.get()))
228228
return false;
229229

230230
Settings.SoundSync = true;

0 commit comments

Comments
 (0)