1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-01 19:00:34 +02:00

fix TR2-4 textures

This commit is contained in:
XProger
2020-03-01 04:57:07 +03:00
parent 15ecaeace5
commit d27f9de1fd
2 changed files with 6 additions and 3 deletions

View File

@@ -5223,7 +5223,7 @@ namespace TR {
if (version == VER_TR3_PC || version == VER_TR4_PC) {
Color16 color;
stream.read(color.value);
v.color = color.getBGR();
v.color = color;
}
}
@@ -6338,7 +6338,7 @@ namespace TR {
index = indices + (y * w + x) / 2;
int idx = (x % 2) ? index->a : index->b;
Color16 &c = clut->color[idx];
ColorCLUT &c = clut->color[idx];
if (t->attribute == 1 && idx == 0)
dst->color[y * 256 + x].value = 0;
@@ -6386,7 +6386,9 @@ namespace TR {
AtlasColor *ptr = &dst->color[uv.y * 256];
for (int y = uv.y; y < uv.w; y++) {
for (int x = uv.x; x < uv.z; x++) {
ptr[x] = tiles32[t->tile].color[y * 256 + x];
Color32 c = tiles32[t->tile].color[y * 256 + x];
swap(c.r, c.b);
ptr[x] = c;
}
ptr += 256;
}

View File

@@ -1352,6 +1352,7 @@ namespace TR {
callback(Sound::openCDAudioWAD("audio/3/cdaudio.wad", track), userData);
return;
#else
return; // TODO ask hoster to fix problems with gzip for wav's
sprintf(title, "audio/3/track_%02d.wav", track);
#endif
break;