Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Value of FastPlot library
#10
(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:
[Image: attachment.php?aid=310]

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.


Attached Files
.png   fill.png (Size: 6.74 KB / Downloads: 2,203)
Reply


Messages In This Thread
Value of FastPlot library - by patters - 01-28-2021, 06:39 PM
RE: Value of FastPlot library - by boriel - 01-28-2021, 09:28 PM
RE: Value of FastPlot library - by patters - 01-28-2021, 10:43 PM
RE: Value of FastPlot library - by boriel - 01-28-2021, 11:46 PM
RE: Value of FastPlot library - by patters - 01-29-2021, 12:38 AM
RE: Value of FastPlot library - by boriel - 01-29-2021, 08:33 AM
RE: Value of FastPlot library - by patters - 02-01-2021, 05:18 PM
RE: Value of FastPlot library - by boriel - 02-01-2021, 08:22 PM
RE: Value of FastPlot library - by boriel - 02-01-2021, 08:32 PM
RE: Value of FastPlot library - by patters - 02-01-2021, 10:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)