Merge pull request #697 from 0lvin/for_review

soft: fix m8 image load
This commit is contained in:
Yamagi 2021-04-08 11:05:56 +02:00 committed by GitHub
commit 4fd0369f47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -412,6 +412,8 @@ R_LoadM8 (char *name, imagetype_t type)
strcpy (image->name, name); strcpy (image->name, name);
image->width = LittleLong (mt->width[0]); image->width = LittleLong (mt->width[0]);
image->height = LittleLong (mt->height[0]); image->height = LittleLong (mt->height[0]);
image->asset_width = image->width;
image->asset_height = image->height;
image->type = type; image->type = type;
image->registration_sequence = registration_sequence; image->registration_sequence = registration_sequence;
ofs = LittleLong (mt->offsets[0]); ofs = LittleLong (mt->offsets[0]);
@ -744,6 +746,7 @@ R_InitTextures (void)
r_notexture_mip = &r_notexture_buffer.image; r_notexture_mip = &r_notexture_buffer.image;
r_notexture_mip->width = r_notexture_mip->height = 16; r_notexture_mip->width = r_notexture_mip->height = 16;
r_notexture_mip->asset_width = r_notexture_mip->asset_height = 16;
r_notexture_mip->pixels[0] = r_notexture_buffer.buffer; r_notexture_mip->pixels[0] = r_notexture_buffer.buffer;
R_RestoreImagePointers(r_notexture_mip, 0); R_RestoreImagePointers(r_notexture_mip, 0);