added a FS_GetFileList syscall for CGame

This commit is contained in:
myT 2024-04-10 20:04:45 +02:00
parent 2204f40d7a
commit f43c18e86e
2 changed files with 6 additions and 1 deletions

View file

@ -362,6 +362,7 @@ static qbool CL_CG_GetValue( char* value, int valueSize, const char* key )
{ "trap_CNQ3_NK_Draw", CG_EXT_NK_DRAW }, { "trap_CNQ3_NK_Draw", CG_EXT_NK_DRAW },
{ "trap_CNQ3_SetCharEvents", CG_EXT_SETCHAREVENTS }, { "trap_CNQ3_SetCharEvents", CG_EXT_SETCHAREVENTS },
{ "trap_CNQ3_R_AddRefEntityToScene", CG_EXT_CNQ3_R_ADDREFENTITYTOSCENE }, { "trap_CNQ3_R_AddRefEntityToScene", CG_EXT_CNQ3_R_ADDREFENTITYTOSCENE },
{ "trap_CNQ3_FS_GetFileList", CG_EXT_CNQ3_FS_GETFILELIST },
// commands // commands
{ "screenshotnc", 1 }, { "screenshotnc", 1 },
{ "screenshotncJPEG", 1 }, { "screenshotncJPEG", 1 },
@ -733,6 +734,9 @@ static intptr_t CL_CgameSystemCalls( intptr_t *args )
re.AddRefEntityToScene( VMA(1), REV_MOTIONBLUR ); re.AddRefEntityToScene( VMA(1), REV_MOTIONBLUR );
return 0; return 0;
case CG_EXT_CNQ3_FS_GETFILELIST:
return FS_GetFileList( VMA(1), VMA(2), VMA(3), args[4] );
default: default:
Com_Error( ERR_DROP, "Bad cgame system trap: %i", args[0] ); Com_Error( ERR_DROP, "Bad cgame system trap: %i", args[0] );
} }

View file

@ -207,7 +207,8 @@ typedef enum {
CG_EXT_NK_UPLOAD, CG_EXT_NK_UPLOAD,
CG_EXT_NK_DRAW, CG_EXT_NK_DRAW,
CG_EXT_SETCHAREVENTS, CG_EXT_SETCHAREVENTS,
CG_EXT_CNQ3_R_ADDREFENTITYTOSCENE CG_EXT_CNQ3_R_ADDREFENTITYTOSCENE,
CG_EXT_CNQ3_FS_GETFILELIST
} cgameImport_t; } cgameImport_t;