mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-22 17:47:20 +03:00
Fixes
This commit is contained in:
parent
6992f313a9
commit
dfdd037ed3
4 changed files with 61 additions and 61 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
#define LOGS
|
#define LOGS
|
||||||
#ifdef __SYMBIAN32__
|
#ifdef __SYMBIAN32__
|
||||||
#define LOGS_RDEBUG
|
#define LOGS_RDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef AUDIO_OAL
|
#ifdef AUDIO_OAL
|
||||||
#undef AUDIO_OAL
|
#undef AUDIO_OAL
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ static int clamp(int size, int targetSize)
|
||||||
static void halveTexture(RwTexture *texture){
|
static void halveTexture(RwTexture *texture){
|
||||||
if(texture == nil)
|
if(texture == nil)
|
||||||
return;
|
return;
|
||||||
|
debug("halving %s", texture->name);
|
||||||
|
|
||||||
RwRaster *oldRaster = RwTextureGetRaster(texture);
|
RwRaster *oldRaster = RwTextureGetRaster(texture);
|
||||||
if(oldRaster == nil)
|
if(oldRaster == nil)
|
||||||
|
|
@ -156,6 +157,7 @@ static void downscaleTexture(RwTexture *texture) {
|
||||||
RwRaster *oldRaster = RwTextureGetRaster(texture);
|
RwRaster *oldRaster = RwTextureGetRaster(texture);
|
||||||
if (oldRaster == nil)
|
if (oldRaster == nil)
|
||||||
return;
|
return;
|
||||||
|
debug("downscaling %s", texture->name);
|
||||||
|
|
||||||
extern bool moreVram;
|
extern bool moreVram;
|
||||||
int targetSize = moreVram ? 64 : 32;
|
int targetSize = moreVram ? 64 : 32;
|
||||||
|
|
@ -211,7 +213,6 @@ RwTextureGtaStreamRead(RwStream *stream)
|
||||||
#ifdef __SYMBIAN32__
|
#ifdef __SYMBIAN32__
|
||||||
else if (gGameState != GS_PLAYING_GAME || FrontEndMenuManager.m_bMenuActive) {
|
else if (gGameState != GS_PLAYING_GAME || FrontEndMenuManager.m_bMenuActive) {
|
||||||
if (tex != nil && tex->raster != nil && (RwRasterGetWidth(tex->raster) > 128 || RwRasterGetHeight(tex->raster) > 128)) {
|
if (tex != nil && tex->raster != nil && (RwRasterGetWidth(tex->raster) > 128 || RwRasterGetHeight(tex->raster) > 128)) {
|
||||||
// debug("downscaling %s", tex->name);
|
|
||||||
halveTexture(tex);
|
halveTexture(tex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -533,7 +534,7 @@ CreateTxdImageForVideoCard()
|
||||||
// so let's hope that is the case for all
|
// so let's hope that is the case for all
|
||||||
rw::gl3::needToReadBackTextures = true;
|
rw::gl3::needToReadBackTextures = true;
|
||||||
#elif defined RW_GLES1
|
#elif defined RW_GLES1
|
||||||
rw::gl1::needToReadBackTextures = true;
|
rw::gles1::needToReadBackTextures = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISABLE_VSYNC_ON_TEXTURE_CONVERSION
|
#ifdef DISABLE_VSYNC_ON_TEXTURE_CONVERSION
|
||||||
|
|
@ -585,7 +586,7 @@ CreateTxdImageForVideoCard()
|
||||||
#ifdef RW_GL3
|
#ifdef RW_GL3
|
||||||
rw::gl3::needToReadBackTextures = false;
|
rw::gl3::needToReadBackTextures = false;
|
||||||
#elif defined RW_GLES1
|
#elif defined RW_GLES1
|
||||||
rw::gl1::needToReadBackTextures = false;
|
rw::gles1::needToReadBackTextures = false;
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -622,7 +623,7 @@ CreateTxdImageForVideoCard()
|
||||||
#ifdef RW_GL3
|
#ifdef RW_GL3
|
||||||
rw::gl3::needToReadBackTextures = false;
|
rw::gl3::needToReadBackTextures = false;
|
||||||
#elif defined RW_GLES1
|
#elif defined RW_GLES1
|
||||||
rw::gl1::needToReadBackTextures = false;
|
rw::gles1::needToReadBackTextures = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!pDir->WriteDirFile("models\\txd.dir")) {
|
if (!pDir->WriteDirFile("models\\txd.dir")) {
|
||||||
|
|
|
||||||
2
vendor/librw/src/gl/rwgl3.h
vendored
2
vendor/librw/src/gl/rwgl3.h
vendored
|
|
@ -18,7 +18,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#ifdef _DEBUG
|
||||||
extern void re3_debug(const char *format, ...);
|
extern void re3_debug(const char *format, ...);
|
||||||
extern void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
|
extern void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
|
||||||
#define CHECK_GL_ERROR(trace) do { \
|
#define CHECK_GL_ERROR(trace) do { \
|
||||||
|
|
|
||||||
5
vendor/librw/src/gles1/gl1raster.cpp
vendored
5
vendor/librw/src/gles1/gl1raster.cpp
vendored
|
|
@ -395,11 +395,8 @@ rasterLock(Raster *raster, int32 level, int32 lockMode)
|
||||||
px = (uint8*)rwMalloc(allocSz, MEMDUR_EVENT | ID_DRIVER);
|
px = (uint8*)rwMalloc(allocSz, MEMDUR_EVENT | ID_DRIVER);
|
||||||
assert(raster->pixels == nil);
|
assert(raster->pixels == nil);
|
||||||
raster->pixels = px;
|
raster->pixels = px;
|
||||||
#ifdef __SYMBIAN32__
|
|
||||||
memset(px, 0, allocSz);
|
memset(px, 0, allocSz);
|
||||||
#else
|
|
||||||
glReadBuffer(GL_BACK);
|
|
||||||
#endif
|
|
||||||
glReadPixels(0, 0, raster->width, raster->height, GL_RGB, GL_UNSIGNED_BYTE, px);
|
glReadPixels(0, 0, raster->width, raster->height, GL_RGB, GL_UNSIGNED_BYTE, px);
|
||||||
|
|
||||||
raster->privateFlags = lockMode;
|
raster->privateFlags = lockMode;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue