mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
revert all code back except platform
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -295,7 +295,7 @@ static char ILLEGAL_FILE_CHARACTERS[] = {
|
||||
void SelectWorldScreen::tick()
|
||||
{
|
||||
if (_state == _STATE_CREATEWORLD) {
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#if defined(RPI)
|
||||
std::string levelId = getUniqueLevelName("world");
|
||||
LevelSettings settings(getEpochTimeS(), GameType::Creative);
|
||||
minecraft->selectLevel(levelId, levelId, settings);
|
||||
|
||||
@@ -393,7 +393,7 @@ static char ILLEGAL_FILE_CHARACTERS[] = {
|
||||
void SelectWorldScreen::tick()
|
||||
{
|
||||
if (_state == _STATE_CREATEWORLD) {
|
||||
#ifdef PLATFORM_DESKTOP
|
||||
#if defined(RPI)
|
||||
std::string levelId = getUniqueLevelName("perf");
|
||||
//int seed = Util::hashCode("/r/Minecraft");
|
||||
LevelSettings settings(getEpochTimeS(), GameType::Creative);
|
||||
|
||||
Reference in New Issue
Block a user