32 lines
760 B
C
32 lines
760 B
C
/**
|
|
* Copyright (c) 2021 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "../libs.h"
|
|
#include "../file/asset.h"
|
|
#include "../file/csv.h"
|
|
|
|
#define LANGUAGE_HEADER_KEY "Key"
|
|
#define LANGUAGE_HEADER_VALUE "Value"
|
|
|
|
/** Definition for a Language */
|
|
typedef struct {
|
|
/** The buffer to read the asset from. */
|
|
assetbuffer_t *asset;
|
|
/** CSV Row for the header */
|
|
csvrow_t header;
|
|
/** The index in the header row that the key column is in. */
|
|
int32_t headerIndexKey;
|
|
/** The index in the header row that the value column is in. */
|
|
int32_t headerIndexValue;
|
|
} language_t;
|
|
|
|
typedef struct {
|
|
language_t *language;
|
|
csvrow_t *row;
|
|
char *key;
|
|
} languagecsvget_t; |