mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-02-05 20:31:53 +00:00
Unbreak INTERFACE_CLASSIC rendering
This commit is contained in:
parent
5bd8e25739
commit
faf7d707ed
@ -698,16 +698,6 @@ static void _display_plotChar(PIXEL_TYPE *fboff, const unsigned int fbPixWidth,
|
||||
_plot_char80(&fboff, &src, fbPixWidth);
|
||||
}
|
||||
|
||||
#if INTERFACE_CLASSIC
|
||||
void display_plotChar(const uint8_t col, const uint8_t row, const interface_colorscheme_t cs, const uint8_t c) {
|
||||
assert(col < 80);
|
||||
assert(row < 24);
|
||||
unsigned int off = row * SCANWIDTH * FONT_HEIGHT_PIXELS + col * FONT80_WIDTH_PIXELS + _FB_OFF;
|
||||
_display_plotChar(fbFull+off, SCANWIDTH, cs, c);
|
||||
video_setDirty(FB_DIRTY_FLAG);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void _display_plotLine(PIXEL_TYPE *fb, const unsigned int fbPixWidth, const unsigned int xAdjust, const uint8_t col, const uint8_t row, const interface_colorscheme_t cs, const char *line) {
|
||||
for (uint8_t x=col; *line; x++, line++) {
|
||||
char c = *line;
|
||||
@ -717,6 +707,14 @@ static void _display_plotLine(PIXEL_TYPE *fb, const unsigned int fbPixWidth, con
|
||||
}
|
||||
|
||||
#if INTERFACE_CLASSIC
|
||||
void display_plotChar(const uint8_t col, const uint8_t row, const interface_colorscheme_t cs, const uint8_t c) {
|
||||
assert(col < 80);
|
||||
assert(row < 24);
|
||||
unsigned int off = row * SCANWIDTH * FONT_HEIGHT_PIXELS + col * FONT80_WIDTH_PIXELS + _FB_OFF;
|
||||
_display_plotChar(fbFull+off, SCANWIDTH, cs, c);
|
||||
video_setDirty(FB_DIRTY_FLAG);
|
||||
}
|
||||
|
||||
void display_plotLine(const uint8_t col, const uint8_t row, const interface_colorscheme_t cs, const char *message) {
|
||||
_display_plotLine(fbFull, /*fbPixWidth:*/SCANWIDTH, /*xAdjust:*/_FB_OFF, col, row, cs, message);
|
||||
video_setDirty(FB_DIRTY_FLAG);
|
||||
@ -957,6 +955,11 @@ void display_flashText(void) {
|
||||
}
|
||||
|
||||
PIXEL_TYPE *display_getCurrentFramebuffer(void) {
|
||||
#if INTERFACE_CLASSIC
|
||||
if (interface_isShowing()) {
|
||||
memcpy(/*dst:*/fbDone, /*src:*/fbFull, sizeof(fbDone));
|
||||
}
|
||||
#endif
|
||||
return fbDone;
|
||||
}
|
||||
|
||||
|
@ -354,8 +354,8 @@ static void glvideo_render(void) {
|
||||
if (wasDirty) {
|
||||
SCOPE_TRACE_VIDEO("glvideo texImage2D");
|
||||
_HACKAROUND_GLTEXIMAGE2D_PRE(TEXTURE_ACTIVE_FRAMEBUFFER, crtModel->textureName);
|
||||
void *fb = display_getCurrentFramebuffer(); // NOTE: has an INTERFACE_CLASSIC side-effect ...
|
||||
#if !FB_PIXELS_PASS_THRU
|
||||
void *fb = display_getCurrentFramebuffer();
|
||||
memcpy(/*dest:*/crtModel->texPixels, /*src:*/fb, (SCANWIDTH*SCANHEIGHT*sizeof(PIXEL_TYPE)));
|
||||
#endif
|
||||
glTexImage2D(GL_TEXTURE_2D, /*level*/0, TEX_FORMAT_INTERNAL, SCANWIDTH, SCANHEIGHT, /*border*/0, TEX_FORMAT, TEX_TYPE, crtModel->texPixels);
|
||||
|
Loading…
x
Reference in New Issue
Block a user