diff --git a/planar.h b/planar.h index 4b0487c5..adc6d325 100644 --- a/planar.h +++ b/planar.h @@ -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 diff --git a/th01/hardware/grcg8x8m.cpp b/th01/hardware/grcg8x8m.cpp index 6774c038..b8631825 100644 --- a/th01/hardware/grcg8x8m.cpp +++ b/th01/hardware/grcg8x8m.cpp @@ -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)) );