@@ -157,18 +157,16 @@ fn create_resources(
157
157
cache : & mut cache:: ResourceCache ,
158
158
working_dir : & Path ,
159
159
output_dir : & PathBuf ,
160
- sprite_output_dir : & PathBuf ,
161
160
shut_up : bool ,
162
161
) {
163
162
// Make sure output directory exists
164
163
fs:: create_dir_all ( output_dir) . expect ( "Could not create resource directory" ) ;
165
- fs:: create_dir_all ( sprite_output_dir) . expect ( "Could not create sprite resource directory" ) ;
166
164
167
165
// Create spritesheets
168
166
for sheet in mod_info. resources . spritesheets . values ( ) {
169
167
let sheet_file = spritesheet:: get_spritesheet_bundles (
170
168
sheet,
171
- sprite_output_dir ,
169
+ output_dir ,
172
170
cache_bundle,
173
171
mod_info,
174
172
shut_up,
@@ -178,7 +176,7 @@ fn create_resources(
178
176
179
177
// Create fonts
180
178
for font in mod_info. resources . fonts . values ( ) {
181
- let font_file = bmfont:: get_font_bundles ( font, sprite_output_dir , cache_bundle, mod_info, shut_up) ;
179
+ let font_file = bmfont:: get_font_bundles ( font, output_dir , cache_bundle, mod_info, shut_up) ;
182
180
cache. add_font ( font, font_file. cache_name ( working_dir) ) ;
183
181
}
184
182
@@ -194,13 +192,13 @@ fn create_resources(
194
192
195
193
// Collect all errors
196
194
( || {
197
- sprite. save ( sprite_output_dir . join ( base. to_string ( ) + "-uhd.png" ) ) ?;
195
+ sprite. save ( output_dir . join ( base. to_string ( ) + "-uhd.png" ) ) ?;
198
196
199
197
spritesheet:: downscale ( & mut sprite, 2 ) ;
200
- sprite. save ( sprite_output_dir . join ( base. to_string ( ) + "-hd.png" ) ) ?;
198
+ sprite. save ( output_dir . join ( base. to_string ( ) + "-hd.png" ) ) ?;
201
199
202
200
spritesheet:: downscale ( & mut sprite, 2 ) ;
203
- sprite. save ( sprite_output_dir . join ( base. to_string ( ) + ".png" ) )
201
+ sprite. save ( output_dir . join ( base. to_string ( ) + ".png" ) )
204
202
} ) ( )
205
203
. expect ( & format ! (
206
204
"Unable to copy sprite at {}" ,
@@ -247,7 +245,6 @@ fn create_package_resources_only(
247
245
& mut new_cache,
248
246
output_dir,
249
247
output_dir,
250
- output_dir,
251
248
shut_up,
252
249
) ;
253
250
@@ -306,7 +303,6 @@ fn create_package(
306
303
& mut cache_bundle,
307
304
& mut new_cache,
308
305
& working_dir,
309
- & working_dir. join ( "resources" ) ,
310
306
& working_dir. join ( "resources" ) . join ( & mod_file_info. id ) ,
311
307
false ,
312
308
) ;
0 commit comments