Fix PAL4 textures

This commit is contained in:
Flyinghead 2018-07-09 19:20:33 +02:00
parent 6df46b1d83
commit 889f722e73
2 changed files with 4 additions and 4 deletions

View File

@ -293,7 +293,7 @@ pixelcvt32_start(convYUV_TW,2,2)
}
pixelcvt_end;
pixelcvt_size_start(convPAL4_TW,2,4)
pixelcvt_size_start(convPAL4_TW,4,4)
{
u8* p_in=(u8*)data;
u32* pal=&palette_ram[palette_index];

View File

@ -309,7 +309,7 @@ struct TextureCacheData
if (texconv32 != NULL && (pal_table_rev == NULL || textype == GL_UNSIGNED_INT_8_8_8_8))
{
PixelBuffer<u32> pbt;
pbt.p_buffer_start = pbt.p_current_line = (u32*)temp_tex_buffer;
pbt.p_buffer_start = pbt.p_current_line = pbt.p_current_pixel = (u32*)temp_tex_buffer;
pbt.pixels_per_line = w;
texconv32(&pbt, (u8*)&vram[sa], stride, h);
@ -317,8 +317,8 @@ struct TextureCacheData
else if (texconv != NULL)
{
PixelBuffer<u16> pbt;
pbt.p_buffer_start=pbt.p_current_line=temp_tex_buffer;
pbt.pixels_per_line=w;
pbt.p_buffer_start = pbt.p_current_line = pbt.p_current_pixel = temp_tex_buffer;
pbt.pixels_per_line = w;
texconv(&pbt,(u8*)&vram[sa],stride,h);
}