Raffaello / sdl2-vga-terminal

SDL2 VGA Terminal
MIT License
6 stars 1 forks source link

[VgaTerminal] at method and lost information about the char is rendered or not #112

Open Raffaello opened 4 years ago

Raffaello commented 4 years ago

I discover this behaviour that was considered right at the beginning, but i am reconsidering it:

if the terminal char is not rendered the at method will return anyway the char present there.

Should not return the char there IFF the char has been rendered?

especially because it might have inconsistency in the interpretation.

but at was designed to read the VgaTerminal, not the "rendered char on screen" .

this might require another method or something related.... do not know now

Raffaello commented 4 years ago

it makes sense to considering at if it is rendered on screen?

so this is not a bug, but an intended feature, it is missing to retrieve the information if it is rendered or not and that is an enhancement

Raffaello commented 4 years ago

there could be a side function bool isRenderedAt(...) that return that missing bit and with both function combined, should give enough information to understand, for sure is a missing rendering phase... anyway, at the same time, it is supposed to run within a main loop and render every frame... so still the original at method is ok.

returning a non rendered char on the screen is not really useful as the screen is "just hidden" and are pixels not chars... so again the double buffer situation of not yet rendered is normal and acceptable.

still the isRenderAt can be implemented, but i do not see really too many use cases... more a debugging/control function that a "feature"...

anyway... not hurting