mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 04:50:00 +00:00
little support for gl3 textures; txd.img enabled again
This commit is contained in:
parent
d397a59951
commit
f399fd1050
2
librw
2
librw
|
@ -1 +1 @@
|
||||||
Subproject commit 4db08e15e8bdd0286195f48a28d4c8108ea64c6a
|
Subproject commit eb71ca25d0c4f10b39c653d9b9847e38aac198d7
|
|
@ -191,7 +191,7 @@ enum Config {
|
||||||
#define TOGGLEABLE_BETA_FEATURES // toggleable from debug menu. not too many things
|
#define TOGGLEABLE_BETA_FEATURES // toggleable from debug menu. not too many things
|
||||||
#define MORE_LANGUAGES // Add more translations to the game
|
#define MORE_LANGUAGES // Add more translations to the game
|
||||||
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
|
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
|
||||||
//#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||||
//#define USE_TEXTURE_POOL
|
//#define USE_TEXTURE_POOL
|
||||||
//#define OPENAL
|
//#define OPENAL
|
||||||
|
|
||||||
|
|
|
@ -294,6 +294,14 @@ static rw::Raster*
|
||||||
ConvertTexRaster(rw::Raster *ras)
|
ConvertTexRaster(rw::Raster *ras)
|
||||||
{
|
{
|
||||||
using namespace rw;
|
using namespace rw;
|
||||||
|
|
||||||
|
if(ras->platform == rw::platform)
|
||||||
|
return ras;
|
||||||
|
// compatible platforms
|
||||||
|
if(ras->platform == PLATFORM_D3D8 && rw::platform == PLATFORM_D3D9 ||
|
||||||
|
ras->platform == PLATFORM_D3D9 && rw::platform == PLATFORM_D3D8)
|
||||||
|
return ras;
|
||||||
|
|
||||||
Image *img = ras->toImage();
|
Image *img = ras->toImage();
|
||||||
ras->destroy();
|
ras->destroy();
|
||||||
img->unindex();
|
img->unindex();
|
||||||
|
@ -306,9 +314,7 @@ ConvertTexRaster(rw::Raster *ras)
|
||||||
RwBool rwNativeTextureHackRead(RwStream *stream, RwTexture **tex, RwInt32 size)
|
RwBool rwNativeTextureHackRead(RwStream *stream, RwTexture **tex, RwInt32 size)
|
||||||
{
|
{
|
||||||
*tex = Texture::streamReadNative(stream);
|
*tex = Texture::streamReadNative(stream);
|
||||||
#ifdef RW_GL3
|
#ifdef LIBRW
|
||||||
if(strcmp((*tex)->name, "copnu") == 0)
|
|
||||||
tex = tex;
|
|
||||||
(*tex)->raster = ConvertTexRaster((*tex)->raster);
|
(*tex)->raster = ConvertTexRaster((*tex)->raster);
|
||||||
#endif
|
#endif
|
||||||
return *tex != nil;
|
return *tex != nil;
|
||||||
|
@ -830,4 +836,10 @@ RwBool RtCharsetDestroy(RtCharset * charSet) { charSet->destroy(); return
|
||||||
|
|
||||||
|
|
||||||
// fake shit
|
// fake shit
|
||||||
RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags) { return 1; }
|
RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags)
|
||||||
|
{
|
||||||
|
#ifdef RW_GL3
|
||||||
|
return '3LGO';
|
||||||
|
#endif
|
||||||
|
return flags & 0xF00;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue