Browse code

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.)

Naram Qashat authored on 2021/03/19 15:58:49
Showing 2 changed files
... ...
@@ -119,7 +119,7 @@ SoundDriver *systemSoundInit()
119 119
 	return new GSFSoundDriver();
120 120
 }
121 121
 
122
-static void Map2SFSection(const std::vector<uint8_t> &section, int level)
122
+static void MapGSFSection(const std::vector<uint8_t> &section, int level)
123 123
 {
124 124
 	auto &data = loaderwork.rom;
125 125
 
... ...
@@ -134,7 +134,7 @@ static void Map2SFSection(const std::vector<uint8_t> &section, int level)
134 134
 	memcpy(&data[offset], &section[12], size);
135 135
 }
136 136
 
137
-static bool Map2SF(XSFFile *xSF, int level)
137
+static bool MapGSF(XSFFile *xSF, int level)
138 138
 {
139 139
 	if (!xSF->IsValidType(0x22))
140 140
 		return false;
... ...
@@ -142,12 +142,12 @@ static bool Map2SF(XSFFile *xSF, int level)
142 142
 	auto &programSection = xSF->GetProgramSection();
143 143
 
144 144
 	if (!programSection.empty())
145
-		Map2SFSection(programSection, level);
145
+		MapGSFSection(programSection, level);
146 146
 
147 147
 	return true;
148 148
 }
149 149
 
150
-static bool RecursiveLoad2SF(XSFFile *xSF, int level)
150
+static bool RecursiveLoadGSF(XSFFile *xSF, int level)
151 151
 {
152 152
 	if (level <= 10 && xSF->GetTagExists("_lib"))
153 153
 	{
... ...
@@ -156,11 +156,11 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
156 156
 #else
157 157
 		auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue("_lib"), 8, 12));
158 158
 #endif
159
-		if (!RecursiveLoad2SF(libxSF.get(), level + 1))
159
+		if (!RecursiveLoadGSF(libxSF.get(), level + 1))
160 160
 			return false;
161 161
 	}
162 162
 
163
-	if (!Map2SF(xSF, level))
163
+	if (!MapGSF(xSF, level))
164 164
 		return false;
165 165
 
166 166
 	unsigned n = 2;
... ...
@@ -177,7 +177,7 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
177 177
 #else
178 178
 			auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue(libTag), 8, 12));
179 179
 #endif
180
-			if (!RecursiveLoad2SF(libxSF.get(), level + 1))
180
+			if (!RecursiveLoadGSF(libxSF.get(), level + 1))
181 181
 				return false;
182 182
 		}
183 183
 	} while (found);
... ...
@@ -185,12 +185,12 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
185 185
 	return true;
186 186
 }
187 187
 
188
-static bool Load2SF(XSFFile *xSF)
188
+static bool LoadGSF(XSFFile *xSF)
189 189
 {
190 190
 	loaderwork.rom.clear();
191 191
 	loaderwork.entry = 0;
192 192
 
193
-	return RecursiveLoad2SF(xSF, 1);
193
+	return RecursiveLoadGSF(xSF, 1);
194 194
 }
195 195
 
196 196
 XSFPlayer_GSF::XSFPlayer_GSF(const std::string &filename) : XSFPlayer()
... ...
@@ -207,7 +207,7 @@ XSFPlayer_GSF::XSFPlayer_GSF(const std::wstring &filename) : XSFPlayer()
207 207
 
208 208
 bool XSFPlayer_GSF::Load()
209 209
 {
210
-	if (!Load2SF(this->xSF.get()))
210
+	if (!LoadGSF(this->xSF.get()))
211 211
 		return false;
212 212
 
213 213
 	cpuIsMultiBoot = (loaderwork.entry >> 24) == 2;
... ...
@@ -106,7 +106,7 @@ bool S9xOpenSoundDevice()
106 106
 	return true;
107 107
 }
108 108
 
109
-static void Map2SFSection(const std::vector<uint8_t> &section)
109
+static void MapSNSFSection(const std::vector<uint8_t> &section)
110 110
 {
111 111
 	auto &data = loaderwork.rom;
112 112
 
... ...
@@ -126,7 +126,7 @@ static void Map2SFSection(const std::vector<uint8_t> &section)
126 126
 	std::copy_n(&section[8], size, &data[offset]);
127 127
 }
128 128
 
129
-static bool Map2SF(XSFFile *xSF)
129
+static bool MapSNSF(XSFFile *xSF)
130 130
 {
131 131
 	if (!xSF->IsValidType(0x23))
132 132
 		return false;
... ...
@@ -157,12 +157,12 @@ static bool Map2SF(XSFFile *xSF)
157 157
 	}
158 158
 
159 159
 	if (!programSection.empty())
160
-		Map2SFSection(programSection);
160
+		MapSNSFSection(programSection);
161 161
 
162 162
 	return true;
163 163
 }
164 164
 
165
-static bool RecursiveLoad2SF(XSFFile *xSF, int level)
165
+static bool RecursiveLoadSNSF(XSFFile *xSF, int level)
166 166
 {
167 167
 	if (level <= 10 && xSF->GetTagExists("_lib"))
168 168
 	{
... ...
@@ -171,11 +171,11 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
171 171
 #else
172 172
 		auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue("_lib"), 4, 8));
173 173
 #endif
174
-		if (!RecursiveLoad2SF(libxSF.get(), level + 1))
174
+		if (!RecursiveLoadSNSF(libxSF.get(), level + 1))
175 175
 			return false;
176 176
 	}
177 177
 
178
-	if (!Map2SF(xSF))
178
+	if (!MapSNSF(xSF))
179 179
 		return false;
180 180
 
181 181
 	unsigned n = 2;
... ...
@@ -192,7 +192,7 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
192 192
 #else
193 193
 			auto libxSF = std::unique_ptr<XSFFile>(new XSFFile(ExtractDirectoryFromPath(xSF->GetFilename()) + xSF->GetTagValue(libTag), 4, 8));
194 194
 #endif
195
-			if (!RecursiveLoad2SF(libxSF.get(), level + 1))
195
+			if (!RecursiveLoadSNSF(libxSF.get(), level + 1))
196 196
 				return false;
197 197
 		}
198 198
 	} while (found);
... ...
@@ -200,14 +200,14 @@ static bool RecursiveLoad2SF(XSFFile *xSF, int level)
200 200
 	return true;
201 201
 }
202 202
 
203
-static bool Load2SF(XSFFile *xSF)
203
+static bool LoadSNSF(XSFFile *xSF)
204 204
 {
205 205
 	loaderwork.rom.clear();
206 206
 	loaderwork.sram.clear();
207 207
 	loaderwork.first = false;
208 208
 	loaderwork.base = 0;
209 209
 
210
-	return RecursiveLoad2SF(xSF, 1);
210
+	return RecursiveLoadSNSF(xSF, 1);
211 211
 }
212 212
 
213 213
 XSFPlayer_SNSF::XSFPlayer_SNSF(const std::string &filename) : XSFPlayer()
... ...
@@ -224,7 +224,7 @@ XSFPlayer_SNSF::XSFPlayer_SNSF(const std::wstring &filename) : XSFPlayer()
224 224
 
225 225
 bool XSFPlayer_SNSF::Load()
226 226
 {
227
-	if (!Load2SF(this->xSF.get()))
227
+	if (!LoadSNSF(this->xSF.get()))
228 228
 		return false;
229 229
 
230 230
 	Settings.SoundSync = true;