revert all code back except platform

This commit is contained in:
Kolyah35
2026-03-03 01:22:26 +03:00
parent a86d333478
commit 13010f10fa
16 changed files with 90 additions and 98 deletions

View File

@@ -112,10 +112,10 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
unsigned int max = 10;
bool isChatting = false;
renderChatMessages(screenHeight, max, isChatting, font);
#ifndef PLATFORM_DESKTOP
#if !defined(RPI)
renderOnSelectItemNameText(screenWidth, font, ySlot);
#endif
#ifdef PLATFORM_DESKTOP
#if defined(RPI)
renderDebugInfo();
#endif
@@ -614,27 +614,27 @@ void Gui::renderBubbles() {
}
}
static OffsetPosTranslator posTranslator;
void Gui::onLevelGenerated() {
if (Level* level = minecraft->level) {
Pos p = level->getSharedSpawnPos();
posTranslator = OffsetPosTranslator((float)-p.x, (float)-p.y, (float)-p.z);
}
}
static OffsetPosTranslator posTranslator;
void Gui::onLevelGenerated() {
if (Level* level = minecraft->level) {
Pos p = level->getSharedSpawnPos();
posTranslator = OffsetPosTranslator((float)-p.x, (float)-p.y, (float)-p.z);
}
}
void Gui::renderDebugInfo() {
static char buf[256];
float xx = minecraft->player->x;
float yy = minecraft->player->y - minecraft->player->heightOffset;
float zz = minecraft->player->z;
posTranslator.to(xx, yy, zz);
sprintf(buf, "pos: %3.1f, %3.1f, %3.1f\n", xx, yy, zz);
Tesselator& t = Tesselator::instance;
t.beginOverride();
t.scale2d(InvGuiScale, InvGuiScale);
minecraft->font->draw(buf, 2, 2, 0xffffff);
t.resetScale();
t.endOverrideAndDraw();
static char buf[256];
float xx = minecraft->player->x;
float yy = minecraft->player->y - minecraft->player->heightOffset;
float zz = minecraft->player->z;
posTranslator.to(xx, yy, zz);
sprintf(buf, "pos: %3.1f, %3.1f, %3.1f\n", xx, yy, zz);
Tesselator& t = Tesselator::instance;
t.beginOverride();
t.scale2d(InvGuiScale, InvGuiScale);
minecraft->font->draw(buf, 2, 2, 0xffffff);
t.resetScale();
t.endOverrideAndDraw();
}
void Gui::renderSleepAnimation( const int screenWidth, const int screenHeight ) {