Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
wsgCanvas.h
Go to the documentation of this file.
1
11
59
60#pragma once
61
62//==============================================================================
63// Includes
64//==============================================================================
65
66#include "wsg.h"
67#include "wsgPalette.h"
68
69//==============================================================================
70// Functions
71//==============================================================================
72
82void canvasBlankInit(wsg_t* canvas, int width, int height, paletteColor_t startColor, bool spiRam);
83
92void canvasDrawSimple(wsg_t* canvas, cnfsFileIdx_t image, int startX, int startY);
93
103void canvasDrawSimplePal(wsg_t* canvas, cnfsFileIdx_t image, int startX, int startY, wsgPalette_t* pal);
104
116void canvasDraw(wsg_t* canvas, cnfsFileIdx_t image, int startX, int startY, bool flipX, bool flipY, int32_t rotateDeg);
117
130void canvasDrawPal(wsg_t* canvas, cnfsFileIdx_t image, int startX, int startY, bool flipX, bool flipY,
131 int32_t rotateDeg, wsgPalette_t* pal);
paletteColor_t
All 216 possible colors, named like cRGB.
Definition palette.h:23
void canvasBlankInit(wsg_t *canvas, int width, int height, paletteColor_t startColor, bool spiRam)
Initializes a blank canvas to the dimensions and color provided.
Definition wsgCanvas.c:50
void canvasDraw(wsg_t *canvas, cnfsFileIdx_t image, int startX, int startY, bool flipX, bool flipY, int32_t rotateDeg)
Draws an image to the canvas at a specified angle.
Definition wsgCanvas.c:69
void canvasDrawSimple(wsg_t *canvas, cnfsFileIdx_t image, int startX, int startY)
Draws a image to the canvas at the specified coordinates relative to the canvas.
Definition wsgCanvas.c:59
void canvasDrawPal(wsg_t *canvas, cnfsFileIdx_t image, int startX, int startY, bool flipX, bool flipY, int32_t rotateDeg, wsgPalette_t *pal)
Draws an image to the canvas at a specified angle.
Definition wsgCanvas.c:74
void canvasDrawSimplePal(wsg_t *canvas, cnfsFileIdx_t image, int startX, int startY, wsgPalette_t *pal)
Draws a image to the canvas at the specified coordinates relative to the canvas and applies a palette...
Definition wsgCanvas.c:64
Provides palette swap functionality for Swadge.
Definition wsgPalette.h:74
A sprite using paletteColor_t colors that can be drawn to the display.
Definition wsg.h:57