Files
dusk/archive/loader/assetlanguage.c
2026-04-03 12:56:04 -05:00

45 lines
1.1 KiB
C

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "asset/asset.h"
#include "assert/assert.h"
#include "locale/localemanager.h"
errorret_t assetLanguageHandler(assetcustom_t custom) {
assertNotNull(custom.zipFile, "Custom asset zip file cannot be NULL");
assertNotNull(custom.output, "Custom asset output cannot be NULL");
assetlanguage_t *lang = (assetlanguage_t *)custom.output;
errorChain(assetLanguageInit(lang, custom.zipFile));
errorOk();
}
errorret_t assetLanguageInit(
assetlanguage_t *lang,
zip_file_t *zipFile
) {
errorThrow("Language asset initialization is not yet implemented.");
}
errorret_t assetLanguageRead(
assetlanguage_t *lang,
const uint32_t key,
char_t *buffer,
const uint32_t bufferSize,
uint32_t *outLength
) {
errorThrow("Language string reading is not yet implemented.");
}
void assetLanguageDispose(assetlanguage_t *lang) {
assertNotNull(lang, "Language asset cannot be NULL");
if(lang->zip) {
zip_fclose(lang->zip);
}
}