mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-04-30 17:43:30 +00:00
forgot to change vertex size for touch circle, also shadow attempt fix again
This commit is contained in:
@@ -382,7 +382,6 @@ void Gui::renderVignette(float br, int w, int h) {
|
||||
|
||||
void Gui::renderSlot(int slot, int x, int y, float a) {
|
||||
ItemInstance* item = minecraft->player->inventory->getItem(slot);
|
||||
|
||||
if (!item) {
|
||||
//LOGW("Warning: item @ Gui::renderSlot is NULL\n");
|
||||
return;
|
||||
@@ -596,8 +595,6 @@ 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.getBooleanValue(OPTIONS_IS_JOY_TOUCH_AREA)
|
||||
// || (bowEquipped && itemInUse)) && !minecraft->options.getBooleanValue(OPTIONS_HIDEGUI))
|
||||
if ((!isTouchInterface || minecraft->options.getBooleanValue(OPTIONS_IS_JOY_TOUCH_AREA)
|
||||
|| (bowEquipped && itemInUse)) && !minecraft->options.getBooleanValue(OPTIONS_HIDEGUI))
|
||||
{
|
||||
@@ -606,7 +603,7 @@ void Gui::renderProgressIndicator( const bool isTouchInterface, const int screen
|
||||
glBlendFunc2(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR);
|
||||
blit(screenWidth/2 - 8, screenHeight/2 - 8, 0, 0, 16, 16);
|
||||
glDisable(GL_BLEND);
|
||||
} else if((!bowEquipped) || (!minecraft->options.getBooleanValue(OPTIONS_IS_JOY_TOUCH_AREA))) {
|
||||
} else if(!bowEquipped) {
|
||||
const float tprogress = minecraft->gameMode->destroyProgress;
|
||||
const float alpha = Mth::clamp(minecraft->inputHolder->alpha, 0.0f, 1.0f);
|
||||
//LOGI("alpha: %f\n", alpha);
|
||||
@@ -624,7 +621,7 @@ void Gui::renderProgressIndicator( const bool isTouchInterface, const int screen
|
||||
const float x = InvGuiScale * minecraft->inputHolder->mousex;
|
||||
const float y = InvGuiScale * minecraft->inputHolder->mousey;
|
||||
glTranslatef2(x, y, 0);
|
||||
drawArrayVT(rcFeedbackOuter.vboId, rcFeedbackOuter.vertexCount, 24);
|
||||
drawArrayVT(rcFeedbackOuter.vboId, rcFeedbackOuter.vertexCount, 36);
|
||||
glTranslatef2(-x, -y, 0);
|
||||
|
||||
glEnable2(GL_TEXTURE_2D);
|
||||
@@ -645,12 +642,12 @@ void Gui::renderProgressIndicator( const bool isTouchInterface, const int screen
|
||||
const float y = InvGuiScale * minecraft->inputHolder->mousey;
|
||||
glPushMatrix2();
|
||||
glTranslatef2(x, y, 0);
|
||||
drawArrayVT(rcFeedbackOuter.vboId, rcFeedbackOuter.vertexCount, 24);
|
||||
drawArrayVT(rcFeedbackOuter.vboId, rcFeedbackOuter.vertexCount, 36);
|
||||
glScalef2(0.5f + progress, 0.5f + progress, 1);
|
||||
//glDisable2(GL_CULL_FACE);
|
||||
glColor4f2(1, 1, 1, 1);
|
||||
glBlendFunc2(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR);
|
||||
drawArrayVT(rcFeedbackInner.vboId, rcFeedbackInner.vertexCount, 24, GL_TRIANGLE_FAN);
|
||||
drawArrayVT(rcFeedbackInner.vboId, rcFeedbackInner.vertexCount, 36, GL_TRIANGLE_FAN);
|
||||
glPopMatrix2();
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
|
||||
@@ -187,7 +187,7 @@ void EntityRenderer::renderShadow(Entity* e, float x, float y, float z, float po
|
||||
//Textures* textures = entityRenderDispatcher->textures;
|
||||
//textures->bind(textures->loadTexture("%clamp%/environment/shadow.png"));
|
||||
Textures* textures = entityRenderDispatcher->textures;
|
||||
textures->loadAndBindTexture(("/misc/shadow.png"));
|
||||
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
@@ -222,6 +222,7 @@ void EntityRenderer::renderShadow(Entity* e, float x, float y, float z, float po
|
||||
renderTileShadow(Tile::tiles[t], x, y + e->getShadowHeightOffs(), z, xt, yt, zt, pow, r, xo, yo + e->getShadowHeightOffs(), zo);
|
||||
}
|
||||
}
|
||||
textures->loadAndBindTexture(("/misc/shadow.png"));
|
||||
tt.draw();
|
||||
|
||||
glColor4f2(1, 1, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user