misaligment fixes
This commit is contained in:
parent
1218fa659c
commit
3a73624b7e
@ -435,7 +435,8 @@ static inline void DecodeAlpha3BitLinear( CDestPixel *pImPos, DXTAlphaBlock3BitL
|
||||
// pRows = (Alpha3BitRows*) & ( pAlphaBlock->stuff[0] );
|
||||
const DWORD mask = 0x00000007; // bits = 00 00 01 11
|
||||
|
||||
DWORD bits = *( (DWORD*) & ( pAlphaBlock->stuff[0] ));
|
||||
DWORD bits;
|
||||
memcpy( &bits, &(pAlphaBlock->stuff[0]), sizeof(DWORD) );
|
||||
|
||||
gBits[0][0] = (BYTE)( bits & mask );
|
||||
bits >>= 3;
|
||||
@ -454,7 +455,7 @@ static inline void DecodeAlpha3BitLinear( CDestPixel *pImPos, DXTAlphaBlock3BitL
|
||||
gBits[1][3] = (BYTE)( bits & mask );
|
||||
|
||||
// now for last two rows:
|
||||
bits = *( (DWORD*) & ( pAlphaBlock->stuff[3] )); // last 3 bytes
|
||||
memcpy( &bits, &(pAlphaBlock->stuff[3]), sizeof(DWORD) );
|
||||
|
||||
gBits[2][0] = (BYTE)( bits & mask );
|
||||
bits >>= 3;
|
||||
|
13043
common/sse2neon.h
13043
common/sse2neon.h
File diff suppressed because it is too large
Load Diff
@ -1268,7 +1268,9 @@ void CEdgeList::CullSmallOccluders()
|
||||
// Sort the surfaces by screen area, in descending order
|
||||
int nSurfCount = m_Surfaces.Count();
|
||||
s_pSortSurfaces = m_Surfaces.Base();
|
||||
qsort( m_SurfaceSort.Base(), nSurfCount, sizeof(int), SurfCompare );
|
||||
|
||||
if( m_SurfaceSort.Base() )
|
||||
qsort( m_SurfaceSort.Base(), nSurfCount, sizeof(int), SurfCompare );
|
||||
|
||||
// We're going to keep the greater of r_occludermin + All surfaces with a screen area >= r_occluderarea
|
||||
int nMinSurfaces = r_occludermincount.GetInt();
|
||||
@ -1282,7 +1284,7 @@ void CEdgeList::CullSmallOccluders()
|
||||
|
||||
bool *bUseSurface = (bool*)stackalloc( nSurfCount * sizeof(bool) );
|
||||
memset( bUseSurface, 0, nSurfCount * sizeof(bool) );
|
||||
|
||||
|
||||
int i;
|
||||
for ( i = 0; i < nSurfCount; ++i )
|
||||
{
|
||||
|
@ -4099,7 +4099,9 @@ CBrushBatchRender::brushrender_t *CBrushBatchRender::FindOrCreateRenderBatch( mo
|
||||
surfaceList.Sort( SurfaceCmp );
|
||||
renderT.pPlanes = new cplane_t *[planeList.Count()];
|
||||
renderT.planeCount = planeList.Count();
|
||||
memcpy( renderT.pPlanes, planeList.Base(), sizeof(cplane_t *)*planeList.Count() );
|
||||
|
||||
if( planeList.Base() )
|
||||
memcpy( renderT.pPlanes, planeList.Base(), sizeof(cplane_t *)*planeList.Count() );
|
||||
renderT.pSurfaces = new brushrendersurface_t[surfaceList.Count()];
|
||||
renderT.surfaceCount = surfaceList.Count();
|
||||
|
||||
|
@ -166,7 +166,7 @@ void GenerateSquareWaveEffect( RumbleWaveform_t *pWaveform, const WaveGenParams_
|
||||
|
||||
while( i < NUM_WAVE_SAMPLES )
|
||||
{
|
||||
for( j = 0 ; j < steps ; j++ )
|
||||
for( j = 0 ; j < steps && i < NUM_WAVE_SAMPLES; j++ )
|
||||
{
|
||||
if( params.leftChannel )
|
||||
{
|
||||
@ -177,7 +177,7 @@ void GenerateSquareWaveEffect( RumbleWaveform_t *pWaveform, const WaveGenParams_
|
||||
pWaveform->amplitude_right[i++] = params.minAmplitude;
|
||||
}
|
||||
}
|
||||
for( j = 0 ; j < steps ; j++ )
|
||||
for( j = 0 ; j < steps && i < NUM_WAVE_SAMPLES; j++ )
|
||||
{
|
||||
if( params.leftChannel )
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ void C_VoteController::RecvProxy_VoteType( const CRecvProxyData *pData, void *pS
|
||||
if( pMe->m_iActiveIssueIndex == pData->m_Value.m_Int )
|
||||
return;
|
||||
|
||||
pMe->m_iActiveIssueIndex = pData->m_Value.m_Int;
|
||||
memcpy( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int) );
|
||||
pMe->m_bTypeDirty = true;
|
||||
|
||||
// Since the contents of a new vote are in three parts, we can't directly send an event to the Hud
|
||||
@ -186,4 +186,4 @@ void C_VoteController::FireGameEvent( IGameEvent *event )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
109
game/client/client_hl1mp.vpc
Normal file
109
game/client/client_hl1mp.vpc
Normal file
@ -0,0 +1,109 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// CLIENT_HL1MP.VPC
|
||||
//
|
||||
// Project Script
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Macro SRCDIR "..\.."
|
||||
$Macro GAMENAME "hl1mp"
|
||||
|
||||
$Include "$SRCDIR\game\client\client_base.vpc"
|
||||
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE;.\hl1,.\hl2,.\hl2\elements,$SRCDIR\game\shared\hl1,$SRCDIR\game\shared\hl2"
|
||||
$PreprocessorDefinitions "$BASE;HL1_CLIENT_DLL;HL1MP_CLIENT_DLL"
|
||||
}
|
||||
}
|
||||
|
||||
$Project "Client (HL1MP)"
|
||||
{
|
||||
$Folder "Source Files"
|
||||
{
|
||||
-$File "geiger.cpp"
|
||||
-$File "history_resource.cpp"
|
||||
-$File "train.cpp"
|
||||
|
||||
$File "c_team_objectiveresource.cpp"
|
||||
$File "c_team_objectiveresource.h"
|
||||
$File "hud_chat.cpp"
|
||||
$File "$SRCDIR\game\shared\predicted_viewmodel.cpp"
|
||||
$File "$SRCDIR\game\shared\predicted_viewmodel.h"
|
||||
|
||||
$Folder "HL2 DLL"
|
||||
{
|
||||
$File "hl2\c_antlion_dust.cpp"
|
||||
$File "hl2\c_basehelicopter.cpp"
|
||||
$File "hl2\c_basehelicopter.h"
|
||||
$File "hl2\c_basehlcombatweapon.h"
|
||||
$File "hl2\c_corpse.cpp"
|
||||
$File "hl2\c_corpse.h"
|
||||
$File "hl2\c_hl2_playerlocaldata.h"
|
||||
$File "hl2\c_rotorwash.cpp"
|
||||
$File "$SRCDIR\game\shared\hl2\citadel_effects_shared.h"
|
||||
$File "$SRCDIR\game\shared\hl2\env_headcrabcanister_shared.h"
|
||||
$File "hl2\fx_bugbait.cpp"
|
||||
$File "$SRCDIR\game\shared\hl2\hl2_shareddefs.h"
|
||||
$File "hl2\hl_in_main.cpp"
|
||||
$File "hl2\hl_prediction.cpp"
|
||||
$File "hl2\vgui_rootpanel_hl2.cpp"
|
||||
}
|
||||
|
||||
$Folder "HL1 DLL"
|
||||
{
|
||||
$File "hl1\hl1_c_legacytempents.cpp"
|
||||
$File "hl1\hl1_c_player.cpp"
|
||||
$File "hl1\hl1_c_player.h"
|
||||
$File "hl1\hl1_c_rpg_rocket.cpp"
|
||||
$File "hl1\hl1_c_weapon__stubs.cpp"
|
||||
$File "hl1\hl1_clientmode.cpp"
|
||||
$File "hl1\hl1_clientmode.h"
|
||||
$File "hl1\hl1_clientscoreboard.cpp"
|
||||
$File "hl1\hl1_hud_deathnotice.cpp"
|
||||
$File "hl1\hl1_fx_gauss.cpp"
|
||||
$File "hl1\hl1_fx_gibs.cpp"
|
||||
$File "hl1\hl1_fx_impacts.cpp"
|
||||
$File "hl1\hl1_fx_shelleject.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.h"
|
||||
$File "hl1\hl1_hud_ammo.cpp"
|
||||
$File "hl1\hl1_hud_battery.cpp"
|
||||
$File "hl1\hl1_hud_damageindicator.cpp"
|
||||
$File "hl1\hl1_hud_damagetiles.cpp"
|
||||
$File "hl1\hl1_hud_flashlight.cpp"
|
||||
$File "hl1\hl1_hud_geiger.cpp"
|
||||
$File "hl1\hl1_hud_health.cpp"
|
||||
$File "hl1\hl1_hud_history_resource.cpp"
|
||||
$File "hl1\hl1_hud_numbers.cpp"
|
||||
$File "hl1\hl1_hud_numbers.h"
|
||||
$File "hl1\hl1_hud_train.cpp"
|
||||
$File "hl1\hl1_hud_weaponselection.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_basecombatweapon_shared.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamerules.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.h"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_usermessages.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_357.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_crossbow.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_egon.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_gauss.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_glock.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_handgrenade.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_hornetgun.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_mp5.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_rpg.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_sachel.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_shotgun.cpp"
|
||||
$File "$SRCDIR\game\server\hl1\hl1_weapon_crowbar.cpp"
|
||||
}
|
||||
|
||||
$Folder "HL1MP DLL"
|
||||
{
|
||||
$File "hl1\c_hl1mp_player.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_basecombatweapon_shared.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_gamerules.cpp"
|
||||
}
|
||||
}
|
||||
}
|
@ -119,6 +119,9 @@ class CHudVote : public vgui::EditablePanel, public CHudElement
|
||||
{
|
||||
DECLARE_CLASS_SIMPLE( CHudVote, vgui::EditablePanel );
|
||||
|
||||
public:
|
||||
DECLARE_MULTIPLY_INHERITED();
|
||||
|
||||
CHudVote( const char *pElementName );
|
||||
|
||||
virtual void LevelInit( void );
|
||||
|
@ -4010,7 +4010,7 @@ void CRendering3dView::DrawOpaqueRenderables( ERenderDepthMode DepthMode )
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0 && r_threaded_renderables.GetBool() )
|
||||
if ( r_threaded_renderables.GetBool() )
|
||||
{
|
||||
ParallelProcess( "BoneSetupNpcsLast", arrBoneSetupNpcsLast.Base() + numOpaqueEnts - numNpcs, numNpcs, &SetupBonesOnBaseAnimating );
|
||||
ParallelProcess( "BoneSetupNpcsLast NonNPCs", arrBoneSetupNpcsLast.Base(), numNonNpcsAnimating, &SetupBonesOnBaseAnimating );
|
||||
|
@ -17,7 +17,7 @@ games = {
|
||||
'hl1': ['client_base.vpc', 'client_hl1.vpc'],
|
||||
'episodic': ['client_base.vpc', 'client_episodic.vpc'],
|
||||
'portal': ['client_base.vpc', 'client_portal.vpc'],
|
||||
'hl1mp': ['client_base.vpc', 'client_hl1.vpc'],
|
||||
'hl1mp': ['client_base.vpc', 'client_hl1mp.vpc'],
|
||||
'cstrike': ['client_base.vpc', 'client_cstrike.vpc'],
|
||||
'dod': ['client_base.vpc', 'client_dod.vpc']
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ private:
|
||||
CUtlRBTree< CritEntry_t, short > m_Lookup;
|
||||
};
|
||||
|
||||
#pragma pack(1)
|
||||
//#pragma pack(1)
|
||||
template<typename T>
|
||||
struct response_interval_t
|
||||
{
|
||||
@ -150,7 +150,7 @@ struct AI_ResponseParams
|
||||
|
||||
responseparams_interval_t predelay; //21
|
||||
};
|
||||
#pragma pack()
|
||||
//#pragma pack()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Generic container for a response to a match to a criteria set
|
||||
|
@ -44,7 +44,6 @@ inline static char *CopyString( const char *in )
|
||||
return out;
|
||||
}
|
||||
|
||||
#pragma pack(1)
|
||||
class Matcher
|
||||
{
|
||||
public:
|
||||
@ -542,7 +541,6 @@ struct Rule
|
||||
bool m_bMatchOnce : 1;
|
||||
bool m_bEnabled : 1;
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
|
179
game/server/server_hl1mp.vpc
Normal file
179
game/server/server_hl1mp.vpc
Normal file
@ -0,0 +1,179 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVER_HL1MP.VPC
|
||||
//
|
||||
// Project Script
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Macro SRCDIR "..\.."
|
||||
$Macro GAMENAME "hl1mp"
|
||||
|
||||
$Include "$SRCDIR\game\server\server_base.vpc"
|
||||
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\hl1,$SRCDIR\game\shared\hl2,.\hl1,.\hl2"
|
||||
$PreprocessorDefinitions "$BASE;HL1_DLL;HL1MP_DLL"
|
||||
}
|
||||
}
|
||||
|
||||
$Project "Server (HL1MP)"
|
||||
{
|
||||
$Folder "Source Files"
|
||||
{
|
||||
$File "hl1\hl1mp_gameinterface.cpp"
|
||||
$File "basegrenade_concussion.cpp"
|
||||
$File "basegrenade_contact.cpp"
|
||||
$File "basegrenade_timed.cpp"
|
||||
$File "hl2\Func_Monitor.cpp"
|
||||
$File "GrenadeThrown.cpp"
|
||||
$File "GrenadeThrown.h"
|
||||
$File "h_cycler.cpp"
|
||||
$File "$SRCDIR\game\shared\predicted_viewmodel.cpp"
|
||||
$File "$SRCDIR\game\shared\predicted_viewmodel.h"
|
||||
$File "$SRCDIR\game\shared\hl2\survival_gamerules.cpp"
|
||||
$File "team_spawnpoint.cpp"
|
||||
$File "team_spawnpoint.h"
|
||||
$File "$SRCDIR\game\shared\weapon_parse_default.cpp"
|
||||
|
||||
$Folder "HL2 DLL"
|
||||
{
|
||||
$File "hl2\ai_behavior_police.h"
|
||||
$File "hl2\ai_goal_police.h"
|
||||
$File "hl2\ai_interactions.h"
|
||||
$File "hl2\antlion_maker.h"
|
||||
$File "hl2\CBaseSpriteProjectile.cpp"
|
||||
$File "hl2\CBaseSpriteProjectile.h"
|
||||
$File "$SRCDIR\game\shared\hl2\citadel_effects_shared.h"
|
||||
$File "hl2\energy_wave.h"
|
||||
$File "$SRCDIR\game\shared\hl2\env_alyxemp_shared.h"
|
||||
$File "$SRCDIR\game\shared\hl2\hl2_shareddefs.h"
|
||||
$File "$SRCDIR\game\shared\hl2\hl_movedata.h"
|
||||
$File "hl2\look_door.cpp"
|
||||
$File "hl2\monster_dummy.cpp"
|
||||
$File "hl2\npc_metropolice.h"
|
||||
$File "hl2\npc_playercompanion.h"
|
||||
$File "npc_Talker.cpp"
|
||||
$File "npc_Talker.h"
|
||||
$File "hl2\prop_combine_ball.h"
|
||||
$File "hl2\script_intro.h"
|
||||
$File "hl2\vehicle_crane.h"
|
||||
$File "hl2\weapon_crowbar.h"
|
||||
$File "hl2\weapon_physcannon.h"
|
||||
$File "hl2\weapon_stunstick.h"
|
||||
|
||||
$Folder "unused"
|
||||
{
|
||||
$File "hl2\grenade_beam.cpp"
|
||||
$File "hl2\grenade_beam.h"
|
||||
$File "hl2\grenade_homer.cpp"
|
||||
$File "hl2\grenade_homer.h"
|
||||
}
|
||||
}
|
||||
|
||||
$Folder "HL1 DLL"
|
||||
{
|
||||
$File "actanimating.cpp"
|
||||
$File "actanimating.h"
|
||||
$File "hl1\hl1_ai_basenpc.cpp"
|
||||
$File "hl1\hl1_ai_basenpc.h"
|
||||
$File "hl1\hl1_basecombatweapon.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_basecombatweapon_shared.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_basecombatweapon_shared.h"
|
||||
$File "hl1\hl1_basegrenade.cpp"
|
||||
$File "hl1\hl1_basegrenade.h"
|
||||
$File "hl1_CBaseHelicopter.h"
|
||||
$File "hl1\hl1_client.cpp"
|
||||
$File "hl1\hl1_ents.cpp"
|
||||
$File "hl1\hl1_env_speaker.cpp"
|
||||
$File "hl1\hl1_eventlog.cpp"
|
||||
$File "hl1\hl1_func_recharge.cpp"
|
||||
$File "hl1\hl1_func_tank.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamemovement.h"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamerules.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_gamerules.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_gamerules.h"
|
||||
$File "hl1\hl1_grenade_mp5.cpp"
|
||||
$File "hl1\hl1_grenade_mp5.h"
|
||||
$File "hl1\hl1_grenade_spit.cpp"
|
||||
$File "hl1\hl1_grenade_spit.h"
|
||||
$File "hl1\hl1_item_ammo.cpp"
|
||||
$File "hl1\hl1_item_battery.cpp"
|
||||
$File "hl1\hl1_item_healthkit.cpp"
|
||||
$File "hl1\hl1_item_longjump.cpp"
|
||||
$File "hl1\hl1_item_suit.cpp"
|
||||
$File "hl1\hl1_items.cpp"
|
||||
$File "hl1\hl1_items.h"
|
||||
$File "hl1\hl1_monstermaker.cpp"
|
||||
$File "hl1\hl1_monstermaker.h"
|
||||
$File "hl1\hl1_npc_aflock.cpp"
|
||||
$File "hl1\hl1_npc_agrunt.cpp"
|
||||
$File "hl1\hl1_npc_apache.cpp"
|
||||
$File "hl1\hl1_npc_barnacle.cpp"
|
||||
$File "hl1\hl1_npc_barnacle.h"
|
||||
$File "hl1\hl1_npc_barney.cpp"
|
||||
$File "hl1\hl1_npc_barney.h"
|
||||
$File "hl1\hl1_npc_bigmomma.cpp"
|
||||
$File "hl1\hl1_npc_bloater.cpp"
|
||||
$File "hl1\hl1_npc_bullsquid.cpp"
|
||||
$File "hl1\hl1_npc_bullsquid.h"
|
||||
$File "hl1\hl1_npc_controller.cpp"
|
||||
$File "hl1\hl1_npc_gargantua.cpp"
|
||||
$File "hl1\hl1_npc_gargantua.h"
|
||||
$File "hl1\hl1_npc_gman.cpp"
|
||||
$File "hl1\hl1_npc_hassassin.cpp"
|
||||
$File "hl1\hl1_npc_headcrab.cpp"
|
||||
$File "hl1\hl1_npc_headcrab.h"
|
||||
$File "hl1\hl1_npc_hgrunt.cpp"
|
||||
$File "hl1\hl1_npc_hgrunt.h"
|
||||
$File "hl1\hl1_npc_hornet.cpp"
|
||||
$File "hl1\hl1_npc_hornet.h"
|
||||
$File "hl1\hl1_npc_houndeye.cpp"
|
||||
$File "hl1\hl1_npc_houndeye.h"
|
||||
$File "hl1\hl1_npc_ichthyosaur.cpp"
|
||||
$File "hl1\hl1_npc_ichthyosaur.h"
|
||||
$File "hl1\hl1_npc_leech.cpp"
|
||||
$File "hl1\hl1_npc_nihilanth.cpp"
|
||||
$File "hl1\hl1_npc_osprey.cpp"
|
||||
$File "hl1\hl1_npc_roach.cpp"
|
||||
$File "hl1\hl1_npc_scientist.cpp"
|
||||
$File "hl1\hl1_npc_scientist.h"
|
||||
$File "hl1\hl1_npc_snark.cpp"
|
||||
$File "hl1\hl1_npc_snark.h"
|
||||
$File "hl1\hl1_npc_talker.cpp"
|
||||
$File "hl1\hl1_npc_talker.h"
|
||||
$File "hl1\hl1_npc_tentacle.cpp"
|
||||
$File "hl1\hl1_npc_turret.cpp"
|
||||
$File "hl1\hl1_npc_vortigaunt.cpp"
|
||||
$File "hl1\hl1_npc_vortigaunt.h"
|
||||
$File "hl1\hl1_npc_zombie.cpp"
|
||||
$File "hl1\hl1_npc_zombie.h"
|
||||
$File "hl1\hl1_player.cpp"
|
||||
$File "hl1\hl1_player.h"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_player_shared.h"
|
||||
$File "hl1\hl1_playermove.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1_usermessages.cpp"
|
||||
$File "hl1\hl1_weapon_snark.cpp"
|
||||
$File "hl1\hl1_weapon_tripmine.cpp"
|
||||
$File "hl1\hl1_weaponbox.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_basecombatweapon_shared.cpp"
|
||||
$File "hl1\hl1mp_bot_temp.cpp"
|
||||
$File "hl1\hl1mp_player.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_357.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_crossbow.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_egon.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_gauss.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_glock.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_handgrenade.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_hornetgun.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_mp5.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_rpg.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_sachel.cpp"
|
||||
$File "$SRCDIR\game\shared\hl1\hl1mp_weapon_shotgun.cpp"
|
||||
$File "$SRCDIR\game\server\hl1\hl1_weapon_crowbar.cpp"
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ games = {
|
||||
'hl2mp': ['server_base.vpc', 'server_hl2mp.vpc'],
|
||||
'portal': ['server_base.vpc', 'server_portal.vpc'],
|
||||
'hl1': ['server_base.vpc', 'server_hl1.vpc'],
|
||||
'hl1mp': ['server_base.vpc', 'server_hl1.vpc'],
|
||||
'hl1mp': ['server_base.vpc', 'server_hl1mp.vpc'],
|
||||
'cstrike': ['server_base.vpc', 'server_cstrike.vpc', 'nav_mesh.vpc'],
|
||||
'dod': ['server_base.vpc', 'server_dod.vpc'],
|
||||
'tf': [
|
||||
|
@ -203,6 +203,7 @@ CSave::CSave( CSaveRestoreData *pdata )
|
||||
|
||||
inline int CSave::DataEmpty( const char *pdata, int size )
|
||||
{
|
||||
static int void_data = 0;
|
||||
if ( size != 4 )
|
||||
{
|
||||
const char *pLimit = pdata + size;
|
||||
@ -214,7 +215,7 @@ inline int CSave::DataEmpty( const char *pdata, int size )
|
||||
return 1;
|
||||
}
|
||||
|
||||
return ( *((int *)pdata) == 0 );
|
||||
return memcmp(pdata, &void_data, sizeof(int)) == 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -560,7 +560,7 @@ int SaveReadNameAndComment( FileHandle_t f, OUT_Z_CAP(nameSize) char *name, int
|
||||
int nNumberOfFields;
|
||||
|
||||
char *pData;
|
||||
int nFieldSize;
|
||||
short nFieldSize;
|
||||
|
||||
pData = pSaveData;
|
||||
|
||||
@ -580,9 +580,12 @@ int SaveReadNameAndComment( FileHandle_t f, OUT_Z_CAP(nameSize) char *name, int
|
||||
pTokenList = NULL;
|
||||
|
||||
// short, short (size, index of field name)
|
||||
nFieldSize = *(short *)pData;
|
||||
memcpy( &nFieldSize, pData, sizeof(short) );
|
||||
|
||||
pData += sizeof(short);
|
||||
pFieldName = pTokenList[ *(short *)pData ];
|
||||
short index;
|
||||
memcpy( &index, pData, sizeof(short) );
|
||||
pFieldName = pTokenList[index];
|
||||
|
||||
if (stricmp(pFieldName, "GameHeader"))
|
||||
{
|
||||
@ -592,7 +595,7 @@ int SaveReadNameAndComment( FileHandle_t f, OUT_Z_CAP(nameSize) char *name, int
|
||||
|
||||
// int (fieldcount)
|
||||
pData += sizeof(short);
|
||||
nNumberOfFields = *(int*)pData;
|
||||
memcpy( &nNumberOfFields, pData, sizeof(int) );
|
||||
pData += nFieldSize;
|
||||
|
||||
// Each field is a short (size), short (index of name), binary string of "size" bytes (data)
|
||||
@ -603,10 +606,12 @@ int SaveReadNameAndComment( FileHandle_t f, OUT_Z_CAP(nameSize) char *name, int
|
||||
// szName
|
||||
// Actual Data
|
||||
|
||||
nFieldSize = *(short *)pData;
|
||||
memcpy( &nFieldSize, pData, sizeof(short) );
|
||||
pData += sizeof(short);
|
||||
|
||||
pFieldName = pTokenList[ *(short *)pData ];
|
||||
short index;
|
||||
memcpy( &index, pData, sizeof(short));
|
||||
pFieldName = pTokenList[index];
|
||||
pData += sizeof(short);
|
||||
|
||||
if (!stricmp(pFieldName, "comment"))
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "convar.h"
|
||||
#include "tier0/tslist.h"
|
||||
#include "vphysics_interface.h"
|
||||
#include "mathlib/compressed_vector.h"
|
||||
|
||||
#ifdef CLIENT_DLL
|
||||
#include "posedebugger.h"
|
||||
#endif
|
||||
@ -378,14 +380,18 @@ void CalcBoneQuaternion( int frame, float s,
|
||||
{
|
||||
if ( panim->flags & STUDIO_ANIM_RAWROT )
|
||||
{
|
||||
q = *(panim->pQuat48());
|
||||
Quaternion48 tmp;
|
||||
memcpy( &tmp, panim->pQuat48(), sizeof(Quaternion48) );
|
||||
q = tmp;
|
||||
Assert( q.IsValid() );
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( panim->flags & STUDIO_ANIM_RAWROT2 )
|
||||
{
|
||||
q = *(panim->pQuat64());
|
||||
Quaternion64 tmp;
|
||||
memcpy( &tmp, panim->pQuat64(), sizeof(Quaternion64) );
|
||||
q = tmp;
|
||||
Assert( q.IsValid() );
|
||||
return;
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ void SendProxy_UInt16ToInt32( const SendProp *pProp, const void *pStruct, const
|
||||
|
||||
void SendProxy_UInt32ToInt32( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID)
|
||||
{
|
||||
*((unsigned long*)&pOut->m_Int) = *((unsigned long*)pData);
|
||||
memcpy( &pOut->m_Int, pData, sizeof(unsigned long) );
|
||||
}
|
||||
#ifdef SUPPORTS_INT64
|
||||
void SendProxy_UInt64ToInt64( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID)
|
||||
|
@ -149,7 +149,7 @@ class Quaternion64
|
||||
{
|
||||
public:
|
||||
// Construction/destruction:
|
||||
Quaternion64(void);
|
||||
Quaternion64(void) {};
|
||||
Quaternion64(vec_t X, vec_t Y, vec_t Z);
|
||||
|
||||
// assignment
|
||||
@ -197,7 +197,7 @@ class Quaternion48
|
||||
{
|
||||
public:
|
||||
// Construction/destruction:
|
||||
Quaternion48(void);
|
||||
Quaternion48(void) {};
|
||||
Quaternion48(vec_t X, vec_t Y, vec_t Z);
|
||||
|
||||
// assignment
|
||||
|
@ -34,7 +34,7 @@ enum LightType_OptimizationFlags_t
|
||||
struct LightDesc_t
|
||||
{
|
||||
LightType_t m_Type; //< MATERIAL_LIGHT_xxx
|
||||
Vector m_Color; //< color+intensity
|
||||
Vector m_Color; //< color+intensity
|
||||
Vector m_Position; //< light source center position
|
||||
Vector m_Direction; //< for SPOT, direction it is pointing
|
||||
float m_Range; //< distance range for light.0=infinite
|
||||
@ -60,6 +60,7 @@ public:
|
||||
|
||||
LightDesc_t(void)
|
||||
{
|
||||
m_Type = MATERIAL_LIGHT_DISABLE;
|
||||
}
|
||||
|
||||
// constructors for various useful subtypes
|
||||
|
@ -23,6 +23,10 @@
|
||||
#include "tier0/dbg.h"
|
||||
#include "mathlib/math_pfns.h"
|
||||
|
||||
#ifdef __arm__
|
||||
#include "sse2neon.h"
|
||||
#endif
|
||||
|
||||
// forward declarations
|
||||
class Vector;
|
||||
class Vector2D;
|
||||
@ -141,10 +145,8 @@ public:
|
||||
inline void Set( vec_t X, vec_t Y, vec_t Z, vec_t W );
|
||||
inline void InitZero( void );
|
||||
|
||||
#ifndef __arm__
|
||||
inline __m128 &AsM128() { return *(__m128*)&x; }
|
||||
inline const __m128 &AsM128() const { return *(const __m128*)&x; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
// No copy constructors allowed if we're in optimal mode
|
||||
@ -616,9 +618,7 @@ inline void Vector4DAligned::Set( vec_t X, vec_t Y, vec_t Z, vec_t W )
|
||||
|
||||
inline void Vector4DAligned::InitZero( void )
|
||||
{
|
||||
#if defined (__arm__)
|
||||
x = y = z = w = 0;
|
||||
#elif !defined( _X360 )
|
||||
#if !defined( _X360 )
|
||||
this->AsM128() = _mm_set1_ps( 0.0f );
|
||||
#else
|
||||
this->AsM128() = __vspltisw( 0 );
|
||||
@ -629,7 +629,7 @@ inline void Vector4DAligned::InitZero( void )
|
||||
inline void Vector4DMultiplyAligned( Vector4DAligned const& a, Vector4DAligned const& b, Vector4DAligned& c )
|
||||
{
|
||||
Assert( a.IsValid() && b.IsValid() );
|
||||
#if !defined( _X360 ) || defined (__arm__)
|
||||
#if !defined( _X360 )
|
||||
c.x = a.x * b.x;
|
||||
c.y = a.y * b.y;
|
||||
c.z = a.z * b.z;
|
||||
@ -643,7 +643,7 @@ inline void Vector4DWeightMAD( vec_t w, Vector4DAligned const& vInA, Vector4DAli
|
||||
{
|
||||
Assert( vInA.IsValid() && vInB.IsValid() && IsFinite(w) );
|
||||
|
||||
#if !defined( _X360 ) || defined (__arm__)
|
||||
#if !defined( _X360 )
|
||||
vOutA.x += vInA.x * w;
|
||||
vOutA.y += vInA.y * w;
|
||||
vOutA.z += vInA.z * w;
|
||||
@ -664,7 +664,6 @@ inline void Vector4DWeightMAD( vec_t w, Vector4DAligned const& vInA, Vector4DAli
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef __arm__
|
||||
inline void Vector4DWeightMADSSE( vec_t w, Vector4DAligned const& vInA, Vector4DAligned& vOutA, Vector4DAligned const& vInB, Vector4DAligned& vOutB )
|
||||
{
|
||||
Assert( vInA.IsValid() && vInB.IsValid() && IsFinite(w) );
|
||||
@ -686,7 +685,6 @@ inline void Vector4DWeightMADSSE( vec_t w, Vector4DAligned const& vInA, Vector4D
|
||||
vOutB.AsM128() = __vmaddfp( vInB.AsM128(), temp, vOutB.AsM128() );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // VECTOR4D_H
|
||||
|
||||
|
@ -423,6 +423,12 @@ void MatrixInverseTranspose( const VMatrix& src, VMatrix& dst );
|
||||
//-----------------------------------------------------------------------------
|
||||
inline VMatrix::VMatrix()
|
||||
{
|
||||
Init(
|
||||
0.f, 0.f, 0.f, 0.f,
|
||||
0.f, 0.f, 0.f, 0.f,
|
||||
0.f, 0.f, 0.f, 0.f,
|
||||
0.f, 0.f, 0.f, 0.f
|
||||
);
|
||||
}
|
||||
|
||||
inline VMatrix::VMatrix(
|
||||
|
@ -639,6 +639,7 @@ struct mstudioanim_t
|
||||
byte bone;
|
||||
byte flags; // weighing options
|
||||
|
||||
|
||||
// valid for animating data only
|
||||
inline byte *pData( void ) const { return (((byte *)this) + sizeof( struct mstudioanim_t )); };
|
||||
inline mstudioanim_valueptr_t *pRotV( void ) const { return (mstudioanim_valueptr_t *)(pData()); };
|
||||
@ -650,8 +651,9 @@ struct mstudioanim_t
|
||||
inline Vector48 *pPos( void ) const { return (Vector48 *)(pData() + ((flags & STUDIO_ANIM_RAWROT) != 0) * sizeof( *pQuat48() ) + ((flags & STUDIO_ANIM_RAWROT2) != 0) * sizeof( *pQuat64() ) ); };
|
||||
|
||||
short nextoffset;
|
||||
|
||||
inline mstudioanim_t *pNext( void ) const { if (nextoffset != 0) return (mstudioanim_t *)(((byte *)this) + nextoffset); else return NULL; };
|
||||
};
|
||||
} ALIGN16;
|
||||
|
||||
struct mstudiomovement_t
|
||||
{
|
||||
|
@ -1195,7 +1195,7 @@ typedef enum _D3DVERTEXBLENDFLAGS
|
||||
D3DVBF_3WEIGHTS = 3, // 4 matrix blending
|
||||
D3DVBF_TWEENING = 255, // blending using D3DRS_TWEENFACTOR
|
||||
D3DVBF_0WEIGHTS = 256, // one matrix is used with weight 1.0
|
||||
D3DVBF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
|
||||
D3DVBF_FORCE_DWORD = 0xffffffff, // force 32-bit size enum
|
||||
} D3DVERTEXBLENDFLAGS;
|
||||
|
||||
typedef struct _D3DINDEXBUFFER_DESC
|
||||
@ -1533,7 +1533,7 @@ typedef enum _D3DTRANSFORMSTATETYPE
|
||||
D3DTS_VIEW = 2,
|
||||
D3DTS_PROJECTION = 3,
|
||||
D3DTS_TEXTURE0 = 16,
|
||||
D3DTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
|
||||
D3DTS_FORCE_DWORD = 0xffffffff, /* force 32-bit size enum */
|
||||
} D3DTRANSFORMSTATETYPE;
|
||||
|
||||
// **** FIXED FUNCTION STUFF - None of this stuff needs support in GL.
|
||||
|
@ -38,18 +38,8 @@
|
||||
#include "interface.h"
|
||||
#include "togles/rendermechanism.h"
|
||||
|
||||
#ifdef LINUX
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
void *VoidFnPtrLookup_GlMgr(const char *fn, bool &okay, const bool bRequired, void *fallback=NULL);
|
||||
|
||||
/*
|
||||
#define GL_USE_EXECUTE_HELPER_FOR_ALL_API_CALLS 1
|
||||
#define GL_TRACK_API_TIME 1
|
||||
#define GL_DUMP_ALL_API_CALLS 1
|
||||
*/
|
||||
|
||||
#if GL_USE_EXECUTE_HELPER_FOR_ALL_API_CALLS
|
||||
class CGLExecuteHelperBase
|
||||
{
|
||||
@ -57,7 +47,7 @@ public:
|
||||
inline void StartCall(const char *pName);
|
||||
inline void StopCall(const char *pName);
|
||||
#if GL_TRACK_API_TIME
|
||||
uint64 m_nStartTime;
|
||||
TmU64 m_nStartTime;
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -313,32 +303,30 @@ public:
|
||||
int m_nOpenGLVersionMinor; // if GL_VERSION is 2.1.0, this will be set to 1.
|
||||
int m_nOpenGLVersionPatch; // if GL_VERSION is 2.1.0, this will be set to 0.
|
||||
bool m_bHave_OpenGL;
|
||||
|
||||
|
||||
char *m_pGLDriverStrings[cGLTotalDriverStrings];
|
||||
GLDriverProvider_t m_nDriverProvider;
|
||||
GLDriverProvider_t m_nDriverProvider;
|
||||
|
||||
#ifdef LOAD_HARDFP
|
||||
#define _APIENTRY __attribute__((pcs("aapcs"))) APIENTRY
|
||||
#else
|
||||
#define _APIENTRY APIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef OSX
|
||||
#define GL_EXT(x,glmajor,glminor) bool m_bHave_##x;
|
||||
#define GL_FUNC(ext,req,ret,fn,arg,call) CDynamicFunctionOpenGL< req, ret (*) arg, ret > fn;
|
||||
#define GL_FUNC_VOID(ext,req,fn,arg,call) CDynamicFunctionOpenGL< req, void (*) arg, void > fn;
|
||||
#else
|
||||
|
||||
#ifdef LOAD_HARDFP
|
||||
#define _APIENTRY __attribute__((pcs("aapcs"))) APIENTRY
|
||||
#define GL_EXT(x,glmajor,glminor) bool m_bHave_##x;
|
||||
#define GL_FUNC(ext,req,ret,fn,arg,call) CDynamicFunctionOpenGL< req, ret (_APIENTRY *) arg, ret > fn;
|
||||
#define GL_FUNC_VOID(ext,req,fn,arg,call) CDynamicFunctionOpenGL< req, void (_APIENTRY *) arg, void > fn;
|
||||
#else
|
||||
#define GL_EXT(x,glmajor,glminor) bool m_bHave_##x;
|
||||
#define GL_FUNC(ext,req,ret,fn,arg,call) CDynamicFunctionOpenGL< req, ret (APIENTRY *) arg, ret > fn;
|
||||
#define GL_FUNC_VOID(ext,req,fn,arg,call) CDynamicFunctionOpenGL< req, void (APIENTRY *) arg, void > fn;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include "togles/glfuncs.inl"
|
||||
#undef GL_FUNC_VOID
|
||||
#undef GL_FUNC
|
||||
#undef GL_EXT
|
||||
#include "togles/glfuncs.inl"
|
||||
#undef GL_FUNC_VOID
|
||||
#undef GL_FUNC
|
||||
#undef GL_EXT
|
||||
|
||||
bool HasSwapTearExtension() const
|
||||
{
|
||||
@ -366,30 +354,54 @@ typedef void * (*GL_GetProcAddressCallbackFunc_t)(const char *, bool &, const bo
|
||||
DLL_IMPORT void ClearOpenGLEntryPoints();
|
||||
#endif
|
||||
|
||||
inline uint64 get_nsecs()
|
||||
{
|
||||
struct timespec time={0,0};
|
||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
return time.tv_nsec;
|
||||
}
|
||||
|
||||
#if GL_USE_EXECUTE_HELPER_FOR_ALL_API_CALLS
|
||||
inline void CGLExecuteHelperBase::StartCall(const char *pName)
|
||||
{
|
||||
(void)pName;
|
||||
m_nStartTime = get_nsecs();
|
||||
|
||||
#if GL_TELEMETRY_ZONES
|
||||
tmEnter( TELEMETRY_LEVEL3, TMZF_NONE, pName );
|
||||
#endif
|
||||
|
||||
#if GL_TRACK_API_TIME
|
||||
m_nStartTime = tmFastTime();
|
||||
#endif
|
||||
|
||||
#if GL_DUMP_ALL_API_CALLS
|
||||
static bool s_bDumpCalls;
|
||||
if ( s_bDumpCalls )
|
||||
{
|
||||
char buf[128];
|
||||
buf[0] = 'G';
|
||||
buf[1] = 'L';
|
||||
buf[2] = ':';
|
||||
size_t l = strlen( pName );
|
||||
memcpy( buf + 3, pName, l );
|
||||
buf[3 + l] = '\n';
|
||||
buf[4 + l] = '\0';
|
||||
Plat_DebugString( buf );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void CGLExecuteHelperBase::StopCall(const char *pName)
|
||||
{
|
||||
if( gGL )
|
||||
{
|
||||
uint64 time = get_nsecs() - m_nStartTime;
|
||||
printf("Function %s finished in %llu\n", pName, time);
|
||||
|
||||
if( strcmp(pName, "glBufferSubData") == 0 && time > 1000000 )
|
||||
DebuggerBreak();
|
||||
}
|
||||
{
|
||||
#if GL_TRACK_API_TIME
|
||||
uint64 nTotalCycles = tmFastTime() - m_nStartTime;
|
||||
#endif
|
||||
|
||||
#if GL_TELEMETRY_ZONES
|
||||
tmLeave( TELEMETRY_LEVEL3 );
|
||||
#endif
|
||||
|
||||
#if GL_TRACK_API_TIME
|
||||
//double flMilliseconds = g_Telemetry.flRDTSCToMilliSeconds * nTotalCycles;
|
||||
if (gGL)
|
||||
{
|
||||
gGL->m_nTotalGLCycles += nTotalCycles;
|
||||
gGL->m_nTotalGLCalls++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -154,9 +154,10 @@ CServerBrowserDialog::~CServerBrowserDialog()
|
||||
SaveUserData();
|
||||
|
||||
if (m_pSavedData)
|
||||
{
|
||||
m_pSavedData->deleteThis();
|
||||
}
|
||||
|
||||
if( m_pFilterData )
|
||||
m_pFilterData->deleteThis();
|
||||
}
|
||||
|
||||
|
||||
@ -813,4 +814,4 @@ void CServerBrowserDialog::OnKeyCodePressed( vgui::KeyCode code )
|
||||
}
|
||||
|
||||
BaseClass::OnKeyCodePressed( code );
|
||||
}
|
||||
}
|
||||
|
@ -763,7 +763,9 @@ void CStudioRenderContext::R_StudioBuildMeshGroup( const char *pModelName, bool
|
||||
|
||||
for (i = 0; i < pStripGroup->numIndices; ++i)
|
||||
{
|
||||
meshBuilder.Index( *pStripGroup->pIndex(i) );
|
||||
unsigned short index;
|
||||
memcpy( &index, pStripGroup->pIndex(i), sizeof(index) );
|
||||
meshBuilder.Index( index );
|
||||
meshBuilder.AdvanceIndex();
|
||||
}
|
||||
|
||||
|
@ -142,9 +142,9 @@ static bool IsWin98OrOlder()
|
||||
|
||||
static bool CheckSSETechnology(void)
|
||||
{
|
||||
#if defined(__SANITIZE_ADDRESS__)
|
||||
#if defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined( _X360 ) || defined( _PS3 ) || defined (__arm__)
|
||||
#elif defined( _X360 ) || defined( _PS3 )
|
||||
return true;
|
||||
#else
|
||||
if ( IsWin98OrOlder() ) {
|
||||
@ -162,10 +162,8 @@ static bool CheckSSETechnology(void)
|
||||
|
||||
static bool CheckSSE2Technology(void)
|
||||
{
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__)
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined (__arm__)
|
||||
return true;
|
||||
#else
|
||||
unsigned long eax,ebx,edx,unused;
|
||||
if ( !cpuid(1,eax,ebx,unused,edx) )
|
||||
@ -177,10 +175,8 @@ static bool CheckSSE2Technology(void)
|
||||
|
||||
bool CheckSSE3Technology(void)
|
||||
{
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__)
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined (__arm__)
|
||||
return true;
|
||||
#else
|
||||
unsigned long eax,ebx,edx,ecx;
|
||||
if( !cpuid(1,eax,ebx,ecx,edx) )
|
||||
@ -192,10 +188,8 @@ bool CheckSSE3Technology(void)
|
||||
|
||||
bool CheckSSSE3Technology(void)
|
||||
{
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__)
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined (__arm__)
|
||||
return true;
|
||||
#else
|
||||
// SSSE 3 is implemented by both Intel and AMD
|
||||
// detection is done the same way for both vendors
|
||||
@ -209,10 +203,8 @@ bool CheckSSSE3Technology(void)
|
||||
|
||||
bool CheckSSE41Technology(void)
|
||||
{
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__)
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined (__arm__)
|
||||
return true;
|
||||
#else
|
||||
// SSE 4.1 is implemented by both Intel and AMD
|
||||
// detection is done the same way for both vendors
|
||||
@ -227,10 +219,8 @@ bool CheckSSE41Technology(void)
|
||||
|
||||
bool CheckSSE42Technology(void)
|
||||
{
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__)
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined (__arm__)
|
||||
return true;
|
||||
#else
|
||||
// SSE4.2 is an Intel-only feature
|
||||
|
||||
@ -249,10 +239,8 @@ bool CheckSSE42Technology(void)
|
||||
|
||||
bool CheckSSE4aTechnology( void )
|
||||
{
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__)
|
||||
#if defined( _X360 ) || defined( _PS3 ) || defined(__SANITIZE_ADDRESS__) || defined (__arm__)
|
||||
return false;
|
||||
#elif defined (__arm__)
|
||||
return true;
|
||||
#else
|
||||
// SSE 4a is an AMD-only feature
|
||||
|
||||
|
@ -105,6 +105,8 @@ void CRC32_ProcessBuffer(CRC32_t *pulCRC, const void *pBuffer, int nBuffer)
|
||||
unsigned int nFront;
|
||||
int nMain;
|
||||
|
||||
CRC32_t tmp;
|
||||
|
||||
JustAfew:
|
||||
|
||||
switch (nBuffer)
|
||||
@ -119,7 +121,8 @@ JustAfew:
|
||||
ulCrc = pulCRCTable[*pb++ ^ (unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
|
||||
case 4:
|
||||
ulCrc ^= LittleLong( *(CRC32_t *)pb );
|
||||
memcpy( &tmp, pb, sizeof(CRC32_t) );
|
||||
ulCrc ^= LittleLong( tmp );
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
@ -162,12 +165,15 @@ JustAfew:
|
||||
nMain = nBuffer >> 3;
|
||||
while (nMain--)
|
||||
{
|
||||
ulCrc ^= LittleLong( *(CRC32_t *)pb );
|
||||
memcpy( &tmp, pb, sizeof(CRC32_t) );
|
||||
ulCrc ^= LittleLong( tmp );
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc ^= LittleLong( *(CRC32_t *)(pb + 4) );
|
||||
|
||||
memcpy( &tmp, pb+4, sizeof(CRC32_t) );
|
||||
ulCrc ^= LittleLong( tmp );
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
ulCrc = pulCRCTable[(unsigned char)ulCrc] ^ (ulCrc >> 8);
|
||||
|
@ -12,9 +12,9 @@ bool CheckSSETechnology(void) { return false; }
|
||||
bool CheckSSE2Technology(void) { return false; }
|
||||
bool Check3DNowTechnology(void) { return false; }
|
||||
#elif defined (__arm__)
|
||||
bool CheckMMXTechnology(void) { return true; }
|
||||
bool CheckSSETechnology(void) { return true; }
|
||||
bool CheckSSE2Technology(void) { return true; }
|
||||
bool CheckMMXTechnology(void) { return false; }
|
||||
bool CheckSSETechnology(void) { return false; }
|
||||
bool CheckSSE2Technology(void) { return false; }
|
||||
bool Check3DNowTechnology(void) { return false; }
|
||||
#else
|
||||
|
||||
|
@ -100,7 +100,8 @@ static const int64 kint64max = static_cast<int64>(0x7FFFFFFFFFFFFFFFLL);
|
||||
|
||||
// x86 and PowerPC can simply do these loads and stores native.
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
|
||||
// fuck this shit
|
||||
#if 0 // defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
|
||||
|
||||
#define UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
|
||||
#define UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
|
||||
|
@ -472,10 +472,7 @@ CGLMBuffer::CGLMBuffer( GLMContext *pCtx, EGLMBufferType type, uint size, uint o
|
||||
m_bPseudo = true;
|
||||
#endif
|
||||
|
||||
const char *szRenderer = (const char*)gGL->glGetString(GL_VENDOR);
|
||||
// Msg("GL_VENDOR: %s\n", szRenderer);
|
||||
|
||||
if( strcmp(szRenderer, "ARM") == 0 )
|
||||
if( strcmp(gGL->m_pGLDriverStrings[cGLVendorString], "ARM") == 0 )
|
||||
g_bUsePseudoBufs = true; // works faster with Mali gpu
|
||||
|
||||
#if GL_ENABLE_INDEX_VERIFICATION
|
||||
|
@ -350,11 +350,10 @@ void CGLMProgram::Compile( EGLMProgramLang lang )
|
||||
|
||||
// compile
|
||||
gGL->glCompileShader( glslDesc->m_object.glsl );
|
||||
|
||||
|
||||
|
||||
GLint isCompiled = 0;
|
||||
gGL->glGetShaderiv(glslDesc->m_object.glsl, GL_COMPILE_STATUS, &isCompiled);
|
||||
|
||||
|
||||
if(isCompiled == GL_FALSE)
|
||||
{
|
||||
GLint maxLength = 0;
|
||||
|
@ -3649,9 +3649,9 @@ void CGLMTex::WriteTexels( GLMTexLockDesc *desc, bool writeWholeSlice, bool noDa
|
||||
Assert( writeWholeSlice ); //subimage not implemented in this path yet
|
||||
// compressed path
|
||||
// http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml
|
||||
if( gGL->m_bHave_GL_EXT_texture_compression_dxt1 )
|
||||
/* if( gGL->m_bHave_GL_EXT_texture_compression_dxt1 )
|
||||
gGL->glCompressedTexImage2D( target, desc->m_req.m_mip, intformat, slice->m_xSize, slice->m_ySize, 0, slice->m_storageSize, sliceAddress );
|
||||
else
|
||||
else*/
|
||||
CompressedTexImage2D( target, desc->m_req.m_mip, intformat, slice->m_xSize, slice->m_ySize, 0, slice->m_storageSize, sliceAddress );
|
||||
}
|
||||
else
|
||||
|
Binary file not shown.
@ -2148,23 +2148,32 @@ static uint PrintDoubleInt( char *pBuf, uint nBufSize, double f, uint nMinChars
|
||||
|
||||
if ( bAnyDigitsLeft )
|
||||
{
|
||||
uint n = remainder % 100U; remainder /= 100U; *reinterpret_cast<uint16*>(pDst - 1) = reinterpret_cast<const uint16*>(pDigits)[n];
|
||||
n = remainder % 100U; remainder /= 100U; *reinterpret_cast<uint16*>(pDst - 1 - 2) = reinterpret_cast<const uint16*>(pDigits)[n];
|
||||
uint n = remainder % 100U; remainder /= 100U;
|
||||
memcpy( reinterpret_cast<uint16*>(pDst - 1), &(reinterpret_cast<const uint16*>(pDigits)[n]), sizeof(uint16) );
|
||||
n = remainder % 100U; remainder /= 100U;
|
||||
memcpy( reinterpret_cast<uint16*>(pDst - 3), &(reinterpret_cast<const uint16*>(pDigits)[n]), sizeof(uint16) );
|
||||
Assert( remainder < 100U );
|
||||
*reinterpret_cast<uint16*>(pDst - 1 - 4) = reinterpret_cast<const uint16*>(pDigits)[remainder];
|
||||
memcpy( reinterpret_cast<uint16*>(pDst - 5), &(reinterpret_cast<const uint16*>(pDigits)[remainder]), sizeof(uint16) );
|
||||
pDst -= 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint n = remainder % 100U; remainder /= 100U; *reinterpret_cast<uint16*>(pDst - 1) = reinterpret_cast<const uint16*>(pDigits)[n]; --pDst; if ( ( n >= 10 ) || ( remainder ) ) --pDst;
|
||||
uint n = remainder % 100U; remainder /= 100U;
|
||||
memcpy( reinterpret_cast<uint16*>(pDst - 1), &(reinterpret_cast<const uint16*>(pDigits)[n]), sizeof(uint16) );
|
||||
--pDst; if ( ( n >= 10 ) || ( remainder ) ) --pDst;
|
||||
|
||||
if ( remainder )
|
||||
{
|
||||
n = remainder % 100U; remainder /= 100U; *reinterpret_cast<uint16*>(pDst - 1) = reinterpret_cast<const uint16*>(pDigits)[n]; --pDst; if ( ( n >= 10 ) || ( remainder ) ) --pDst;
|
||||
n = remainder % 100U; remainder /= 100U;
|
||||
memcpy( reinterpret_cast<uint16*>(pDst - 1), &(reinterpret_cast<const uint16*>(pDigits)[n]), sizeof(uint16) );
|
||||
|
||||
--pDst; if ( ( n >= 10 ) || ( remainder ) ) --pDst;
|
||||
|
||||
if ( remainder )
|
||||
{
|
||||
Assert( remainder < 100U );
|
||||
*reinterpret_cast<uint16*>(pDst - 1) = reinterpret_cast<const uint16*>(pDigits)[remainder]; --pDst; if ( remainder >= 10 ) --pDst;
|
||||
memcpy( reinterpret_cast<uint16*>(pDst - 1), &(reinterpret_cast<const uint16*>(pDigits)[remainder]), sizeof(uint16) );
|
||||
--pDst; if ( remainder >= 10 ) --pDst;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ void ToGLDisconnectLibraries()
|
||||
static void GetOpenGLVersion(int *major, int *minor, int *patch)
|
||||
{
|
||||
*major = *minor = *patch = 0;
|
||||
static CDynamicFunctionOpenGL< true, const GLubyte *( APIENTRY *)(GLenum name), const GLubyte * > glGetString("glGetString");
|
||||
static CDynamicFunctionOpenGL< true, const GLubyte *( _APIENTRY *)(GLenum name), const GLubyte * > glGetString("glGetString");
|
||||
if (glGetString)
|
||||
{
|
||||
const char *version = (const char *) glGetString(GL_VERSION);
|
||||
@ -271,7 +271,7 @@ static bool CheckOpenGLExtension_internal(const char *ext, const int coremajor,
|
||||
}
|
||||
|
||||
// okay, see if the GL_EXTENSIONS string reports it.
|
||||
static CDynamicFunctionOpenGL< true, const GLubyte *( APIENTRY *)(GLenum name), const GLubyte * > glGetString("glGetString");
|
||||
static CDynamicFunctionOpenGL< true, const GLubyte *( _APIENTRY *)(GLenum name), const GLubyte * > glGetString("glGetString");
|
||||
if (!glGetString)
|
||||
return false;
|
||||
|
||||
@ -284,7 +284,7 @@ static bool CheckOpenGLExtension_internal(const char *ext, const int coremajor,
|
||||
#if _WIN32
|
||||
if (!ptr)
|
||||
{
|
||||
static CDynamicFunctionOpenGL< true, const char *( APIENTRY *)( ), const char * > wglGetExtensionsStringEXT("wglGetExtensionsStringEXT");
|
||||
static CDynamicFunctionOpenGL< true, const char *( _APIENTRY *)( ), const char * > wglGetExtensionsStringEXT("wglGetExtensionsStringEXT");
|
||||
if (wglGetExtensionsStringEXT)
|
||||
{
|
||||
extensions = wglGetExtensionsStringEXT();
|
||||
|
@ -221,7 +221,7 @@ void APIENTRY GL_Debug_Output_Callback(GLenum source, GLenum type, GLuint id, GL
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gl_debug_output.GetBool() || type == GL_DEBUG_TYPE_ERROR_ARB )
|
||||
if ( gl_debug_output.GetBool() || type == GL_DEBUG_TYPE_ERROR_ARB || type == GL_DEBUG_SEVERITY_MEDIUM_ARB )
|
||||
{
|
||||
Msg( "GL: [%s][%s][%s][%d]: %s\n", sSource, sType, sSeverity, id, message );
|
||||
}
|
||||
|
@ -1641,8 +1641,13 @@ void CPhysicsCollision::VCollideLoad( vcollide_t *pOutput, int solidCount, const
|
||||
memcpy( &size, pBuffer + position, sizeof(int) );
|
||||
position += sizeof(int);
|
||||
|
||||
pOutput->solids[i] = CPhysCollide::UnserializeFromBuffer( pBuffer + position, size, i, swap );
|
||||
char *tmpbuf = new char[size];
|
||||
memcpy(tmpbuf, pBuffer + position, size);
|
||||
|
||||
pOutput->solids[i] = CPhysCollide::UnserializeFromBuffer( tmpbuf, size, i, swap );
|
||||
position += size;
|
||||
|
||||
delete[] tmpbuf;
|
||||
}
|
||||
|
||||
END_IVP_ALLOCATION();
|
||||
|
Loading…
Reference in New Issue
Block a user