--- uae/src/include/drawing.h 2018/04/24 16:45:11 1.1.1.3 +++ uae/src/include/drawing.h 2018/04/24 16:47:42 1.1.1.4 @@ -29,6 +29,14 @@ #define MAX_PLANES 6 #endif +#define RES_LORES 0 +#define RES_HIRES 1 +#define RES_SUPERHIRES 2 + +/* calculate shift depending on resolution (replaced "decided_hires ? 4 : 8") (TW) */ +#define RES_SHIFT(res) ((res) == RES_LORES ? 8 : (res) == RES_HIRES ? 4 : 2) +#define RES_ADJUST(res) ((res) == RES_LORES ? 8 : (res) == RES_HIRES ? 4 : 2) + /* We ignore that many lores pixels at the start of the display. These are * invisible anyway due to hardware DDF limits. */ #define DISPLAY_LEFT_SHIFT 0x38 @@ -89,7 +97,7 @@ struct delay_change { }; /* Way too much... */ -#define MAX_REG_CHANGE ((maxvpos+1) * 2 * maxhpos) +#define MAX_REG_CHANGE ((MAXVPOS + 1) * 2 * MAXHPOS) #ifdef OS_WITHOUT_MEMORY_MANAGEMENT extern struct sprite_draw *sprite_positions[2]; @@ -103,7 +111,7 @@ extern struct color_change color_changes extern struct delay_change delay_changes[MAX_REG_CHANGE]; #endif -extern struct color_entry color_tables[2][(maxvpos+1) * 2]; +extern struct color_entry color_tables[2][(MAXVPOS+1) * 2]; extern struct color_entry *curr_color_tables, *prev_color_tables; extern struct sprite_draw *curr_sprite_positions, *prev_sprite_positions; @@ -141,10 +149,10 @@ struct draw_info { int nr_color_changes, nr_sprites; }; -extern struct decision line_decisions[2 * (maxvpos+1) + 1]; -extern struct draw_info line_drawinfo[2][2 * (maxvpos+1) + 1]; +extern struct decision line_decisions[2 * (MAXVPOS+1) + 1]; +extern struct draw_info line_drawinfo[2][2 * (MAXVPOS+1) + 1]; -extern uae_u8 line_data[(maxvpos+1) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2]; +extern uae_u8 line_data[(MAXVPOS+1) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2]; /* Functions in drawing.c. */ extern int coord_native_to_amiga_y (int);