the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "..\Minecraft.World\ArrayWithLength.h"
3#include "Vertex.h"
4#include "Polygon.h"
5#include "Model.h"
6#include "..\Minecraft.Client\SkinBox.h"
7
8class Cube;
9
10class ModelPart
11{
12public:
13 float xTexSize;
14 float yTexSize;
15 float x, y, z;
16 float xRot, yRot, zRot;
17 bool bMirror;
18 bool visible;
19 bool neverRender;
20 vector <Cube *> cubes;
21 vector <ModelPart *> children;
22 static const float RAD;
23 float translateX, translateY, translateZ;
24
25private:
26 wstring id;
27 int xTexOffs, yTexOffs;
28 boolean compiled;
29 int list;
30 Model *model;
31
32public:
33 void _init(); // 4J added
34 ModelPart();
35 ModelPart(Model *model, const wstring &id);
36 ModelPart(Model *model);
37 ModelPart(Model *model, int xTexOffs, int yTexOffs);
38
39 // 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
40 void construct(Model *model, const wstring &id);
41 void construct(Model *model);
42 void construct(Model *model, int xTexOffs, int yTexOffs);
43
44 void addChild(ModelPart *child);
45 ModelPart * retrieveChild(SKIN_BOX *pBox);
46 ModelPart *mirror();
47 ModelPart *texOffs(int xTexOffs, int yTexOffs);
48 ModelPart *addBox(wstring id, float x0, float y0, float z0, int w, int h, int d);
49 ModelPart *addBox(float x0, float y0, float z0, int w, int h, int d);
50 ModelPart *addBoxWithMask(float x0, float y0, float z0, int w, int h, int d, int faceMask); // 4J added
51 void addBox(float x0, float y0, float z0, int w, int h, int d, float g);
52 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
53 void addTexBox(float x0, float y0, float z0, int w, int h, int d, int tex);
54 void setPos(float x, float y, float z);
55 void render(float scale, bool usecompiled,bool bHideParentBodyPart=false);
56 void renderRollable(float scale, bool usecompiled);
57 void translateTo(float scale);
58 ModelPart *setTexSize(int xs, int ys);
59 void mimic(ModelPart *o);
60 void compile(float scale);
61 int getfU() {return xTexOffs;}
62 int getfV() {return yTexOffs;}
63 };