fix vignette and other stuff

This commit is contained in:
Toru the Red Fox 2026-03-03 20:59:21 +00:00
parent 5ea556d00b
commit 07b10d4662
5 changed files with 66 additions and 66 deletions

View file

@ -864,7 +864,7 @@ void UIScene_HUD::handleGameTick()
m_parentLayer->showComponent(m_iPad, eUIScene_HUD,false); m_parentLayer->showComponent(m_iPad, eUIScene_HUD,false);
return; return;
} }
m_parentLayer->showComponent(m_iPad, eUIScene_HUD,true); m_parentLayer->showComponent(m_iPad, eUIScene_HUD, false);
updateFrameTick(); updateFrameTick();
} }

View file

@ -91,28 +91,28 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
bool bTwoPlayerSplitscreen=false; bool bTwoPlayerSplitscreen=false;
currentGuiScaleFactor = (float) guiScale; // Keep static copy of scale so we know how gui coordinates map to physical pixels - this is also affected by the viewport currentGuiScaleFactor = (float) guiScale; // Keep static copy of scale so we know how gui coordinates map to physical pixels - this is also affected by the viewport
switch(guiScale) //switch(guiScale)
{ //{
case 3: //case 3:
splitYOffset = 0; // splitYOffset = 0;
break; // break;
case 4: //case 4:
splitYOffset = -5; // splitYOffset = -5;
break; // break;
default: // 2 //default: // 2
splitYOffset = 10; // splitYOffset = 10;
break; // break;
} //}
// Check which screen section this player is in // Check which screen section this player is in
switch(minecraft->player->m_iScreenSection) switch(minecraft->player->m_iScreenSection)
{ {
case C4JRender::VIEWPORT_TYPE_FULLSCREEN: case C4JRender::VIEWPORT_TYPE_FULLSCREEN:
// single player // single player
iSafezoneXHalf = screenWidth/20; // 5% iSafezoneXHalf = 0;//screenWidth/20; // 5%
iSafezoneYHalf = screenHeight/20; // 5% iSafezoneYHalf = 0;//screenHeight/20; // 5%
iSafezoneTopYHalf = iSafezoneYHalf; iSafezoneTopYHalf = 0;// iSafezoneYHalf;
iTooltipsYOffset=40+splitYOffset; iTooltipsYOffset = 40 + splitYOffset;
break; break;
case C4JRender::VIEWPORT_TYPE_SPLIT_TOP: case C4JRender::VIEWPORT_TYPE_SPLIT_TOP:
iSafezoneXHalf = screenWidth/10; // 5% (need to treat the whole screen is 2x this screen) iSafezoneXHalf = screenWidth/10; // 5% (need to treat the whole screen is 2x this screen)
@ -303,7 +303,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
RenderManager.StateSetBlendFactor(0xffffff |(((unsigned int)fVal)<<24)); RenderManager.StateSetBlendFactor(0xffffff |(((unsigned int)fVal)<<24));
currentGuiBlendFactor = fVal / 255.0f; currentGuiBlendFactor = fVal / 255.0f;
// RenderManager.StateSetBlendFactor(0x40ffffff); // RenderManager.StateSetBlendFactor(0x40ffffff);
glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); //glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); // this breaks the semi-transparent background for quickselect
blitOffset = -90; blitOffset = -90;
@ -341,8 +341,8 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
MemSect(0); MemSect(0);
glEnable(GL_BLEND); glEnable(GL_BLEND);
RenderManager.StateSetBlendFactor(0xffffff |(((unsigned int)fVal)<<24)); RenderManager.StateSetBlendFactor(0xffffff |(((unsigned int)fVal)<<24));
glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); //glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); // this is the legacy console blend func
//glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR); glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR); // this is the java blend func
// 4J Stu - We don't want to adjust the cursor by the safezone, we want it centred // 4J Stu - We don't want to adjust the cursor by the safezone, we want it centred
if(bTwoPlayerSplitscreen) if(bTwoPlayerSplitscreen)
{ {
@ -573,36 +573,36 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
{ {
// Render mount health // Render mount health
//int riderCurrentHealth = (int) ceil(living.get()->GetHealth()); int riderCurrentHealth = (int) ceil(living.get()->getHealth());
//float maxRiderHealth = living->GetMaxHealth(); float maxRiderHealth = living->getMaxHealth();
//int hearts = (int) (maxRiderHealth + .5f) / 2; int hearts = (int) (maxRiderHealth + .5f) / 2;
//if (hearts > 30) if (hearts > 30)
//{ {
// hearts = 30; hearts = 30;
//} }
//
//int yo = yLine1; int yo = yLine1;
//int baseHealth = 0; int baseHealth = 0;
//
//while (hearts > 0) while (hearts > 0)
//{ {
// int rowHearts = min(hearts, 10); int rowHearts = min(hearts, 10);
// hearts -= rowHearts; hearts -= rowHearts;
//
// for (int i = 0; i < rowHearts; i++) for (int i = 0; i < rowHearts; i++)
// { {
// int texBaseX = 52; int texBaseX = 52;
// int bg = 0; int bg = 0;
//
// if (foodBlink) bg = 1; if (foodBlink) bg = 1;
// int xo = xRight - i * 8 - 9; int xo = xRight - i * 8 - 9;
// blit(xo, yo, texBaseX + bg * 9, 9 * 1, 9, 9); blit(xo, yo, texBaseX + bg * 9, 9 * 1, 9, 9);
// if (i * 2 + 1 + baseHealth < riderCurrentHealth) blit(xo, yo, texBaseX + 4 * 9, 9 * 1, 9, 9); if (i * 2 + 1 + baseHealth < riderCurrentHealth) blit(xo, yo, texBaseX + 4 * 9, 9 * 1, 9, 9);
// if (i * 2 + 1 + baseHealth == riderCurrentHealth) blit(xo, yo, texBaseX + 5 * 9, 9 * 1, 9, 9); if (i * 2 + 1 + baseHealth == riderCurrentHealth) blit(xo, yo, texBaseX + 5 * 9, 9 * 1, 9, 9);
// } }
// yo -= 10; yo -= 10;
// baseHealth += 20; baseHealth += 20;
//} }
} }
// render air bubbles // render air bubbles
@ -932,7 +932,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
lastTickA = a; lastTickA = a;
// 4J Stu - This is now displayed in a xui scene // 4J Stu - This is now displayed in a xui scene
#if 0 //#if 0
// Jukebox CD message // Jukebox CD message
if (overlayMessageTime > 0) if (overlayMessageTime > 0)
{ {
@ -965,7 +965,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
glPopMatrix(); glPopMatrix();
} }
} }
#endif //#endif
unsigned int max = 10; unsigned int max = 10;
bool isChatting = false; bool isChatting = false;
@ -980,7 +980,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
glDisable(GL_ALPHA_TEST); glDisable(GL_ALPHA_TEST);
// 4J Stu - We have moved the chat text to a xui // 4J Stu - We have moved the chat text to a xui
#if 0 //#if 0
glPushMatrix(); glPushMatrix();
// 4J-PB we need to move this up a bit because we've moved the quick select // 4J-PB we need to move this up a bit because we've moved the quick select
//glTranslatef(0, ((float)screenHeight) - 48, 0); //glTranslatef(0, ((float)screenHeight) - 48, 0);
@ -1024,7 +1024,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
} }
} }
glPopMatrix(); glPopMatrix();
#endif //#endif
// 4J Stu - Copied over but not used // 4J Stu - Copied over but not used
#if 0 #if 0
@ -1162,7 +1162,7 @@ void Gui::renderVignette(float br, int w, int h)
if (br > 1) br = 1; if (br > 1) br = 1;
tbr += (br - tbr) * 0.01f; tbr += (br - tbr) * 0.01f;
#if 0 // 4J - removed - TODO put back when we have blend functions implemented //#if 0 // 4J - removed - TODO put back when we have blend functions implemented
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glDepthMask(false); glDepthMask(false);
glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR); glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_COLOR);
@ -1179,7 +1179,7 @@ void Gui::renderVignette(float br, int w, int h)
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
glColor4f(1, 1, 1, 1); glColor4f(1, 1, 1, 1);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
#endif //#endif
} }
void Gui::renderTp(float br, int w, int h) void Gui::renderTp(float br, int w, int h)

View file

@ -1994,9 +1994,9 @@ void Minecraft::run_middle()
checkGlError(L"Post render"); checkGlError(L"Post render");
MemSect(0); MemSect(0);
frames++; frames++;
pause = !isClientSide() && screen != NULL && screen->isPauseScreen(); //pause = !isClientSide() && screen != NULL && screen->isPauseScreen();
//pause = g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && app.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()); pause = g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && screen != NULL && screen->isPauseScreen();//app.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad());
pause = app.IsAppPaused(); //pause = app.IsAppPaused();
#ifndef _CONTENT_PACKAGE #ifndef _CONTENT_PACKAGE
while (System::nanoTime() >= lastTime + 1000000000) while (System::nanoTime() >= lastTime + 1000000000)
@ -2274,9 +2274,9 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
// setScreen(new InBedChatScreen()); // 4J - TODO put back in // setScreen(new InBedChatScreen()); // 4J - TODO put back in
} }
player->missTime = 10000; //layer->missTime = 10000;
player->lastClickTick[0] = ticks + 10000; //layer->lastClickTick[0] = ticks + 10000;
player->lastClickTick[1] = ticks + 10000; //layer->lastClickTick[1] = ticks + 10000;
} }
else if (screen != NULL && (dynamic_cast<InBedChatScreen *>(screen)!=NULL) && !player->isSleeping()) else if (screen != NULL && (dynamic_cast<InBedChatScreen *>(screen)!=NULL) && !player->isSleeping())
{ {

View file

@ -27,9 +27,9 @@ int Textures::preLoadedIdx[TN_COUNT];
wchar_t *Textures::preLoaded[TN_COUNT] = wchar_t *Textures::preLoaded[TN_COUNT] =
{ {
L"%blur%misc/pumpkinblur", L"%blur%misc/pumpkinblur",
// L"%blur%/misc/vignette", // Not currently used L"%blur%/misc/vignette", // Not currently used
L"%clamp%misc/shadow", L"%clamp%misc/shadow",
// L"/achievement/bg", // Not currently used L"/achievement/bg", // Not currently used
L"art/kz", L"art/kz",
L"environment/clouds", L"environment/clouds",
L"environment/rain", L"environment/rain",

View file

@ -18,9 +18,9 @@ class ResourceLocation;
typedef enum _TEXTURE_NAME typedef enum _TEXTURE_NAME
{ {
TN__BLUR__MISC_PUMPKINBLUR, TN__BLUR__MISC_PUMPKINBLUR,
// TN__BLUR__MISC_VIGNETTE, // Not currently used TN__BLUR__MISC_VIGNETTE, // Not currently used
TN__CLAMP__MISC_SHADOW, TN__CLAMP__MISC_SHADOW,
// TN_ACHIEVEMENT_BG, // Not currently used TN_ACHIEVEMENT_BG, // Not currently used
TN_ART_KZ, TN_ART_KZ,
TN_ENVIRONMENT_CLOUDS, TN_ENVIRONMENT_CLOUDS,
TN_ENVIRONMENT_RAIN, TN_ENVIRONMENT_RAIN,