mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
FEAT: F1 (but why jump doesnt work wtf)
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
bool Options::debugGl = false;
|
||||
|
||||
void Options::initDefaultValues() {
|
||||
F1 = false;
|
||||
|
||||
difficulty = Difficulty::NORMAL;
|
||||
hideGui = false;
|
||||
thirdPersonView = false;
|
||||
|
||||
@@ -108,6 +108,8 @@ private:
|
||||
public:
|
||||
static bool debugGl;
|
||||
|
||||
bool F1;
|
||||
|
||||
float music;
|
||||
float sound;
|
||||
//note: sensitivity is transformed in Options::update
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Gui.h"
|
||||
#include "Font.h"
|
||||
#include "client/Options.h"
|
||||
#include "platform/input/Keyboard.h"
|
||||
#include "screens/IngameBlockSelectionScreen.h"
|
||||
#include "../Minecraft.h"
|
||||
#include "../player/LocalPlayer.h"
|
||||
@@ -87,14 +88,16 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
|
||||
// F: 3
|
||||
int ySlot = screenHeight - 16 - 3;
|
||||
|
||||
if (minecraft->gameMode->canHurtPlayer()) {
|
||||
minecraft->textures->loadAndBindTexture("gui/icons.png");
|
||||
Tesselator& t = Tesselator::instance;
|
||||
t.beginOverride();
|
||||
t.colorABGR(0xffffffff);
|
||||
renderHearts();
|
||||
renderBubbles();
|
||||
t.endOverrideAndDraw();
|
||||
if (!minecraft->options.F1) {
|
||||
if (minecraft->gameMode->canHurtPlayer()) {
|
||||
minecraft->textures->loadAndBindTexture("gui/icons.png");
|
||||
Tesselator& t = Tesselator::instance;
|
||||
t.beginOverride();
|
||||
t.colorABGR(0xffffffff);
|
||||
renderHearts();
|
||||
renderBubbles();
|
||||
t.endOverrideAndDraw();
|
||||
}
|
||||
}
|
||||
|
||||
if(minecraft->player->getSleepTimer() > 0) {
|
||||
@@ -106,7 +109,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
if (!minecraft->options.F1) {
|
||||
renderToolBar(a, ySlot, screenWidth);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
@@ -122,6 +125,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) {
|
||||
if (minecraft->options.renderDebug)
|
||||
renderDebugInfo();
|
||||
#endif
|
||||
}
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
glEnable2(GL_ALPHA_TEST);
|
||||
@@ -201,6 +205,10 @@ void Gui::handleClick(int button, int x, int y) {
|
||||
|
||||
void Gui::handleKeyPressed(int key)
|
||||
{
|
||||
if (key == Keyboard::KEY_F1) {
|
||||
minecraft->options.F1 = !minecraft->options.F1;
|
||||
}
|
||||
|
||||
if (key == 99)
|
||||
{
|
||||
if (minecraft->player->inventory->selected > 0)
|
||||
@@ -516,7 +524,7 @@ void Gui::renderProgressIndicator( const bool isTouchInterface, const int screen
|
||||
ItemInstance* currentItem = minecraft->player->inventory->getSelected();
|
||||
bool bowEquipped = currentItem != NULL ? currentItem->getItem() == Item::bow : false;
|
||||
bool itemInUse = currentItem != NULL ? currentItem->getItem() == minecraft->player->getUseItem()->getItem() : false;
|
||||
if (!isTouchInterface || minecraft->options.isJoyTouchArea || (bowEquipped && itemInUse)) {
|
||||
if ((!isTouchInterface || minecraft->options.isJoyTouchArea || (bowEquipped && itemInUse)) && !minecraft->options.F1) {
|
||||
minecraft->textures->loadAndBindTexture("gui/icons.png");
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc2(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR);
|
||||
|
||||
@@ -373,7 +373,7 @@ void GameRenderer::renderLevel(float a) {
|
||||
// glDisable2(GL_FOG);
|
||||
setupFog(1);
|
||||
|
||||
if (zoom == 1) {
|
||||
if (zoom == 1 && !mc->options.F1) {
|
||||
TIMER_POP_PUSH("hand");
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
renderItemInHand(a, i);
|
||||
|
||||
Reference in New Issue
Block a user