mirror of
https://github.com/luanti-org/minetestmapper.git
synced 2025-10-05 21:35:22 +02:00
Move everything that deals with images directly to an Image class
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include "PixelAttributes.h"
|
||||
#include "Image.h"
|
||||
#include "db.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -25,16 +26,6 @@ enum {
|
||||
SCALE_RIGHT = (1 << 3),
|
||||
};
|
||||
|
||||
struct Color {
|
||||
Color(): r(0xFF), g(0xFF), b(0xFF), a(0) {};
|
||||
Color(uint8_t r, uint8_t g, uint8_t b): r(r), g(g), b(b), a(0) {};
|
||||
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a): r(r), g(g), b(b), a(a) {};
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
uint8_t a;
|
||||
};
|
||||
|
||||
struct ColorEntry {
|
||||
ColorEntry(): r(0), g(0), b(0), a(0), t(0) {};
|
||||
ColorEntry(uint8_t r, uint8_t g, uint8_t b, uint8_t a, uint8_t t): r(r), g(g), b(b), a(a), t(t) {};
|
||||
@@ -99,7 +90,7 @@ private:
|
||||
void printUnknown();
|
||||
int getImageX(int val) const;
|
||||
int getImageY(int val) const;
|
||||
void setZoomed(gdImagePtr image, int x, int y, int color);
|
||||
void setZoomed(int x, int y, Color color);
|
||||
|
||||
private:
|
||||
Color m_bgColor;
|
||||
@@ -115,7 +106,7 @@ private:
|
||||
int m_xBorder, m_yBorder;
|
||||
|
||||
DB *m_db;
|
||||
gdImagePtr m_image;
|
||||
Image *m_image;
|
||||
PixelAttributes m_blockPixelAttributes;
|
||||
int m_xMin;
|
||||
int m_xMax;
|
||||
|
Reference in New Issue
Block a user