]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mvm_cmds.c
Added DP_QC_STRREPLACE - adds strreplace and strireplace functions (behave like str_r...
[xonotic/darkplaces.git] / mvm_cmds.c
index b5f7927895d8d1ae4dbc55528e6832f58995bdd5..69391109c2310f74d8fcd9c9dbcd91c8151166d4 100644 (file)
@@ -9,10 +9,12 @@ char *vm_m_extensions =
 "DP_MENU_EXTRESPONSEPACKET "
 "DP_QC_ASINACOSATANATAN2TAN "
 "DP_QC_STRFTIME "
+"DP_QC_STRING_CASE_FUNCTIONS "
 "DP_QC_STRINGCOLORFUNCTIONS "
 "DP_QC_TOKENIZEBYSEPARATOR "
 "DP_QC_UNLIMITEDTEMPSTRINGS "
 "DP_QC_CMD "
+"DP_QC_STRREPLACE "
 ;
 
 /*
@@ -133,7 +135,7 @@ void VM_M_callfunction(void)
 
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_M_callfunction);
 
-       s = PRVM_G_STRING(OFS_PARM0 + (prog->argc - 1));
+       s = PRVM_G_STRING(OFS_PARM0+(prog->argc - 1)*3);
 
        VM_CheckEmptyString(s);
 
@@ -1225,7 +1227,7 @@ VM_cin_setstate,                  // #463
 VM_cin_getstate,                       // #464
 VM_cin_restart,                        // #465
 VM_drawline,                           // #466
-NULL,                                          // #467
+VM_drawcolorcodedstring,       // #467
 NULL,                                          // #468
 NULL,                                          // #469
 NULL,                                          // #470
@@ -1238,12 +1240,12 @@ VM_strlennocol,                         // #476 float(string s) : DRESK - String Length (not counting
 VM_strdecolorize,                      // #477 string(string s) : DRESK - Decolorized String (DP_QC_STRINGCOLORFUNCTIONS)
 VM_strftime,                           // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
 VM_tokenizebyseparator,                // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
-NULL,                                          // #480
-NULL,                                          // #481
+VM_strtolower,                         // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
+VM_strtoupper,                         // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
 NULL,                                          // #482
 NULL,                                          // #483
-NULL,                                          // #484
-NULL,                                          // #485
+VM_strreplace,                         // #484 string(string search, string replace, string subject) strreplace (DP_QC_STRREPLACE)
+VM_strireplace,                                // #485 string(string search, string replace, string subject) strireplace (DP_QC_STRREPLACE)
 NULL,                                          // #486
 NULL,                                          // #487
 NULL,                                          // #488