[Decompilation] [th01] Add width and height getters for DotRect

Would be a lot more useful if ZUN's code were better.

Part of P0153, funded by Ember2528.
This commit is contained in:
nmlgc 2021-08-15 18:46:26 +02:00
parent 624e0cbff6
commit cd969d543b
2 changed files with 9 additions and 1 deletions

View File

@ -52,6 +52,14 @@ typedef enum {
const row_dots_t& operator [](pixel_t y) const {
return row[y];
}
static pixel_t w() {
return (sizeof(row_dots_t) * 8);
}
static pixel_t h() {
return H;
}
};
#define dot_rect_t(w, h) DotRect<dots_t(w), h>

View File

@ -8,7 +8,7 @@ void grcg_put_8x8_mono(
)
{
grcg_setcolor_rmw(col);
for(pixel_t y = 0; y < 8; y++) {
for(pixel_t y = 0; y < sprite.h(); y++) {
dots16_t d = (
(sprite[y] >> first_bit) + (sprite[y] << (16 - first_bit))
);