mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-13 03:32:28 +00:00
feat(console): hardware detection et cetera
This commit is contained in:
parent
97bbe2ea66
commit
31f215ea14
118 changed files with 4059 additions and 1931 deletions
|
|
@ -141,11 +141,13 @@ void CBLPFile::DecompPalARGB8888(uint8_t* data, void* tempbuffer, uint32_t color
|
|||
auto pixels = data;
|
||||
auto bytes = reinterpret_cast<uint8_t*>(tempbuffer);
|
||||
|
||||
for (auto i = colorSize; i; i--) {
|
||||
auto i = colorSize;
|
||||
while (i != 0) {
|
||||
*reinterpret_cast<BlpPalPixel*>(pixels) = this->m_header.extended.palette[*bytes];
|
||||
pixels[3] = 0xFF;
|
||||
pixels += 4;
|
||||
bytes++;
|
||||
i--;
|
||||
}
|
||||
|
||||
auto alphaBits = this->AlphaBits();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ struct BlpPalPixel {
|
|||
uint8_t pad;
|
||||
};
|
||||
|
||||
static_assert(sizeof(BlpPalPixel) == 4);
|
||||
|
||||
class CBLPFile {
|
||||
#pragma pack(push, 1)
|
||||
struct BLPHeader {
|
||||
uint32_t magic = 0x32504C42;
|
||||
uint32_t formatVersion = 1;
|
||||
|
|
@ -49,6 +52,7 @@ class CBLPFile {
|
|||
} jpeg;
|
||||
} extended;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
public:
|
||||
// Static variables
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "gx/texture/CGxTex.hpp"
|
||||
#include "gx/Gx.hpp"
|
||||
#include "gx/Device.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
CGxTexFlags::CGxTexFlags(EGxTexFilter filter, uint32_t wrapU, uint32_t wrapV, uint32_t force, uint32_t generateMipMaps, uint32_t renderTarget, uint32_t maxAnisotropy) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue