Files
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

64 lines
2.1 KiB
C++

#pragma once
#include "..\Minecraft.World\ArrayWithLength.h"
#include "Vertex.h"
#include "Polygon.h"
#include "Model.h"
#include "..\Minecraft.Client\SkinBox.h"
class Cube;
class ModelPart
{
public:
float xTexSize;
float yTexSize;
float x, y, z;
float xRot, yRot, zRot;
bool bMirror;
bool visible;
bool neverRender;
vector <Cube *> cubes;
vector <ModelPart *> children;
static const float RAD;
float translateX, translateY, translateZ;
private:
wstring id;
int xTexOffs, yTexOffs;
boolean compiled;
int list;
Model *model;
public:
void _init(); // 4J added
ModelPart();
ModelPart(Model *model, const wstring &id);
ModelPart(Model *model);
ModelPart(Model *model, int xTexOffs, int yTexOffs);
// MGH - had to add these for PS3, as calling constructors from others was only introduced in c++11 - https://en.wikipedia.org/wiki/C++11#Object_construction_improvement
void construct(Model *model, const wstring &id);
void construct(Model *model);
void construct(Model *model, int xTexOffs, int yTexOffs);
void addChild(ModelPart *child);
ModelPart * retrieveChild(SKIN_BOX *pBox);
ModelPart *mirror();
ModelPart *texOffs(int xTexOffs, int yTexOffs);
ModelPart *addBox(wstring id, float x0, float y0, float z0, int w, int h, int d);
ModelPart *addBox(float x0, float y0, float z0, int w, int h, int d);
ModelPart *addBoxWithMask(float x0, float y0, float z0, int w, int h, int d, int faceMask); // 4J added
void addBox(float x0, float y0, float z0, int w, int h, int d, float g);
void addHumanoidBox(float x0, float y0, float z0, int w, int h, int d, float g); // 4J - to flip the poly 3 uvs so the skin maps correctly
void addTexBox(float x0, float y0, float z0, int w, int h, int d, int tex);
void setPos(float x, float y, float z);
void render(float scale, bool usecompiled,bool bHideParentBodyPart=false);
void renderRollable(float scale, bool usecompiled);
void translateTo(float scale);
ModelPart *setTexSize(int xs, int ys);
void mimic(ModelPart *o);
void compile(float scale);
int getfU() {return xTexOffs;}
int getfV() {return yTexOffs;}
};