From 2112445828bdb79a823097272e326c5b65aba5dd Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Thu, 16 Jul 2020 14:45:10 +0000 Subject: [PATCH] Fix search_packfile_begin builtin number in the menu VM, also fix checkextension not working in the menu git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12830 d7cf8633-e32d-0410-b094-e92efae38249 --- dpdefs/menudefs.qc | 4 ++-- mvm_cmds.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dpdefs/menudefs.qc b/dpdefs/menudefs.qc index 36cedec4..63d2c638 100644 --- a/dpdefs/menudefs.qc +++ b/dpdefs/menudefs.qc @@ -159,7 +159,7 @@ float OS_MAC = 2; ////////////////////////////////////////////////// // AK FIXME: Create perhaps a special builtin file for the common cmds -void checkextension(string ext) = #1; +float checkextension(string ext) = #1; // error cmds void error(string err,...) = #2; @@ -542,7 +542,7 @@ void coverage() = #642; // Reports a coverage event. The engine counts for each //idea: Mario //darkplaces implementation: Mario //builtin definitions: -float(string pattern, float caseinsensitive, float quiet, string packfile) search_packfile_begin = #444; +float(string pattern, float caseinsensitive, float quiet, string packfile) search_packfile_begin = #74; //description: //extension to search_begin (DP_QC_FS_SEARCH), performs a filename search with the specified pattern (for example "maps/*.bsp") and stores the results in a search slot (minimum of 128 supported by any engine with this extension), the other functions take this returned search slot number, be sure to search_free when done (they are also freed on progs reload). //only searches for files within the specified packfile, which is expected to match the results of whichpack(). diff --git a/mvm_cmds.c b/mvm_cmds.c index c9da3166..8b9df778 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -49,6 +49,7 @@ const char *vm_m_extensions[] = { "DP_QC_URI_POST", "DP_QC_WHICHPACK", "FTE_STRINGS", +"DP_QC_FS_SEARCH_PACKFILE", NULL }; -- 2.39.2