Files
MinecraftConsoles/Minecraft.Client/BufferedImage.h
ModMaker101 a9be52c41a Project modernization (#630)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
2026-03-08 09:56:03 +07:00

33 lines
1.0 KiB
C++

#pragma once
using namespace std;
class Graphics;
class DLCPack;
class BufferedImage
{
private:
int *data[10]; // Arrays for mipmaps - nullptr if not used
int width;
int height;
void ByteFlip4(unsigned int &data); // 4J added
public:
static const int TYPE_INT_ARGB = 0;
static const int TYPE_INT_RGB = 1;
BufferedImage(int width,int height,int type);
BufferedImage(const wstring& File, bool filenameHasExtension = false, bool bTitleUpdateTexture=false, const wstring &drive =L""); // 4J added
BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenameHasExtension = false ); // 4J Added
BufferedImage(BYTE *pbData, DWORD dwBytes); // 4J added
~BufferedImage();
int getWidth();
int getHeight();
void getRGB(int startX, int startY, int w, int h, intArray out,int offset,int scansize, int level = 0); // 4J Added level param
int *getData(); // 4J added
int *getData(int level); // 4J added
Graphics *getGraphics();
int getTransparency();
BufferedImage *getSubimage(int x, int y, int w, int h);
void preMultiplyAlpha();
};