femto.mode.HiRes16Color - felipemanga/FemtoIDE GitHub Wiki
Summary
A framebuffer-based mode with a 220x176 resolution and a 16-color palette.
Initialization
HiRes16Color screen = new HiRes16Color( palette, font );
API CHANGED: was HiRes16Color( font )
When instancing a screen, it's best to set references to other screen modes to null first, as there might not be enough RAM to store both framebuffers simultaneously:
HiRes16Color screen = new HiRes16Color( Pico8.palette(), Tiny.font() );
screen = null;
screen = new HiRes16Color( Pico8.palette(), Tiny.font() );
Methods
In all operations, unless stated otherwise, only the lower nibble of the color is used. See also the drawing primitives in femto.mode.ScreenMode.
screen.clear( int color )
Fills the entire screen with the specified color.
screen.fillTriangle( int x0, int y0, int x1, int y1, int x2, int y2, int color )
Draws a filled triangle.
screen.flush()
Copies the framebuffer data to the LCD.
screen.loadPalette( pointer palette )
Reads the given palette. Example: screen.loadPalette( Pico8.palette() );