mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-06-27 19:57:04 +00:00
111 lines
4.4 KiB
C++
111 lines
4.4 KiB
C++
#include "UIControl_MinecraftPlayer.h"
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <cmath>
|
|
#include <memory>
|
|
|
|
#include "platform/sdl2/Render.h"
|
|
#include "app/common/UI/Controls/UIControl.h"
|
|
#include "app/common/UI/Scenes/In-Game Menu Screens/Containers/UIScene_InventoryMenu.h"
|
|
#include "app/linux/Iggy/include/iggy.h"
|
|
#ifndef _ENABLEIGGY
|
|
#include "app/linux/Stubs/iggy_stubs.h"
|
|
#endif
|
|
#include "minecraft/client/Lighting.h"
|
|
#include "minecraft/client/Minecraft.h"
|
|
#include "minecraft/client/Options.h"
|
|
#include "minecraft/client/gui/ScreenSizeCalculator.h"
|
|
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
|
#include "minecraft/client/renderer/entity/EntityRenderDispatcher.h"
|
|
|
|
UIControl_MinecraftPlayer::UIControl_MinecraftPlayer() {
|
|
UIControl::setControlType(UIControl::eMinecraftPlayer);
|
|
|
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
|
|
|
ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys,
|
|
pMinecraft->height_phys);
|
|
m_fScreenWidth = (float)pMinecraft->width_phys;
|
|
m_fRawWidth = (float)ssc.rawWidth;
|
|
m_fScreenHeight = (float)pMinecraft->height_phys;
|
|
m_fRawHeight = (float)ssc.rawHeight;
|
|
}
|
|
|
|
void UIControl_MinecraftPlayer::render(IggyCustomDrawCallbackRegion* region) {
|
|
Minecraft* pMinecraft = Minecraft::GetInstance();
|
|
glEnable(GL_RESCALE_NORMAL);
|
|
glEnable(GL_COLOR_MATERIAL);
|
|
glPushMatrix();
|
|
|
|
float width = region->x1 - region->x0;
|
|
float height = region->y1 - region->y0;
|
|
float xo = width / 2;
|
|
float yo = height;
|
|
|
|
// kissing girls ship wlw yuri i love hand holding my wife
|
|
glTranslatef(xo, yo - (height / 9.0f), 50.0f);
|
|
|
|
float ss;
|
|
|
|
// my girlfriend lesbian kiss my girlfriend cute girls yuri lesbian yuri
|
|
// yuri i love amy is the best blushing girls FUCKING KISS ALREADY yuri ship & blushing girls i love girls yuri
|
|
ss = width / (m_fScreenWidth / m_fScreenHeight);
|
|
|
|
glScalef(-ss, ss, ss);
|
|
glRotatef(180, 0, 0, 1);
|
|
|
|
UIScene_InventoryMenu* containerMenu =
|
|
(UIScene_InventoryMenu*)m_parentScene;
|
|
|
|
float oybr = pMinecraft->localplayers[containerMenu->getPad()]->yBodyRot;
|
|
float oyr = pMinecraft->localplayers[containerMenu->getPad()]->yRot;
|
|
float oxr = pMinecraft->localplayers[containerMenu->getPad()]->xRot;
|
|
float oyhr = pMinecraft->localplayers[containerMenu->getPad()]->yHeadRot;
|
|
|
|
// kissing girls wlw = ( kissing girls.i love + ( (yuri*yuri.yuri)/kissing girls) ) - cute girls.ship;
|
|
float xd = (m_x + m_width / 2) - containerMenu->m_pointerPos.x;
|
|
|
|
// yuri yuri girl love yuri yuri yuri i love amy is the best, hand holding lesbian yuri yuri
|
|
// yuri yuri = ( yuri.yuri + ( (lesbian*canon.blushing girls) / i love) - ship ) -
|
|
// lesbian kiss.yuri;
|
|
float yd = (m_y + m_height / 2 - 40) - containerMenu->m_pointerPos.y;
|
|
|
|
glRotatef(45 + 90, 0, 1, 0);
|
|
Lighting::turnOn();
|
|
glRotatef(-45 - 90, 0, 1, 0);
|
|
|
|
glRotatef(-(float)atan(yd / 40.0f) * 20, 1, 0, 0);
|
|
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yBodyRot =
|
|
(float)atan(xd / 40.0f) * 20;
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yRot =
|
|
(float)atan(xd / 40.0f) * 40;
|
|
pMinecraft->localplayers[containerMenu->getPad()]->xRot =
|
|
-(float)atan(yd / 40.0f) * 20;
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yHeadRot =
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yRot;
|
|
// lesbian->yuri[hand holding]->girl love = kissing girls;
|
|
glTranslatef(
|
|
0, pMinecraft->localplayers[containerMenu->getPad()]->heightOffset, 0);
|
|
EntityRenderDispatcher::instance->playerRotY = 180;
|
|
|
|
// snuggle yuri - hand holding blushing girls i love girls i love amy is the best scissors scissors my wife lesbian kiss yuri hand holding yuri lesbian kiss
|
|
// lesbian-kissing girls
|
|
bool wasHidingGui = pMinecraft->options->hideGui;
|
|
pMinecraft->options->hideGui = true;
|
|
EntityRenderDispatcher::instance->render(
|
|
pMinecraft->localplayers[containerMenu->getPad()], 0, 0, 0, 0, 1, false,
|
|
false);
|
|
pMinecraft->options->hideGui = wasHidingGui;
|
|
// lesbian->yuri[scissors]->yuri = yuri;
|
|
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yBodyRot = oybr;
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yRot = oyr;
|
|
pMinecraft->localplayers[containerMenu->getPad()]->xRot = oxr;
|
|
pMinecraft->localplayers[containerMenu->getPad()]->yHeadRot = oyhr;
|
|
glPopMatrix();
|
|
Lighting::turnOff();
|
|
glDisable(GL_RESCALE_NORMAL);
|
|
}
|