feat: remove experience

This commit is contained in:
str1k3r committed 2026-09-26 17:17:51 -04:00
1 parent bdfe5350cd
commit 41d166afed
83 files changed
+47 -1501

No files matched your search

@@ -423,7 +423,6 @@ void IUIScene_CreativeMenu::staticCtor()
// Brewing (TODO)
DEF(eCreativeInventory_Brewing)
ITEM(Item::expBottle_Id)
// 4J Stu - Anything else added here also needs to be added to the key handler below
ITEM(Item::ghastTear_Id)
@@ -84,40 +84,6 @@ void UIControl_EnchantmentButton::render(IggyCustomDrawCallbackRegion *region)
//}
glColor4f(1, 1, 1, 1);
if (cost != 0)
{
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.1f);
Minecraft *pMinecraft = Minecraft::GetInstance();
wstring line = _toString<int>(cost);
Font *font = pMinecraft->altFont;
//int col = 0x685E4A;
unsigned int col = m_textColour;
if (pMinecraft->localplayers[enchantingScene->getPad()]->experienceLevel < cost && !pMinecraft->localplayers[enchantingScene->getPad()]->abilities.instabuild)
{
col = m_textDisabledColour;
font->drawWordWrap(m_enchantmentString, 0, 0, (float)m_width/ss, col, (float)m_height/ss);
font = pMinecraft->font;
//col = (0x80ff20 & 0xfefefe) >> 1;
//font->drawShadow(line, (bwidth - font->width(line))/ss, 7, col);
}
else
{
if (m_bHasFocus)
{
//col = 0xffff80;
col = m_textFocusColour;
}
font->drawWordWrap(m_enchantmentString, 0, 0, (float)m_width/ss, col, (float)m_height/ss);
font = pMinecraft->font;
//col = 0x80ff20;
//font->drawShadow(line, (bwidth - font->width(line))/ss, 7, col);
}
glDisable(GL_ALPHA_TEST);
}
else
{
}
//Lighting::turnOff();
glDisable(GL_RESCALE_NORMAL);
@@ -133,23 +99,6 @@ void UIControl_EnchantmentButton::updateState()
int cost = menu->costs[m_index];
Minecraft *pMinecraft = Minecraft::GetInstance();
if(cost > pMinecraft->localplayers[enchantingScene->getPad()]->experienceLevel && !pMinecraft->localplayers[enchantingScene->getPad()]->abilities.instabuild)
{
// Dark background
state = eState_Inactive;
}
else
{
// Light background and focus background
if(m_bHasFocus)
{
state = eState_Selected;
}
else
{
state = eState_Active;
}
}
if(cost != m_lastCost)
{
@@ -851,29 +851,6 @@ void UIScene_HUD::handleGameTick()
#endif
SetActiveSlot(pMinecraft->localplayers[m_iPad]->inventory->selected);
// Update xp progress
if (pMinecraft->localgameModes[m_iPad]->canHurtPlayer())
{
ShowExpBar(true);
int xpNeededForNextLevel = pMinecraft->localplayers[m_iPad]->getXpNeededForNextLevel();
int progress = (int)(pMinecraft->localplayers[m_iPad]->experienceProgress *xpNeededForNextLevel);
SetExpBarProgress((float)progress/xpNeededForNextLevel);
}
else
{
ShowExpBar(false);
}
// Update xp level
if (pMinecraft->localgameModes[m_iPad]->hasExperience() && pMinecraft->localplayers[m_iPad]->experienceLevel > 0)
{
SetExpLevel(pMinecraft->localplayers[m_iPad]->experienceLevel);
}
else
{
SetExpLevel(0);
}
if (pMinecraft->localgameModes[m_iPad]->canHurtPlayer())
{
ShowHealth(true);
@@ -10,12 +10,12 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
m_buttons[BUTTON_HAO_CHANGESKIN].init(app.GetString(IDS_CHANGE_SKIN),BUTTON_HAO_CHANGESKIN);
m_buttons[BUTTON_HAO_HOWTOPLAY].init(app.GetString(IDS_HOW_TO_PLAY),BUTTON_HAO_HOWTOPLAY);
m_buttons[BUTTON_HAO_CONTROLS].init(app.GetString(IDS_CONTROLS),BUTTON_HAO_CONTROLS);
m_buttons[BUTTON_HAO_SETTINGS].init(app.GetString(IDS_SETTINGS),BUTTON_HAO_SETTINGS);
m_buttons[BUTTON_HAO_CREDITS].init(app.GetString(IDS_CREDITS),BUTTON_HAO_CREDITS);
//m_buttons[BUTTON_HAO_REINSTALL].init(app.GetString(IDS_REINSTALL_CONTENT),BUTTON_HAO_REINSTALL);
m_buttons[BUTTON_HAO_RESETTODEFAULTS].init(app.GetString(IDS_RESET_TO_DEFAULTS),BUTTON_HAO_RESETTODEFAULTS);
m_buttons[BUTTON_HAO_DEBUG].init(app.GetString(IDS_DEBUG_SETTINGS),BUTTON_HAO_DEBUG);
/* 4J-TomK - we should never remove a control before the other buttons controls are initialised!
@@ -70,11 +70,6 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void *initData,
}
}
if(!ProfileManager.IsFullVersion() )//|| ProfileManager.IsGuest(m_iPad))
{
removeControl( &m_buttons[BUTTON_HAO_CHANGESKIN], false);
}
//StorageManager.TMSPP_GetUserQuotaInfo(C4JStorage::eGlobalStorage_TitleUser,iPad);
//StorageManager.WebServiceRequestGetFriends(iPad);
}
@@ -165,11 +160,6 @@ void UIScene_HelpAndOptionsMenu::handleReload()
#endif
}
if(!ProfileManager.IsFullVersion() )//|| ProfileManager.IsGuest(m_iPad))
{
removeControl( &m_buttons[BUTTON_HAO_CHANGESKIN], false);
}
doHorizontalResizeCheck();
}
@@ -208,9 +198,6 @@ void UIScene_HelpAndOptionsMenu::handlePress(F64 controlId, F64 childId)
{
switch((int)controlId)
{
case BUTTON_HAO_CHANGESKIN:
ui.NavigateToScene(m_iPad, eUIScene_SkinSelectMenu);
break;
case BUTTON_HAO_HOWTOPLAY:
ui.NavigateToScene(m_iPad, eUIScene_HowToPlayMenu);
break;
@@ -223,6 +210,15 @@ void UIScene_HelpAndOptionsMenu::handlePress(F64 controlId, F64 childId)
case BUTTON_HAO_CREDITS:
ui.NavigateToScene(m_iPad, eUIScene_Credits);
break;
case BUTTON_HAO_RESETTODEFAULTS:
{
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_DEFAULTS_TITLE, IDS_DEFAULTS_TEXT, uiIDA, 2, m_iPad,&UIScene_HelpAndOptionsMenu::ResetDefaultsDialogReturned,this, app.GetStringTable(), NULL, 0, false);
}
break;
case BUTTON_HAO_REINSTALL:
ui.NavigateToScene(m_iPad, eUIScene_ReinstallMenu);
break;
@@ -231,3 +227,22 @@ void UIScene_HelpAndOptionsMenu::handlePress(F64 controlId, F64 childId)
break;
}
}
int UIScene_HelpAndOptionsMenu::ResetDefaultsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
UIScene_HelpAndOptionsMenu* pClass = (UIScene_HelpAndOptionsMenu*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
{
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
app.SetDefaultOptions(StorageManager.GetDashboardProfileSettings(pClass->m_iPad),pClass->m_iPad);
#else
app.SetDefaultOptions(ProfileManager.GetDashboardProfileSettings(pClass->m_iPad),pClass->m_iPad);
#endif
// if the profile data has been changed, then force a profile write
// It seems we're allowed to break the 5 minute rule if it's the result of a user action
app.CheckGameSettingsChanged(true,iPad);
}
return 0;
}
@@ -2,12 +2,12 @@
#include "UIScene.h"
#define BUTTON_HAO_CHANGESKIN 0
#define BUTTON_HAO_HOWTOPLAY 1
#define BUTTON_HAO_CONTROLS 2
#define BUTTON_HAO_SETTINGS 3
#define BUTTON_HAO_CREDITS 4
#define BUTTON_HAO_REINSTALL 5
#define BUTTON_HAO_HOWTOPLAY 0
#define BUTTON_HAO_CONTROLS 1
#define BUTTON_HAO_SETTINGS 2
#define BUTTON_HAO_CREDITS 3
#define BUTTON_HAO_REINSTALL 4
#define BUTTON_HAO_RESETTODEFAULTS 5
#define BUTTON_HAO_DEBUG 6
#define BUTTONS_HAO_MAX BUTTON_HAO_DEBUG + 1
@@ -16,12 +16,12 @@ class UIScene_HelpAndOptionsMenu : public UIScene
private:
UIControl_Button m_buttons[BUTTONS_HAO_MAX];
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_CHANGESKIN], "Button1")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_HOWTOPLAY], "Button2")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_CONTROLS], "Button3")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_SETTINGS], "Button4")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_CREDITS], "Button5")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_REINSTALL], "Button6")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_HOWTOPLAY], "Button1")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_CONTROLS], "Button2")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_SETTINGS], "Button3")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_CREDITS], "Button4")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_REINSTALL], "Button5")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_RESETTODEFAULTS], "Button6")
UI_MAP_ELEMENT( m_buttons[BUTTON_HAO_DEBUG], "Button7")
UI_END_MAP_ELEMENTS_AND_NAMES()
@@ -47,4 +47,6 @@ public:
protected:
void handlePress(F64 controlId, F64 childId);
static int ResetDefaultsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
};