Corrected the custom graphic file loading procedure in the Scenario Editor, so that files/folders with point . characters in their name won't prevent correct loading. (useful if we plan to use a "scenario_filename.exr" ressource folder).

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@124 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
Chokboyz
2009-09-15 17:28:59 +00:00
parent 5d0ee55d78
commit f9d84777f8

View File

@@ -519,7 +519,7 @@ void load_scenario()
//extern GWorldPtr spec_scen_g;
void load_spec_graphics()
{
short i,file_num;
short i;
char file_name[256];
if (spec_scen_g != NULL) {
@@ -529,14 +529,10 @@ void load_spec_graphics()
//build_scen_file_name(file_name);
sprintf(file_name,"%s",szFileName);
for (i = 0; i < 256; i++) {
if (file_name[i] == '.') {
file_name[i + 1] = 'b';
file_name[i + 2] = 'm';
file_name[i + 3] = 'p';
i = 256;
}
}
i = strlen(file_name);
file_name[i - 3] = 'b';
file_name[i - 2] = 'm';
file_name[i - 1] = 'p';
suppress_load_file_name = TRUE;
spec_scen_g = ReadBMP(file_name);
suppress_load_file_name = FALSE;