aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/TextureHolder.h
blob: 304d03e7579db99931bf09af0d52459bd648c460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

class Texture;

class TextureHolder //implements Comparable<TextureHolder> {
{
private:
	Texture *texture;
	int width;
	int height;
	bool rotated;
	float scale;

public:
	TextureHolder(Texture *texture);

	Texture *getTexture();
	int getWidth() const;
	int getHeight() const;
	void rotate();
	bool isRotated();

private:
	int smallestFittingMinTexel(int input) const;

public:
	void setForcedScale(int targetSize);
	//@Override
	wstring toString();
	int compareTo(const TextureHolder *other) const;
};

typedef struct
{
	bool operator() (const TextureHolder *first, const TextureHolder *second) const { return first->compareTo(second) >= 0; }
} TextureHolderLessThan;