CON: Add STR_YOURTIME, STR_PARTIME, STR_DESIGNERTIME, and STR_BESTTIME to qgetsysstr.

git-svn-id: https://svn.eduke32.com/eduke32@4969 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-02-08 08:03:50 +00:00
parent d7f846d0b6
commit b355d75ab3
5 changed files with 33 additions and 1 deletions

View file

@ -6019,6 +6019,10 @@ static void C_AddDefaultDefinitions(void)
C_AddDefinition("STR_VERSION",STR_VERSION,LABEL_DEFINE); C_AddDefinition("STR_VERSION",STR_VERSION,LABEL_DEFINE);
C_AddDefinition("STR_GAMETYPE",STR_GAMETYPE,LABEL_DEFINE); C_AddDefinition("STR_GAMETYPE",STR_GAMETYPE,LABEL_DEFINE);
C_AddDefinition("STR_VOLUMENAME",STR_VOLUMENAME,LABEL_DEFINE); C_AddDefinition("STR_VOLUMENAME",STR_VOLUMENAME,LABEL_DEFINE);
C_AddDefinition("STR_YOURTIME",STR_YOURTIME,LABEL_DEFINE);
C_AddDefinition("STR_PARTIME",STR_PARTIME,LABEL_DEFINE);
C_AddDefinition("STR_DESIGNERTIME",STR_DESIGNERTIME,LABEL_DEFINE);
C_AddDefinition("STR_BESTTIME",STR_BESTTIME,LABEL_DEFINE);
C_AddDefinition("NO",0,LABEL_DEFINE|LABEL_ACTION|LABEL_AI|LABEL_MOVE); C_AddDefinition("NO",0,LABEL_DEFINE|LABEL_ACTION|LABEL_AI|LABEL_MOVE);
C_AddDefinition("MAXSTATUS", MAXSTATUS, LABEL_DEFINE); C_AddDefinition("MAXSTATUS", MAXSTATUS, LABEL_DEFINE);

View file

@ -139,7 +139,11 @@ enum SystemString_t {
STR_PLAYERNAME, STR_PLAYERNAME,
STR_VERSION, STR_VERSION,
STR_GAMETYPE, STR_GAMETYPE,
STR_VOLUMENAME STR_VOLUMENAME,
STR_YOURTIME,
STR_PARTIME,
STR_DESIGNERTIME,
STR_BESTTIME,
}; };
enum ScriptError_t enum ScriptError_t

View file

@ -2237,6 +2237,18 @@ skip_check:
} }
Bstrcpy(ScriptQuotes[i],EpisodeNames[ud.volume_number]); Bstrcpy(ScriptQuotes[i],EpisodeNames[ud.volume_number]);
break; break;
case STR_YOURTIME:
Bstrcpy(ScriptQuotes[i],G_PrintYourTime());
break;
case STR_PARTIME:
Bstrcpy(ScriptQuotes[i],G_PrintParTime());
break;
case STR_DESIGNERTIME:
Bstrcpy(ScriptQuotes[i],G_PrintDesignerTime());
break;
case STR_BESTTIME:
Bstrcpy(ScriptQuotes[i],G_PrintBestTime());
break;
default: default:
CON_ERRPRINTF("unknown str ID %d %d\n", i,j); CON_ERRPRINTF("unknown str ID %d %d\n", i,j);
} }

View file

@ -37,6 +37,10 @@ local STR = {
STR_VERSION = 3, STR_VERSION = 3,
STR_GAMETYPE = 4, STR_GAMETYPE = 4,
STR_VOLUMENAME = 5, STR_VOLUMENAME = 5,
STR_YOURTIME = 6,
STR_PARTIME = 7,
STR_DESIGNERTIME = 8,
STR_BESTTIME = 9,
} }
PROJ = { PROJ = {

View file

@ -938,6 +938,14 @@ function _qgetsysstr(qdst, what, pli)
local vol = ffiC.ud.volume_number local vol = ffiC.ud.volume_number
bcheck.volume_idx(vol) bcheck.volume_idx(vol)
ffi.copy(dst, ffiC.EpisodeNames[vol], ffi.sizeof(ffiC.EpisodeNames[0])) ffi.copy(dst, ffiC.EpisodeNames[vol], ffi.sizeof(ffiC.EpisodeNames[0]))
elseif (what == ffiC.STR_YOURTIME) then
ffi.copy(dst, ffiC.G_PrintYourTime())
elseif (what == ffiC.STR_PARTIME) then
ffi.copy(dst, ffiC.G_PrintParTime())
elseif (what == ffiC.STR_DESIGNERTIME) then
ffi.copy(dst, ffiC.G_PrintDesignerTime())
elseif (what == ffiC.STR_BESTTIME) then
ffi.copy(dst, ffiC.G_PrintBestTime())
else else
error("unknown system string ID "..what, 2) error("unknown system string ID "..what, 2)
end end