mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
PartsEngine.SetPartsCG: Accept <save> path
This fixes an issue where thumbnails do not display on the save screen in Pastel Chime 3. If `cg_name` starting with "<save>" is passed, the function loads the CG from the save directory. Note that unlike GoatGUIEngine.SetPartsCG() in Rance Quest, `cg_name` does not include "SaveData\\".
This commit is contained in:
+9
-1
@@ -604,7 +604,15 @@ bool parts_cg_set(struct parts *parts, struct parts_cg *parts_cg, struct string
|
||||
{
|
||||
assert(cg_name && *(cg_name->text) != '\0');
|
||||
int no;
|
||||
struct cg *cg = asset_cg_load_by_name(cg_name->text, &no);
|
||||
struct cg *cg;
|
||||
if (!memcmp(cg_name->text, "<save>", 6)) {
|
||||
char *path = savedir_path(cg_name->text + 6);
|
||||
cg = cg_load_file(path);
|
||||
no = 0;
|
||||
free(path);
|
||||
} else {
|
||||
cg = asset_cg_load_by_name(cg_name->text, &no);
|
||||
}
|
||||
return _parts_cg_set(parts, parts_cg, cg, no, string_dup(cg_name));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user