-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* palettes.h */ | ||
|
||
#ifndef PALETTES_H | ||
#define PALETTES_H | ||
|
||
#include "framebuf/colour.h" | ||
|
||
/* PICO-8 palette */ | ||
|
||
#define palette_PICO8_BLACK (0) | ||
#define palette_PICO8_DARK_BLUE (1) | ||
#define palette_PICO8_DARK_PURPLE (2) | ||
#define palette_PICO8_DARK_GREEN (3) | ||
#define palette_PICO8_BROWN (4) | ||
#define palette_PICO8_DARK_GREY (5) | ||
#define palette_PICO8_LIGHT_GREY (6) | ||
#define palette_PICO8_WHITE (7) | ||
#define palette_PICO8_RED (8) | ||
#define palette_PICO8_ORANGE (9) | ||
#define palette_PICO8_YELLOW (10) | ||
#define palette_PICO8_GREEN (11) | ||
#define palette_PICO8_BLUE (12) | ||
#define palette_PICO8_LAVENDER (13) | ||
#define palette_PICO8_PINK (14) | ||
#define palette_PICO8_LIGHT_PEACH (15) | ||
|
||
void define_pico8_palette(colour_t palette[16]); | ||
|
||
#endif /* PALETTES_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* palettes.c */ | ||
|
||
#include "framebuf/colour.h" | ||
|
||
#include "framebuf/palettes.h" | ||
|
||
void define_pico8_palette(colour_t palette[16]) | ||
{ | ||
palette[palette_PICO8_BLACK ] = colour_rgb(0x00, 0x00, 0x00); | ||
palette[palette_PICO8_DARK_BLUE ] = colour_rgb(0x1D, 0x2B, 0x53); | ||
palette[palette_PICO8_DARK_PURPLE] = colour_rgb(0x7E, 0x25, 0x53); | ||
palette[palette_PICO8_DARK_GREEN ] = colour_rgb(0x00, 0x87, 0x51); | ||
palette[palette_PICO8_BROWN ] = colour_rgb(0xAB, 0x52, 0x36); | ||
palette[palette_PICO8_DARK_GREY ] = colour_rgb(0x5F, 0x57, 0x4F); | ||
palette[palette_PICO8_LIGHT_GREY ] = colour_rgb(0xC2, 0xC3, 0xC7); | ||
palette[palette_PICO8_WHITE ] = colour_rgb(0xFF, 0xF1, 0xE8); | ||
palette[palette_PICO8_RED ] = colour_rgb(0xFF, 0x00, 0x4D); | ||
palette[palette_PICO8_ORANGE ] = colour_rgb(0xFF, 0xA3, 0x00); | ||
palette[palette_PICO8_YELLOW ] = colour_rgb(0xFF, 0xEC, 0x27); | ||
palette[palette_PICO8_GREEN ] = colour_rgb(0x00, 0xE4, 0x36); | ||
palette[palette_PICO8_BLUE ] = colour_rgb(0x29, 0xAD, 0xFF); | ||
palette[palette_PICO8_LAVENDER ] = colour_rgb(0x83, 0x76, 0x9C); | ||
palette[palette_PICO8_PINK ] = colour_rgb(0xFF, 0x77, 0xA8); | ||
palette[palette_PICO8_LIGHT_PEACH] = colour_rgb(0xFF, 0xCC, 0xAA); | ||
} |