fix raster bugs

This commit is contained in:
aap
2021-02-18 19:57:42 +01:00
parent 65c619b3e7
commit cc550ff69c
6 changed files with 27 additions and 27 deletions

View File

@@ -742,7 +742,7 @@ rasterFromImage(Raster *raster, Image *image)
}
D3dRaster *natras = GETD3DRASTEREXT(raster);
int32 format = raster->format&0xF00;
int32 format = raster->format&(Raster::PAL8 | Raster::PAL4 | 0xF00);
switch(image->depth){
case 32:
if(format == Raster::C8888)
@@ -781,6 +781,7 @@ rasterFromImage(Raster *raster, Image *image)
break;
default:
err:
fprintf(stderr, "%d %x\n", image->depth, format); fflush(stdout);
RWERROR((ERR_INVRASTER));
return 0;
}

View File

@@ -883,8 +883,8 @@ readNativeTexture(Stream *stream)
RWERROR((ERR_PLATFORM, platform));
return nil;
}
if(version < 0x34001){
RWERROR((ERR_VERSION, version));
if(vers < 0x34001){
RWERROR((ERR_VERSION, vers));
return nil;
}
Texture *tex = Texture::create(nil);