Polishing the CSV and Language Parser(s).
This commit is contained in:
@ -7,16 +7,23 @@
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../file/asset.h"
|
||||
#include "../file/csv.h"
|
||||
|
||||
/** Maximum number of strings a language can hold. */
|
||||
#define LANGUAGE_STRING_MAX 128
|
||||
/** 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;
|
||||
char *text;
|
||||
} languagestring_t;
|
||||
|
||||
typedef struct {
|
||||
languagestring_t strings[LANGUAGE_STRING_MAX];
|
||||
int32_t stringCount;
|
||||
} language_t;
|
||||
} languagecsvget_t;
|
Reference in New Issue
Block a user