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