About to implement load strategy

This commit is contained in:
2025-11-08 08:32:21 -06:00
parent 9f88374627
commit cf2aacd75b
10 changed files with 80 additions and 40 deletions

View File

@@ -1,15 +0,0 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "dusk.h"
#define LANG_CHUNK_CHAR_COUNT 6 * 1024 // 6 KB per chunk
#pragma pack(push, 1)
typedef char languagechunkdata_t[LANG_CHUNK_CHAR_COUNT];
#pragma pack(pop)

View File

@@ -7,9 +7,13 @@
#include "localemanager.h"
#include "util/memory.h"
#include "asset/asset.h"
localemanager_t LOCALE;
void localeManagerInit() {
errorret_t localeManagerInit() {
memoryZero(&LOCALE, sizeof(localemanager_t));
errorChain(assetLoad("language/us.dlf", &LOCALE));
errorOk();
}

View File

@@ -6,7 +6,7 @@
*/
#pragma once
#include "dusk.h"
#include "error/error.h"
typedef struct {
void *nothing;
@@ -16,5 +16,7 @@ extern localemanager_t LOCALE;
/**
* Initialize the locale system.
*
* @return An error code if a failure occurs.
*/
void localeManagerInit();
errorret_t localeManagerInit();