mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
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:
parent
d7f846d0b6
commit
b355d75ab3
5 changed files with 33 additions and 1 deletions
|
@ -6019,6 +6019,10 @@ static void C_AddDefaultDefinitions(void)
|
|||
C_AddDefinition("STR_VERSION",STR_VERSION,LABEL_DEFINE);
|
||||
C_AddDefinition("STR_GAMETYPE",STR_GAMETYPE,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("MAXSTATUS", MAXSTATUS, LABEL_DEFINE);
|
||||
|
|
|
@ -139,7 +139,11 @@ enum SystemString_t {
|
|||
STR_PLAYERNAME,
|
||||
STR_VERSION,
|
||||
STR_GAMETYPE,
|
||||
STR_VOLUMENAME
|
||||
STR_VOLUMENAME,
|
||||
STR_YOURTIME,
|
||||
STR_PARTIME,
|
||||
STR_DESIGNERTIME,
|
||||
STR_BESTTIME,
|
||||
};
|
||||
|
||||
enum ScriptError_t
|
||||
|
|
|
@ -2237,6 +2237,18 @@ skip_check:
|
|||
}
|
||||
Bstrcpy(ScriptQuotes[i],EpisodeNames[ud.volume_number]);
|
||||
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:
|
||||
CON_ERRPRINTF("unknown str ID %d %d\n", i,j);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ local STR = {
|
|||
STR_VERSION = 3,
|
||||
STR_GAMETYPE = 4,
|
||||
STR_VOLUMENAME = 5,
|
||||
STR_YOURTIME = 6,
|
||||
STR_PARTIME = 7,
|
||||
STR_DESIGNERTIME = 8,
|
||||
STR_BESTTIME = 9,
|
||||
}
|
||||
|
||||
PROJ = {
|
||||
|
|
|
@ -938,6 +938,14 @@ function _qgetsysstr(qdst, what, pli)
|
|||
local vol = ffiC.ud.volume_number
|
||||
bcheck.volume_idx(vol)
|
||||
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
|
||||
error("unknown system string ID "..what, 2)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue