chore: fmt

This commit is contained in:
Sally Knight 2026-03-27 20:37:52 +03:00 committed by Tropical
parent 1a478c8a5b
commit 02845d9a5f
5 changed files with 26 additions and 25 deletions

View file

@ -43,7 +43,7 @@ void Button::render(Minecraft* minecraft, int xm, int ym) {
Font* font = minecraft->font;
// glBindTexture(GL_TEXTURE_2D, minecraft->textures->loadTexture(
// TN_GUI_GUI)); // 4J was L"/gui/gui.png"
// TN_GUI_GUI)); // 4J was L"/gui/gui.png"
minecraft->textures->bindTexture(&GUI_GUI_LOCATION);
glColor4f(1, 1, 1, 1);

View file

@ -68,14 +68,14 @@ void AchievementPopup::prepareWindow() {
void AchievementPopup::render() {
// 4J Unused
#if ENABLE_JAVA_GUIS
if (Minecraft::warezTime > 0)
{
if (Minecraft::warezTime > 0) {
glDisable(GL_DEPTH_TEST);
glDepthMask(false);
Lighting::turnOff();
prepareWindow();
std::wstring title = L"Minecraft " + SharedConstants::VERSION_STRING + L" Unlicensed Copy :(";
std::wstring title = L"Minecraft " + SharedConstants::VERSION_STRING +
L" Unlicensed Copy :(";
std::wstring msg1 = L"(Or logged in from another location)";
std::wstring msg2 = L"Purchase at minecraft.net";
@ -89,16 +89,12 @@ void AchievementPopup::render() {
if (ach == NULL || startTime == 0) return;
double time = (System::currentTimeMillis() - startTime) / 3000.0;
if (isHelper)
{
}
else if (!isHelper && (time < 0 || time > 1))
{
if (isHelper) {
} else if (!isHelper && (time < 0 || time > 1)) {
startTime = 0;
return;
}
prepareWindow();
glDisable(GL_DEPTH_TEST);
glDepthMask(false);
@ -112,7 +108,7 @@ void AchievementPopup::render() {
yo = yo * yo;
int xx = width - 160;
int yy = 0 - (int) (yo * 36);
int yy = 0 - (int)(yo * 36);
int tex = mc->textures->loadTexture(TN_ACHIEVEMENT_BG);
glColor4f(1, 1, 1, 1);
glEnable(GL_TEXTURE_2D);
@ -122,13 +118,13 @@ void AchievementPopup::render() {
blit(xx, yy, 96, 202, 160, 32);
// if (isHelper)
// {
// {
// mc->font->drawWordWrap(desc, xx + 30, yy + 7, 120, 0xffffffff);
// }
// else
// {
mc->font->draw(title, xx + 30, yy + 7, 0xffffff00);
mc->font->draw(desc, xx + 30, yy + 18, 0xffffffff);
// else
// {
mc->font->draw(title, xx + 30, yy + 7, 0xffffff00);
mc->font->draw(desc, xx + 30, yy + 18, 0xffffffff);
// }
glPushMatrix();

View file

@ -12,8 +12,8 @@ ResourceLocation GUI_CRAFTING_LOCATION = ResourceLocation(TN_GUI_CRAFTING);
CraftingScreen::CraftingScreen(std::shared_ptr<Inventory> inventory,
Level* level, int x, int y, int z)
: AbstractContainerScreen(new CraftingMenu(inventory, level, x, y, z)) {
this->inventory = inventory;
}
this->inventory = inventory;
}
void CraftingScreen::removed() {
AbstractContainerScreen::removed();
@ -21,7 +21,8 @@ void CraftingScreen::removed() {
}
void CraftingScreen::renderLabels() {
font->draw(Language::getInstance()->getElement(L"container.crafting"), 8 + 16 + 4, 2 + 2 + 2, 0x404040);
font->draw(Language::getInstance()->getElement(L"container.crafting"),
8 + 16 + 4, 2 + 2 + 2, 0x404040);
font->draw(inventory->getName(), 8, imageHeight - 96 + 2, 0x404040);
}

View file

@ -127,7 +127,9 @@ void SelectWorldScreen::buttonClicked(Button* button) {
minecraft->setScreen(
new RenameWorldScreen(this, getWorldId(selectedWorld)));
} else if (button->id == BUTTON_CANCEL_ID) {
app.DebugPrintf("SelectWorldScreen::buttonClicked 'Cancel' minecraft->setScreen(lastScreen)\n");
app.DebugPrintf(
"SelectWorldScreen::buttonClicked 'Cancel' "
"minecraft->setScreen(lastScreen)\n");
minecraft->setScreen(lastScreen);
} else {
worldSelectionList->buttonClicked(button);
@ -181,9 +183,9 @@ void SelectWorldScreen::render(int xm, int ym, float a) {
static bool forceCreateLevel = false;
if (count++ >= 100) {
if (!forceCreateLevel && levelList->size() > 0) {
// 4J Stu - For some obscures reason the "delete" button is called
// "renameButton" and vice versa.
// if( levelList->size() > 2 && deleteButton->active )
// 4J Stu - For some obscures reason the "delete" button is
// called "renameButton" and vice versa. if( levelList->size() >
// 2 && deleteButton->active )
//{
// this->selectedWorld = 2;
// count = 0;
@ -205,7 +207,9 @@ void SelectWorldScreen::render(int xm, int ym, float a) {
count = 0;
}
} else {
app.DebugPrintf("SelectWorldScreen::render minecraft->setScreen(new CreateWorldScreen(this))\n");
app.DebugPrintf(
"SelectWorldScreen::render minecraft->setScreen(new "
"CreateWorldScreen(this))\n");
minecraft->setScreen(new CreateWorldScreen(this));
}
}

View file

@ -20,7 +20,7 @@ protected:
private:
// final DateFormat DATE_FORMAT = new SimpleDateFormat(); // 4J -
//removed
// removed
protected:
Screen* lastScreen;