Mostly nuking old system
Some checks failed
Build Dusk / build-linux (push) Failing after 1m24s
Build Dusk / run-tests (push) Failing after 1m17s
Build Dusk / build-psp (push) Failing after 1m34s
Build Dusk / build-dolphin (push) Failing after 2m5s

This commit is contained in:
2026-02-13 19:13:26 -06:00
parent b37e5f45ca
commit e5e8c49f6c
97 changed files with 1454 additions and 408 deletions

View File

@@ -6,4 +6,5 @@
# Sources
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
palette.c
)

View File

@@ -0,0 +1,8 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "palette.h"

View File

@@ -8,7 +8,11 @@
#pragma once
#include "display/color.h"
#define PALETTE_COUNT 4
typedef struct {
const uint8_t colorCount;
const color_t *colors;
} palette_t;
} palette_t;
extern palette_t PALETTES[PALETTE_COUNT];

View File

@@ -12,14 +12,15 @@
#include "asset/asset.h"
texture_t DEFAULT_FONT_TEXTURE;
tileset_t DEFAULT_FONT_TILESET;
errorret_t textInit(void) {
errorChain(assetLoad(DEFAULT_FONT_TILESET.image, &DEFAULT_FONT_TEXTURE));
// errorChain(assetLoad(DEFAULT_FONT_TILESET.image, &DEFAULT_FONT_TEXTURE));
errorOk();
}
void textDispose(void) {
textureDispose(&DEFAULT_FONT_TEXTURE);
// textureDispose(&DEFAULT_FONT_TEXTURE);
}
void textDrawChar(

View File

@@ -9,12 +9,11 @@
#include "asset/asset.h"
#include "display/texture.h"
#include "display/tileset/tileset.h"
#include "display/tileset/tileset_minogram.h"
#define TEXT_CHAR_START '!'
extern texture_t DEFAULT_FONT_TEXTURE;
#define DEFAULT_FONT_TILESET TILESET_MINOGRAM
// extern texture_t DEFAULT_FONT_TEXTURE;
// #define DEFAULT_FONT_TILESET TILESET_MINOGRAM
/**
* Initializes the text system.

View File

@@ -10,7 +10,6 @@
#include "util/memory.h"
#include "util/math.h"
#include "util/string.h"
#include "display/palette/palettelist.h"
#include "debug/debug.h"
const texture_t *TEXTURE_BOUND = NULL;

View File

@@ -6,7 +6,6 @@
*/
#include "tileset.h"
#include "display/tileset/tilesetlist.h"
#include "assert/assert.h"
#include "util/string.h"
@@ -34,13 +33,4 @@ void tilesetPositionGetUV(
outUV[1] = ((float_t)row) * tileset->uv[1];
outUV[2] = outUV[0] + tileset->uv[0];
outUV[3] = outUV[1] + tileset->uv[1];
}
const tileset_t * tilesetGetByName(const char_t *name) {
assertStrLenMin(name, 1, "Tileset name cannot be empty");
for(uint32_t i = 0; i < TILESET_LIST_COUNT; i++) {
if(stringCompare(TILESET_LIST[i]->name, name) != 0) continue;
return TILESET_LIST[i];
}
return NULL;
}

View File

@@ -45,12 +45,4 @@ void tilesetPositionGetUV(
const uint16_t column,
const uint16_t row,
vec4 outUV
);
/**
* Gets a tileset by its name.
*
* @param name The name of the tileset to get.
* @return The tileset with the given name, or NULL if not found.
*/
const tileset_t* tilesetGetByName(const char_t *name);
);