Initial commit
This commit is contained in:
36
Minecraft.Client/TextureHolder.h
Normal file
36
Minecraft.Client/TextureHolder.h
Normal file
@@ -0,0 +1,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;
|
||||
Reference in New Issue
Block a user