the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "..\Minecraft.World\Icon.h"
5class Texture;
6
7class StitchedTexture : public Icon
8{
9private:
10 const wstring name;
11
12public:
13 wstring m_fileName;
14
15protected:
16 Texture *source;
17 vector<Texture *> *frames;
18
19private:
20 typedef vector<pair<int, int> > intPairVector;
21 intPairVector *frameOverride;
22 int flags;
23
24protected:
25 bool rotated;
26
27 int x;
28 int y;
29
30protected:
31 int width;
32 int height;
33
34 float u0;
35 float u1;
36 float v0;
37 float v1;
38
39 float widthTranslation;
40 float heightTranslation;
41
42protected:
43 int frame;
44 int subFrame;
45
46public:
47 static StitchedTexture *create(const wstring &name);
48
49 ~StitchedTexture();
50protected:
51 StitchedTexture(const wstring &name, const wstring &filename);
52
53public:
54 void initUVs(float U0, float V0, float U1, float V1);
55 void init(Texture *source, vector<Texture *> *frames, int x, int y, int width, int height, bool rotated);
56 void replaceWith(StitchedTexture *texture);
57 int getX() const;
58 int getY() const;
59 int getWidth() const;
60 int getHeight() const;
61 float getU0(bool adjust = false) const;
62 float getU1(bool adjust = false) const;
63 float getU(double offset, bool adjust = false) const;
64 float getV0(bool adjust = false) const;
65 float getV1(bool adjust = false) const;
66 float getV(double offset, bool adjust = false) const;
67 wstring getName() const;
68 virtual int getSourceWidth() const;
69 virtual int getSourceHeight() const;
70 virtual void cycleFrames();
71 Texture *getSource();
72 Texture *getFrame(int i);
73 virtual int getFrames();
74
75 /**
76 * Loads animation frames from a file with the syntax, <code>
77 * 0,1,2,3,
78 * 4*10,5*10,
79 * 4*10,3,2,1,
80 * 0
81 * </code> or similar
82 *
83 * @param bufferedReader
84 */
85 void loadAnimationFrames(BufferedReader *bufferedReader);
86 void loadAnimationFrames(const wstring &string); // 4J Added
87
88 int getFlags() const ; // 4J added
89 void setFlags(int flags); // 4J added
90 virtual void freeFrameTextures(); // 4J added
91 virtual bool hasOwnData(); // 4J Added
92};