mirror of https://github.com/sm64pc/sm64pc.git
Fixed BITDW level name
This commit is contained in:
parent
8f5b1b74c2
commit
b20e3c7940
|
@ -104,21 +104,24 @@ void load_language(char* jsonTxt, s8 language){
|
||||||
const cJSON *act = NULL;
|
const cJSON *act = NULL;
|
||||||
char* courseName = cJSON_GetObjectItemCaseSensitive(course, "course")->valuestring;
|
char* courseName = cJSON_GetObjectItemCaseSensitive(course, "course")->valuestring;
|
||||||
|
|
||||||
languages[language]->courses[courseID] = getTranslatedText(courseName);
|
if(courseID + 1 <= cJSON_GetArraySize(courses) - 1){
|
||||||
courseID++;
|
languages[language]->courses[courseID] = getTranslatedText(courseName);
|
||||||
|
courseID++;
|
||||||
|
}
|
||||||
|
|
||||||
cJSON_ArrayForEach(act, acts) {
|
cJSON_ArrayForEach(act, acts) {
|
||||||
languages[language]->acts[actID] = getTranslatedText(act->valuestring);
|
languages[language]->acts[actID] = getTranslatedText(act->valuestring);
|
||||||
actSize += strlen(act->valuestring);
|
actSize += strlen(act->valuestring);
|
||||||
actID++;
|
actID++;
|
||||||
}
|
}
|
||||||
actAmount += cJSON_GetArraySize(acts);
|
actAmount += cJSON_GetArraySize(acts);
|
||||||
actSize += strlen(courseName);
|
actSize += strlen(courseName);
|
||||||
}
|
}
|
||||||
|
|
||||||
languages[language]->acts = realloc(languages[language]->acts, sizeof(u8*) * (actAmount * actSize));
|
languages[language]->acts = realloc(languages[language]->acts, sizeof(u8*) * (actAmount * actSize));
|
||||||
|
|
||||||
cJSON_ArrayForEach(secret, secrets) {
|
cJSON_ArrayForEach(secret, secrets) {
|
||||||
languages[language]->courses[courseID] = getTranslatedText(secret->valuestring);
|
languages[language]->courses[courseID] = getTranslatedText(secret->valuestring);
|
||||||
courseID++;
|
courseID++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue