mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
fix many things and make playable
This commit is contained in:
@@ -66,7 +66,11 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
|
||||
//minecraft->gameRenderer->setupGuiScreen();
|
||||
Font* font = minecraft->font;
|
||||
|
||||
#ifdef PLATFORM_DESKTOP
|
||||
const bool isTouchInterface = false;
|
||||
#else
|
||||
const bool isTouchInterface = minecraft->useTouchscreen();
|
||||
#endif
|
||||
const int screenWidth = (int)(minecraft->width * InvGuiScale);
|
||||
const int screenHeight = (int)(minecraft->height * InvGuiScale);
|
||||
blitOffset = -90;
|
||||
@@ -391,7 +395,6 @@ void Gui::onConfigChanged( const Config& c ) {
|
||||
//LOGI("x,y: %f, %f\n", xx, yy);
|
||||
}
|
||||
rcFeedbackInner = t.end(true, rcFeedbackInner.vboId);
|
||||
|
||||
if (c.minecraft->useTouchscreen()) {
|
||||
// I'll bump this up to 6.
|
||||
int num = 6; // without "..." dots
|
||||
@@ -614,27 +617,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 ) {
|
||||
|
||||
@@ -401,7 +401,7 @@ void SelectWorldScreen::tick()
|
||||
minecraft->hostMultiplayer();
|
||||
minecraft->setScreen(new ProgressScreen());
|
||||
_hasStartedLevel = true;
|
||||
#elif defined(WIN32)
|
||||
#elif defined(PLATFORM_DESKTOP)
|
||||
std::string name = getUniqueLevelName("perf");
|
||||
minecraft->setScreen(new SimpleChooseLevelScreen(name));
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user