(02-01-2021, 08:22 PM)boriel Wrote: Fastplot is almost identical to Compilers PLOT. Fastplot is slightly faster because it does not deal with INVERSE ("erase"), OVER (XOR) and ROM TMP Attributes.
In other words: INK 4; PAPER 2: PLOT INK 7; PAPER 5; x, y must remove INK 7; PAPER 5 attributes and restore INK 4: PAPER 2 and other attributes back.
Yes I have run into this limitation already and it's probably worth the slight speed penalty to use the compiler version's more complete feature support
(02-01-2021, 08:22 PM)boriel Wrote: This is why there are 2 fastplot implementations (one specific for XOR / OVER 1, another for OVER 0 and none for inverse) and they use the attribute color directly.
Can you upload those to the wiki too? I only found the over 0 one.
(02-01-2021, 08:22 PM)boriel Wrote: Can you put an example of what do you mean with a "checkerboard" fill, please?
To fill areas with patterns, consider using SPFill for irregular surfaces or DRAW as you said (fastest):
https://github.com/boriel/zxbasic/blob/m...spfill.bas
This kind of shading for the landscape:
I see that in src/arch/zx48k/library/SP only fill.bas is present, but this file contains includes which are missing:
Code:
#include once <SP/PixelUp.asm>
#include once <SP/PixelDown.asm>
#include once <SP/CharLeft.asm>
#include once <SP/CharRight.asm>
#include once <SP/GetScrnAddr.asm>
EDIT - ah nm, I see they're in src/arch/zx48k/library-asm/SP
I'm not sure this fill algorithm would work in my case since it needs some kind of hard boundaries, and my landscape is quite a jagged elevation map which can vary by sometimes more than even 8 y pixels for each x increment. I achieved what you see in the screenshot by FOR looping from the bottom to the terrain elevation in pairs of vertical slices - one odd spaced, one even spaced.