2020-06-06 16:39:55 +00:00
|
|
|
/* ReC98
|
|
|
|
* -----
|
|
|
|
* 2nd part of code segment #13 of TH01's REIIDEN.EXE
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include "th01/th01.h"
|
2020-08-08 18:12:22 +00:00
|
|
|
#include "th01/math/wave.hpp"
|
2020-06-06 16:39:55 +00:00
|
|
|
|
|
|
|
#pragma option -2
|
|
|
|
#pragma option -O-
|
|
|
|
#pragma option -Z-
|
|
|
|
|
2020-08-05 17:14:38 +00:00
|
|
|
#include "th01/hardware/grp2xscs.cpp"
|
2020-06-06 16:39:55 +00:00
|
|
|
|
2020-08-20 19:59:45 +00:00
|
|
|
void egc_wave_unput(
|
2020-08-21 18:13:08 +00:00
|
|
|
screen_x_t left,
|
|
|
|
vram_y_t top,
|
|
|
|
int len,
|
|
|
|
pixel_t amp,
|
|
|
|
int ph,
|
|
|
|
pixel_t w,
|
|
|
|
pixel_t h
|
2020-08-20 19:59:45 +00:00
|
|
|
)
|
2020-06-06 16:39:55 +00:00
|
|
|
{
|
|
|
|
int t = ph;
|
2020-08-21 18:13:08 +00:00
|
|
|
for(pixel_t y = 0; y < h; y++) {
|
2020-08-20 19:59:45 +00:00
|
|
|
screen_x_t x = (wave_x(amp, t) + left);
|
2020-08-08 18:12:22 +00:00
|
|
|
t += (0x100 / len);
|
2020-07-04 18:20:51 +00:00
|
|
|
egc_copy_rect_1_to_0_16(x, top + y, w, 1);
|
2020-06-06 16:39:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-20 19:59:45 +00:00
|
|
|
void graph_hline_unput_masked(
|
2020-08-21 18:13:08 +00:00
|
|
|
screen_x_t left, vram_y_t top, dots8_t *mask, vram_byte_amount_t w
|
2020-08-20 19:59:45 +00:00
|
|
|
)
|
2020-06-06 16:39:55 +00:00
|
|
|
{
|
|
|
|
planar8_t px8;
|
2020-08-21 17:18:28 +00:00
|
|
|
register vram_offset_t p = vram_offset_shift(left, top);
|
2020-08-21 18:13:08 +00:00
|
|
|
for(vram_byte_amount_t x = 0; x < w; x++, p++) {
|
2020-06-06 16:39:55 +00:00
|
|
|
if(mask[x]) {
|
|
|
|
graph_accesspage_func(1);
|
|
|
|
px8.B = mask[x] & VRAM_PLANE_B[p];
|
|
|
|
px8.R = mask[x] & VRAM_PLANE_R[p];
|
|
|
|
px8.G = mask[x] & VRAM_PLANE_G[p];
|
|
|
|
px8.E = mask[x] & VRAM_PLANE_E[p];
|
|
|
|
graph_accesspage_func(0);
|
|
|
|
grcg_setcolor_rmw(0);
|
|
|
|
VRAM_PLANE_B[p] = mask[x];
|
|
|
|
grcg_off();
|
|
|
|
VRAM_PLANE_B[p] |= px8.B;
|
|
|
|
VRAM_PLANE_R[p] |= px8.R;
|
|
|
|
VRAM_PLANE_G[p] |= px8.G;
|
|
|
|
VRAM_PLANE_E[p] |= px8.E;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|