diff --git a/th01/main/boss/b20j.cpp b/th01/main/boss/b20j.cpp index 132637d0..133f20aa 100644 --- a/th01/main/boss/b20j.cpp +++ b/th01/main/boss/b20j.cpp @@ -410,9 +410,7 @@ void pattern_diamond_cross_to_edges_followed_by_rain(void) #define diamonds_unput(i) \ for(i = 0; i < DIAMOND_COUNT; i++) { \ - egc_copy_rect_1_to_0_16( \ - diamonds.left[i], diamonds.top[i], 16, DIAMOND_H \ - ); \ + shape8x8_sloppy_unput(diamonds.left[i], diamonds.top[i]); \ } #define diamonds_put(i) \ diff --git a/th01/main/player/inv_spr.cpp b/th01/main/player/inv_spr.cpp index 991dc6d5..3d4a6c4a 100644 --- a/th01/main/player/inv_spr.cpp +++ b/th01/main/player/inv_spr.cpp @@ -15,17 +15,12 @@ void invincibility_sprites_update_and_render(bool16 invincible) } invincibility_sprites; #define sprites invincibility_sprites - #define sloppy_unput(i) \ - egc_copy_rect_1_to_0_16( \ - sprites.left[i], sprites.top[i], 16, sSHAPE8X8[0].h() \ - ); - if(!invincible) { if(sprites.frame[0] == INVINCIBILITY_SPRITES_DONE) { return; } for(i = 0; i < INVINCIBILITY_SPRITE_COUNT; i++) { - sloppy_unput(i); + shape8x8_sloppy_unput(sprites.left[i], sprites.top[i]); } sprites.frame[0] = INVINCIBILITY_SPRITES_DONE; return; @@ -43,7 +38,7 @@ void invincibility_sprites_update_and_render(bool16 invincible) (sprites.frame[i] == 0) ) { if(sprites.frame[i] == (INVINCIBILITY_SPRITE_FRAMES + 1)) { - sloppy_unput(i); + shape8x8_sloppy_unput(sprites.left[i], sprites.top[i]); } sprites.left[i] = ((rand() % 48) + (player_left - 8)); sprites.top[i] = ((rand() % 48) + (player_top - 16)); @@ -64,6 +59,5 @@ void invincibility_sprites_update_and_render(bool16 invincible) } sprites.frame[i]++; } - #undef sloppy_unput #undef sprites } diff --git a/th01/main/shape.hpp b/th01/main/shape.hpp index 4fc102cc..e8cbd0c5 100644 --- a/th01/main/shape.hpp +++ b/th01/main/shape.hpp @@ -8,6 +8,11 @@ void shape8x8_flake_put(screen_x_t left, vram_y_t top, int col); // position. void shape8x8_invincibility_put(screen_x_t left, vram_y_t top, int cel); +// Attempts to unblit a 8×8 sprite, but ends up unblitting a 16×8 rectangle +// instead. +#define shape8x8_sloppy_unput(left, top) \ + egc_copy_rect_1_to_0_16(left, top, 16, 8); + void shape_ellipse_arc_put( screen_x_t center_x, vram_y_t center_y,