Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
wsgPalette.h
Go to the documentation of this file.
1
59#pragma once
60
61//==============================================================================
62// Includes
63//==============================================================================
64
65#include <palette.h>
66#include <stdint.h>
67#include "wsg.h"
68
69//==============================================================================
70// Struct
71//==============================================================================
72
73typedef struct
74{
75 paletteColor_t newColors[217];
77
78//==============================================================================
79// Functions
80//==============================================================================
81
82void drawWsgPalette(const wsg_t* wsg, int16_t xOff, int16_t yOff, wsgPalette_t* palette, bool flipLR, bool flipUD,
83 int16_t rotateDeg);
84void drawWsgPaletteSimple(const wsg_t* wsg, int16_t xOff, int16_t yOff, wsgPalette_t* palette);
85void drawWsgPaletteSimpleScaled(const wsg_t* wsg, int16_t xOff, int16_t yOff, wsgPalette_t* palette, int16_t xScale,
86 int16_t yScale);
87void drawWsgPaletteSimpleHalf(const wsg_t* wsg, int16_t xOff, int16_t yOff, wsgPalette_t* palette);
88void wsgPaletteReset(wsgPalette_t* palette);
89void wsgPaletteSet(wsgPalette_t* palette, paletteColor_t replaced, paletteColor_t newColor);
90void wsgPaletteSetGroup(wsgPalette_t* palette, paletteColor_t* replacedColors, paletteColor_t* newColors,
91 uint8_t arrSize);
paletteColor_t
All 216 possible colors, named like cRGB.
Definition palette.h:23
void drawWsgPaletteSimple(const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette)
Draw a WSG to the display without flipping or rotation.
Definition wsgPalette.c:206
void drawWsgPaletteSimpleHalf(const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette)
Draw a WSG to the display without flipping or rotation at half size.
Definition wsgPalette.c:330
void wsgPaletteReset(wsgPalette_t *palette)
Resets the palette to initial state.
Definition wsgPalette.c:376
void drawWsgPalette(const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette, bool flipLR, bool flipUD, int16_t rotateDeg)
Draw a WSG to the display utilizing a palette.
Definition wsgPalette.c:37
void wsgPaletteSetGroup(wsgPalette_t *palette, paletteColor_t *replacedColors, paletteColor_t *newColors, uint8_t arrSize)
Definition wsgPalette.c:397
void wsgPaletteSet(wsgPalette_t *palette, paletteColor_t replaced, paletteColor_t newColor)
Sets a single color to the provided palette.
Definition wsgPalette.c:392
void drawWsgPaletteSimpleScaled(const wsg_t *wsg, int16_t xOff, int16_t yOff, wsgPalette_t *palette, int16_t xScale, int16_t yScale)
Draw a WSG to the display without flipping or rotation.
Definition wsgPalette.c:257
Definition wsgPalette.h:74
A sprite using paletteColor_t colors that can be drawn to the display.
Definition wsg.h:57