cleanup: remove console branches from render texture and world helpers

This commit is contained in:
MatthewBeshay
2026-03-26 19:24:04 +11:00
parent 6ef7d05f7e
commit 1fecbf297a
139 changed files with 535 additions and 535 deletions

View File

@@ -384,7 +384,7 @@ int Textures::loadTexture(int idx) {
// renderer that map the single 8-bit channel to RGBA differently.
void Textures::setTextureFormat(const std::wstring& resourceName) {
// 4J Stu - These texture formats are not currently in the render header
#ifdef _XBOX
#if 0
if (resourceName == L"/environment/clouds.png") {
TEXTURE_FORMAT = C4JRender::TEXTURE_FORMAT_R1G1B1Ax;
} else if (resourceName == L"%blur%/misc/pumpkinblur.png") {
@@ -701,7 +701,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) {
int g = (rawPixels[i] >> 8) & 0xff;
int b = (rawPixels[i]) & 0xff;
#ifdef _XBOX
#if 0
newPixels[i * 4 + 0] = (uint8_t)a;
newPixels[i * 4 + 1] = (uint8_t)r;
newPixels[i * 4 + 2] = (uint8_t)g;
@@ -753,7 +753,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) {
// rather than generating if possible
if (img->getData(level)) {
memcpy(tempData, img->getData(level), ww * hh * 4);
#ifndef _XBOX
#if 1
// Swap ARGB to RGBA
for (int i = 0; i < ww * hh; i++) {
tempData[i] = (tempData[i] >> 24) | (tempData[i] << 8);
@@ -770,7 +770,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) {
((x * 2 + 1) + (y * 2 + 1) * ow) * 4);
int c3 = pixels->getInt(
((x * 2 + 0) + (y * 2 + 1) * ow) * 4);
#ifndef _XBOX
#if 1
// 4J - convert our RGBA texels to ARGB that crispBlend
// is expecting 4jcraft, added uint cast to pervent
// shift of neg int
@@ -786,7 +786,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) {
int col =
Texture::crispBlend(Texture::crispBlend(c0, c1),
Texture::crispBlend(c2, c3));
#ifndef _XBOX
#if 1
// 4J - and back from ARGB -> RGBA
col = ((unsigned int)col << 8) | ((col >> 24) & 0xff);
#endif
@@ -892,7 +892,7 @@ void Textures::replaceTexture(intArray rawPixels, int w, int h, int id) {
// New
// glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL12.GL_BGRA,
// GL12.GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
#ifdef _XBOX
#if 0
RenderManager.TextureDataUpdate(pixels->getBuffer(), 0);
#else
RenderManager.TextureDataUpdate(0, 0, w, h, pixels->getBuffer(), 0);
@@ -932,7 +932,7 @@ void Textures::replaceTextureDirect(intArray rawPixels, int w, int h, int id) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
#ifdef _XBOX
#if 0
RenderManager.TextureDataUpdate(rawPixels.data, 0);
#else
RenderManager.TextureDataUpdate(0, 0, w, h, rawPixels.data, 0);
@@ -969,7 +969,7 @@ void Textures::replaceTextureDirect(shortArray rawPixels, int w, int h,
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
#ifdef _XBOX
#if 0
RenderManager.TextureDataUpdate(rawPixels.data, 0);
#else
RenderManager.TextureDataUpdate(0, 0, w, h, rawPixels.data, 0);
@@ -1336,7 +1336,7 @@ BufferedImage* Textures::readImage(
drive); // new BufferedImage(name,false,isTu,drive);
} else {
const char* pchName = wstringtofilename(name);
#ifdef __PS3__
#if 0
if (app.GetBootedFromDiscPatch() && app.IsFileInPatchList(pchName)) {
char* pchUsrDir = app.GetBDUsrDirPath(pchName);
std::wstring wstr(pchUsrDir, pchUsrDir + strlen(pchUsrDir));