30 lines
664 B
C
30 lines
664 B
C
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "error/error.h"
|
|
#include "display/texture/palette.h"
|
|
|
|
typedef struct assetentire_s assetentire_t;
|
|
|
|
#pragma pack(push, 1)
|
|
typedef struct {
|
|
char_t header[3];
|
|
uint8_t version;
|
|
|
|
uint8_t colorCount;
|
|
color_t colors[PALETTE_COLOR_COUNT_MAX];
|
|
} assetpalette_t;
|
|
#pragma pack(pop)
|
|
|
|
/**
|
|
* Loads a palette from the given data pointer into the output palette.
|
|
*
|
|
* @param entire Data received from the asset loader system.
|
|
* @return An error code.
|
|
*/
|
|
errorret_t assetPaletteLoad(assetentire_t entire); |