changed lexer helper function to add match char to data, and fixed loading in spritesheet from string
This commit is contained in:
parent
83b87c6d63
commit
1435ae14b0
5 changed files with 19 additions and 3 deletions
|
|
@ -22,10 +22,13 @@ void ARC_Config_InitGraphics(ARC_Config *config, ARC_Renderer *renderer){
|
|||
void ARC_ConfigType_SpritesheetString(void **type, ARC_ParserTagToken *parsedData, ARC_Config *config, void *userdata){
|
||||
ARC_Renderer *renderer = (ARC_Renderer *)userdata;
|
||||
|
||||
//get the string chars between the quotes
|
||||
ARC_ParserTagToken *stringCharsTagToken = (ARC_ParserTagToken *)ARC_Vector_Get(parsedData->tagTokens, 1);
|
||||
|
||||
//get the path
|
||||
ARC_String *path;
|
||||
ARC_String_Create(&path, NULL, 0);
|
||||
ARC_ParserData_HelperRecurseStringAdd(&path, parsedData);
|
||||
ARC_ParserData_HelperRecurseStringAdd(&path, stringCharsTagToken);
|
||||
|
||||
//read in and set the texture
|
||||
ARC_Spritesheet_CreateFromFile((ARC_Spritesheet **)type, renderer, path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue