Menu: Add ability to set custom readme filenames inside the manifests.
This commit is contained in:
parent
58d420861f
commit
ac68be9f67
3 changed files with 10 additions and 3 deletions
|
@ -55,6 +55,7 @@ typedef struct
|
|||
string url_info;
|
||||
string url_dl;
|
||||
string version;
|
||||
string readme;
|
||||
int size;
|
||||
int svonly;
|
||||
int cldll;
|
||||
|
|
|
@ -158,6 +158,7 @@ games_init(void)
|
|||
games[id].svonly = 0;
|
||||
games[id].installed = 1;
|
||||
games[id].chatroom = gamedirname;
|
||||
games[id].readme = "readme.txt";
|
||||
games[id].pkgid = -1;
|
||||
|
||||
for (int i = 0; i < county; i++) {
|
||||
|
@ -237,6 +238,9 @@ games_init(void)
|
|||
case "gameinfo_chatroom":
|
||||
games[id].chatroom = argv(i+1);
|
||||
break;
|
||||
case "gameinfo_readme":
|
||||
games[id].readme = argv(i+1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -332,8 +336,10 @@ customgame_installframe(void)
|
|||
|
||||
/* display download percentage we calculated */
|
||||
perc = perc / c;
|
||||
WField_Static(162, 220, sprintf("%d", perc), 320, 260,
|
||||
col_prompt_text, 1.0f, 2, font_label_p);
|
||||
WField_Static(162, 220, sprintf("%d%%", perc), 320, 260,
|
||||
[1,1,1], 1.0f, 2, font_label_p);
|
||||
WField_Static(162, 220, "Service provided by frag-net.com through archive.org", 320, 260,
|
||||
[1,1,1], 1.0f, 2, font_label);
|
||||
|
||||
/* not everything has been downloaded */
|
||||
if (loading == TRUE)
|
||||
|
|
|
@ -71,7 +71,7 @@ menu_viewreadme_init(void)
|
|||
|
||||
filestream rdme;
|
||||
string lstline;
|
||||
rdme = fopen("readme.txt", FILE_READ);
|
||||
rdme = fopen(games[gameinfo_current].readme, FILE_READ);
|
||||
if (rdme >= 0) {
|
||||
while((lstline = fgets(rdme))) {
|
||||
vr_lbReadme.AddWrapped(lstline);
|
||||
|
|
Loading…
Reference in a new issue