This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
frostbite/snowlib/TexDecoder.h

20 lines
521 B
C
Raw Normal View History

2020-02-06 13:23:46 +13:00
#pragma once
class Texture;
class Palette;
class TexDecoder
{
public:
Texture* decode(const unsigned char* data, int ps2Addr);
Texture* decode(int finalw, int finalh, const unsigned char* data, int curIdx);
private:
void readPixels32(const unsigned char* data, Palette* palette, int startOffset, int startx, int starty, int rrw, int rrh, int dbw, int dbh);
void readPixels32(const unsigned char* data, int w, int h);
void unswizzle8bpp(int w, int h);
unsigned char* pixels;
int pixelsLength;
};