mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th01] Don't #define away master.lib's graph_accesspage() macro
We will in fact have to use both the function call and the macro version, even within the same translation unit. Part of P0067, funded by Splashman.
This commit is contained in:
parent
6222b78514
commit
f87b0d4f9e
|
@ -31,7 +31,7 @@ void graph_slow_2xscale_rect_1_to_0(int x0, int y0, int x1, int y1, int w1, int
|
|||
int p1 = row_p1;
|
||||
for(col16 = 0; col16 < w1 / 16; col16++) {
|
||||
int scale_p;
|
||||
graph_accesspage(1);
|
||||
graph_accesspage_func(1);
|
||||
px16.B = *(planar16_t*)(VRAM_PLANE_B + p1);
|
||||
px16.R = *(planar16_t*)(VRAM_PLANE_R + p1);
|
||||
px16.G = *(planar16_t*)(VRAM_PLANE_G + p1);
|
||||
|
@ -41,7 +41,7 @@ void graph_slow_2xscale_rect_1_to_0(int x0, int y0, int x1, int y1, int w1, int
|
|||
planar32_t dst32;
|
||||
planar32_t px32_nonzero;
|
||||
|
||||
graph_accesspage(0);
|
||||
graph_accesspage_func(0);
|
||||
scale_2x(&px32_nonzero, px16_nonzero);
|
||||
grcg_setcolor_rmw(0);
|
||||
*(planar32_t*)(VRAM_PLANE_B + p0 + scale_p) = px32_nonzero;
|
||||
|
|
|
@ -33,8 +33,8 @@ void egc_copy_rect_1_to_0(int x, int y, int w, int h)
|
|||
egc_start_copy();
|
||||
for(row = 0; row < h; row++) {
|
||||
for(col = x_floor, p = row_p; col < x_end; p += 2, col += 16) {
|
||||
graph_accesspage(1); bits = *(planar16_t*)(VRAM_PLANE_B + p);
|
||||
graph_accesspage(0); *(planar16_t*)(VRAM_PLANE_B + p) = bits;
|
||||
graph_accesspage_func(1); bits = *(planar16_t*)(VRAM_PLANE_B + p);
|
||||
graph_accesspage_func(0); *(planar16_t*)(VRAM_PLANE_B + p) = bits;
|
||||
}
|
||||
row_p += 640 / 8;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
// Also updates [page_back].
|
||||
void graph_showpage_func(page_t page);
|
||||
|
||||
void graph_accesspage_func(int page);
|
||||
#undef graph_accesspage
|
||||
#define graph_accesspage graph_accesspage_func
|
||||
|
|
|
@ -29,12 +29,12 @@ void graph_copy_hline_mask_1_to_0(int x, int y, char *mask, int w)
|
|||
register int p = VRAM_OFFSET(x, y);
|
||||
for(col = 0; col < w; col++, p++) {
|
||||
if(mask[col]) {
|
||||
graph_accesspage(1);
|
||||
graph_accesspage_func(1);
|
||||
px8.B = mask[col] & VRAM_PLANE_B[p];
|
||||
px8.R = mask[col] & VRAM_PLANE_R[p];
|
||||
px8.G = mask[col] & VRAM_PLANE_G[p];
|
||||
px8.E = mask[col] & VRAM_PLANE_E[p];
|
||||
graph_accesspage(0);
|
||||
graph_accesspage_func(0);
|
||||
grcg_setcolor_rmw(0);
|
||||
VRAM_PLANE_B[p] = mask[col];
|
||||
grcg_off();
|
||||
|
|
|
@ -24,6 +24,7 @@ void pascal near rotrect_draw(int rad, unsigned char angle)
|
|||
grcg_line(x[3], y[3], x[0], y[0]);
|
||||
}
|
||||
|
||||
#define graph_accesspage_func graph_accesspage
|
||||
#include "th01\hardware\egccopyr.c"
|
||||
|
||||
void pascal rotrect_animate(char rot_speed, char start_angle)
|
||||
|
|
Loading…
Reference in New Issue