Skip to content

Commit

Permalink
update after merge, make it build and run with rasterizer
Browse files Browse the repository at this point in the history
have not checked ray tracing, or playing longer than a couple of minutes
  • Loading branch information
w23 committed Aug 8, 2022
1 parent 6b9ddf2 commit 85c55a7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion engine/client/cl_gameui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ static ui_extendedfuncs_t gExtendedfuncs =
pfnGetRenderers,
Sys_DoubleTime,
pfnParseFileSafe,
NET_AdrToString
NET_AdrToString,
R_GetRenderDevice
};

Expand Down
3 changes: 3 additions & 0 deletions engine/common/pm_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GNU General Public License for more details.
#define PM_LOCAL_H

#include "pm_defs.h"
#include "xash3d_mathlib.h"

#include <string.h> // memset

typedef int (*pfnIgnore)( physent_t *pe ); // custom trace filter

Expand Down
2 changes: 1 addition & 1 deletion ref_vk/vk_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ VkShaderModule loadShader(const char *filename) {
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
};
VkShaderModule shader;
byte* buf = gEngine.COM_LoadFile( filename, &size, false);
byte* buf = gEngine.fsapi->LoadFile( filename, &size, false);
uint32_t *pcode;

if (!buf)
Expand Down
4 changes: 2 additions & 2 deletions ref_vk/vk_framectl.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ qboolean VID_ScreenShot( const char *filename, int shot_type )
case VID_SCREENSHOT:
break;
case VID_SNAPSHOT:
gEngine.FS_AllowDirectPaths( true );
gEngine.fsapi->AllowDirectPaths( true );
break;
case VID_LEVELSHOT:
flags |= IMAGE_RESAMPLE;
Expand Down Expand Up @@ -703,7 +703,7 @@ qboolean VID_ScreenShot( const char *filename, int shot_type )

// write image
result = gEngine.FS_SaveImage( filename, r_shot );
gEngine.FS_AllowDirectPaths( false ); // always reset after store screenshot
gEngine.fsapi->AllowDirectPaths( false ); // always reset after store screenshot
gEngine.FS_FreeImage( r_shot );

gEngine.Con_Printf("Wrote screenshot %s\n", filename);
Expand Down
2 changes: 1 addition & 1 deletion ref_vk/vk_light.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void loadRadData( const model_t *map, const char *fmt, ... ) {
vsnprintf( filename, sizeof filename, fmt, argptr );
va_end( argptr );

buffer = gEngine.COM_LoadFile( filename, &size, false);
buffer = gEngine.fsapi->LoadFile( filename, &size, false);

if (!buffer) {
gEngine.Con_Printf(S_ERROR "Couldn't load RAD data from file %s, the map will be completely black\n", filename);
Expand Down
2 changes: 1 addition & 1 deletion ref_vk/vk_mapents.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static void parsePatches( const model_t *const map ) {

Q_snprintf(filename, sizeof(filename), "luchiki/%s.patch", map->name);
gEngine.Con_Reportf("Loading patches from file \"%s\"\n", filename);
data = gEngine.COM_LoadFile( filename, 0, false );
data = gEngine.fsapi->LoadFile( filename, 0, false );
if (!data) {
gEngine.Con_Reportf("No patch file \"%s\"\n", filename);
return;
Expand Down
2 changes: 1 addition & 1 deletion ref_vk/vk_materials.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void loadMaterialsFromFile( const char *filename, int depth ) {
fs_offset_t size;
const char *const path_begin = filename;
const char *path_end = Q_strrchr(filename, '/');
byte *data = gEngine.COM_LoadFile( filename, 0, false );
byte *data = gEngine.fsapi->LoadFile( filename, 0, false );
char *pos = (char*)data;
xvk_material_t current_material = {
.base_color = -1,
Expand Down
2 changes: 1 addition & 1 deletion ref_vk/vk_studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,7 @@ static model_t *R_StudioSetupPlayerModel( int index )

Q_snprintf( state->modelname, sizeof( state->modelname ), "models/player/%s/%s.mdl", info->model, info->model );

if( gEngine.FS_FileExists( state->modelname, false ))
if( gEngine.fsapi->FileExists( state->modelname, false ))
state->model = gEngine.Mod_ForName( state->modelname, false, true );
else state->model = NULL;

Expand Down
4 changes: 2 additions & 2 deletions ref_vk/vk_textures.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static int CheckSkybox( const char *name )
{
// build side name
sidename = va( "%s%s.%s", name, g_skybox_info[j].suffix, skybox_ext[i] );
if( gEngine.FS_FileExists( sidename, false ))
if( gEngine.fsapi->FileExists( sidename, false ))
num_checked_sides++;

}
Expand All @@ -972,7 +972,7 @@ static int CheckSkybox( const char *name )
{
// build side name
sidename = va( "%s_%s.%s", name, g_skybox_info[j].suffix, skybox_ext[i] );
if( gEngine.FS_FileExists( sidename, false ))
if( gEngine.fsapi->FileExists( sidename, false ))
num_checked_sides++;
}

Expand Down
1 change: 1 addition & 0 deletions ref_vk/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def build(bld):
rtx_glsl_source = bld.path.ant_glob(['shaders/*.rgen', 'shaders/*.rchit', 'shaders/*.rmiss', 'shaders/*.rahit'])

includes = ['.',
'../filesystem',
'../engine',
'../engine/common',
'../engine/server',
Expand Down

0 comments on commit 85c55a7

Please sign in to comment.