2020-11-03 15:25:41 +00:00
|
|
|
#pragma codeseg SHARED
|
2020-09-06 18:49:20 +00:00
|
|
|
#pragma option -3
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include <mbctype.h>
|
|
|
|
#include <mbstring.h>
|
|
|
|
#include "libs/master.lib/master.h"
|
|
|
|
#include "platform.h"
|
|
|
|
#include "pc98.h"
|
|
|
|
#include "planar.h"
|
|
|
|
#include "th01/hardware/grppsafx.h"
|
|
|
|
|
|
|
|
#include "th01/hardware/grppsafx.cpp"
|
|
|
|
|
|
|
|
#undef grcg_off
|
|
|
|
|
|
|
|
void graph_putsa_fx(
|
2020-10-26 13:30:35 +00:00
|
|
|
screen_x_t left, vram_y_t top, int16_t col_and_fx, const unsigned char *str
|
2020-09-06 18:49:20 +00:00
|
|
|
)
|
|
|
|
{
|
|
|
|
uint16_t codepoint;
|
|
|
|
dots16_t glyph_row;
|
|
|
|
unsigned char far *vram;
|
|
|
|
int fullwidth;
|
|
|
|
int first_bit;
|
2020-10-26 13:30:35 +00:00
|
|
|
int weight = (col_and_fx >> 4) & 3;
|
|
|
|
pixel_t spacing = (col_and_fx >> 6) & 7;
|
2020-09-06 18:49:20 +00:00
|
|
|
pixel_t line;
|
|
|
|
dots16_t glyph[GLYPH_H];
|
|
|
|
register dots16_t glyph_row_tmp;
|
|
|
|
|
2020-10-26 13:30:35 +00:00
|
|
|
grcg_setcolor(GC_RMW, col_and_fx);
|
2020-11-06 21:24:00 +00:00
|
|
|
outportb(0x68, 0xB); // CG ROM dot access
|
2020-09-06 18:49:20 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2020-11-06 21:24:00 +00:00
|
|
|
outportb(0x68, 0xA); // CG ROM code access
|
2020-09-06 18:49:20 +00:00
|
|
|
grcg_off();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|