2021-03-21 18:35:04 +00:00
|
|
|
#pragma option -zCSHARED -3
|
2021-01-01 14:40:28 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include <mbctype.h>
|
|
|
|
#include <mbstring.h>
|
|
|
|
#include "platform.h"
|
2021-02-07 20:03:00 +00:00
|
|
|
#include "x86real.h"
|
2021-01-01 14:40:28 +00:00
|
|
|
#include "pc98.h"
|
|
|
|
#include "planar.h"
|
2021-01-26 15:33:06 +00:00
|
|
|
#include "master.hpp"
|
2021-01-01 14:40:28 +00:00
|
|
|
#include "th01/hardware/grppsafx.h"
|
|
|
|
|
|
|
|
#include "th01/hardware/grppsafx.cpp"
|
|
|
|
|
|
|
|
#undef grcg_off
|
|
|
|
|
|
|
|
void DEFCONV graph_putsa_fx(
|
|
|
|
screen_x_t left, vram_y_t top, int16_t col_and_fx, const unsigned char *str
|
|
|
|
)
|
|
|
|
{
|
|
|
|
uint16_t codepoint;
|
2021-04-17 18:08:30 +00:00
|
|
|
dots_t(GLYPH_FULL_W) glyph_row;
|
2021-02-03 17:12:06 +00:00
|
|
|
dots8_t far *vram;
|
2021-01-01 14:40:28 +00:00
|
|
|
int fullwidth;
|
|
|
|
int first_bit;
|
|
|
|
int weight = (col_and_fx >> 4) & 3;
|
|
|
|
pixel_t spacing = (col_and_fx >> 6) & 7;
|
|
|
|
pixel_t line;
|
2021-04-17 18:08:30 +00:00
|
|
|
dot_rect_t(GLYPH_FULL_W, GLYPH_H) glyph;
|
|
|
|
register dots_t(GLYPH_FULL_W) glyph_row_tmp;
|
2021-01-01 14:40:28 +00:00
|
|
|
|
|
|
|
#if (GAME >= 3)
|
|
|
|
grcg_setcolor(GC_RMW, (col_and_fx & (COLOR_COUNT - 1)));
|
|
|
|
#else
|
|
|
|
grcg_setcolor(GC_RMW, col_and_fx);
|
|
|
|
#endif
|
|
|
|
outportb(0x68, 0xB); // CG ROM dot access
|
|
|
|
|
|
|
|
while(str[0]) {
|
|
|
|
set_vram_ptr(vram, first_bit, left, top);
|
|
|
|
get_glyph(glyph, codepoint, fullwidth, str, left, line);
|
|
|
|
|
|
|
|
for(line = 0; line < GLYPH_H; line++) {
|
|
|
|
apply_weight(glyph_row, glyph[line], glyph_row_tmp, weight);
|
|
|
|
put_row_and_advance(vram, row, first_bit);
|
|
|
|
}
|
|
|
|
advance_left(left, fullwidth, spacing);
|
|
|
|
}
|
|
|
|
|
|
|
|
outportb(0x68, 0xA); // CG ROM code access
|
|
|
|
grcg_off();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|