This still needs to be cleaned up, particularly to properly pass the texture size around--there are a few unnecessary '128x256' magic numbers scattered in the code.
17 lines
255 B
C++
17 lines
255 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
struct rect {
|
|
uint32_t char_code;
|
|
uint32_t width;
|
|
uint32_t height;
|
|
int32_t x;
|
|
int32_t y;
|
|
|
|
std::strong_ordering operator<=>(const rect& b) const
|
|
{
|
|
return (width * height) <=> (b.width * b.height);
|
|
}
|
|
};
|