mirror of
https://github.com/aap/librw.git
synced 2026-01-24 12:02:58 +00:00
fix raster bugs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user