.h -> .hpp everything

This commit is contained in:
Kolyah35
2026-03-28 01:08:50 +03:00
parent 7d3257669a
commit 7418263193
845 changed files with 53732 additions and 53754 deletions

View File

@@ -2,8 +2,8 @@
//package net.minecraft.client.model;
#include "Model.h"
#include "geom/ModelPart.h"
#include "Model.hpp"
#include "geom/ModelPart.hpp"
class ChestModel: public Model
{

View File

@@ -1,101 +1,101 @@
#include "ChickenModel.h"
#include "../../world/entity/Entity.h"
ChickenModel::ChickenModel()
: head(0, 0),
beak(14, 0),
redThing(14, 4),
body(0, 9),
leg0(26, 0),
leg1(26, 0),
wing0(24, 13),
wing1(24, 13)
{
head.setModel(this);
beak.setModel(this);
redThing.setModel(this);
body.setModel(this);
leg0.setModel(this);
leg1.setModel(this);
wing0.setModel(this);
wing1.setModel(this);
int yo = 16;
head.addBox(-2, -6, -2, 4, 6, 3, 0); // Head
head.setPos(0, -1 + (float)yo, -4);
beak.addBox(-2, -4, -4, 4, 2, 2, 0); // Beak
beak.setPos(0, -1 + (float)yo, -4);
redThing.addBox(-1, -2, -3, 2, 2, 2, 0); // Beak
redThing.setPos(0, -1 + (float)yo, -4);
body.addBox(-3, -4, -3, 6, 8, 6, 0); // Body
body.setPos(0, 0 + (float)yo, 0);
leg0.addBox(-1, 0, -3, 3, 5, 3); // Leg0
leg0.setPos(-2, 3 + (float)yo, 1);
leg1.addBox(-1, 0, -3, 3, 5, 3); // Leg1
leg1.setPos(1, 3 + (float)yo, 1);
wing0.addBox(0, 0, -3, 1, 4, 6); // Wing0
wing0.setPos(-4, -3 + (float)yo, 0);
wing1.addBox(-1, 0, -3, 1, 4, 6); // Wing1
wing1.setPos(4, -3 + (float)yo, 0);
}
void ChickenModel::render( Entity* entity, float time, float r, float bob, float yRot, float xRot, float scale )
{
setupAnim(time, r, bob, yRot, xRot, scale);
if (young) {
float ss = 2;
glPushMatrix();
glTranslatef(0, 5 * scale, 2 * scale);
head.render(scale);
beak.render(scale);
redThing.render(scale);
glPopMatrix();
glPushMatrix();
glScalef(1 / ss, 1 / ss, 1 / ss);
glTranslatef(0, 24 * scale, 0);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
wing0.render(scale);
wing1.render(scale);
glPopMatrix();
} else {
head.render(scale);
beak.render(scale);
redThing.render(scale);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
wing0.render(scale);
wing1.render(scale);
}
}
void ChickenModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
head.xRot = -((xRot / (float) (180 / Mth::PI)));
head.yRot = yRot / (float) (180 / Mth::PI);
beak.xRot = head.xRot;
beak.yRot = head.yRot;
redThing.xRot = head.xRot;
redThing.yRot = head.yRot;
body.xRot = 90 / (float) (180 / Mth::PI);
const float pend = Mth::cos(time * 0.6662f) * 1.4f * r;
leg0.xRot = pend;
leg1.xRot = -pend;
wing0.zRot = bob;
wing1.zRot = -bob;
}
#include "ChickenModel.hpp"
#include "world/entity/Entity.hpp"
ChickenModel::ChickenModel()
: head(0, 0),
beak(14, 0),
redThing(14, 4),
body(0, 9),
leg0(26, 0),
leg1(26, 0),
wing0(24, 13),
wing1(24, 13)
{
head.setModel(this);
beak.setModel(this);
redThing.setModel(this);
body.setModel(this);
leg0.setModel(this);
leg1.setModel(this);
wing0.setModel(this);
wing1.setModel(this);
int yo = 16;
head.addBox(-2, -6, -2, 4, 6, 3, 0); // Head
head.setPos(0, -1 + (float)yo, -4);
beak.addBox(-2, -4, -4, 4, 2, 2, 0); // Beak
beak.setPos(0, -1 + (float)yo, -4);
redThing.addBox(-1, -2, -3, 2, 2, 2, 0); // Beak
redThing.setPos(0, -1 + (float)yo, -4);
body.addBox(-3, -4, -3, 6, 8, 6, 0); // Body
body.setPos(0, 0 + (float)yo, 0);
leg0.addBox(-1, 0, -3, 3, 5, 3); // Leg0
leg0.setPos(-2, 3 + (float)yo, 1);
leg1.addBox(-1, 0, -3, 3, 5, 3); // Leg1
leg1.setPos(1, 3 + (float)yo, 1);
wing0.addBox(0, 0, -3, 1, 4, 6); // Wing0
wing0.setPos(-4, -3 + (float)yo, 0);
wing1.addBox(-1, 0, -3, 1, 4, 6); // Wing1
wing1.setPos(4, -3 + (float)yo, 0);
}
void ChickenModel::render( Entity* entity, float time, float r, float bob, float yRot, float xRot, float scale )
{
setupAnim(time, r, bob, yRot, xRot, scale);
if (young) {
float ss = 2;
glPushMatrix();
glTranslatef(0, 5 * scale, 2 * scale);
head.render(scale);
beak.render(scale);
redThing.render(scale);
glPopMatrix();
glPushMatrix();
glScalef(1 / ss, 1 / ss, 1 / ss);
glTranslatef(0, 24 * scale, 0);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
wing0.render(scale);
wing1.render(scale);
glPopMatrix();
} else {
head.render(scale);
beak.render(scale);
redThing.render(scale);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
wing0.render(scale);
wing1.render(scale);
}
}
void ChickenModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
head.xRot = -((xRot / (float) (180 / Mth::PI)));
head.yRot = yRot / (float) (180 / Mth::PI);
beak.xRot = head.xRot;
beak.yRot = head.yRot;
redThing.xRot = head.xRot;
redThing.yRot = head.yRot;
body.xRot = 90 / (float) (180 / Mth::PI);
const float pend = Mth::cos(time * 0.6662f) * 1.4f * r;
leg0.xRot = pend;
leg1.xRot = -pend;
wing0.zRot = bob;
wing1.zRot = -bob;
}

View File

@@ -1,7 +1,7 @@
#pragma once
#include "Model.h"
#include "geom/ModelPart.h"
#include "Model.hpp"
#include "geom/ModelPart.hpp"
class Entity;

View File

@@ -1,30 +1,30 @@
#include "CowModel.h"
CowModel::CowModel()
: super(12, 0)
{
head = ModelPart(0, 0);
head.setModel(this);
head.addBox(-4, -4, -6, 8, 8, 6, 0); // Head
head.setPos(0, 12 - 6 - 2, -8);
head.texOffs(22, 0).addBox(-5, -5, -4, 1, 3, 1, 0); // Horn1
head.texOffs(22, 0).addBox(+4, -5, -4, 1, 3, 1, 0); // Horn1
body = ModelPart(18, 4);
body.setModel(this);
body.addBox(-6, -10, -7, 12, 18, 10, 0); // Body
body.setPos(0, 11 + 6 - 12, 2);
body.texOffs(52, 0).addBox(-2, 2, -8, 4, 6, 1);
leg0.x -= 1;
leg1.x += 1;
leg0.z += 0;
leg1.z += 0;
leg2.x -= 1;
leg3.x += 1;
leg2.z -= 1;
leg3.z -= 1;
this->zHeadOffs += 2;
}
#include "CowModel.hpp"
CowModel::CowModel()
: super(12, 0)
{
head = ModelPart(0, 0);
head.setModel(this);
head.addBox(-4, -4, -6, 8, 8, 6, 0); // Head
head.setPos(0, 12 - 6 - 2, -8);
head.texOffs(22, 0).addBox(-5, -5, -4, 1, 3, 1, 0); // Horn1
head.texOffs(22, 0).addBox(+4, -5, -4, 1, 3, 1, 0); // Horn1
body = ModelPart(18, 4);
body.setModel(this);
body.addBox(-6, -10, -7, 12, 18, 10, 0); // Body
body.setPos(0, 11 + 6 - 12, 2);
body.texOffs(52, 0).addBox(-2, 2, -8, 4, 6, 1);
leg0.x -= 1;
leg1.x += 1;
leg0.z += 0;
leg1.z += 0;
leg2.x -= 1;
leg3.x += 1;
leg2.z -= 1;
leg3.z -= 1;
this->zHeadOffs += 2;
}

View File

@@ -2,7 +2,7 @@
//package net.minecraft.client.model;
#include "QuadrupedModel.h"
#include "QuadrupedModel.hpp"
class CowModel: public QuadrupedModel
{

View File

@@ -2,10 +2,10 @@
//package net.minecraft.client.model;
#include "Model.h"
#include "Model.hpp"
#include "geom/ModelPart.h"
#include "../../world/entity/Entity.h"
#include "geom/ModelPart.hpp"
#include "world/entity/Entity.hpp"
class CreeperModel: public Model
{

View File

@@ -1,292 +1,292 @@
#include "HumanoidModel.h"
#include <Minecraft.h>
#include "../../util/Mth.h"
#include "../../world/entity/player/Player.h"
#include "../../world/entity/player/Inventory.h"
HumanoidModel::HumanoidModel( float g /*= 0*/, float yOffset /*= 0*/, int texW /*= 64*/, int texH /*= 32*/ )
: holdingLeftHand(false),
holdingRightHand(false),
sneaking(false),
bowAndArrow(false),
head(0, 0),
hair(32, 0),
//ear (24, 0),
body(16, 16),
arm0(24 + 16, 16),
arm1(24 + 16, 16),
leg0(0, 16),
leg1(0, 16)
{
texWidth = texW;
texHeight = texH;
head.setModel(this);
hair.setModel(this);
body.setModel(this);
arm0.setModel(this);
arm1.setModel(this);
leg0.setModel(this);
leg1.setModel(this);
// If the texture is 64x64, use the modern skin layout for arms/legs and add overlay layers.
bool modernSkin = (texWidth == 64 && texHeight == 64);
if (modernSkin) {
// Left arm and left leg are located in the bottom half of a 64x64 skin.
arm1.texOffs(32, 48);
leg1.texOffs(16, 48);
}
head.addBox(-4, -8, -4, 8, 8, 8, g); // Head
head.setPos(0, 0 + yOffset, 0);
if (modernSkin) {
hair.addBox(-4, -8, -4, 8, 8, 8, g + 0.5f); // Outer head layer (hat)
hair.setPos(0, 0 + yOffset, 0);
}
body.addBox(-4, 0, -2, 8, 12, 4, g); // Body
body.setPos(0, 0 + yOffset, 0);
arm0.addBox(-3, -2, -2, 4, 12, 4, g); // Arm0
arm0.setPos(-5, 2 + yOffset, 0);
arm1.mirror = true;
arm1.addBox(-1, -2, -2, 4, 12, 4, g); // Arm1
arm1.setPos(5, 2 + yOffset, 0);
leg0.addBox(-2, 0, -2, 4, 12, 4, g); // Leg0
leg0.setPos(-2, 12 + yOffset, 0);
leg1.mirror = true;
leg1.addBox(-2, 0, -2, 4, 12, 4, g); // Leg1
leg1.setPos(2, 12 + yOffset, 0);
if (modernSkin) {
// Overlay layers for 64x64 skins (same geometry, different texture regions)
body.texOffs(16, 32);
body.addBox(-4, 0, -2, 8, 12, 4, g + 0.5f);
arm0.texOffs(40, 32);
arm0.addBox(-3, -2, -2, 4, 12, 4, g + 0.5f);
arm1.texOffs(48, 48);
arm1.addBox(-1, -2, -2, 4, 12, 4, g + 0.5f);
leg0.texOffs(0, 32);
leg0.addBox(-2, 0, -2, 4, 12, 4, g + 0.5f);
leg1.texOffs(0, 48);
leg1.addBox(-2, 0, -2, 4, 12, 4, g + 0.5f);
}
}
void HumanoidModel::render(Entity* e, float time, float r, float bob, float yRot, float xRot, float scale )
{
if(e != NULL && e->isMob()) {
Mob* mob = (Mob*)(e);
ItemInstance* item = mob->getCarriedItem();
if(item != NULL) {
if(mob->getUseItemDuration() > 0) {
UseAnim::UseAnimation anim = item->getUseAnimation();
if(anim == UseAnim::bow) {
bowAndArrow = true;
}
}
}
}
setupAnim(time, r, bob, yRot, xRot, scale);
// Sync overlay with head rotation/position
if (texWidth == 64 && texHeight == 64) {
hair.xRot = head.xRot;
hair.yRot = head.yRot;
hair.zRot = head.zRot;
hair.y = head.y;
}
head.render(scale);
if (texWidth == 64 && texHeight == 64) {
hair.render(scale);
}
body.render(scale);
arm0.render(scale);
arm1.render(scale);
leg0.render(scale);
leg1.render(scale);
bowAndArrow = false;
}
void HumanoidModel::render( HumanoidModel* model, float scale )
{
head.yRot = model->head.yRot;
head.y = model->head.y;
head.xRot = model->head.xRot;
if (texWidth == 64 && texHeight == 64) {
hair.yRot = head.yRot;
hair.xRot = head.xRot;
hair.zRot = head.zRot;
hair.y = head.y;
}
arm0.xRot = model->arm0.xRot;
arm0.zRot = model->arm0.zRot;
arm1.xRot = model->arm1.xRot;
arm1.zRot = model->arm1.zRot;
leg0.xRot = model->leg0.xRot;
leg1.xRot = model->leg1.xRot;
head.render(scale);
if (texWidth == 64 && texHeight == 64) {
hair.render(scale);
}
body.render(scale);
arm0.render(scale);
arm1.render(scale);
leg0.render(scale);
leg1.render(scale);
}
void HumanoidModel::renderHorrible( float time, float r, float bob, float yRot, float xRot, float scale )
{
setupAnim(time, r, bob, yRot, xRot, scale);
head.renderHorrible(scale);
body.renderHorrible(scale);
arm0.renderHorrible(scale);
arm1.renderHorrible(scale);
leg0.renderHorrible(scale);
leg1.renderHorrible(scale);
//hair.renderHorrible(scale);
}
// Updated to match Minecraft Java, all except hair.
void HumanoidModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
head.yRot = yRot / (180 / Mth::PI);
head.xRot = xRot / (180 / Mth::PI);
const float tcos0 = Mth::cos(time * 0.6662f) * r;
const float tcos1 = Mth::cos(time * 0.6662f + Mth::PI) * r;
arm0.xRot = tcos1;
arm1.xRot = tcos0;
arm0.zRot = 0;
arm1.zRot = 0;
leg0.xRot = tcos0 * 1.4f;
leg1.xRot = tcos1 * 1.4f;
leg0.yRot = 0;
leg1.yRot = 0;
if (riding) {
arm0.xRot += -Mth::PI / 2 * 0.4f;
arm1.xRot += -Mth::PI / 2 * 0.4f;
leg0.xRot = -Mth::PI / 2 * 0.8f;
leg1.xRot = -Mth::PI / 2 * 0.8f;
leg0.yRot = Mth::PI / 2 * 0.2f;
leg1.yRot = -Mth::PI / 2 * 0.2f;
}
if (holdingLeftHand != 0) {
arm1.xRot = arm1.xRot * 0.5f - Mth::PI / 2.0f * 0.2f * holdingLeftHand;
}
if (holdingRightHand != 0) {
arm0.xRot = arm0.xRot * 0.5f - Mth::PI / 2.0f * 0.2f * holdingRightHand;
}
arm0.yRot = 0;
arm1.yRot = 0;
if (attackTime > -9990) {
float swing = attackTime;
body.yRot = Mth::sin(Mth::sqrt(swing) * Mth::PI * 2) * 0.2f;
arm0.z = Mth::sin(body.yRot) * 5;
arm0.x = -Mth::cos(body.yRot) * 5;
arm1.z = -Mth::sin(body.yRot) * 5;
arm1.x = Mth::cos(body.yRot) * 5;
arm0.yRot += body.yRot;
arm1.yRot += body.yRot;
arm1.xRot += body.yRot;
swing = 1 - attackTime;
swing *= swing;
swing *= swing;
swing = 1 - swing;
float aa = Mth::sin(swing * Mth::PI);
float bb = Mth::sin(attackTime * Mth::PI) * -(head.xRot - 0.7f) * 0.75f;
arm0.xRot -= aa * 1.2f + bb;
arm0.yRot += body.yRot * 2;
arm0.zRot = Mth::sin(attackTime * Mth::PI) * -0.4f;
}
if (sneaking) {
body.xRot = 0.5f;
arm0.xRot += 0.4f;
arm1.xRot += 0.4f;
leg0.z = +4.0f;
leg1.z = +4.0f;
leg0.y = +9.0f;
leg1.y = +9.0f;
head.y = +1;
} else {
body.xRot = 0.0f;
leg0.z = +0.0f;
leg1.z = +0.0f;
leg0.y = +12.0f;
leg1.y = +12.0f;
head.y = 0;
}
const float bcos = Mth::cos(bob * 0.09f) * 0.05f + 0.05f;
const float bsin = Mth::sin(bob * 0.067f) * 0.05f;
arm0.zRot += bcos;
arm1.zRot -= bcos;
arm0.xRot += bsin;
arm1.xRot -= bsin;
if (bowAndArrow) {
float attack2 = 0;
float attack = 0;
arm0.zRot = 0;
arm1.zRot = 0;
arm0.yRot = -(0.1f - attack2 * 0.6f) + head.yRot;
arm1.yRot = +(0.1f - attack2 * 0.6f) + head.yRot + 0.4f;
arm0.xRot = -Mth::PI / 2.0f + head.xRot;
arm1.xRot = -Mth::PI / 2.0f + head.xRot;
arm0.xRot -= attack2 * 1.2f - attack * 0.4f;
arm1.xRot -= attack2 * 1.2f - attack * 0.4f;
arm0.zRot += bcos;
arm1.zRot -= bcos;
arm0.xRot += bsin;
arm1.xRot -= bsin;
}
}
void HumanoidModel::onGraphicsReset()
{
head.onGraphicsReset();
body.onGraphicsReset();
arm0.onGraphicsReset();
arm1.onGraphicsReset();
leg0.onGraphicsReset();
leg1.onGraphicsReset();
//hair.onGraphicsReset();
}
//void renderHair(float scale) {
// hair.yRot = head.yRot;
// hair.xRot = head.xRot;
// hair.render(scale);
//}
//
//void renderEars(float scale) {
// ear.yRot = head.yRot;
// ear.xRot = head.xRot;
// ear.x=0;
// ear.y=0;
// ear.render(scale);
//}
//
#include "HumanoidModel.hpp"
#include <Minecraft.hpp>
#include "util/Mth.hpp"
#include "world/entity/player/Player.hpp"
#include "world/entity/player/Inventory.hpp"
HumanoidModel::HumanoidModel( float g /*= 0*/, float yOffset /*= 0*/, int texW /*= 64*/, int texH /*= 32*/ )
: holdingLeftHand(false),
holdingRightHand(false),
sneaking(false),
bowAndArrow(false),
head(0, 0),
hair(32, 0),
//ear (24, 0),
body(16, 16),
arm0(24 + 16, 16),
arm1(24 + 16, 16),
leg0(0, 16),
leg1(0, 16)
{
texWidth = texW;
texHeight = texH;
head.setModel(this);
hair.setModel(this);
body.setModel(this);
arm0.setModel(this);
arm1.setModel(this);
leg0.setModel(this);
leg1.setModel(this);
// If the texture is 64x64, use the modern skin layout for arms/legs and add overlay layers.
bool modernSkin = (texWidth == 64 && texHeight == 64);
if (modernSkin) {
// Left arm and left leg are located in the bottom half of a 64x64 skin.
arm1.texOffs(32, 48);
leg1.texOffs(16, 48);
}
head.addBox(-4, -8, -4, 8, 8, 8, g); // Head
head.setPos(0, 0 + yOffset, 0);
if (modernSkin) {
hair.addBox(-4, -8, -4, 8, 8, 8, g + 0.5f); // Outer head layer (hat)
hair.setPos(0, 0 + yOffset, 0);
}
body.addBox(-4, 0, -2, 8, 12, 4, g); // Body
body.setPos(0, 0 + yOffset, 0);
arm0.addBox(-3, -2, -2, 4, 12, 4, g); // Arm0
arm0.setPos(-5, 2 + yOffset, 0);
arm1.mirror = true;
arm1.addBox(-1, -2, -2, 4, 12, 4, g); // Arm1
arm1.setPos(5, 2 + yOffset, 0);
leg0.addBox(-2, 0, -2, 4, 12, 4, g); // Leg0
leg0.setPos(-2, 12 + yOffset, 0);
leg1.mirror = true;
leg1.addBox(-2, 0, -2, 4, 12, 4, g); // Leg1
leg1.setPos(2, 12 + yOffset, 0);
if (modernSkin) {
// Overlay layers for 64x64 skins (same geometry, different texture regions)
body.texOffs(16, 32);
body.addBox(-4, 0, -2, 8, 12, 4, g + 0.5f);
arm0.texOffs(40, 32);
arm0.addBox(-3, -2, -2, 4, 12, 4, g + 0.5f);
arm1.texOffs(48, 48);
arm1.addBox(-1, -2, -2, 4, 12, 4, g + 0.5f);
leg0.texOffs(0, 32);
leg0.addBox(-2, 0, -2, 4, 12, 4, g + 0.5f);
leg1.texOffs(0, 48);
leg1.addBox(-2, 0, -2, 4, 12, 4, g + 0.5f);
}
}
void HumanoidModel::render(Entity* e, float time, float r, float bob, float yRot, float xRot, float scale )
{
if(e != NULL && e->isMob()) {
Mob* mob = (Mob*)(e);
ItemInstance* item = mob->getCarriedItem();
if(item != NULL) {
if(mob->getUseItemDuration() > 0) {
UseAnim::UseAnimation anim = item->getUseAnimation();
if(anim == UseAnim::bow) {
bowAndArrow = true;
}
}
}
}
setupAnim(time, r, bob, yRot, xRot, scale);
// Sync overlay with head rotation/position
if (texWidth == 64 && texHeight == 64) {
hair.xRot = head.xRot;
hair.yRot = head.yRot;
hair.zRot = head.zRot;
hair.y = head.y;
}
head.render(scale);
if (texWidth == 64 && texHeight == 64) {
hair.render(scale);
}
body.render(scale);
arm0.render(scale);
arm1.render(scale);
leg0.render(scale);
leg1.render(scale);
bowAndArrow = false;
}
void HumanoidModel::render( HumanoidModel* model, float scale )
{
head.yRot = model->head.yRot;
head.y = model->head.y;
head.xRot = model->head.xRot;
if (texWidth == 64 && texHeight == 64) {
hair.yRot = head.yRot;
hair.xRot = head.xRot;
hair.zRot = head.zRot;
hair.y = head.y;
}
arm0.xRot = model->arm0.xRot;
arm0.zRot = model->arm0.zRot;
arm1.xRot = model->arm1.xRot;
arm1.zRot = model->arm1.zRot;
leg0.xRot = model->leg0.xRot;
leg1.xRot = model->leg1.xRot;
head.render(scale);
if (texWidth == 64 && texHeight == 64) {
hair.render(scale);
}
body.render(scale);
arm0.render(scale);
arm1.render(scale);
leg0.render(scale);
leg1.render(scale);
}
void HumanoidModel::renderHorrible( float time, float r, float bob, float yRot, float xRot, float scale )
{
setupAnim(time, r, bob, yRot, xRot, scale);
head.renderHorrible(scale);
body.renderHorrible(scale);
arm0.renderHorrible(scale);
arm1.renderHorrible(scale);
leg0.renderHorrible(scale);
leg1.renderHorrible(scale);
//hair.renderHorrible(scale);
}
// Updated to match Minecraft Java, all except hair.
void HumanoidModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
head.yRot = yRot / (180 / Mth::PI);
head.xRot = xRot / (180 / Mth::PI);
const float tcos0 = Mth::cos(time * 0.6662f) * r;
const float tcos1 = Mth::cos(time * 0.6662f + Mth::PI) * r;
arm0.xRot = tcos1;
arm1.xRot = tcos0;
arm0.zRot = 0;
arm1.zRot = 0;
leg0.xRot = tcos0 * 1.4f;
leg1.xRot = tcos1 * 1.4f;
leg0.yRot = 0;
leg1.yRot = 0;
if (riding) {
arm0.xRot += -Mth::PI / 2 * 0.4f;
arm1.xRot += -Mth::PI / 2 * 0.4f;
leg0.xRot = -Mth::PI / 2 * 0.8f;
leg1.xRot = -Mth::PI / 2 * 0.8f;
leg0.yRot = Mth::PI / 2 * 0.2f;
leg1.yRot = -Mth::PI / 2 * 0.2f;
}
if (holdingLeftHand != 0) {
arm1.xRot = arm1.xRot * 0.5f - Mth::PI / 2.0f * 0.2f * holdingLeftHand;
}
if (holdingRightHand != 0) {
arm0.xRot = arm0.xRot * 0.5f - Mth::PI / 2.0f * 0.2f * holdingRightHand;
}
arm0.yRot = 0;
arm1.yRot = 0;
if (attackTime > -9990) {
float swing = attackTime;
body.yRot = Mth::sin(Mth::sqrt(swing) * Mth::PI * 2) * 0.2f;
arm0.z = Mth::sin(body.yRot) * 5;
arm0.x = -Mth::cos(body.yRot) * 5;
arm1.z = -Mth::sin(body.yRot) * 5;
arm1.x = Mth::cos(body.yRot) * 5;
arm0.yRot += body.yRot;
arm1.yRot += body.yRot;
arm1.xRot += body.yRot;
swing = 1 - attackTime;
swing *= swing;
swing *= swing;
swing = 1 - swing;
float aa = Mth::sin(swing * Mth::PI);
float bb = Mth::sin(attackTime * Mth::PI) * -(head.xRot - 0.7f) * 0.75f;
arm0.xRot -= aa * 1.2f + bb;
arm0.yRot += body.yRot * 2;
arm0.zRot = Mth::sin(attackTime * Mth::PI) * -0.4f;
}
if (sneaking) {
body.xRot = 0.5f;
arm0.xRot += 0.4f;
arm1.xRot += 0.4f;
leg0.z = +4.0f;
leg1.z = +4.0f;
leg0.y = +9.0f;
leg1.y = +9.0f;
head.y = +1;
} else {
body.xRot = 0.0f;
leg0.z = +0.0f;
leg1.z = +0.0f;
leg0.y = +12.0f;
leg1.y = +12.0f;
head.y = 0;
}
const float bcos = Mth::cos(bob * 0.09f) * 0.05f + 0.05f;
const float bsin = Mth::sin(bob * 0.067f) * 0.05f;
arm0.zRot += bcos;
arm1.zRot -= bcos;
arm0.xRot += bsin;
arm1.xRot -= bsin;
if (bowAndArrow) {
float attack2 = 0;
float attack = 0;
arm0.zRot = 0;
arm1.zRot = 0;
arm0.yRot = -(0.1f - attack2 * 0.6f) + head.yRot;
arm1.yRot = +(0.1f - attack2 * 0.6f) + head.yRot + 0.4f;
arm0.xRot = -Mth::PI / 2.0f + head.xRot;
arm1.xRot = -Mth::PI / 2.0f + head.xRot;
arm0.xRot -= attack2 * 1.2f - attack * 0.4f;
arm1.xRot -= attack2 * 1.2f - attack * 0.4f;
arm0.zRot += bcos;
arm1.zRot -= bcos;
arm0.xRot += bsin;
arm1.xRot -= bsin;
}
}
void HumanoidModel::onGraphicsReset()
{
head.onGraphicsReset();
body.onGraphicsReset();
arm0.onGraphicsReset();
arm1.onGraphicsReset();
leg0.onGraphicsReset();
leg1.onGraphicsReset();
//hair.onGraphicsReset();
}
//void renderHair(float scale) {
// hair.yRot = head.yRot;
// hair.xRot = head.xRot;
// hair.render(scale);
//}
//
//void renderEars(float scale) {
// ear.yRot = head.yRot;
// ear.xRot = head.xRot;
// ear.x=0;
// ear.y=0;
// ear.render(scale);
//}
//

View File

@@ -2,8 +2,8 @@
//package net.minecraft.client.model;
#include "Model.h"
#include "geom/ModelPart.h"
#include "Model.hpp"
#include "geom/ModelPart.hpp"
class ItemInstance;
class HumanoidModel: public Model
{

View File

@@ -3,7 +3,7 @@
//package net.minecraft.client.model;
#include <vector>
#include "geom/ModelPart.h"
#include "geom/ModelPart.hpp"
class Mob;
class Entity;

View File

@@ -1,15 +0,0 @@
#pragma once
#include "HumanoidModel.h"
#include "ChickenModel.h"
#include "CowModel.h"
#include "PigModel.h"
#include "SheepModel.h"
#include "SheepFurModel.h"
#include "ZombieModel.h"
#include "SkeletonModel.h"
#include "SignModel.h"

View File

@@ -0,0 +1,15 @@
#pragma once
#include "HumanoidModel.hpp"
#include "ChickenModel.hpp"
#include "CowModel.hpp"
#include "PigModel.hpp"
#include "SheepModel.hpp"
#include "SheepFurModel.hpp"
#include "ZombieModel.hpp"
#include "SkeletonModel.hpp"
#include "SignModel.hpp"

View File

@@ -1,8 +1,8 @@
#include "PigModel.h"
PigModel::PigModel( float g /*= 0*/ )
: super(6, g)
{
head.texOffs(16, 16).addBox(-2, 0, -9, 4, 3, 1, g);
yHeadOffs = 4;
}
#include "PigModel.hpp"
PigModel::PigModel( float g /*= 0*/ )
: super(6, g)
{
head.texOffs(16, 16).addBox(-2, 0, -9, 4, 3, 1, g);
yHeadOffs = 4;
}

View File

@@ -2,7 +2,7 @@
//package net.minecraft.client.model;
#include "QuadrupedModel.h"
#include "QuadrupedModel.hpp"
class PigModel: public QuadrupedModel
{

View File

@@ -1,122 +1,122 @@
#include "QuadrupedModel.h"
#include "geom/ModelPart.h"
#include "../../util/Mth.h"
QuadrupedModel::QuadrupedModel( int legSize, float g )
: yHeadOffs(8),
zHeadOffs(4),
head(0, 0),
body(28, 8),
leg0(0, 16),
leg1(0, 16),
leg2(0, 16),
leg3(0, 16)
{
head.setModel(this);
body.setModel(this);
leg0.setModel(this);
leg1.setModel(this);
leg2.setModel(this);
leg3.setModel(this);
head.addBox(-4, -4, -8, 8, 8, 8, g); // Head
head.setPos(0, 12 + 6 - (float)legSize, -6);
body.addBox(-5, -10, -7, 10, 16, 8, g); // Body
body.setPos(0, 11 + 6 - (float)legSize, 2);
leg0.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg0
leg0.setPos(-3, 18 + 6 - (float)legSize, 7);
leg1.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg1
leg1.setPos(3, 18 + 6 - (float)legSize, 7);
leg2.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg2
leg2.setPos(-3, 18 + 6 - (float)legSize, -5);
leg3.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg3
leg3.setPos(3, 18 + 6 - (float)legSize, -5);
}
void QuadrupedModel::render( Entity* entity, float time, float r, float bob, float yRot, float xRot, float scale )
{
setupAnim(time, r, bob, yRot, xRot, scale);
if (young) {
float ss = 2.0f;
glPushMatrix();
glTranslatef(0, yHeadOffs * scale, zHeadOffs * scale);
head.render(scale);
glPopMatrix();
glPushMatrix();
glScalef(1 / ss, 1 / ss, 1 / ss);
glTranslatef(0, 24 * scale, 0);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
glPopMatrix();
} else {
head.render(scale);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
}
}
void QuadrupedModel::render( QuadrupedModel* model, float scale )
{
head.yRot = model->head.yRot;
head.xRot = model->head.xRot;
head.y = model->head.y;
head.x = model->head.x;
body.yRot = model->body.yRot;
body.xRot = model->body.xRot;
leg0.xRot = model->leg0.xRot;
leg1.xRot = model->leg1.xRot;
leg2.xRot = model->leg2.xRot;
leg3.xRot = model->leg3.xRot;
if (young) {
float ss = 2.0f;
glPushMatrix();
glTranslatef(0, 8 * scale, 4 * scale);
head.render(scale);
glPopMatrix();
glPushMatrix();
glScalef(1 / ss, 1 / ss, 1 / ss);
glTranslatef(0, 24 * scale, 0);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
glPopMatrix();
} else {
head.render(scale);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
}
}
void QuadrupedModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
head.xRot = xRot / (180.f / Mth::PI);
head.yRot = yRot / (180.f / Mth::PI);
body.xRot = 90 / (180.f / Mth::PI);
const float pend = Mth::cos(time * 0.6662f) * 1.4f * r;
leg0.xRot = pend;
leg1.xRot = -pend;
leg2.xRot = -pend;
leg3.xRot = pend;
}
#include "QuadrupedModel.hpp"
#include "geom/ModelPart.hpp"
#include "util/Mth.hpp"
QuadrupedModel::QuadrupedModel( int legSize, float g )
: yHeadOffs(8),
zHeadOffs(4),
head(0, 0),
body(28, 8),
leg0(0, 16),
leg1(0, 16),
leg2(0, 16),
leg3(0, 16)
{
head.setModel(this);
body.setModel(this);
leg0.setModel(this);
leg1.setModel(this);
leg2.setModel(this);
leg3.setModel(this);
head.addBox(-4, -4, -8, 8, 8, 8, g); // Head
head.setPos(0, 12 + 6 - (float)legSize, -6);
body.addBox(-5, -10, -7, 10, 16, 8, g); // Body
body.setPos(0, 11 + 6 - (float)legSize, 2);
leg0.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg0
leg0.setPos(-3, 18 + 6 - (float)legSize, 7);
leg1.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg1
leg1.setPos(3, 18 + 6 - (float)legSize, 7);
leg2.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg2
leg2.setPos(-3, 18 + 6 - (float)legSize, -5);
leg3.addBox(-2, 0, -2, 4, legSize, 4, g); // Leg3
leg3.setPos(3, 18 + 6 - (float)legSize, -5);
}
void QuadrupedModel::render( Entity* entity, float time, float r, float bob, float yRot, float xRot, float scale )
{
setupAnim(time, r, bob, yRot, xRot, scale);
if (young) {
float ss = 2.0f;
glPushMatrix();
glTranslatef(0, yHeadOffs * scale, zHeadOffs * scale);
head.render(scale);
glPopMatrix();
glPushMatrix();
glScalef(1 / ss, 1 / ss, 1 / ss);
glTranslatef(0, 24 * scale, 0);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
glPopMatrix();
} else {
head.render(scale);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
}
}
void QuadrupedModel::render( QuadrupedModel* model, float scale )
{
head.yRot = model->head.yRot;
head.xRot = model->head.xRot;
head.y = model->head.y;
head.x = model->head.x;
body.yRot = model->body.yRot;
body.xRot = model->body.xRot;
leg0.xRot = model->leg0.xRot;
leg1.xRot = model->leg1.xRot;
leg2.xRot = model->leg2.xRot;
leg3.xRot = model->leg3.xRot;
if (young) {
float ss = 2.0f;
glPushMatrix();
glTranslatef(0, 8 * scale, 4 * scale);
head.render(scale);
glPopMatrix();
glPushMatrix();
glScalef(1 / ss, 1 / ss, 1 / ss);
glTranslatef(0, 24 * scale, 0);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
glPopMatrix();
} else {
head.render(scale);
body.render(scale);
leg0.render(scale);
leg1.render(scale);
leg2.render(scale);
leg3.render(scale);
}
}
void QuadrupedModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
head.xRot = xRot / (180.f / Mth::PI);
head.yRot = yRot / (180.f / Mth::PI);
body.xRot = 90 / (180.f / Mth::PI);
const float pend = Mth::cos(time * 0.6662f) * 1.4f * r;
leg0.xRot = pend;
leg1.xRot = -pend;
leg2.xRot = -pend;
leg3.xRot = pend;
}

View File

@@ -2,8 +2,8 @@
//package net.minecraft.client.model;
#include "Model.h"
#include "geom/ModelPart.h"
#include "Model.hpp"
#include "geom/ModelPart.hpp"
class Entity;

View File

@@ -1,49 +1,49 @@
#include "SheepFurModel.h"
#include "geom/ModelPart.h"
#include "../../world/entity/Mob.h"
#include "../../world/entity/animal/Sheep.h"
SheepFurModel::SheepFurModel()
: super(12, 0)
{
head = ModelPart(this, 0, 0);
head.addBox(-3, -4, -4, 6, 6, 6, 0.6f); // Head
head.setPos(0, 12 - 6, -8);
body = ModelPart(this, 28, 8);
body.addBox(-4, -10, -7, 8, 16, 6, 1.75f); // Body
body.setPos(0, 11 + 6 - 12, 2);
float g = 0.5f;
leg0 = ModelPart(this, 0, 16);
leg0.addBox(-2, 0, -2, 4, 6, 4, g); // Leg0
leg0.setPos(-3, 18 + 6 - 12, 7);
leg1 = ModelPart(this, 0, 16);
leg1.addBox(-2, 0, -2, 4, 6, 4, g); // Leg1
leg1.setPos(3, 18 + 6 - 12, 7);
leg2 = ModelPart(this, 0, 16);
leg2.addBox(-2, 0, -2, 4, 6, 4, g); // Leg2
leg2.setPos(-3, 18 + 6 - 12, -5);
leg3 = ModelPart(this, 0, 16);
leg3.addBox(-2, 0, -2, 4, 6, 4, g); // Leg3
leg3.setPos(3, 18 + 6 - 12, -5);
}
void SheepFurModel::prepareMobModel( Mob* mob, float time, float r, float a )
{
super::prepareMobModel(mob, time, r, a);
Sheep* sheep = (Sheep*) mob;
head.y = 6 + sheep->getHeadEatPositionScale(a) * 9.f;
headXRot = sheep->getHeadEatAngleScale(a);
}
void SheepFurModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
super::setupAnim(time, r, bob, yRot, xRot, scale);
head.xRot = headXRot;
}
#include "SheepFurModel.hpp"
#include "geom/ModelPart.hpp"
#include "world/entity/Mob.hpp"
#include "world/entity/animal/Sheep.hpp"
SheepFurModel::SheepFurModel()
: super(12, 0)
{
head = ModelPart(this, 0, 0);
head.addBox(-3, -4, -4, 6, 6, 6, 0.6f); // Head
head.setPos(0, 12 - 6, -8);
body = ModelPart(this, 28, 8);
body.addBox(-4, -10, -7, 8, 16, 6, 1.75f); // Body
body.setPos(0, 11 + 6 - 12, 2);
float g = 0.5f;
leg0 = ModelPart(this, 0, 16);
leg0.addBox(-2, 0, -2, 4, 6, 4, g); // Leg0
leg0.setPos(-3, 18 + 6 - 12, 7);
leg1 = ModelPart(this, 0, 16);
leg1.addBox(-2, 0, -2, 4, 6, 4, g); // Leg1
leg1.setPos(3, 18 + 6 - 12, 7);
leg2 = ModelPart(this, 0, 16);
leg2.addBox(-2, 0, -2, 4, 6, 4, g); // Leg2
leg2.setPos(-3, 18 + 6 - 12, -5);
leg3 = ModelPart(this, 0, 16);
leg3.addBox(-2, 0, -2, 4, 6, 4, g); // Leg3
leg3.setPos(3, 18 + 6 - 12, -5);
}
void SheepFurModel::prepareMobModel( Mob* mob, float time, float r, float a )
{
super::prepareMobModel(mob, time, r, a);
Sheep* sheep = (Sheep*) mob;
head.y = 6 + sheep->getHeadEatPositionScale(a) * 9.f;
headXRot = sheep->getHeadEatAngleScale(a);
}
void SheepFurModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
super::setupAnim(time, r, bob, yRot, xRot, scale);
head.xRot = headXRot;
}

View File

@@ -2,7 +2,7 @@
//package net.minecraft.client.model;
#include "QuadrupedModel.h"
#include "QuadrupedModel.hpp"
class SheepFurModel: public QuadrupedModel
{

View File

@@ -1,32 +1,32 @@
#include "SheepModel.h"
#include "geom/ModelPart.h"
#include "../../world/entity/Mob.h"
#include "../../world/entity/animal/Sheep.h"
SheepModel::SheepModel()
: super(12, 0)
{
head = ModelPart(this, 0, 0);
head.addBox(-3, -4, -6, 6, 6, 8, 0); // Head
head.setPos(0, 12 - 6, -8);
body = ModelPart(this, 28, 8);
body.addBox(-4, -10, -7, 8, 16, 6, 0); // Body
body.setPos(0, 11 + 6 - 12, 2);
}
void SheepModel::prepareMobModel( Mob* mob, float time, float r, float a )
{
super::prepareMobModel(mob, time, r, a);
Sheep* sheep = (Sheep*) mob;
head.y = 6 + sheep->getHeadEatPositionScale(a) * 9.f;
headXRot = sheep->getHeadEatAngleScale(a);
}
void SheepModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
super::setupAnim(time, r, bob, yRot, xRot, scale);
head.xRot = headXRot;
}
#include "SheepModel.hpp"
#include "geom/ModelPart.hpp"
#include "world/entity/Mob.hpp"
#include "world/entity/animal/Sheep.hpp"
SheepModel::SheepModel()
: super(12, 0)
{
head = ModelPart(this, 0, 0);
head.addBox(-3, -4, -6, 6, 6, 8, 0); // Head
head.setPos(0, 12 - 6, -8);
body = ModelPart(this, 28, 8);
body.addBox(-4, -10, -7, 8, 16, 6, 0); // Body
body.setPos(0, 11 + 6 - 12, 2);
}
void SheepModel::prepareMobModel( Mob* mob, float time, float r, float a )
{
super::prepareMobModel(mob, time, r, a);
Sheep* sheep = (Sheep*) mob;
head.y = 6 + sheep->getHeadEatPositionScale(a) * 9.f;
headXRot = sheep->getHeadEatAngleScale(a);
}
void SheepModel::setupAnim( float time, float r, float bob, float yRot, float xRot, float scale )
{
super::setupAnim(time, r, bob, yRot, xRot, scale);
head.xRot = headXRot;
}

View File

@@ -2,7 +2,7 @@
//package net.minecraft.client.model;
#include "QuadrupedModel.h"
#include "QuadrupedModel.hpp"
class SheepModel: public QuadrupedModel
{

View File

@@ -2,8 +2,8 @@
//package net.minecraft.client.model;
#include "Model.h"
#include "geom/ModelPart.h"
#include "Model.hpp"
#include "geom/ModelPart.hpp"
class SignModel: public Model
{

View File

@@ -2,8 +2,8 @@
//package net.minecraft.client.model;
#include "ZombieModel.h"
#include "geom/ModelPart.h"
#include "ZombieModel.hpp"
#include "geom/ModelPart.hpp"
class SkeletonModel: public ZombieModel
{

View File

@@ -2,11 +2,11 @@
//package net.minecraft.client.model;
#include "Model.h"
#include "Model.hpp"
#include "geom/ModelPart.h"
#include "../../world/entity/Entity.h"
#include "../../util/Mth.h"
#include "geom/ModelPart.hpp"
#include "world/entity/Entity.hpp"
#include "util/Mth.hpp"
class SpiderModel: public Model
{

View File

@@ -2,7 +2,7 @@
//package net.minecraft.client.model;
#include "HumanoidModel.h"
#include "HumanoidModel.hpp"
class ZombieModel: public HumanoidModel
{

View File

@@ -1,75 +1,75 @@
#include "Cube.h"
#include "ModelPart.h"
#include "../../renderer/Tesselator.h"
#include "../../renderer/gles.h"
#include "../../../util/Mth.h"
Cube::Cube(ModelPart* modelPart, int xTexOffs, int yTexOffs, float x0, float y0, float z0, int w, int h, int d, float g)
: x0(x0),
y0(y0),
z0(z0),
x1(x0 + w),
y1(y0 + h),
z1(z0 + d)
{
float x1 = this->x1;
float y1 = this->y1;
float z1 = this->z1;
x0 -= g;
y0 -= g;
z0 -= g;
x1 += g;
y1 += g;
z1 += g;
if (modelPart->mirror) {
float tmp = x1;
x1 = x0;
x0 = tmp;
}
vertices[0] = VertexPT(x0, y0, z0, 0, 0);
vertices[1] = VertexPT(x1, y0, z0, 0, 8);
vertices[2] = VertexPT(x1, y1, z0, 8, 8);
vertices[3] = VertexPT(x0, y1, z0, 8, 0);
vertices[4] = VertexPT(x0, y0, z1, 0, 0);
vertices[5] = VertexPT(x1, y0, z1, 0, 8);
vertices[6] = VertexPT(x1, y1, z1, 8, 8);
vertices[7] = VertexPT(x0, y1, z1, 8, 0);
VertexPT* ptr = vertices - 1;
VertexPT* u0 = ++ptr;
VertexPT* u1 = ++ptr;
VertexPT* u2 = ++ptr;
VertexPT* u3 = ++ptr;
VertexPT* l0 = ++ptr;
VertexPT* l1 = ++ptr;
VertexPT* l2 = ++ptr;
VertexPT* l3 = ++ptr;
polygons[0] = PolygonQuad(l1, u1, u2, l2, xTexOffs + d + w, yTexOffs + d, xTexOffs + d + w + d, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Right
polygons[1] = PolygonQuad(u0, l0, l3, u3, xTexOffs + 0, yTexOffs + d, xTexOffs + d, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Left
polygons[2] = PolygonQuad(l1, l0, u0, u1, xTexOffs + d, yTexOffs + 0, xTexOffs + d + w, yTexOffs + d, modelPart->xTexSize, modelPart->yTexSize); // Up
polygons[3] = PolygonQuad(u2, u3, l3, l2, xTexOffs + d + w, yTexOffs + d, xTexOffs + d + w + w, yTexOffs, modelPart->xTexSize, modelPart->yTexSize); // Down
polygons[4] = PolygonQuad(u1, u0, u3, u2, xTexOffs + d, yTexOffs + d, xTexOffs + d + w, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Front
polygons[5] = PolygonQuad(l0, l1, l2, l3, xTexOffs + d + w + d, yTexOffs + d, xTexOffs + d + w + d + w, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Back
if (modelPart->mirror) {
for (int i = 0; i < 6; i++)
polygons[i].mirror();
}
}
void Cube::compile(Tesselator& t, float scale) {
for (int i = 0; i < 6; i++) {
polygons[i].render(t, scale);
}
}
Cube* Cube::setId(const std::string& id) {
this->id = id;
return this;
#include "Cube.hpp"
#include "ModelPart.hpp"
#include "client/renderer/Tesselator.hpp"
#include "client/renderer/gles.hpp"
#include "util/Mth.hpp"
Cube::Cube(ModelPart* modelPart, int xTexOffs, int yTexOffs, float x0, float y0, float z0, int w, int h, int d, float g)
: x0(x0),
y0(y0),
z0(z0),
x1(x0 + w),
y1(y0 + h),
z1(z0 + d)
{
float x1 = this->x1;
float y1 = this->y1;
float z1 = this->z1;
x0 -= g;
y0 -= g;
z0 -= g;
x1 += g;
y1 += g;
z1 += g;
if (modelPart->mirror) {
float tmp = x1;
x1 = x0;
x0 = tmp;
}
vertices[0] = VertexPT(x0, y0, z0, 0, 0);
vertices[1] = VertexPT(x1, y0, z0, 0, 8);
vertices[2] = VertexPT(x1, y1, z0, 8, 8);
vertices[3] = VertexPT(x0, y1, z0, 8, 0);
vertices[4] = VertexPT(x0, y0, z1, 0, 0);
vertices[5] = VertexPT(x1, y0, z1, 0, 8);
vertices[6] = VertexPT(x1, y1, z1, 8, 8);
vertices[7] = VertexPT(x0, y1, z1, 8, 0);
VertexPT* ptr = vertices - 1;
VertexPT* u0 = ++ptr;
VertexPT* u1 = ++ptr;
VertexPT* u2 = ++ptr;
VertexPT* u3 = ++ptr;
VertexPT* l0 = ++ptr;
VertexPT* l1 = ++ptr;
VertexPT* l2 = ++ptr;
VertexPT* l3 = ++ptr;
polygons[0] = PolygonQuad(l1, u1, u2, l2, xTexOffs + d + w, yTexOffs + d, xTexOffs + d + w + d, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Right
polygons[1] = PolygonQuad(u0, l0, l3, u3, xTexOffs + 0, yTexOffs + d, xTexOffs + d, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Left
polygons[2] = PolygonQuad(l1, l0, u0, u1, xTexOffs + d, yTexOffs + 0, xTexOffs + d + w, yTexOffs + d, modelPart->xTexSize, modelPart->yTexSize); // Up
polygons[3] = PolygonQuad(u2, u3, l3, l2, xTexOffs + d + w, yTexOffs + d, xTexOffs + d + w + w, yTexOffs, modelPart->xTexSize, modelPart->yTexSize); // Down
polygons[4] = PolygonQuad(u1, u0, u3, u2, xTexOffs + d, yTexOffs + d, xTexOffs + d + w, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Front
polygons[5] = PolygonQuad(l0, l1, l2, l3, xTexOffs + d + w + d, yTexOffs + d, xTexOffs + d + w + d + w, yTexOffs + d + h, modelPart->xTexSize, modelPart->yTexSize); // Back
if (modelPart->mirror) {
for (int i = 0; i < 6; i++)
polygons[i].mirror();
}
}
void Cube::compile(Tesselator& t, float scale) {
for (int i = 0; i < 6; i++) {
polygons[i].render(t, scale);
}
}
Cube* Cube::setId(const std::string& id) {
this->id = id;
return this;
}

View File

@@ -3,7 +3,7 @@
//package net.minecraft.client.model;
#include <string>
#include "Polygon.h"
#include "Polygon.hpp"
class Tesselator;
class ModelPart;

View File

@@ -1,303 +1,303 @@
#include "ModelPart.h"
#include "Cube.h"
#include "../Model.h"
#include "../../renderer/Tesselator.h"
#include "../../../util/Mth.h"
ModelPart::ModelPart( const std::string& id )
: id(id),
model(NULL),
xTexOffs(0),
yTexOffs(0)
{
_init();
}
ModelPart::ModelPart( int xTexOffs /*= 0*/, int yTexOffs /*= 0*/ )
: xTexOffs(xTexOffs),
yTexOffs(yTexOffs),
model(NULL)
{
_init();
}
ModelPart::ModelPart( Model* model, int xTexOffs /*= 0*/, int yTexOffs /*= 0*/ )
: model(model),
xTexOffs(xTexOffs),
yTexOffs(yTexOffs)
{
_init();
}
ModelPart::~ModelPart() {
clear();
}
void ModelPart::_init() {
x = y = z = 0;
xRot = yRot = zRot = 0;
list = 0;
mirror = false;
visible = true;
neverRender = false;
compiled = false;
xTexSize = 64;
yTexSize = 32;
vboId = 0;
glGenBuffers2(1, &vboId);
}
void ModelPart::setModel(Model* model) {
if (this->model) {
Util::remove(this->model->cubes, this);
}
if (model) {
model->cubes.push_back(this);
setTexSize(model->texWidth, model->texHeight);
}
this->model = model;
}
void ModelPart::addChild(ModelPart* child) {
children.push_back(child);
}
ModelPart& ModelPart::addBox(const std::string& id, float x0, float y0, float z0, int w, int h, int d) {
std::string newid = this->id + "." + id;
//TexOffs offs = model.getMapTex(id); //@todo @diff
//texOffs(offs.x, offs.y);
cubes.push_back((new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, 0))->setId(newid));
return *this;
}
ModelPart& ModelPart::addBox(float x0, float y0, float z0, int w, int h, int d) {
cubes.push_back(new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, 0));
return *this;
}
void ModelPart::addBox(float x0, float y0, float z0, int w, int h, int d, float g) {
cubes.push_back(new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, g));
}
//This Cube constructor is commented out
//void ModelPart::addTexBox(float x0, float y0, float z0, int w, int h, int d, int tex) {
// cubes.push_back(new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, tex));
//}
void ModelPart::setPos( float x, float y, float z )
{
this->x = x;
this->y = y;
this->z = z;
}
void ModelPart::render( float scale )
{
if (neverRender) return;
if (!visible) return;
if (!compiled) compile(scale);
if (xRot != 0 || yRot != 0 || zRot != 0) {
glPushMatrix2();
glTranslatef2(x * scale, y * scale, z * scale);
const float c = Mth::RADDEG;
if (zRot != 0) glRotatef2(zRot * c, 0.0f, 0.0f, 1.0f);
if (yRot != 0) glRotatef2(yRot * c, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * c, 1.0f, 0.0f, 0.0f);
//LOGI("A");
draw();
if (!children.empty()) {
for (unsigned int i = 0; i < children.size(); i++) {
children[i]->render(scale);
}
}
glPopMatrix2();
} else if (x != 0 || y != 0 || z != 0) {
glTranslatef2(x * scale, y * scale, z * scale);
//LOGI("B");
draw();
if (!children.empty()) {
for (unsigned int i = 0; i < children.size(); i++) {
children[i]->render(scale);
}
}
glTranslatef2(-x * scale, -y * scale, -z * scale);
} else {
//LOGI("C");
draw();
if (!children.empty()) {
for (unsigned int i = 0; i < children.size(); i++) {
children[i]->render(scale);
}
}
}
}
void ModelPart::renderRollable( float scale )
{
if (neverRender) return;
if (!visible) return;
if (!compiled) compile(scale);
glPushMatrix2();
glTranslatef2(x * scale, y * scale, z * scale);
const float c = Mth::RADDEG;
if (yRot != 0) glRotatef2(yRot * c, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * c, 1.0f, 0.0f, 0.0f);
if (zRot != 0) glRotatef2(zRot * c, 0.0f, 0.0f, 1.0f);
draw();
glPopMatrix2();
}
void ModelPart::translateTo( float scale )
{
if (neverRender) return;
if (!visible) return;
if (!compiled) compile(scale);
if (xRot != 0 || yRot != 0 || zRot != 0) {
const float c = Mth::RADDEG;
glTranslatef2(x * scale, y * scale, z * scale);
if (zRot != 0) glRotatef2(zRot * c, 0.0f, 0.0f, 1.0f);
if (yRot != 0) glRotatef2(yRot * c, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * c, 1.0f, 0.0f, 0.0f);
} else if (x != 0 || y != 0 || z != 0) {
glTranslatef2(x * scale, y * scale, z * scale);
} else {
}
}
void ModelPart::compile( float scale )
{
#ifndef OPENGL_ES
list = glGenLists(1);
// FIX NORMAL BUG HERE
glNewList(list, GL_COMPILE);
#endif
Tesselator& t = Tesselator::instance;
t.begin();
t.color(255, 255, 255, 255);
for (int i = 0; i < 6; i++) {
for (unsigned int i = 0; i < cubes.size(); ++i)
cubes[i]->compile(t, scale);
}
t.end(true, vboId);
#ifndef OPENGL_ES
glEndList();
#endif
compiled = true;
}
void ModelPart::draw()
{
#ifdef OPENGL_ES
drawArrayVT_NoState(vboId, cubes.size() * 2 * 3 * 6, 24);
#else
glCallList(list);
#endif
}
ModelPart& ModelPart::setTexSize(int xs, int ys) {
xTexSize = (float)xs;
yTexSize = (float)ys;
return *this;
}
ModelPart& ModelPart::texOffs(int xTexOffs, int yTexOffs) {
this->xTexOffs = xTexOffs;
this->yTexOffs = yTexOffs;
return *this;
}
void ModelPart::mimic(const ModelPart* o) {
x = o->x;
y = o->y;
z = o->z;
xRot = o->xRot;
yRot = o->yRot;
zRot = o->zRot;
}
void ModelPart::renderHorrible( float scale )
{
if (neverRender) {
return;
}
if (!visible) {
return;
}
//if (!compiled) compile(scale);
if (xRot != 0 || yRot != 0 || zRot != 0) {
glPushMatrix2();
glTranslatef2(x * scale, y * scale, z * scale);
if (zRot != 0) glRotatef2(zRot * Mth::RADDEG, 0.0f, 0.0f, 1.0f);
if (yRot != 0) glRotatef2(yRot * Mth::RADDEG, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * Mth::RADDEG, 1.0f, 0.0f, 0.0f);
drawSlow(scale);
glPopMatrix2();
} else if (x != 0 || y != 0 || z != 0) {
glTranslatef2(x * scale, y * scale, z * scale);
drawSlow(scale);
glTranslatef2(-x * scale, -y * scale, -z * scale);
} else {
drawSlow(scale);
}
}
void ModelPart::drawSlow( float scale )
{
Tesselator& t = Tesselator::instance;
t.begin();
for (int j = 0; j < (int)cubes.size(); ++j) {
Cube* c = cubes[j];
for (int i = 0; i < 6; i++) {
c->polygons[i].render(t, scale, vboId);
}
}
t.draw();
}
void ModelPart::clear()
{
for (unsigned int i = 0; i < cubes.size(); ++i)
delete cubes[i];
cubes.clear();
setModel(NULL);
}
ModelPart& ModelPart::operator=( const ModelPart& rhs )
{
clear();
if (!id.empty() || !rhs.id.empty()) {
id = rhs.id;
}
xTexOffs = rhs.xTexOffs;
yTexOffs = rhs.yTexOffs;
compiled = false;
mirror = rhs.mirror;
setModel(rhs.model);
cubes.assign(rhs.cubes.begin(), rhs.cubes.end());
mimic(&rhs);
return *this;
}
#include "ModelPart.hpp"
#include "Cube.hpp"
#include "client/model/Model.hpp"
#include "client/renderer/Tesselator.hpp"
#include "util/Mth.hpp"
ModelPart::ModelPart( const std::string& id )
: id(id),
model(NULL),
xTexOffs(0),
yTexOffs(0)
{
_init();
}
ModelPart::ModelPart( int xTexOffs /*= 0*/, int yTexOffs /*= 0*/ )
: xTexOffs(xTexOffs),
yTexOffs(yTexOffs),
model(NULL)
{
_init();
}
ModelPart::ModelPart( Model* model, int xTexOffs /*= 0*/, int yTexOffs /*= 0*/ )
: model(model),
xTexOffs(xTexOffs),
yTexOffs(yTexOffs)
{
_init();
}
ModelPart::~ModelPart() {
clear();
}
void ModelPart::_init() {
x = y = z = 0;
xRot = yRot = zRot = 0;
list = 0;
mirror = false;
visible = true;
neverRender = false;
compiled = false;
xTexSize = 64;
yTexSize = 32;
vboId = 0;
glGenBuffers2(1, &vboId);
}
void ModelPart::setModel(Model* model) {
if (this->model) {
Util::remove(this->model->cubes, this);
}
if (model) {
model->cubes.push_back(this);
setTexSize(model->texWidth, model->texHeight);
}
this->model = model;
}
void ModelPart::addChild(ModelPart* child) {
children.push_back(child);
}
ModelPart& ModelPart::addBox(const std::string& id, float x0, float y0, float z0, int w, int h, int d) {
std::string newid = this->id + "." + id;
//TexOffs offs = model.getMapTex(id); //@todo @diff
//texOffs(offs.x, offs.y);
cubes.push_back((new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, 0))->setId(newid));
return *this;
}
ModelPart& ModelPart::addBox(float x0, float y0, float z0, int w, int h, int d) {
cubes.push_back(new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, 0));
return *this;
}
void ModelPart::addBox(float x0, float y0, float z0, int w, int h, int d, float g) {
cubes.push_back(new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, g));
}
//This Cube constructor is commented out
//void ModelPart::addTexBox(float x0, float y0, float z0, int w, int h, int d, int tex) {
// cubes.push_back(new Cube(this, xTexOffs, yTexOffs, x0, y0, z0, w, h, d, tex));
//}
void ModelPart::setPos( float x, float y, float z )
{
this->x = x;
this->y = y;
this->z = z;
}
void ModelPart::render( float scale )
{
if (neverRender) return;
if (!visible) return;
if (!compiled) compile(scale);
if (xRot != 0 || yRot != 0 || zRot != 0) {
glPushMatrix2();
glTranslatef2(x * scale, y * scale, z * scale);
const float c = Mth::RADDEG;
if (zRot != 0) glRotatef2(zRot * c, 0.0f, 0.0f, 1.0f);
if (yRot != 0) glRotatef2(yRot * c, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * c, 1.0f, 0.0f, 0.0f);
//LOGI("A");
draw();
if (!children.empty()) {
for (unsigned int i = 0; i < children.size(); i++) {
children[i]->render(scale);
}
}
glPopMatrix2();
} else if (x != 0 || y != 0 || z != 0) {
glTranslatef2(x * scale, y * scale, z * scale);
//LOGI("B");
draw();
if (!children.empty()) {
for (unsigned int i = 0; i < children.size(); i++) {
children[i]->render(scale);
}
}
glTranslatef2(-x * scale, -y * scale, -z * scale);
} else {
//LOGI("C");
draw();
if (!children.empty()) {
for (unsigned int i = 0; i < children.size(); i++) {
children[i]->render(scale);
}
}
}
}
void ModelPart::renderRollable( float scale )
{
if (neverRender) return;
if (!visible) return;
if (!compiled) compile(scale);
glPushMatrix2();
glTranslatef2(x * scale, y * scale, z * scale);
const float c = Mth::RADDEG;
if (yRot != 0) glRotatef2(yRot * c, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * c, 1.0f, 0.0f, 0.0f);
if (zRot != 0) glRotatef2(zRot * c, 0.0f, 0.0f, 1.0f);
draw();
glPopMatrix2();
}
void ModelPart::translateTo( float scale )
{
if (neverRender) return;
if (!visible) return;
if (!compiled) compile(scale);
if (xRot != 0 || yRot != 0 || zRot != 0) {
const float c = Mth::RADDEG;
glTranslatef2(x * scale, y * scale, z * scale);
if (zRot != 0) glRotatef2(zRot * c, 0.0f, 0.0f, 1.0f);
if (yRot != 0) glRotatef2(yRot * c, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * c, 1.0f, 0.0f, 0.0f);
} else if (x != 0 || y != 0 || z != 0) {
glTranslatef2(x * scale, y * scale, z * scale);
} else {
}
}
void ModelPart::compile( float scale )
{
#ifndef OPENGL_ES
list = glGenLists(1);
// FIX NORMAL BUG HERE
glNewList(list, GL_COMPILE);
#endif
Tesselator& t = Tesselator::instance;
t.begin();
t.color(255, 255, 255, 255);
for (int i = 0; i < 6; i++) {
for (unsigned int i = 0; i < cubes.size(); ++i)
cubes[i]->compile(t, scale);
}
t.end(true, vboId);
#ifndef OPENGL_ES
glEndList();
#endif
compiled = true;
}
void ModelPart::draw()
{
#ifdef OPENGL_ES
drawArrayVT_NoState(vboId, cubes.size() * 2 * 3 * 6, 24);
#else
glCallList(list);
#endif
}
ModelPart& ModelPart::setTexSize(int xs, int ys) {
xTexSize = (float)xs;
yTexSize = (float)ys;
return *this;
}
ModelPart& ModelPart::texOffs(int xTexOffs, int yTexOffs) {
this->xTexOffs = xTexOffs;
this->yTexOffs = yTexOffs;
return *this;
}
void ModelPart::mimic(const ModelPart* o) {
x = o->x;
y = o->y;
z = o->z;
xRot = o->xRot;
yRot = o->yRot;
zRot = o->zRot;
}
void ModelPart::renderHorrible( float scale )
{
if (neverRender) {
return;
}
if (!visible) {
return;
}
//if (!compiled) compile(scale);
if (xRot != 0 || yRot != 0 || zRot != 0) {
glPushMatrix2();
glTranslatef2(x * scale, y * scale, z * scale);
if (zRot != 0) glRotatef2(zRot * Mth::RADDEG, 0.0f, 0.0f, 1.0f);
if (yRot != 0) glRotatef2(yRot * Mth::RADDEG, 0.0f, 1.0f, 0.0f);
if (xRot != 0) glRotatef2(xRot * Mth::RADDEG, 1.0f, 0.0f, 0.0f);
drawSlow(scale);
glPopMatrix2();
} else if (x != 0 || y != 0 || z != 0) {
glTranslatef2(x * scale, y * scale, z * scale);
drawSlow(scale);
glTranslatef2(-x * scale, -y * scale, -z * scale);
} else {
drawSlow(scale);
}
}
void ModelPart::drawSlow( float scale )
{
Tesselator& t = Tesselator::instance;
t.begin();
for (int j = 0; j < (int)cubes.size(); ++j) {
Cube* c = cubes[j];
for (int i = 0; i < 6; i++) {
c->polygons[i].render(t, scale, vboId);
}
}
t.draw();
}
void ModelPart::clear()
{
for (unsigned int i = 0; i < cubes.size(); ++i)
delete cubes[i];
cubes.clear();
setModel(NULL);
}
ModelPart& ModelPart::operator=( const ModelPart& rhs )
{
clear();
if (!id.empty() || !rhs.id.empty()) {
id = rhs.id;
}
xTexOffs = rhs.xTexOffs;
yTexOffs = rhs.yTexOffs;
compiled = false;
mirror = rhs.mirror;
setModel(rhs.model);
cubes.assign(rhs.cubes.begin(), rhs.cubes.end());
mimic(&rhs);
return *this;
}

View File

@@ -1,6 +1,6 @@
#pragma once
#include "../../renderer/gles.h"
#include "client/renderer/gles.hpp"
class Model;
class Cube;

View File

@@ -1,55 +1,55 @@
#include "Polygon.h"
#include "../../renderer/Tesselator.h"
#include "../../../world/phys/Vec3.h"
PolygonQuad::PolygonQuad(VertexPT* v0, VertexPT* v1, VertexPT* v2, VertexPT* v3)
: _flipNormal(false)
{
vertices[0] = *v0;
vertices[1] = *v1;
vertices[2] = *v2;
vertices[3] = *v3;
}
PolygonQuad::PolygonQuad( VertexPT* v0, VertexPT* v1, VertexPT* v2, VertexPT* v3,
int uu0, int vv0, int uu1, int vv1, float texW, float texH)
: _flipNormal(false)
{
const float us = -0.002f / texW;
const float vs = -0.002f / texH;
vertices[0] = v0->remap(uu1 / texW - us, vv0 / texH + vs);
vertices[1] = v1->remap(uu0 / texW + us, vv0 / texH + vs);
vertices[2] = v2->remap(uu0 / texW + us, vv1 / texH - vs);
vertices[3] = v3->remap(uu1 / texW - us, vv1 / texH - vs);
}
PolygonQuad::PolygonQuad( VertexPT* v0, VertexPT* v1, VertexPT* v2, VertexPT* v3,
float uu0, float vv0, float uu1, float vv1)
: _flipNormal(false)
{
vertices[0] = v0->remap(uu1, vv0);
vertices[1] = v1->remap(uu0, vv0);
vertices[2] = v2->remap(uu0, vv1);
vertices[3] = v3->remap(uu1, vv1);
}
void PolygonQuad::mirror() {
for (int i = 0; i < VERTEX_COUNT / 2; ++i) {
const int j = VERTEX_COUNT - i - 1;
VertexPT tmp = vertices[i];
vertices[i] = vertices[j];
vertices[j] = tmp;
}
}
void PolygonQuad::render(Tesselator& t, float scale, int vboId /* = -1 */) {
for (int i = 0; i < 4; i++) {
VertexPT& v = vertices[i];
t.vertexUV(v.pos.x * scale, v.pos.y * scale, v.pos.z * scale, v.u, v.v);
}
}
PolygonQuad* PolygonQuad::flipNormal() {
_flipNormal = true;
return this;
}
#include "Polygon.hpp"
#include "client/renderer/Tesselator.hpp"
#include "world/phys/Vec3.hpp"
PolygonQuad::PolygonQuad(VertexPT* v0, VertexPT* v1, VertexPT* v2, VertexPT* v3)
: _flipNormal(false)
{
vertices[0] = *v0;
vertices[1] = *v1;
vertices[2] = *v2;
vertices[3] = *v3;
}
PolygonQuad::PolygonQuad( VertexPT* v0, VertexPT* v1, VertexPT* v2, VertexPT* v3,
int uu0, int vv0, int uu1, int vv1, float texW, float texH)
: _flipNormal(false)
{
const float us = -0.002f / texW;
const float vs = -0.002f / texH;
vertices[0] = v0->remap(uu1 / texW - us, vv0 / texH + vs);
vertices[1] = v1->remap(uu0 / texW + us, vv0 / texH + vs);
vertices[2] = v2->remap(uu0 / texW + us, vv1 / texH - vs);
vertices[3] = v3->remap(uu1 / texW - us, vv1 / texH - vs);
}
PolygonQuad::PolygonQuad( VertexPT* v0, VertexPT* v1, VertexPT* v2, VertexPT* v3,
float uu0, float vv0, float uu1, float vv1)
: _flipNormal(false)
{
vertices[0] = v0->remap(uu1, vv0);
vertices[1] = v1->remap(uu0, vv0);
vertices[2] = v2->remap(uu0, vv1);
vertices[3] = v3->remap(uu1, vv1);
}
void PolygonQuad::mirror() {
for (int i = 0; i < VERTEX_COUNT / 2; ++i) {
const int j = VERTEX_COUNT - i - 1;
VertexPT tmp = vertices[i];
vertices[i] = vertices[j];
vertices[j] = tmp;
}
}
void PolygonQuad::render(Tesselator& t, float scale, int vboId /* = -1 */) {
for (int i = 0; i < 4; i++) {
VertexPT& v = vertices[i];
t.vertexUV(v.pos.x * scale, v.pos.y * scale, v.pos.z * scale, v.u, v.v);
}
}
PolygonQuad* PolygonQuad::flipNormal() {
_flipNormal = true;
return this;
}

View File

@@ -1,7 +1,7 @@
#pragma once
//package net.minecraft.client.model;
#include "Vertex.h"
#include "Vertex.hpp"
class Tesselator;

View File

@@ -2,7 +2,7 @@
//package net.minecraft.client.model;
#include "../../../world/phys/Vec3.h"
#include "world/phys/Vec3.hpp"
class VertexPT
{