summaryrefslogtreecommitdiff
path: root/vdp.h
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-06-20 22:31:31 -0700
committerMichael Pavone <pavone@retrodev.com>2019-06-20 22:31:31 -0700
commit608948cf40855fd680ecf651a94f12247a44cd01 (patch)
tree0c169ce6ad8cd707bff13ead9bbc64b82ebea739 /vdp.h
parent1d8f8c5b5d3a5ea7b20116b690aa38468446df90 (diff)
Rework sprite rendering phase 3 to better match behavior documented by Kabuto/Titan and fix edge case in sprite overflow flag that was breaking the RPS minigame in Alex Kidd
Diffstat (limited to 'vdp.h')
-rw-r--r--vdp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/vdp.h b/vdp.h
index 46400e6..f84c8da 100644
--- a/vdp.h
+++ b/vdp.h
@@ -24,8 +24,6 @@
#define LINEBUF_SIZE (320+HORIZ_BORDER) //H40 + full border
#define SCROLL_BUFFER_SIZE 32
#define BORDER_BOTTOM 13 //TODO: Replace with actual value
-#define MAX_DRAWS 40
-#define MAX_DRAWS_H32 32
#define MAX_DRAWS_H32_MODE4 8
#define MAX_SPRITES_LINE 20
#define MAX_SPRITES_LINE_H32 16
@@ -133,6 +131,8 @@ typedef struct {
int16_t x_pos;
uint8_t pal_priority;
uint8_t h_flip;
+ uint8_t width;
+ uint8_t height;
} sprite_draw;
typedef struct {
@@ -195,7 +195,7 @@ typedef struct {
uint16_t hscroll_b;
uint16_t h40_lines;
uint16_t output_lines;
- sprite_draw sprite_draw_list[MAX_DRAWS];
+ sprite_draw sprite_draw_list[MAX_SPRITES_LINE];
sprite_info sprite_info_list[MAX_SPRITES_LINE];
uint8_t sat_cache[SAT_CACHE_SIZE];
uint16_t col_1;