Fix compilation under MSVC(VS2019)

This commit is contained in:
JusicP
2022-01-13 16:18:38 +02:00
parent 94fb7d4c00
commit 5e27785d40
127 changed files with 195 additions and 95 deletions

View File

@@ -4761,7 +4761,7 @@ C_BaseEntity *C_BaseEntity::Instance( int iEnt )
#ifdef WIN32
#pragma warning( push )
#include <typeinfo.h>
#include <typeinfo>
#pragma warning( pop )
#endif

View File

@@ -16,7 +16,6 @@ $MacroRequired "GAMENAME"
$Include "$SRCDIR\vpc_scripts\source_dll_base.vpc"
$include "$SRCDIR\vpc_scripts\protobuf_builder.vpc"
$Include "$SRCDIR\vpc_scripts\source_replay.vpc" [$TF]
$Include "$SRCDIR\game\protobuf_include.vpc"
$Configuration "Debug"
{
@@ -506,6 +505,8 @@ $Project
$File "$SRCDIR\public\haptics\haptic_msgs.cpp" [!$X360]
$File "$SRCDIR\public\haptics\haptic_utils.cpp" [$WIN32&&!$X360]
$File "$SRCDIR\game\client\touch.cpp"
$Folder "Sixense"
{
$File "sixense\in_sixense.cpp"

View File

@@ -9,7 +9,6 @@ $Macro GAMENAME "hl2" [!$SOURCESDK]
$Macro GAMENAME "mod_hl2" [$SOURCESDK]
$Include "$SRCDIR\game\client\client_base.vpc"
$Include "$SRCDIR\game\protobuf_include.vpc"
$Configuration
{

View File

@@ -15,6 +15,7 @@ $include "$SRCDIR\game\shared\tf\tf_gcmessages_include.vpc"
$Include "$SRCDIR\game\client\client_econ_base.vpc"
$Include "$SRCDIR\vpc_scripts\source_saxxyawards.vpc"
$Include "$SRCDIR\utils\itemtest_lib\itemtest_lib_support.vpc" [$WORKSHOP_IMPORT_ENABLE]
$Include "$SRCDIR\game\protobuf_include.vpc"
$Configuration
{

View File

@@ -22,7 +22,7 @@ static CPDumpPanel *g_pPDumpPanel = NULL;
// retaining our own warning setup...ywb
#ifdef WIN32
#pragma warning( push )
#include <typeinfo.h>
#include <typeinfo>
#pragma warning( pop )
#endif

View File

@@ -283,7 +283,7 @@ struct CInterpolatedVarEntryBase<Type, false>
{
Assert(maxCount==1);
}
Type *NewEntry( Type *pValue, int maxCount, float time )
Type *NewEntry( const Type *pValue, int maxCount, float time )
{
Assert(maxCount==1);
changetime = time;

View File

@@ -120,7 +120,7 @@ entities. Each one is useful under different conditions.
#include "utllinkedlist.h"
#include "utldict.h"
#ifdef WIN32
#include <typeinfo.h>
#include <typeinfo>
#else
#include <typeinfo>
#endif

View File

@@ -7,7 +7,7 @@
#include "cbase.h"
#include "c_baseentity.h"
#ifdef WIN32
#include <typeinfo.h>
#include <typeinfo>
#endif
#include "tier0/vprof.h"

View File

@@ -1,5 +1,5 @@
#include "cbase.h"
#include "convar.h"
#include <dlfcn.h>
#include <string.h>
#include "vgui/IInputInternal.h"
#include "VGuiMatSurface/IMatSystemSurface.h"
@@ -234,24 +234,26 @@ CON_COMMAND( touch_toggleselection, "toggle visibility on selected button in edi
void CTouchControls::Init()
{
m_bHaveAssets = true;
#ifndef _WIN32
if( getAssets() == 0 )
{
m_bHaveAssets = false;
base_textureID = vgui::surface()->CreateNewTextureID(true);
vgui::surface()->DrawSetTextureRGBA( base_textureID, base_img_rgba, 120, 96, 0, true );
}
#endif
int w,h;
engine->GetScreenSize( w, h );
screen_w = w; screen_h = h;
Msg("grid_x: %f, grid_y: %x\n", GRID_X, GRID_Y);
Msg("grid_x: %f, grid_y: %f\n", GRID_X, GRID_Y);
configchanged = false;
config_loaded = false;
btns.EnsureCapacity( 64 );
look_finger = move_finger = resize_finger = -1;
forward = side = 0;
scolor = rgba_t( -1, -1, -1, -1 );
scolor = rgba_t( 255, 255, 255, 255 );
state = state_none;
swidth = 1;
move_button = edit = selection = NULL;
@@ -776,7 +778,6 @@ void CTouchControls::WriteConfig()
if( f )
{
CTouchButton *button;
filesystem->FPrintf( f, "//=======================================================================\n");
filesystem->FPrintf( f, "//\t\t\ttouchscreen config\n" );
filesystem->FPrintf( f, "//=======================================================================\n" );