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:
kichikuou
2026-03-01 07:31:50 +09:00
parent 9c962e3467
commit b758a04760
+9 -1
View File
@@ -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));
}