CPC Mode 5 fixes :
* Be case unsensitive when looking for the GFX-file, * When an underlay is hidden, do not use it and replace it with color 0, 1, 2 or 3. Allows to see pixel data alone or disable rasters on one color, as it's possible to get confused quite easily. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1964 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -3101,14 +3101,25 @@ void Load_CM5(T_IO_Context* context)
|
||||
fclose(file);
|
||||
|
||||
// Load the pixeldata to the 5th layer
|
||||
filename[strlen(filename) - 3] = 0;
|
||||
strcat(filename,"gfx");
|
||||
if (!(file = fopen(filename, "rb")))
|
||||
{
|
||||
File_error = 1;
|
||||
return;
|
||||
}
|
||||
char* ext = filename + strlen(filename) - 3;
|
||||
int idx = 8;
|
||||
do {
|
||||
if (-- idx < 0)
|
||||
{
|
||||
File_error = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
ext[0] = (idx & 1) ? 'g':'G';
|
||||
ext[1] = (idx & 2) ? 'f':'F';
|
||||
ext[2] = (idx & 4) ? 'x':'X';
|
||||
|
||||
printf("trying to load %s...\n", filename);
|
||||
|
||||
file = fopen(filename, "rb");
|
||||
} while(file == NULL);
|
||||
}
|
||||
Set_loading_layer(context, 4);
|
||||
|
||||
for (ty = 0; ty < 256; ty++)
|
||||
|
||||
Reference in New Issue
Block a user