The big merge...

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@21 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
XP-Cagey 2005-04-01 03:04:57 +00:00
parent 8c70d56d87
commit 60007652a3
2066 changed files with 9806 additions and 336824 deletions

BIN
main/source/HPB_bot.ncb Normal file

Binary file not shown.

21
main/source/HPB_bot.sln Normal file
View file

@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HPB_bot", "HPB_bot\dlls\HPB_bot.vcproj", "{4D2D2333-4ACF-44B3-925C-1625FC8EFEA8}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{4D2D2333-4ACF-44B3-925C-1625FC8EFEA8}.Debug.ActiveCfg = Debug|Win32
{4D2D2333-4ACF-44B3-925C-1625FC8EFEA8}.Debug.Build.0 = Debug|Win32
{4D2D2333-4ACF-44B3-925C-1625FC8EFEA8}.Release.ActiveCfg = Release|Win32
{4D2D2333-4ACF-44B3-925C-1625FC8EFEA8}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

BIN
main/source/HPB_bot.suo Normal file

Binary file not shown.

View file

@ -3,6 +3,7 @@
ProjectType="Visual C++"
Version="7.10"
Name="HPB_bot"
ProjectGUID="{4D2D2333-4ACF-44B3-925C-1625FC8EFEA8}"
RootNamespace="HPB_bot"
SccProjectName=""
SccAuxPath=""
@ -15,8 +16,8 @@
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)..\dlls/"
IntermediateDirectory="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
OutputDirectory="V:\temp\$(ProjectName)\$(ConfigurationName)"
IntermediateDirectory="V:\temp\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
@ -24,7 +25,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
AdditionalIncludeDirectories="$(SolutionDir);$(SolutionDir)\dlls;$(SolutionDir)\pm_shared;$(SolutionDir)\common"
AdditionalIncludeDirectories="$(SolutionDir)"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;VALVE_DLL;AVH_SERVER;$(NoInherit)"
StringPooling="TRUE"
RuntimeLibrary="0"
@ -32,9 +33,9 @@
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Release/HPB_bot.pch"
AssemblerListingLocation="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
ObjectFile="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
AssemblerListingLocation="$(IntDir)/"
ObjectFile="$(IntDir)/"
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
@ -48,7 +49,7 @@
OutputFile="$(SolutionDir)\..\dlls\HPB_bot.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="$(SolutionDir)\lib\$(ConfigurationName)"
AdditionalLibraryDirectories="U:\$(ConfigurationName)"
ModuleDefinitionFile=".\HPB_bot.def"
ProgramDatabaseFile=""
GenerateMapFile="FALSE"
@ -87,8 +88,8 @@
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)..\dlls/"
IntermediateDirectory="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
OutputDirectory="V:\temp\$(ProjectName)\$(ConfigurationName)"
IntermediateDirectory="V:\temp\$(ProjectName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
@ -96,15 +97,15 @@
Name="VCCLCompilerTool"
Optimization="0"
OptimizeForProcessor="1"
AdditionalIncludeDirectories="$(SolutionDir);$(SolutionDir)\dlls;$(SolutionDir)\pm_shared;$(SolutionDir)\common"
AdditionalIncludeDirectories="$(SolutionDir)"
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;VALVE_DLL;DEBUG;AVH_SERVER;$(NoInherit)"
RuntimeLibrary="1"
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Debug/HPB_bot.pch"
AssemblerListingLocation="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
ObjectFile="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(SolutionDir)temp\$(ProjectName)\$(ConfigurationName)/"
AssemblerListingLocation="$(IntDir)/"
ObjectFile="$(IntDir)/"
ProgramDataBaseFileName="$(IntDir)/"
WarningLevel="3"
WarnAsError="TRUE"
SuppressStartupBanner="TRUE"
@ -118,7 +119,7 @@
OutputFile="$(SolutionDir)..\dlls\HPB_bot.dll"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="$(SolutionDir)lib\$(ConfigurationName)"
AdditionalLibraryDirectories="U:\$(ConfigurationName)"
IgnoreDefaultLibraryNames="libcmt.lib"
ModuleDefinitionFile=".\HPB_bot.def"
GenerateDebugInformation="TRUE"

View file

@ -7,9 +7,9 @@
//
//#include "windows.h"
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"
#include "bot_func.h"

View file

@ -6,9 +6,9 @@
// bot_client.cpp
//
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"
#include "bot_func.h"

View file

@ -6,9 +6,9 @@
// bot_combat.cpp
//
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"
#include "bot_func.h"

View file

@ -6,9 +6,9 @@
// bot_navigate.cpp
//
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"
#include "bot_func.h"

View file

@ -6,9 +6,9 @@
// bot_start.cpp
//
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"
#include "bot_func.h"

View file

@ -6,11 +6,11 @@
// dll.cpp
//
#include "extdll.h"
#include "enginecallback.h"
#include "util.h"
#include "cbase.h"
#include "entity_state.h"
#include "dlls/extdll.h"
#include "dlls/enginecallback.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "common/entity_state.h"
#include "bot.h"
#include "bot_func.h"

View file

@ -6,8 +6,8 @@
// engine.cpp
//
#include "extdll.h"
#include "util.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "bot.h"
#include "bot_client.h"

View file

@ -6,10 +6,10 @@
// h_export.cpp
//
#include "extdll.h"
#include "enginecallback.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/enginecallback.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "mod/AvHConstants.h"
#include "bot.h"

View file

@ -6,9 +6,9 @@
// linkfunc.cpp
//
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"

View file

@ -21,8 +21,8 @@
// util.cpp
//
#include "extdll.h"
#include "util.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "HPB_bot/engine/engine.h"
#include "dlls/cbase.h"
#include "dlls/player.h"

View file

@ -15,10 +15,10 @@
#include <sys/stat.h>
#endif
#include "extdll.h"
#include "enginecallback.h"
#include "util.h"
#include "cbase.h"
#include "dlls/extdll.h"
#include "dlls/enginecallback.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "bot.h"
#include "waypoint.h"

Binary file not shown.

View file

@ -1,86 +1,26 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HPB_bot", "HPB_bot\dlls\HPB_bot.vcproj", "{44018A66-3207-4CAB-BD27-3C6C59014E21}"
ProjectSection(ProjectDependencies) = postProject
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2} = {C57D57F4-74B2-401F-BE6A-30E2BF8146C2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Textrep", "TEXTREP\Textrep.vcproj", "{CF72E070-32CA-408C-9890-2D92C6565DD9}"
ProjectSection(ProjectDependencies) = postProject
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2} = {C57D57F4-74B2-401F-BE6A-30E2BF8146C2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Util", "UTIL\Util.vcproj", "{C57D57F4-74B2-401F-BE6A-30E2BF8146C2}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cl_dll.dll", "cl_dll\cl_dll.vcproj", "{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cl_dll", "cl_dll\cl_dll.vcproj", "{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}"
ProjectSection(ProjectDependencies) = postProject
{788F4843-CF73-4980-9A99-FBF840C359E5} = {788F4843-CF73-4980-9A99-FBF840C359E5}
{CF72E070-32CA-408C-9890-2D92C6565DD9} = {CF72E070-32CA-408C-9890-2D92C6565DD9}
{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB} = {F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}
{C03B17AC-8484-4453-843B-B38EBA7C5775} = {C03B17AC-8484-4453-843B-B38EBA7C5775}
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2} = {C57D57F4-74B2-401F-BE6A-30E2BF8146C2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curllib", "curl\lib\curllib.vcproj", "{788F4843-CF73-4980-9A99-FBF840C359E5}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hl", "dlls\hl.vcproj", "{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}"
ProjectSection(ProjectDependencies) = postProject
{788F4843-CF73-4980-9A99-FBF840C359E5} = {788F4843-CF73-4980-9A99-FBF840C359E5}
{CF72E070-32CA-408C-9890-2D92C6565DD9} = {CF72E070-32CA-408C-9890-2D92C6565DD9}
{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB} = {F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}
{C03B17AC-8484-4453-843B-B38EBA7C5775} = {C03B17AC-8484-4453-843B-B38EBA7C5775}
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2} = {C57D57F4-74B2-401F-BE6A-30E2BF8146C2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "particles", "particles\particles.vcproj", "{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua.vcproj", "{C03B17AC-8484-4453-843B-B38EBA7C5775}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ns.dll", "dlls\hl.vcproj", "{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
Developer - debug = Developer - debug
Developer - release = Developer - release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{44018A66-3207-4CAB-BD27-3C6C59014E21}.Debug.ActiveCfg = Debug|Win32
{44018A66-3207-4CAB-BD27-3C6C59014E21}.Debug.Build.0 = Debug|Win32
{44018A66-3207-4CAB-BD27-3C6C59014E21}.Release.ActiveCfg = Release|Win32
{44018A66-3207-4CAB-BD27-3C6C59014E21}.Release.Build.0 = Release|Win32
{CF72E070-32CA-408C-9890-2D92C6565DD9}.Debug.ActiveCfg = Debug|Win32
{CF72E070-32CA-408C-9890-2D92C6565DD9}.Debug.Build.0 = Debug|Win32
{CF72E070-32CA-408C-9890-2D92C6565DD9}.Release.ActiveCfg = Release|Win32
{CF72E070-32CA-408C-9890-2D92C6565DD9}.Release.Build.0 = Release|Win32
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2}.Debug.ActiveCfg = Debug|Win32
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2}.Debug.Build.0 = Debug|Win32
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2}.Release.ActiveCfg = Release|Win32
{C57D57F4-74B2-401F-BE6A-30E2BF8146C2}.Release.Build.0 = Release|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Debug.ActiveCfg = Debug|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Debug.Build.0 = Debug|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Release.ActiveCfg = Release|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Release.Build.0 = Release|Win32
{788F4843-CF73-4980-9A99-FBF840C359E5}.Debug.ActiveCfg = Debug|Win32
{788F4843-CF73-4980-9A99-FBF840C359E5}.Debug.Build.0 = Debug|Win32
{788F4843-CF73-4980-9A99-FBF840C359E5}.Release.ActiveCfg = Release|Win32
{788F4843-CF73-4980-9A99-FBF840C359E5}.Release.Build.0 = Release|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Debug.ActiveCfg = Debug|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Debug.Build.0 = Debug|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Release.ActiveCfg = Release|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Release.Build.0 = Release|Win32
{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}.Debug.ActiveCfg = Debug|Win32
{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}.Debug.Build.0 = Debug|Win32
{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}.Release.ActiveCfg = Release|Win32
{F3B3C199-350B-40B1-A6A9-BE5E7BC457AB}.Release.Build.0 = Release|Win32
{C03B17AC-8484-4453-843B-B38EBA7C5775}.Debug.ActiveCfg = Debug|Win32
{C03B17AC-8484-4453-843B-B38EBA7C5775}.Debug.Build.0 = Debug|Win32
{C03B17AC-8484-4453-843B-B38EBA7C5775}.Release.ActiveCfg = Release|Win32
{C03B17AC-8484-4453-843B-B38EBA7C5775}.Release.Build.0 = Release|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Developer - debug.ActiveCfg = Developer - debug|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Developer - debug.Build.0 = Developer - debug|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Developer - release.ActiveCfg = Developer - release|Win32
{4F2D8BCB-E519-4BD6-9E90-F9BD279A7F81}.Developer - release.Build.0 = Developer - release|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Developer - debug.ActiveCfg = Developer - debug|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Developer - debug.Build.0 = Developer - debug|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Developer - release.ActiveCfg = Developer - release|Win32
{FE9B1F1B-866D-4A5A-A303-FAEE34F90025}.Developer - release.Build.0 = Developer - release|Win32
EndGlobalSection
GlobalSection(SolutionItems) = postSolution
..\Balance.txt = ..\Balance.txt

Binary file not shown.

View file

@ -62,46 +62,12 @@
#ifndef BUILD_H
#define BUILD_H
// Build options
#define CLIENT_WEAPONS
#define AVH_PREDICT_SELECT
// Build in code to help playtest. Choose neither, AVH_PLAYTEST_BUILD, or AVH_PLAYTEST_BUILD _and_ AVH_LAN_PLAYTEST_BUILD
#ifdef DEBUG
#define AVH_PLAYTEST_BUILD
//#define AVH_LAN_PLAYTEST_BUILD
#define AVH_PLAYTEST_BUILD
#endif
// Build in code for security. This forces the server to uplink and only allows authenticated players to join the server.
//#ifndef DEBUG
//#define AVH_SECURE_PRERELEASE_BUILD
//#endif
// When you're doing a final secure build of your client .dll and you're ready to
// send the binary to Valve to be processed, you need to change this to 1 and rebuild
//#define FINAL_VAC_BUILD
// Define this when debugging on a different machine in a "live" environment (ie, trying to catch crashes)
//#define AVH_EXTERNAL_BUILD
//#define USE_DIRECTX_8
// May not be working completely
//#define SKULK_VIEW_ROTATION
// Mapper build?
//#define AVH_MAPPER_BUILD
// Sends profiling info to log
//#define PROFILE_BUILD
// Use multiple weapons sounds for upgrades
//#define AVH_UPGRADE_SOUNDS
// Define to track and meter network messages, don't define to use basic HL networking
//#define USE_NETWORK_METERING
// Define to have server report server and player data to master server
//#define USE_UPP
#endif

View file

@ -119,7 +119,7 @@ public:
char buf[512];
strcpy(buf, text);
int len = strlen(buf);
size_t len = strlen(buf);
while (len && isspace(buf[--len]))
{
buf[len] = 0;

View file

@ -1,13 +1,13 @@
#include <assert.h>
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "studio.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "dlight.h"
#include "triangleapi.h"
#include "common/const.h"
#include "common/com_model.h"
#include "engine/studio.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "common/dlight.h"
#include "common/triangleapi.h"
#include <stdio.h>
#include <string.h>

View file

@ -3,13 +3,13 @@
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "studio.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "dlight.h"
#include "triangleapi.h"
#include "common/const.h"
#include "common/com_model.h"
#include "engine/studio.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "common/dlight.h"
#include "common/triangleapi.h"
#include <stdio.h>
#include <string.h>

View file

@ -20,7 +20,6 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include <string.h>
#include <stdio.h>
@ -29,7 +28,7 @@
#include "vgui_TeamFortressViewport.h"
#include "mod/AvHSharedUtil.h"
#include "mod/AvHScrollHandler.h"
#include "build.h"
#include "mod/AvHNetworkMessages.h"
WEAPON *gpActiveSel; // NULL means off, 1 means just the menu bar, otherwise
// this points to the active weapon menu item
@ -51,7 +50,6 @@ void __CmdFunc_LastInv(void)
void WeaponsResource::Init(void)
{
memset( rgWeapons, 0, sizeof rgWeapons );
lastWeapon = NULL;
HOOK_COMMAND("lastinv",LastInv);
Reset();
}
@ -100,25 +98,10 @@ int WeaponsResource::IsEnabled(WEAPON* p)
int WeaponsResource::IsSelectable(WEAPON* p)
{
int theIsSelectable = FALSE;
if(p != NULL )
if( p != NULL && HUD_GetWeaponEnabled(p->iId))
{
// char msg[1024];
// sprintf(msg, "Weapon %s: ", p->szName);
// ConsolePrint(msg);
if ( HUD_GetWeaponEnabled(p->iId))
{
theIsSelectable = TRUE;
// ConsolePrint("Enabled\n");
}
else
{
// ConsolePrint("Not Enabled\n");
}
theIsSelectable = TRUE;
}
// else
// {
// ConsolePrint("Null Weapon\n");
// }
return theIsSelectable;
}
@ -286,7 +269,7 @@ void WeaponsResource::SetCurrentWeapon(WEAPON* newWeapon)
WEAPON* currentWeapon = this->GetWeapon(gHUD.GetCurrentWeaponID());
// puzl: 497 - Because weapon state can get out of sync, we should allow this even if the weapons are the same
// && newWeapon != currentWeapon
if(newWeapon != NULL )
if( newWeapon != NULL )
{
lastWeapon = currentWeapon;
//if ( newWeapon != currentWeapon )
@ -478,15 +461,14 @@ void CHudAmmo::Think(void)
}
}
//voogru: This probably isnt a good place to do this for some reason in release mode this crashes aliens.
/*if(gHUD.GetIsAlien()) //check for hive death causing loss of current weapon
if(gHUD.GetIsAlien()) //check for hive death causing loss of current weapon
{
WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID());
if(!gWR.IsSelectable(currentWeapon)) //current weapon isn't valid
{
gWR.SetValidWeapon(); //get best option
}
}*/
}
if (!gpActiveSel)
return;
@ -608,11 +590,8 @@ void WeaponsResource :: SelectSlot( int iSlot, int fAdvance, int iDirection )
//
int CHudAmmo::MsgFunc_AmmoX(const char *pszName, int iSize, void *pbuf)
{
BEGIN_READ( pbuf, iSize );
int iIndex = READ_BYTE();
int iCount = READ_BYTE();
int iIndex, iCount;
NetMsg_AmmoX( pbuf, iSize, iIndex, iCount );
gWR.SetAmmo( iIndex, abs(iCount) );
return 1;
@ -620,9 +599,8 @@ int CHudAmmo::MsgFunc_AmmoX(const char *pszName, int iSize, void *pbuf)
int CHudAmmo::MsgFunc_AmmoPickup( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int iIndex = READ_BYTE();
int iCount = READ_BYTE();
int iIndex, iCount;
NetMsg_AmmoPickup( pbuf, iSize, iIndex, iCount );
// Add ammo to the history
gHR.AddToHistory( HISTSLOT_AMMO, iIndex, abs(iCount) );
@ -632,8 +610,8 @@ int CHudAmmo::MsgFunc_AmmoPickup( const char *pszName, int iSize, void *pbuf )
int CHudAmmo::MsgFunc_WeapPickup( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int iIndex = READ_BYTE();
int iIndex;
NetMsg_WeapPickup( pbuf, iSize, iIndex );
// Add the weapon to the history
gHR.AddToHistory( HISTSLOT_WEAP, iIndex );
@ -643,11 +621,11 @@ int CHudAmmo::MsgFunc_WeapPickup( const char *pszName, int iSize, void *pbuf )
int CHudAmmo::MsgFunc_ItemPickup( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
const char *szName = READ_STRING();
string szName;
NetMsg_ItemPickup( pbuf, iSize, szName );
// Add the weapon to the history
gHR.AddToHistory( HISTSLOT_ITEM, szName );
gHR.AddToHistory( HISTSLOT_ITEM, szName.c_str() );
return 1;
}
@ -655,9 +633,7 @@ int CHudAmmo::MsgFunc_ItemPickup( const char *pszName, int iSize, void *pbuf )
int CHudAmmo::MsgFunc_HideWeapon( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
gHUD.m_iHideHUDDisplay = READ_BYTE();
NetMsg_HideWeapon( pbuf, iSize, gHUD.m_iHideHUDDisplay );
if (gEngfuncs.IsSpectateOnly())
return 1;
@ -684,70 +660,56 @@ int CHudAmmo::MsgFunc_HideWeapon( const char *pszName, int iSize, void *pbuf )
int CHudAmmo::MsgFunc_CurWeapon(const char *pszName, int iSize, void *pbuf )
{
static wrect_t nullrc;
int fOnTarget = FALSE;
BEGIN_READ( pbuf, iSize );
int iState, iId, iClip;
NetMsg_CurWeapon( pbuf, iSize, iState, iId, iClip );
int iState = READ_BYTE();
int iId = READ_CHAR();
int iClip = READ_CHAR();
// puzl: 497 read enable state from the server ( assign it below )
int iEnabled = READ_BYTE();
// detect if we're also on target
if ( iState > 1 )
{
fOnTarget = TRUE;
}
if ( iId < 1 )
if ( iId < 1 ) //signal kills crosshairs if this condition is met...
{
gHUD.SetCurrentCrosshair(0, nullrc, 0, 0, 0);
return 0;
//previous version had return 0 here, so
//check for dead player below would never
//be reached.
}
bool bOnTarget = (iState && WEAPON_ON_TARGET); //used to track autoaim state
bool bIsCurrent = (iState && WEAPON_IS_CURRENT);
if ( g_iUser1 != OBS_IN_EYE )
{
// Is player dead???
if ((iId == -1) && (iClip == -1))
{
gHUD.m_fPlayerDead = TRUE;
gpActiveSel = NULL;
return 1;
}
gHUD.m_fPlayerDead = FALSE;
if ( iId == -1 && iClip == -1 )
{
gHUD.m_fPlayerDead = TRUE;
gpActiveSel = NULL;
return 1;
}
gHUD.m_fPlayerDead = FALSE;
}
if( !bIsCurrent )
{ return 1; }
WEAPON *pWeapon = gWR.GetWeapon( iId );
if ( !pWeapon )
return 0;
pWeapon->iEnabled=iEnabled;
if ( iClip < -1 )
pWeapon->iClip = abs(iClip);
else
pWeapon->iClip = iClip;
if ( iState == 0 ) // we're not the current weapon, so update no more
return 1;
if( pWeapon == NULL ) //don't have the weapon described in our resource list
{ return 0; }
m_pWeapon = pWeapon;
m_pWeapon->iEnabled = (iState && WEAPON_IS_ENABLED) ? TRUE : FALSE;
m_pWeapon->iClip = abs(iClip);
if ( !(gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL )) )
{
if ( gHUD.m_iFOV >= 90 )
{ // normal crosshairs
if (fOnTarget && m_pWeapon->hAutoaim)
if (bOnTarget && m_pWeapon->hAutoaim)
gHUD.SetCurrentCrosshair(m_pWeapon->hAutoaim, m_pWeapon->rcAutoaim, 255, 255, 255);
else
gHUD.SetCurrentCrosshair(m_pWeapon->hCrosshair, m_pWeapon->rcCrosshair, 255, 255, 255);
}
else
{ // zoomed crosshairs
if (fOnTarget && m_pWeapon->hZoomedAutoaim)
if (bOnTarget && m_pWeapon->hZoomedAutoaim)
gHUD.SetCurrentCrosshair(m_pWeapon->hZoomedAutoaim, m_pWeapon->rcZoomedAutoaim, 255, 255, 255);
else
gHUD.SetCurrentCrosshair(m_pWeapon->hZoomedCrosshair, m_pWeapon->rcZoomedCrosshair, 255, 255, 255);
@ -765,34 +727,26 @@ int CHudAmmo::MsgFunc_CurWeapon(const char *pszName, int iSize, void *pbuf )
//
int CHudAmmo::MsgFunc_WeaponList(const char *pszName, int iSize, void *pbuf )
{
WeaponList weapon_data;
NetMsg_WeaponList( pbuf, iSize, weapon_data );
BEGIN_READ( pbuf, iSize );
WEAPON Weapon;
strcpy( Weapon.szName, READ_STRING() );
Weapon.iAmmoType = (int)READ_CHAR();
Weapon.iMax1 = READ_BYTE();
if (Weapon.iMax1 == 255)
Weapon.iMax1 = -1;
Weapon.iAmmo2Type = READ_CHAR();
Weapon.iMax2 = READ_BYTE();
if (Weapon.iMax2 == 255)
Weapon.iMax2 = -1;
Weapon.iSlot = READ_CHAR();
Weapon.iSlotPos = READ_CHAR();
Weapon.iId = READ_CHAR();
Weapon.iFlags = READ_BYTE();
strcpy( Weapon.szName, weapon_data.weapon_name.c_str() );
Weapon.iAmmoType = weapon_data.ammo1_type;
Weapon.iMax1 = weapon_data.ammo1_max_amnt == 255 ? -1 : weapon_data.ammo1_max_amnt;
Weapon.iAmmo2Type = weapon_data.ammo2_type;
Weapon.iMax2 = weapon_data.ammo2_max_amnt == 255 ? -1 : weapon_data.ammo2_max_amnt;
Weapon.iSlot = weapon_data.bucket;
Weapon.iSlotPos = weapon_data.bucket_pos;
Weapon.iId = weapon_data.bit_index;
Weapon.iFlags = weapon_data.flags;
Weapon.iClip = 0;
// puzl: 497 - default value for enable state
Weapon.iEnabled = 0;
gWR.AddWeapon( &Weapon );
return 1;
}
//------------------------------------------------------------------------
@ -868,54 +822,6 @@ void CHudAmmo::UserCmd_Close(void)
const char* theSound = AvHSHUGetCommonSoundName(gHUD.GetIsAlien(), WEAPON_SOUND_HUD_OFF);
gHUD.PlayHUDSound(theSound, kHUDSoundVolume);
}
else
{
bool thePotentiallyEnableOptionsScreen = false;
bool theOptionsScreenEnabled = false;
#ifdef DEBUG
thePotentiallyEnableOptionsScreen = true;
#endif
#ifdef AVH_PLAYTEST_BUILD
thePotentiallyEnableOptionsScreen = true;
if(thePotentiallyEnableOptionsScreen)
{
if(!gHUD.GetInTopDownMode())
{
if(gHUD.GetBalanceInts().size() > 0)
{
theOptionsScreenEnabled = true;
}
}
}
#endif
if(theOptionsScreenEnabled)
{
// Toggle game options menu
if(gViewPort->IsOptionsMenuVisible())
{
gViewPort->HideOptionsMenu();
}
else
{
gViewPort->ShowOptionsMenu();
}
}
else
{
if(gHUD.GetInTopDownMode())
{
gHUD.Cancel();
}
else
{
ClientCmd("escape");
}
}
}
}

View file

@ -22,16 +22,9 @@
#include "cl_util.h"
#include <string.h>
#include <stdio.h>
#include "parsemsg.h"
DECLARE_MESSAGE( m_AmmoSecondary, SecAmmoVal );
DECLARE_MESSAGE( m_AmmoSecondary, SecAmmoIcon );
int CHudAmmoSecondary :: Init( void )
{
HOOK_MESSAGE( SecAmmoVal );
HOOK_MESSAGE( SecAmmoIcon );
gHUD.AddHudElem(this);
m_HUD_ammoicon = 0;
@ -109,51 +102,3 @@ int CHudAmmoSecondary :: Draw(float flTime)
return 1;
}
// Message handler for Secondary Ammo Value
// accepts one value:
// string: sprite name
int CHudAmmoSecondary :: MsgFunc_SecAmmoIcon( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_HUD_ammoicon = gHUD.GetSpriteIndex( READ_STRING() );
return 1;
}
// Message handler for Secondary Ammo Icon
// Sets an ammo value
// takes two values:
// byte: ammo index
// byte: ammo value
int CHudAmmoSecondary :: MsgFunc_SecAmmoVal( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int index = READ_BYTE();
if ( index < 0 || index >= MAX_SEC_AMMO_VALUES )
return 1;
m_iAmmoAmounts[index] = READ_BYTE();
m_iFlags |= HUD_ACTIVE;
// check to see if there is anything left to draw
int count = 0;
for ( int i = 0; i < MAX_SEC_AMMO_VALUES; i++ )
{
count += max( 0, m_iAmmoAmounts[i] );
}
if ( count == 0 )
{ // the ammo fields are all empty, so turn off this hud area
m_iFlags &= ~HUD_ACTIVE;
return 1;
}
// make the icons light up
m_fFade = 200.0f;
return 1;
}

View file

@ -19,7 +19,6 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include <string.h>
#include <stdio.h>

View file

@ -20,12 +20,12 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include <string.h>
#include <stdio.h>
#include "mod/AvHPlayerUpgrade.h"
#include "mod/AvHHudConstants.h"
#include "mod/AvHNetworkMessages.h"
DECLARE_MESSAGE(m_Battery, Battery)
@ -61,8 +61,8 @@ int CHudBattery:: MsgFunc_Battery(const char *pszName, int iSize, void *pbuf )
m_iFlags |= HUD_ACTIVE;
BEGIN_READ( pbuf, iSize );
int x = READ_SHORT();
int x;
NetMsg_Battery( pbuf, iSize, x );
if (x != m_iBat)
{

View file

@ -20,14 +20,11 @@
#include "hud.h"
#include "cl_util.h"
#include "netadr.h"
#include "common/netadr.h"
#include "vgui_schememanager.h"
#include "particles/papi.h"
#include <papi.h>
//extern "C"
//{
#include "pm_shared.h"
//}
#include "pm_shared/pm_shared.h"
#include <string.h>
#include "hud_servers.h"
@ -36,8 +33,8 @@
#include "mod\AvHUIFactory.h"
#include "mod\AvHParticleSystemManager.h"
#include "mod\AvHHulls.h"
#include "interface.h"
#include "ITrackerUser.h"
#include "common/interface.h"
#include "common/ITrackerUser.h"
#include "engine/APIProxy.h"
#include "cl_dll/Exports.h"
@ -383,7 +380,7 @@ void CL_DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf )
#if defined( FINAL_VAC_BUILD )
#ifdef FINAL_VAC_BUILD
cldll_func_dst_t *g_pcldstAddrs;

View file

@ -16,7 +16,6 @@ private:
int m_iSpriteCount;
int m_iSpriteCountAllRes;
float m_flMouseSensitivity;
int m_iConcussionEffect;
public:
@ -29,7 +28,6 @@ public:
int m_iKeyBits;
int m_iHideHUDDisplay;
int m_iFOV;
int m_Teamplay;
int m_iRes;
cvar_t *m_pCvarStealMouse;
cvar_t *m_pCvarDraw;
@ -97,14 +95,10 @@ public:
~CHud(); // destructor, frees allocated memory
// user messages
int _cdecl MsgFunc_Damage(const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_GameMode(const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_Logo(const char *pszName, int iSize, void *pbuf);
int _cdecl MsgFunc_ResetHUD(const char *pszName, int iSize, void *pbuf);
void _cdecl MsgFunc_InitHUD( const char *pszName, int iSize, void *pbuf );
void _cdecl MsgFunc_ViewMode( const char *pszName, int iSize, void *pbuf );
int _cdecl MsgFunc_SetFOV(const char *pszName, int iSize, void *pbuf);
int _cdecl MsgFunc_Concuss( const char *pszName, int iSize, void *pbuf );
// Screen information
SCREENINFO m_scrinfo;

View file

@ -184,30 +184,6 @@ private:
};
//
//-----------------------------------------------------
//
// REMOVED: Vgui has replaced this.
//
/*
class CHudMOTD : public CHudBase
{
public:
int Init( void );
int VidInit( void );
int Draw( float flTime );
void Reset( void );
int MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf );
protected:
static int MOTD_DISPLAY_TIME;
char m_szMOTD[ MAX_MOTD_LENGTH ];
float m_flActiveRemaining;
int m_iLines;
};
*/
//
//-----------------------------------------------------
//
@ -243,43 +219,7 @@ protected:
float *m_pflNameColors[MAX_STATUSBAR_LINES];
};
//
//-----------------------------------------------------
//
// REMOVED: Vgui has replaced this.
//
/*
class CHudScoreboard: public CHudBase
{
public:
int Init( void );
void InitHUDData( void );
int VidInit( void );
int Draw( float flTime );
int DrawPlayers( int xoffset, float listslot, int nameoffset = 0, char *team = NULL ); // returns the ypos where it finishes drawing
void UserCmd_ShowScores( void );
void UserCmd_HideScores( void );
int MsgFunc_ScoreInfo( const char *pszName, int iSize, void *pbuf );
int MsgFunc_TeamInfo( const char *pszName, int iSize, void *pbuf );
int MsgFunc_TeamScore( const char *pszName, int iSize, void *pbuf );
void DeathMsg( int killer, int victim );
int m_iNumTeams;
int m_iLastKilledBy;
int m_fLastKillTime;
int m_iPlayerNum;
int m_iShowscoresHeld;
void GetAllPlayersInfo( void );
private:
struct cvar_s *cl_showpacketloss;
};
*/
#define CUSTOM_ICON_LENGTH 32
class ScoreboardIcon;
struct extra_player_info_t
{
@ -292,9 +232,7 @@ struct extra_player_info_t
short playerclass;
short teamnumber;
char teamname[MAX_TEAM_NAME];
short auth;
short color;
char customicon[CUSTOM_ICON_LENGTH + 3]; //last 3 characters is the color.
ScoreboardIcon* icon;
};
struct team_info_t
@ -524,7 +462,6 @@ public:
int VidInit( void );
void Reset( void );
int Draw(float flTime);
int MsgFunc_StatusIcon(const char *pszName, int iSize, void *pbuf);
enum {
MAX_ICONSPRITENAME_LENGTH = MAX_SPRITE_NAME_LENGTH,

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
#ifndef CL_UTIL_H
#define CL_UTIL_H
#include "cvardef.h"
#include "common/cvardef.h"
#include "common/vector_util.h"
#include "vgui_Panel.h"
#include "types.h"

View file

@ -20,9 +20,9 @@
#include "cl_util.h"
#include "com_weapons.h"
#include "const.h"
#include "entity_state.h"
#include "r_efx.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/r_efx.h"
// g_runfuncs is true if this is the first time we've "predicated" a particular movement/firing
// command. If it is 1, then we should play events/sounds etc., otherwise, we just will be
@ -58,7 +58,12 @@ void COM_Log( char *pszFile, char *fmt, ...)
}
va_start (argptr,fmt);
#ifdef WIN32
//overflow protection in MS version of function...
_vsnprintf( string, 1023, fmt, argptr );
#else
vsprintf (string, fmt,argptr);
#endif
va_end (argptr);
fp = fopen( pfilename, "a+t");

View file

@ -17,7 +17,6 @@
//
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include <string.h>
#include <stdio.h>
@ -25,6 +24,7 @@
#include "vgui_TeamFortressViewport.h"
#include "mod/AvHHudConstants.h"
#include "pm_shared/pm_shared.h"
#include "mod/AvHNetworkMessages.h"
DECLARE_MESSAGE( m_DeathNotice, DeathMsg );
@ -60,9 +60,6 @@ float* GetClientColor(int clientIndex)
{
int theTeamNumber = g_PlayerExtraInfo[clientIndex].teamnumber;
return kFTeamColors[theTeamNumber];
// outColor[0] = kTeamColors[theTeamNumber][0];
// outColor[1] = kTeamColors[theTeamNumber][1];
// outColor[2] = kTeamColors[theTeamNumber][2];
}
int CHudDeathNotice :: Init( void )
@ -100,8 +97,8 @@ int CHudDeathNotice :: Draw( float flTime )
break; // we've gone through them all
if ( rgDeathNoticeList[i].flDisplayTime < flTime )
{ // display time has expired
// remove the current item from the list
{
// display time has expired, remove the current item from the list
memmove( &rgDeathNoticeList[i], &rgDeathNoticeList[i+1], sizeof(DeathNoticeItem) * (MAX_DEATHNOTICES - i) );
i--; // continue on the next item; stop the counter getting incremented
continue;
@ -185,14 +182,9 @@ int CHudDeathNotice :: MsgFunc_DeathMsg( const char *pszName, int iSize, void *p
{
m_iFlags |= HUD_ACTIVE;
BEGIN_READ( pbuf, iSize );
int killer = READ_BYTE();
int victim = READ_BYTE();
char killedwith[32];
strcpy( killedwith, "d_" );
strncat( killedwith, READ_STRING(), 32 );
int killer, victim;
string killed_with;
NetMsg_DeathMsg( pbuf, iSize, killer, victim, killed_with );
if (gViewPort)
gViewPort->DeathMsg( killer, victim );
@ -250,19 +242,19 @@ int CHudDeathNotice :: MsgFunc_DeathMsg( const char *pszName, int iSize, void *p
rgDeathNoticeList[i].iNonPlayerKill = TRUE;
// Store the object's name in the Victim slot (skip the d_ bit)
strcpy( rgDeathNoticeList[i].szVictim, killedwith+2 );
strcpy( rgDeathNoticeList[i].szVictim, killed_with.c_str()+2 );
}
else
{
if ( killer == victim || killer == 0 )
rgDeathNoticeList[i].iSuicide = TRUE;
if ( !strcmp( killedwith, "d_teammate" ) )
if ( !strcmp( killed_with.c_str(), "d_teammate" ) )
rgDeathNoticeList[i].iTeamKill = TRUE;
}
// Find the sprite in the list
int spr = gHUD.GetSpriteIndex( killedwith );
int spr = gHUD.GetSpriteIndex( killed_with.c_str() );
rgDeathNoticeList[i].iId = spr;
@ -283,7 +275,7 @@ int CHudDeathNotice :: MsgFunc_DeathMsg( const char *pszName, int iSize, void *p
{
ConsolePrint( rgDeathNoticeList[i].szVictim );
if ( !strcmp( killedwith, "d_world" ) )
if ( !strcmp( killed_with.c_str(), "d_world" ) )
{
ConsolePrint( " died" );
}
@ -305,17 +297,16 @@ int CHudDeathNotice :: MsgFunc_DeathMsg( const char *pszName, int iSize, void *p
ConsolePrint( rgDeathNoticeList[i].szVictim );
}
if ( killedwith && *killedwith && (*killedwith > 13 ) && strcmp( killedwith, "d_world" ) && !rgDeathNoticeList[i].iTeamKill )
if ( !killed_with.empty() && killed_with != "d_world" && !rgDeathNoticeList[i].iTeamKill )
{
ConsolePrint( " with " );
// replace the code names with the 'real' names
if ( !strcmp( killedwith+2, "egon" ) )
strcpy( killedwith, "d_gluon gun" );
if ( !strcmp( killedwith+2, "gauss" ) )
strcpy( killedwith, "d_tau cannon" );
ConsolePrint( killedwith+2 ); // skip over the "d_" part
if ( killed_with == "d_egon" )
killed_with = "d_gluon gun";
if ( killed_with == "gauss" )
killed_with = "d_tau cannon";
ConsolePrint( killed_with.c_str()+2 ); // skip over the "d_" part
}
ConsolePrint( "\n" );

View file

@ -15,7 +15,7 @@
#include "hud.h"
#include "cl_util.h"
#include "demo.h"
#include "demo_api.h"
#include "common/demo_api.h"
#include <memory.h>
#include "engine/APIProxy.h"
@ -204,7 +204,7 @@ int GetDataSize(const string& inString)
int theSize = sizeof(int);
// String data
theSize += inString.length();
theSize += (int)inString.length();
return theSize;
}
@ -253,7 +253,7 @@ void SaveData(unsigned char* inBuffer, const void* inData, int inSizeToCopy, int
// Save out string, works for empty strings
void SaveStringData(unsigned char* inBuffer, const string& inString, int& inSizeVariable)
{
int theStringLength = inString.length();
int theStringLength = (int)inString.length();
// Write out string length
memcpy(inBuffer + inSizeVariable, &theStringLength, sizeof(int));

View file

@ -4,13 +4,13 @@
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_types.h"
#include "studio_event.h" // def. of mstudioevent_t
#include "r_efx.h"
#include "event_api.h"
#include "pm_defs.h"
#include "pmtrace.h"
#include "common/const.h"
#include "common/entity_types.h"
#include "common/studio_event.h" // def. of mstudioevent_t
#include "common/r_efx.h"
#include "common/event_api.h"
#include "pm_shared/pm_defs.h"
#include "common/pmtrace.h"
#include "pm_shared/pm_shared.h"
#include "mod/AvHParticleSystemManager.h"
#include "mod/AvHSpecials.h"
@ -36,11 +36,6 @@ int CL_DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *m
{
RecClAddEntity(type, ent, modelname);
if(ent->curstate.iuser3 == AVH_USER3_MARINE_PLAYER)
{
int a = 0;
}
gHUD.ClientProcessEntity(&ent->curstate);
// Particle entities have a model so they will be forced through this function,
@ -787,10 +782,12 @@ void CL_DLLEXPORT HUD_TempEntUpdate (
float s, c;
s = sin( pTemp->entity.baseline.origin[2] + fastFreq );
c = cos( pTemp->entity.baseline.origin[2] + fastFreq );
#pragma warning(push)
#pragma warning(disable: 311)
pTemp->entity.origin[0] += pTemp->entity.baseline.origin[0] * frametime + 8 * sin( client_time * 20 + (int)pTemp );
pTemp->entity.origin[1] += pTemp->entity.baseline.origin[1] * frametime + 4 * sin( client_time * 30 + (int)pTemp );
pTemp->entity.origin[2] += pTemp->entity.baseline.origin[2] * frametime;
#pragma warning(pop)
}
else

View file

@ -15,15 +15,15 @@
// shared event functions
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "r_efx.h"
#include "common/r_efx.h"
#include "eventscripts.h"
#include "event_api.h"
#include "pm_shared.h"
#include "common/event_api.h"
#include "pm_shared/pm_shared.h"
#define IS_FIRSTPERSON_SPEC ( g_iUser1 == OBS_IN_EYE)
/*

View file

@ -15,20 +15,20 @@
//#include "hud.h"
#include "mod/AvHHud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "entity_types.h"
#include "usercmd.h"
#include "pm_defs.h"
#include "pm_materials.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "common/entity_types.h"
#include "common/usercmd.h"
#include "pm_shared/pm_defs.h"
#include "pm_shared/pm_materials.h"
#include "eventscripts.h"
#include "ev_hldm.h"
#include "r_efx.h"
#include "event_api.h"
#include "event_args.h"
#include "common/r_efx.h"
#include "common/event_api.h"
#include "common/event_args.h"
#include "in_defs.h"
#include "mod/AvHBasePlayerWeaponConstants.h"
#include "mod/AvHMarineWeaponConstants.h"
@ -39,7 +39,7 @@ static int tracerCount[ 32 ];
extern AvHHud gHUD;
#include "r_studioint.h"
#include "com_model.h"
#include "common/com_model.h"
extern engine_studio_api_t IEngineStudio;
@ -621,10 +621,10 @@ void EV_HLDM_FireBulletsPlayer( int idx, float *forward, float *right, float *up
case BULLET_PLAYER_BUCKSHOT:
if ( !tracer )
{
theSoundProbability = BALANCE_IVAR(kSGBulletsPerShot)/2;
theSoundProbability = BALANCE_VAR(kSGBulletsPerShot)/2;
EV_HLDM_PlayTextureSound( idx, &tr, vecSrc, vecEnd, iBulletType, theSoundProbability);
theSoundProbability = BALANCE_IVAR(kSGBulletsPerShot)/2;
theSoundProbability = BALANCE_VAR(kSGBulletsPerShot)/2;
EV_HLDM_DecalGunshot( &tr, iBulletType, theSoundProbability);
if(thePlayBulletHitEffect)

View file

@ -1,6 +1,4 @@
#include "build.h"
#if defined( FINAL_VAC_BUILD )
#define CL_DLLEXPORT
#else

View file

@ -20,7 +20,7 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
#include <string.h>
#include <stdio.h>
@ -72,25 +72,14 @@ int CHudFlashlight::VidInit(void)
int CHudFlashlight:: MsgFunc_FlashBat(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int x = READ_BYTE();
m_iBat = x;
m_flBat = ((float)x)/100.0;
return 1;
//this message is a lame duck in NS
return 0;
}
int CHudFlashlight:: MsgFunc_Flashlight(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_fOn = READ_BYTE();
int x = READ_BYTE();
m_iBat = x;
m_flBat = ((float)x)/100.0;
NetMsg_Flashlight( pbuf, iSize, m_fOn, m_iBat );
m_flBat = ((float)m_iBat)/100.0;
return 1;
}

View file

@ -24,7 +24,7 @@
#include <time.h>
#include <stdio.h>
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
DECLARE_MESSAGE(m_Geiger, Geiger )
@ -49,13 +49,9 @@ int CHudGeiger::VidInit(void)
int CHudGeiger::MsgFunc_Geiger(const char *pszName, int iSize, void *pbuf)
{
BEGIN_READ( pbuf, iSize );
// update geiger data
m_iGeigerRange = READ_BYTE();
m_iGeigerRange = m_iGeigerRange << 2;
//update geiger data
NetMsg_GeigerRange( pbuf, iSize, m_iGeigerRange );
m_iGeigerRange <<= 2;
m_iFlags |= HUD_ACTIVE;
return 1;
@ -63,122 +59,5 @@ int CHudGeiger::MsgFunc_Geiger(const char *pszName, int iSize, void *pbuf)
int CHudGeiger::Draw (float flTime)
{
/*
int pct;
float flvol;
int rg[3];
int i;
if (m_iGeigerRange < 1000 && m_iGeigerRange > 0)
{
// peicewise linear is better than continuous formula for this
if (m_iGeigerRange > 800)
{
pct = 0; //Con_Printf ( "range > 800\n");
}
else if (m_iGeigerRange > 600)
{
pct = 2;
flvol = 0.4; //Con_Printf ( "range > 600\n");
rg[0] = 1;
rg[1] = 1;
i = 2;
}
else if (m_iGeigerRange > 500)
{
pct = 4;
flvol = 0.5; //Con_Printf ( "range > 500\n");
rg[0] = 1;
rg[1] = 2;
i = 2;
}
else if (m_iGeigerRange > 400)
{
pct = 8;
flvol = 0.6; //Con_Printf ( "range > 400\n");
rg[0] = 1;
rg[1] = 2;
rg[2] = 3;
i = 3;
}
else if (m_iGeigerRange > 300)
{
pct = 8;
flvol = 0.7; //Con_Printf ( "range > 300\n");
rg[0] = 2;
rg[1] = 3;
rg[2] = 4;
i = 3;
}
else if (m_iGeigerRange > 200)
{
pct = 28;
flvol = 0.78; //Con_Printf ( "range > 200\n");
rg[0] = 2;
rg[1] = 3;
rg[2] = 4;
i = 3;
}
else if (m_iGeigerRange > 150)
{
pct = 40;
flvol = 0.80; //Con_Printf ( "range > 150\n");
rg[0] = 3;
rg[1] = 4;
rg[2] = 5;
i = 3;
}
else if (m_iGeigerRange > 100)
{
pct = 60;
flvol = 0.85; //Con_Printf ( "range > 100\n");
rg[0] = 3;
rg[1] = 4;
rg[2] = 5;
i = 3;
}
else if (m_iGeigerRange > 75)
{
pct = 80;
flvol = 0.9; //Con_Printf ( "range > 75\n");
//gflGeigerDelay = cl.time + GEIGERDELAY * 0.75;
rg[0] = 4;
rg[1] = 5;
rg[2] = 6;
i = 3;
}
else if (m_iGeigerRange > 50)
{
pct = 90;
flvol = 0.95; //Con_Printf ( "range > 50\n");
rg[0] = 5;
rg[1] = 6;
i = 2;
}
else
{
pct = 95;
flvol = 1.0; //Con_Printf ( "range < 50\n");
rg[0] = 5;
rg[1] = 6;
i = 2;
}
flvol = (flvol * ((rand() & 127)) / 255) + 0.25; // UTIL_RandomFloat(0.25, 0.5);
if ((rand() & 127) < pct || (rand() & 127) < pct)
{
//S_StartDynamicSound (-1, 0, rgsfx[rand() % i], r_origin, flvol, 1.0, 0, 100);
char sz[256];
int j = rand() & 1;
if (i > 2)
j += rand() & 1;
sprintf(sz, "player/geiger%d.wav", j + 1);
//PlaySound(sz, flvol);
}
}
*/
return 1;
}

View file

@ -24,14 +24,13 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include <string.h>
#include "mod/AvHHudConstants.h"
#include "mod/AvHPlayerUpgrade.h"
#include "mod/AvHNetworkMessages.h"
DECLARE_MESSAGE(m_Health, Health )
DECLARE_MESSAGE(m_Health, Damage )
//DECLARE_MESSAGE(m_Health, ClCorpse );
#define PAIN_NAME "sprites/%d_pain.spr"
#define DAMAGE_NAME "sprites/%d_dmg.spr"
@ -103,13 +102,10 @@ int CHudHealth::VidInit(void)
int CHudHealth:: MsgFunc_Health(const char *pszName, int iSize, void *pbuf )
{
int theBytesRead = 0;
int x;
NetMsg_Health( pbuf, iSize, x );
// TODO: update local health data
BEGIN_READ( pbuf, iSize );
int x = READ_SHORT();
theBytesRead += 2;
m_iFlags |= HUD_ACTIVE;
// Only update the fade if we've changed health
@ -120,22 +116,21 @@ int CHudHealth:: MsgFunc_Health(const char *pszName, int iSize, void *pbuf )
m_iHealth = x;
}
return theBytesRead;
return 2;
}
int CHudHealth:: MsgFunc_Damage(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int armor = READ_BYTE(); // armor
int damageTaken = READ_BYTE(); // health
long bitsDamage = READ_LONG(); // damage bits
int armor, damageTaken;
long bitsDamage;
float origin[3];
NetMsg_Damage( pbuf, iSize, armor, damageTaken, bitsDamage, origin );
vec3_t vecFrom;
for ( int i = 0 ; i < 3 ; i++)
vecFrom[i] = READ_COORD();
vecFrom[i] = origin[i];
UpdateTiles(gHUD.m_flTime, bitsDamage);
@ -489,36 +484,3 @@ void CHudHealth::UpdateTiles(float flTime, long bitsDamage)
void CreateCorpse ( Vector vOrigin, Vector vAngles, const char *pModel, float flAnimTime, int iSequence, int iBody );
//int CHudHealth::MsgFunc_ClCorpse( const char *pszName, int iSize, void *pbuf )
//{
// BEGIN_READ( pbuf, iSize );
//
// char szModel[64];
// Vector vOrigin;
// Vector vAngles;
// float flAnimTime = 0;
// int iSequence = 0;
// int iBody = 0;
//
// char *pModel = READ_STRING();
//
// sprintf ( szModel, "models/player/%s/%s.mdl", pModel, pModel );
//
// vOrigin.x = READ_LONG(); vOrigin.x /= 128.0f;
// vOrigin.y = READ_LONG(); vOrigin.y /= 128.0f;
// vOrigin.z = READ_LONG(); vOrigin.z /= 128.0f;
//
// vAngles.x = READ_COORD();
// vAngles.y = READ_COORD();
// vAngles.z = READ_COORD();
//
// flAnimTime = ((float)READ_LONG()/100.0f) + gEngfuncs.GetClientTime();
//
// iSequence = READ_BYTE();
// iBody = READ_BYTE();
//
// CreateCorpse ( vOrigin, vAngles, szModel, flAnimTime, iSequence, iBody );
//
// return 1;
//}

View file

@ -93,7 +93,6 @@ public:
virtual int VidInit( void );
virtual int Draw(float fTime);
virtual void Reset( void );
//int MsgFunc_ClCorpse(const char *pszName, int iSize, void *pbuf);
int MsgFunc_Health(const char *pszName, int iSize, void *pbuf);
int MsgFunc_Damage(const char *pszName, int iSize, void *pbuf);
int m_iHealth;

View file

@ -21,18 +21,17 @@ This file contains "stubs" of class member implementations so that we can predic
add in the functionality you need.
==========================
*/
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "player.h"
#include "weapons.h"
#include "nodes.h"
#include "soundent.h"
#include "skill.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "dlls/player.h"
#include "dlls/weapons.h"
#include "dlls/nodes.h"
#include "dlls/soundent.h"
#include "dlls/skill.h"
// Globals used by game logic
const Vector g_vecZero = Vector( 0, 0, 0 );
int gmsgWeapPickup = 0;
enginefuncs_t g_engfuncs;
globalvars_t *gpGlobals;
@ -205,10 +204,7 @@ void CBasePlayer::SelectNextItem( int iItem ) { }
BOOL CBasePlayer::HasWeapons( void ) { return FALSE; }
void CBasePlayer::SelectPrevItem( int iItem ) { }
CBaseEntity *FindEntityForward( CBaseEntity *pMe ) { return NULL; }
BOOL CBasePlayer :: FlashlightIsOn( void ) { return FALSE; }
void CBasePlayer :: FlashlightTurnOn( void ) { }
void CBasePlayer :: FlashlightTurnOff( void ) { }
void CBasePlayer :: ForceClientDllUpdate( void ) { }
void CBasePlayer::ForceClientDllUpdate( void ) { }
void CBasePlayer::ImpulseCommands( ) { }
void CBasePlayer::CheatImpulseCommands( int iImpulse ) { }
int CBasePlayer::AddPlayerItem( CBasePlayerItem *pItem ) { return FALSE; }

View file

@ -73,8 +73,7 @@ void Game_HookEvents( void )
// gEngfuncs.pfnHookEvent( "events/gaussspin.sc", EV_SpinGauss );
// gEngfuncs.pfnHookEvent( "events/train.sc", EV_TrainPitchAdjust );
// Hook marine weapons
AVH_HOOK_EVENT(kMGEventName);
// AVH_HOOK_EVENT(kMGEventName);
// gEngfuncs.pfnHookEvent("events/train.sc", EV_TrainPitchAdjust);
// gEngfuncs.pfnHookEvent( "events/glock1.sc", EV_FireGlock1 );

View file

@ -16,15 +16,15 @@
#include "../cl_util.h"
#include "../demo.h"
#include "demo_api.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "common/demo_api.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "pm_defs.h"
#include "event_api.h"
#include "entity_types.h"
#include "r_efx.h"
#include "pm_shared/pm_defs.h"
#include "common/event_api.h"
#include "common/entity_types.h"
#include "common/r_efx.h"
extern BEAM *pBeam;
extern BEAM *pBeam2;

View file

@ -43,9 +43,9 @@
****/
#include "../hud.h"
#include "../cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "../demo.h"
#include "common/usercmd.h"
#include "common/event_flags.h"
@ -53,29 +53,21 @@
#include "cl_dll/com_weapons.h"
#include "cl_dll/ammo.h"
#include "cl_dll/ammohistory.h"
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "weapons.h"
#include "nodes.h"
#include "player.h"
#include "dlls/extdll.h"
#include "dlls/util.h"
#include "dlls/cbase.h"
#include "dlls/monsters.h"
#include "dlls/weapons.h"
#include "dlls/nodes.h"
#include "dlls/player.h"
#include "mod/AvHEvents.h"
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "weapons.h"
#include "nodes.h"
#include "player.h"
#include "usercmd.h"
#include "entity_state.h"
#include "demo_api.h"
#include "pm_defs.h"
#include "event_api.h"
#include "r_efx.h"
#include "common/usercmd.h"
#include "common/entity_state.h"
#include "common/demo_api.h"
#include "pm_shared/pm_defs.h"
#include "common/event_api.h"
#include "common/r_efx.h"
#include "../hud_iface.h"
#include "../com_weapons.h"
@ -185,7 +177,12 @@ void AlertMessage( ALERT_TYPE atype, char *szFmt, ... )
static char string[1024];
va_start (argptr, szFmt);
#ifdef WIN32
//overflow protection in MS version of function...
_vsnprintf( string, 1023, szFmt, argptr );
#else
vsprintf (string, szFmt,argptr);
#endif
va_end (argptr);
gEngfuncs.Con_Printf( "cl: " );
@ -840,25 +837,6 @@ void HUD_InitClientWeapons( void )
gBlinkEffectSuccessEventID = PRECACHE_EVENT(1, kBlinkEffectSuccessEventName);
}
/*
=====================
=======
HUD_PrepEntity( &g_Glock , &player );
HUD_PrepEntity( &g_Crowbar , &player );
HUD_PrepEntity( &g_Python , &player );
HUD_PrepEntity( &g_Mp5 , &player );
HUD_PrepEntity( &g_Crossbow , &player );
HUD_PrepEntity( &g_Shotgun , &player );
HUD_PrepEntity( &g_Rpg , &player );
HUD_PrepEntity( &g_Gauss , &player );
HUD_PrepEntity( &g_Egon , &player );
HUD_PrepEntity( &g_HGun , &player );
HUD_PrepEntity( &g_HandGren , &player );
HUD_PrepEntity( &g_Satchel , &player );
HUD_PrepEntity( &g_Tripmine , &player );
HUD_PrepEntity( &g_Snark , &player );
}
/*
=====================
HUD_GetLastOrg
@ -1396,19 +1374,11 @@ void CL_DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state
g_runfuncs = runfuncs;
#if defined( CLIENT_WEAPONS )
// if(from->client.m_iId != WEAPON_GLOCK)
// {
// int a = 0;
// }
if ( cl_lw && cl_lw->value )
{
HUD_WeaponsPostThink( from, to, cmd, time, random_seed );
}
else
#endif
{
to->client.fov = g_lastFOV;
}

View file

@ -22,17 +22,17 @@
#include "cl_util.h"
#include <string.h>
#include <stdio.h>
#include "parsemsg.h"
#include "hud_servers.h"
#include "vgui_TeamFortressViewport.h"
#include "vgui_int.h"
#include "demo.h"
#include "demo_api.h"
#include "common/demo_api.h"
#include "ui/UIComponent.h"
#include "vgui_scorepanel.h"
#include "mod/ChatPanel.h"
#include "mod/AvHNetworkMessages.h"
#include "ui/ChatPanel.h"
class CHLVoiceStatusHelper : public IVoiceStatusHelper
{
@ -97,13 +97,6 @@ cvar_t *cl_lw = NULL;
void ShutdownInput (void);
//DECLARE_MESSAGE(m_Logo, Logo)
int __MsgFunc_Logo(const char *pszName, int iSize, void *pbuf)
{
return gHUD.MsgFunc_Logo(pszName, iSize, pbuf );
}
//DECLARE_MESSAGE(m_Logo, Logo)
int __MsgFunc_ResetHUD(const char *pszName, int iSize, void *pbuf)
{
return gHUD.MsgFunc_ResetHUD(pszName, iSize, pbuf );
@ -112,7 +105,7 @@ int __MsgFunc_ResetHUD(const char *pszName, int iSize, void *pbuf)
int __MsgFunc_InitHUD(const char *pszName, int iSize, void *pbuf)
{
gHUD.MsgFunc_InitHUD( pszName, iSize, pbuf );
return 1;
return 0;
}
int __MsgFunc_ViewMode(const char *pszName, int iSize, void *pbuf)
@ -126,89 +119,6 @@ int __MsgFunc_SetFOV(const char *pszName, int iSize, void *pbuf)
return gHUD.MsgFunc_SetFOV( pszName, iSize, pbuf );
}
int __MsgFunc_Concuss(const char *pszName, int iSize, void *pbuf)
{
return gHUD.MsgFunc_Concuss( pszName, iSize, pbuf );
}
int __MsgFunc_GameMode(const char *pszName, int iSize, void *pbuf )
{
return gHUD.MsgFunc_GameMode( pszName, iSize, pbuf );
}
// TFFree Command Menu
void __CmdFunc_OpenCommandMenu(void)
{
if ( gViewPort )
{
gViewPort->ShowCommandMenu(gViewPort->m_StandardMenu);
}
}
// TFC "special" command
void __CmdFunc_InputPlayerSpecial(void)
{
if ( gViewPort )
{
gViewPort->InputPlayerSpecial();
}
}
void __CmdFunc_CloseCommandMenu(void)
{
if ( gViewPort )
{
gViewPort->InputSignalHideCommandMenu();
}
}
void __CmdFunc_ForceCloseCommandMenu( void )
{
if ( gViewPort )
{
gViewPort->HideCommandMenu();
}
}
void __CmdFunc_ToggleServerBrowser( void )
{
if ( gViewPort )
{
gViewPort->ToggleServerBrowser();
}
}
void __CmdFunc_NSMessageMode(void)
{
if(gEngfuncs.Cmd_Argc() >= 2)
{
if(gViewPort)
{
ChatPanel *theChatPanel = gViewPort->GetChatPanel();
if(theChatPanel)
{
theChatPanel->setVisible(true);
theChatPanel->requestFocus();
theChatPanel->SetChatMode( (string)gEngfuncs.Cmd_Argv(1) );
}
}
}
}
void __CmdFunc_SpecialDummy(void)
{
return;
}
// TFFree Command Menu Message Handlers
int __MsgFunc_ValClass(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_ValClass( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_TeamNames(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
@ -216,27 +126,6 @@ int __MsgFunc_TeamNames(const char *pszName, int iSize, void *pbuf)
return 0;
}
int __MsgFunc_Feign(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_Feign( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_Detpack(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_Detpack( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_VGUIMenu(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_VGUIMenu( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_MOTD(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
@ -244,20 +133,6 @@ int __MsgFunc_MOTD(const char *pszName, int iSize, void *pbuf)
return 0;
}
int __MsgFunc_BuildSt(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_BuildSt( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_RandomPC(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_RandomPC( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_ServerName(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
@ -286,59 +161,27 @@ int __MsgFunc_TeamInfo(const char *pszName, int iSize, void *pbuf)
return 0;
}
int __MsgFunc_Spectator(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_Spectator( pszName, iSize, pbuf );
return 0;
}
int __MsgFunc_AllowSpec(const char *pszName, int iSize, void *pbuf)
{
if (gViewPort)
return gViewPort->MsgFunc_AllowSpec( pszName, iSize, pbuf );
return 0;
}
void __CmdFunc_SpecialDummy(void) {}
// This is called every time the DLL is loaded
void CHud :: Init( void )
{
HOOK_MESSAGE( Logo );
HOOK_MESSAGE( ResetHUD );
HOOK_MESSAGE( GameMode );
HOOK_MESSAGE( InitHUD );
HOOK_MESSAGE( ViewMode );
HOOK_MESSAGE( SetFOV );
HOOK_MESSAGE( Concuss );
// TFFree CommandMenu
HOOK_COMMAND( "+commandmenu", OpenCommandMenu );
HOOK_COMMAND( "-commandmenu", CloseCommandMenu );
HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu );
HOOK_COMMAND( "special", InputPlayerSpecial );
HOOK_COMMAND( "togglebrowser", ToggleServerBrowser );
HOOK_COMMAND( "nsmessagemode", NSMessageMode);
HOOK_COMMAND( "_special", SpecialDummy);
HOOK_COMMAND( "special", SpecialDummy);
HOOK_COMMAND( "_special", SpecialDummy); //prevent abuse
HOOK_MESSAGE( ValClass );
HOOK_MESSAGE( TeamNames );
HOOK_MESSAGE( Feign );
HOOK_MESSAGE( Detpack );
HOOK_MESSAGE( MOTD );
HOOK_MESSAGE( BuildSt );
HOOK_MESSAGE( RandomPC );
HOOK_MESSAGE( ServerName );
HOOK_MESSAGE( ScoreInfo );
HOOK_MESSAGE( TeamScore );
HOOK_MESSAGE( TeamInfo );
HOOK_MESSAGE( Spectator );
HOOK_MESSAGE( AllowSpec );
// VGUI Menus
HOOK_MESSAGE( VGUIMenu );
CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch
CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round
@ -554,16 +397,6 @@ void CHud :: VidInit( void )
GetClientVoiceMgr()->VidInit();
}
int CHud::MsgFunc_Logo(const char *pszName, int iSize, void *pbuf)
{
BEGIN_READ( pbuf, iSize );
// update Train data
m_iLogo = READ_BYTE();
return 1;
}
float g_lastFOV = 0.0;
/*
@ -576,7 +409,7 @@ void COM_FileBase ( const char *in, char *out)
{
int len, start, end;
len = strlen( in );
len = (int)strlen( in );
// scan backward for '.'
end = len - 1;
@ -660,9 +493,8 @@ float HUD_GetFOV( void )
int CHud::MsgFunc_SetFOV(const char *pszName, int iSize, void *pbuf)
{
BEGIN_READ( pbuf, iSize );
int newfov = READ_BYTE();
int newfov;
NetMsg_SetFOV( pbuf, iSize, newfov );
int def_fov = CVAR_GET_FLOAT( "default_fov" );
//Weapon prediction already takes care of changing the fog. ( g_lastFOV ).

View file

@ -18,8 +18,8 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include "r_efx.h"
#include "common/r_efx.h"
#include "mod/AvHNetworkMessages.h"
#define MAX_CLIENTS 32
@ -31,9 +31,7 @@ extern BEAM *pBeam2;
int CHud :: MsgFunc_ResetHUD(const char *pszName, int iSize, void *pbuf )
{
/* <<< cgc >>> Removed this, the receiving message is expecting a size of zero and is asserting. Why was this broken, I didn't change it? >>> */
/*ASSERT( iSize == 0 );*/
int theByteRead = READ_BYTE();
NetMsg_ResetHUD( pbuf, iSize );
// clear all hud data
HUDLIST *pList = m_pHudList;
@ -48,10 +46,7 @@ int CHud :: MsgFunc_ResetHUD(const char *pszName, int iSize, void *pbuf )
// reset sensitivity
m_flMouseSensitivity = 0;
// reset concussion effect
m_iConcussionEffect = 0;
return 1;
return 0;
}
void CAM_ToFirstPerson(void);
@ -71,53 +66,4 @@ void CHud :: MsgFunc_InitHUD( const char *pszName, int iSize, void *pbuf )
pList->p->InitHUDData();
pList = pList->pNext;
}
#if !defined( _TFC )
//Probably not a good place to put this.
pBeam = pBeam2 = NULL;
#endif
}
int CHud :: MsgFunc_GameMode(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_Teamplay = READ_BYTE();
return 1;
}
int CHud :: MsgFunc_Damage(const char *pszName, int iSize, void *pbuf )
{
int armor, blood;
Vector from;
int i;
float count;
BEGIN_READ( pbuf, iSize );
armor = READ_BYTE();
blood = READ_BYTE();
for (i=0 ; i<3 ; i++)
from[i] = READ_COORD();
count = (blood * 0.5) + (armor * 0.5);
if (count < 10)
count = 10;
// TODO: kick viewangles, show damage visually
return 1;
}
int CHud :: MsgFunc_Concuss( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iConcussionEffect = READ_BYTE();
if (m_iConcussionEffect)
this->m_StatusIcons.EnableIcon("dmg_concuss",255,160,0);
else
this->m_StatusIcons.DisableIcon("dmg_concuss");
return 1;
}
}

View file

@ -3,7 +3,7 @@
#include "cl_util.h"
#include "hud_servers_priv.h"
#include "hud_servers.h"
#include "net_api.h"
#include "common/net_api.h"
#include <string.h>
#include <winsock.h>
@ -173,7 +173,7 @@ void CHudServers::ServerResponse( struct net_response_s *response )
if ( response->response )
{
szresponse = (char *)response->response;
len = strlen( szresponse ) + 100 + 1;
len = (int)strlen( szresponse ) + 100 + 1;
sprintf( sz, "%i", (int)( 1000.0 * response->ping ) );
browser = new server_t;

View file

@ -2,7 +2,7 @@
#define HUD_SERVERS_PRIVH
#pragma once
#include "netadr.h"
#include "common/netadr.h"
class CHudServers
{

View file

@ -7,24 +7,23 @@
#include "hud.h"
#include "cl_util.h"
#include "cl_entity.h"
#include "triangleapi.h"
#include "common/cl_entity.h"
#include "common/triangleapi.h"
#include "vgui_TeamFortressViewport.h"
#include "vgui_SpectatorPanel.h"
#include "hltv.h"
#include "common/hltv.h"
#include "pm_shared.h"
#include "pm_defs.h"
#include "pmtrace.h"
#include "parsemsg.h"
#include "entity_types.h"
#include "pm_shared/pm_shared.h"
#include "pm_shared/pm_defs.h"
#include "common/pmtrace.h"
#include "common/entity_types.h"
// these are included for the math functions
#include "com_model.h"
#include "demo_api.h"
#include "event_api.h"
#include "common/com_model.h"
#include "common/demo_api.h"
#include "common/event_api.h"
#include "studio_util.h"
#include "screenfade.h"
#include "common/screenfade.h"
#include "util/STLUtil.h"
#include "mod/AvHTitles.h"
#include "mod/AvHSprites.h"
@ -257,7 +256,7 @@ int UTIL_FindEntityInMap(char * name, float * origin, float * angle)
strcpy (keyname, token);
// another hack to fix keynames with trailing spaces
n = strlen(keyname);
n = (int)strlen(keyname);
while (n && keyname[n-1] == ' ')
{
keyname[n-1] = 0;
@ -626,7 +625,7 @@ void CHudSpectator::DrawOverviewMap()
}
#include "parsemsg.h"
void CHudSpectator::DirectorMessage( int iSize, void *pbuf )
{
float value;
@ -663,7 +662,6 @@ void CHudSpectator::DirectorMessage( int iSize, void *pbuf )
g_iUser3 = m_lastSecondaryObject;
}
// gEngfuncs.Con_Printf("Director Camera: %i %i\n", firstObject, secondObject);
break;
case DRC_CMD_MODE :
@ -729,7 +727,6 @@ void CHudSpectator::DirectorMessage( int iSize, void *pbuf )
string = READ_STRING();
value = READ_FLOAT();
// gEngfuncs.Con_Printf("DRC_CMD_FX_SOUND: %s %.2f\n", string, value );
gEngfuncs.pEventAPI->EV_PlaySound(0, v_origin, CHAN_BODY, string, value, ATTN_NORM, 0, PITCH_NORM );
break;
@ -755,24 +752,6 @@ void CHudSpectator::DirectorMessage( int iSize, void *pbuf )
break;
case DRC_CMD_FADE:
/*{
screenfade_t sf;
sf.fader = 255;
sf.fadeg = 0;
sf.fadeb = 0;
sf.fadealpha = 128;
sf.fadeFlags = FFADE_STAYOUT | FFADE_OUT;
// gHUD.m_flTime = cl.time
stream->ReadFloat(); // duration
sf.stream->ReadFloat(); // holdTime
sf.fadeFlags = READ_SHORT(); // flags
stream->ReadLong(); // color RGB
CallEnghudSetScreenFade( &sf );
}*/
break;
case DRC_CMD_STUFFTEXT:

View file

@ -9,7 +9,7 @@
#define SPECTATOR_H
#pragma once
#include "cl_entity.h"
#include "common/cl_entity.h"
// Removed by mmcguire.
/*

View file

@ -43,8 +43,6 @@ int CHud::UpdateClientData(client_data_t *cdata, float time)
cdata->fov = m_iFOV;
v_idlescale = m_iConcussionEffect;
CL_ResetButtonBits( m_iKeyBits );
// return 1 if in anything in the client_data struct has been changed, 0 otherwise

View file

@ -2,17 +2,16 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "APIProxy.h"
#include "engine/APIProxy.h"
#include "Exports.h"
#include "windows.h"
#include "build.h"
float CL_KeyState (kbutton_t *key);
extern "C"
@ -465,8 +464,6 @@ void CAM_ToggleSnapto( void )
void CAM_Toggle( void )
{
int a = 0;
#ifdef DEBUG
if(cam_thirdperson)
{

View file

@ -38,9 +38,9 @@ extern "C"
{
#include "kbutton.h"
}
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "view.h"
@ -58,7 +58,7 @@ extern "C"
#include "mod/AvHCommanderModeHandler.h"
#include "Util/Mat3.h"
#include "APIProxy.h"
#include "engine/APIProxy.h"
#include "Exports.h"
extern int g_iAlive;
@ -497,7 +497,7 @@ bool AvHContainsBlockedCommands(const char* inInput)
if (theCommandEnd == NULL)
{
theCommandLength = strlen(inInput);
theCommandLength = (int)strlen(inInput);
}
else
{
@ -756,17 +756,7 @@ void IN_SpeedDown(void) {KeyDown(&in_speed);}
void IN_SpeedUp(void) {KeyUp(&in_speed);}
void IN_StrafeDown(void) {KeyDown(&in_strafe);}
void IN_StrafeUp(void) {KeyUp(&in_strafe);}
// needs capture by hud/vgui also
extern void __CmdFunc_InputPlayerSpecial(void);
void IN_Attack2Down(void)
{
KeyDown(&in_attack2);
__CmdFunc_InputPlayerSpecial();
//gHUD.m_Spectator.HandleButtonsDown( IN_ATTACK2 );
}
void IN_Attack2Down(void) {KeyDown(&in_attack2);}
void IN_Attack2Up(void) {KeyUp(&in_attack2);}
void IN_UseDown (void)
{
@ -1016,31 +1006,6 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
VectorAdd(viewangles,theRotationDeltas,viewangles);
CL_AdjustAngles ( frametime, viewangles );
#ifdef SKULK_VIEW_ROTATION
//note : this code uses an older view angle tracking system
//and won't compile without changes
cl_entity_t* ent = gEngfuncs.GetLocalPlayer();
if (ent->curstate.iuser3 == AVH_USER3_ALIEN_PLAYER1)
{
// Transform the view angles from the local space of the entity into
// the world space.
Mat3 objectMatrix(gPlayerAngles);
Mat3 viewMatrix(gPlayerViewAngles);
(objectMatrix * viewMatrix).GetEulerAngles(viewangles);
// Since we've updated the local coordinate frame to align with the view,
// reset the local view angles.
gPlayerViewAngles[YAW] = 90;
gPlayerViewAngles[ROLL] = 0;
}
else
#endif
gEngfuncs.SetViewAngles( (float *)viewangles );
VectorCopy (viewangles,gWorldViewAngles);
@ -1119,11 +1084,6 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
cmd->upmove += kCommanderMoveSpeed * theScrollY;
cmd->sidemove += kCommanderMoveSpeed * theScrollX;
cmd->forwardmove += kCommanderMoveSpeed * theScrollZ;
if(theScrollZ != 0)
{
int a = 0;
}
//cmd->forwardmove += 0;//cl_forwardspeed->value * theScrollZ;
cmd->impulse = COMMANDER_SCROLL;
theOverrideImpulse = true;
@ -1311,55 +1271,6 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
}
}
}
///////////////////////////////
// Begin Max's Code
///////////////////////////////
// If the entity is a Skulk then transform the move from local space to
// world space.
#ifdef SKULK_VIEW_ROTATION
cl_entity_t* ent = gEngfuncs.GetLocalPlayer();
if (ent->curstate.iuser3 == AVH_USER3_ALIEN_PLAYER1 && cl_rotateview->value != 0)
{
vec3_t forward;
vec3_t right;
vec3_t up;
AngleVectors(gWorldViewAngles, forward, right, up);
VectorScale(forward, cmd->forwardmove, forward);
VectorScale(right, cmd->sidemove, right);
VectorScale(up, cmd->upmove, up);
vec3_t normalForward;
vec3_t normalRight;
vec3_t normalUp;
AngleVectors(ent->angles, normalForward, normalRight, normalUp);
cmd->forwardmove = DotProduct(normalForward, forward) +
DotProduct(normalForward, right) +
DotProduct(normalForward, up);
cmd->sidemove = DotProduct(normalRight, forward) +
DotProduct(normalRight, right) +
DotProduct(normalRight, up);
cmd->upmove = DotProduct(normalUp, forward) +
DotProduct(normalUp, right) +
DotProduct(normalUp, up);
}
#endif
///////////////////////////////
// End Max's Code
///////////////////////////////
gEngfuncs.GetViewAngles( (float *)viewangles );

View file

@ -5,17 +5,16 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "../engine/keydefs.h"
#include "view.h"
#include "windows.h"
#include "mod/ChatPanel.h"
#include "APIProxy.h"
#include "engine/APIProxy.h"
#include "Exports.h"
#define MOUSE_BUTTON_COUNT 5

View file

@ -19,7 +19,7 @@
//
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
#include <string.h>
#include <stdio.h>
@ -137,11 +137,10 @@ int CHudMenu :: MsgFunc_ShowMenu( const char *pszName, int iSize, void *pbuf )
{
char *temp = NULL;
BEGIN_READ( pbuf, iSize );
int DisplayTime, NeedMore;
string content;
m_bitsValidSlots = READ_SHORT();
int DisplayTime = READ_CHAR();
int NeedMore = READ_BYTE();
NetMsg_ShowMenu( pbuf, iSize, m_bitsValidSlots, DisplayTime, NeedMore, content );
if ( DisplayTime > 0 )
m_flShutoffTime = DisplayTime + gHUD.m_flTime;
@ -152,11 +151,11 @@ int CHudMenu :: MsgFunc_ShowMenu( const char *pszName, int iSize, void *pbuf )
{
if ( !m_fWaitingForMore ) // this is the start of a new menu
{
strncpy( g_szPrelocalisedMenuString, READ_STRING(), MAX_MENU_STRING );
strncpy( g_szPrelocalisedMenuString, content.c_str(), MAX_MENU_STRING );
}
else
{ // append to the current menu string
strncat( g_szPrelocalisedMenuString, READ_STRING(), MAX_MENU_STRING - strlen(g_szPrelocalisedMenuString) );
strncat( g_szPrelocalisedMenuString, content.c_str(), MAX_MENU_STRING - strlen(g_szPrelocalisedMenuString) );
}
g_szPrelocalisedMenuString[MAX_MENU_STRING-1] = 0; // ensure null termination (strncat/strncpy does not)

View file

@ -22,8 +22,8 @@
#include "cl_util.h"
#include <string.h>
#include <stdio.h>
#include "parsemsg.h"
#include "mod/AvHClientVariables.h"
#include "mod/AvHNetworkMessages.h"
DECLARE_MESSAGE( m_Message, HudText )
DECLARE_MESSAGE( m_Message, HudText2 )
@ -231,14 +231,24 @@ void CHudMessage::MessageScanNextChar( void )
}
break;
}
if ( blend > 255 )
blend = 255;
else if ( blend < 0 )
blend = 0;
m_parms.r = ((srcRed * (255-blend)) + (destRed * blend)) >> 8;
m_parms.g = ((srcGreen * (255-blend)) + (destGreen * blend)) >> 8;
m_parms.b = ((srcBlue * (255-blend)) + (destBlue * blend)) >> 8;
if ( blend >= 255 )
{
m_parms.r = destRed;
m_parms.g = destGreen;
m_parms.b = destBlue;
}
else if ( blend <= 0 )
{
m_parms.r = srcRed;
m_parms.g = srcGreen;
m_parms.b = srcBlue;
}
else
{
m_parms.r = ((srcRed * (255-blend)) + (destRed * blend)) >> 8;
m_parms.g = ((srcGreen * (255-blend)) + (destGreen * blend)) >> 8;
m_parms.b = ((srcBlue * (255-blend)) + (destBlue * blend)) >> 8;
}
if ( m_parms.pMessage->effect == 1 && m_parms.charTime != 0 )
{
@ -656,11 +666,10 @@ bool CHudMessage::MessageRemove(const char *pName)
int CHudMessage::MsgFunc_HudText( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
string content;
char *pString = READ_STRING();
MessageAdd( pString, gHUD.m_flTime );
NetMsg_HudText( pbuf, iSize, content );
MessageAdd( content.c_str(), gHUD.m_flTime );
// Remember the time -- to fix up level transitions
m_parms.time = gHUD.m_flTime;
@ -674,12 +683,12 @@ int CHudMessage::MsgFunc_HudText( const char *pszName, int iSize, void *pbuf )
int CHudMessage::MsgFunc_HudText2( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
string content;
int flags;
NetMsg_HudText2( pbuf, iSize, content, flags );
bool theIsAutoHelp = (flags & 1) != 0;
char *pString = READ_STRING();
bool theIsAutoHelp = READ_BYTE();
gHUD.AddTooltip(pString, theIsAutoHelp);
gHUD.AddTooltip(content.c_str(), theIsAutoHelp);
return 2;
}

View file

@ -20,14 +20,14 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
#include <string.h>
#include <stdio.h>
#include "vgui_TeamFortressViewport.h"
#include "mod/AvHClientUtil.h"
#include "mod/ChatPanel.h"
#include "ui/ChatPanel.h"
float* GetClientColor(int clientIndex);
@ -166,20 +166,12 @@ int CHudSayText :: Draw( float flTime )
int CHudSayText :: MsgFunc_SayText( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
// Read client who spoke the message
int client_index = READ_BYTE();
// Read message
const char* inString = READ_STRING();
string theChatMessage(inString);
// Read location of player when he spoke this (" " if nowhere)
const char* theLocation = READ_STRING();
int client_index;
string content, location;
NetMsg_SayText( pbuf, iSize, client_index, content, location );
string theTranslatedLocation;
if(LocalizeString(theLocation, theTranslatedLocation))
if(LocalizeString(location.c_str(), theTranslatedLocation))
{
// If player is on our team, add location
cl_entity_s* theEntity = gEngfuncs.GetEntityByIndex(client_index);
@ -188,26 +180,26 @@ int CHudSayText :: MsgFunc_SayText( const char *pszName, int iSize, void *pbuf )
if(theEntity && theLocalPlayer && (theEntity->curstate.team == theLocalPlayer->curstate.team))
{
// Search for first : so we can insert location
int theColonIndex = theChatMessage.find_first_of(":");
if((theColonIndex > 0) && (theColonIndex < (int)theChatMessage.length()))
int theColonIndex = (int)content.find_first_of(":");
if((theColonIndex > 0) && (theColonIndex < (int)content.length()))
{
AvHCUTrimExtraneousLocationText(theTranslatedLocation);
// Insert location
string theNewMessage = theChatMessage.substr(0, theColonIndex);
string theNewMessage = content.substr(0, theColonIndex);
theNewMessage += " (";
theNewMessage += theTranslatedLocation;
theNewMessage += ")";
theNewMessage += theChatMessage.substr(theColonIndex/*, theChatMessage.length()*/);
theNewMessage += content.substr(theColonIndex);
// Replace the message with new one
theChatMessage = theNewMessage;
content = theNewMessage;
}
}
}
SayTextPrint(theChatMessage.c_str(), theChatMessage.length(), client_index );
SayTextPrint(content.c_str(), (int)content.length(), client_index );
return 1;
}
@ -249,7 +241,7 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn
if ( nameInString )
{
g_iNameLengths[i] = strlen( pName ) + (nameInString - pszBuf);
g_iNameLengths[i] = (int)strlen( pName ) + (nameInString - pszBuf);
g_pflNameColors[i] = GetClientColor(clientIndex);
}
}
@ -286,7 +278,8 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn
gViewPort->GetChatPanel()->getSize(theWidth, theHeight);
//Y_START = theY + theHeight + 5; //voogru: this is too high imo.
Y_START = ScreenHeight()*.5f;
//KGP: then move the viewport
Y_START = theY + theHeight + 5;
}
}
@ -358,8 +351,8 @@ void CHudSayText :: EnsureTextFitsInOneLineAndWrapIfHaveTo( int line )
// copy remaining string into next buffer, making sure it starts with a space character
if ( (char)*last_break == (char)' ' )
{
int linelen = strlen(g_szLineBuffer[j]);
int remaininglen = strlen(last_break);
int linelen = (int)strlen(g_szLineBuffer[j]);
int remaininglen = (int)strlen(last_break);
if ( (linelen - remaininglen) <= MAX_CHARS_PER_LINE )
strcat( g_szLineBuffer[j], last_break );

View file

@ -17,20 +17,15 @@
//
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include <string.h>
#include <stdio.h>
#include "parsemsg.h"
#include "event_api.h"
DECLARE_MESSAGE( m_StatusIcons, StatusIcon );
#include "common/event_api.h"
int CHudStatusIcons::Init( void )
{
HOOK_MESSAGE( StatusIcon );
gHUD.AddHudElem( this );
Reset();
@ -74,35 +69,6 @@ int CHudStatusIcons::Draw( float flTime )
return 1;
}
// Message handler for StatusIcon message
// accepts five values:
// byte : TRUE = ENABLE icon, FALSE = DISABLE icon
// string : the sprite name to display
// byte : red
// byte : green
// byte : blue
int CHudStatusIcons::MsgFunc_StatusIcon( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int ShouldEnable = READ_BYTE();
char *pszIconName = READ_STRING();
if ( ShouldEnable )
{
int r = READ_BYTE();
int g = READ_BYTE();
int b = READ_BYTE();
EnableIcon( pszIconName, r, g, b );
m_iFlags |= HUD_ACTIVE;
}
else
{
DisableIcon( pszIconName );
}
return 1;
}
// add the icon to the icon list, and set it's drawing color
void CHudStatusIcons::EnableIcon( char *pszIconName, unsigned char red, unsigned char green, unsigned char blue )
{

View file

@ -21,7 +21,7 @@
#include "hud.h"
#include "cl_util.h"
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
#include <string.h>
#include <stdio.h>
@ -258,15 +258,15 @@ int CHudStatusBar :: Draw( float fTime )
// %iX, where X is an integer, will substitute a number here, getting the number from StatusValue[X]
int CHudStatusBar :: MsgFunc_StatusText( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int location;
string content;
NetMsg_StatusText( pbuf, iSize, location, content );
int line = READ_BYTE();
if ( line < 0 || line >= MAX_STATUSBAR_LINES )
if ( location < 0 || location >= MAX_STATUSBAR_LINES )
return 1;
strncpy( m_szStatusText[line], READ_STRING(), MAX_STATUSTEXT_LENGTH );
m_szStatusText[line][MAX_STATUSTEXT_LENGTH-1] = 0; // ensure it's null terminated ( strncpy() won't null terminate if read string too long)
strncpy( m_szStatusText[location], content.c_str(), MAX_STATUSTEXT_LENGTH );
m_szStatusText[location][MAX_STATUSTEXT_LENGTH-1] = 0; // ensure it's null terminated ( strncpy() won't null terminate if read string too long)
if ( m_szStatusText[0] == 0 )
m_iFlags &= ~HUD_ACTIVE;
@ -285,13 +285,13 @@ int CHudStatusBar :: MsgFunc_StatusText( const char *pszName, int iSize, void *p
// short: value to store
int CHudStatusBar :: MsgFunc_StatusValue( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int location, state;
NetMsg_StatusValue( pbuf, iSize, location, state );
int index = READ_BYTE();
if ( index < 1 || index >= MAX_STATUSBAR_VALUES )
if ( location < 1 || location >= MAX_STATUSBAR_VALUES )
return 1; // index out of range
m_iStatusValues[index] = READ_SHORT();
m_iStatusValues[location] = state;
m_bReparseString = TRUE;
this->ReparseStringIfNeeded();

View file

@ -1,8 +1,8 @@
#include <memory.h>
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "common/const.h"
#include "common/com_model.h"
#include "studio_util.h"
/*

View file

@ -24,7 +24,7 @@
#include "cl_util.h"
#include <string.h>
#include <stdio.h>
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
#include "vgui_TeamFortressViewport.h"
@ -130,7 +130,7 @@ char *CHudTextMessage::LookupString( const char *msg, int *msg_dest )
void StripEndNewlineFromString( char *str )
{
int s = strlen( str ) - 1;
int s = (int)strlen( str ) - 1;
if ( str[s] == '\n' || str[s] == '\r' )
str[s] = 0;
}
@ -159,53 +159,37 @@ char* ConvertCRtoNL( char *str )
// the next (optional) one to four strings are parameters for that string (which can also be message names if they begin with '#')
int CHudTextMessage::MsgFunc_TextMsg( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int msg_dest = READ_BYTE();
static char szBuf[6][128];
char *msg_text = LookupString( READ_STRING(), &msg_dest );
msg_text = strcpy( szBuf[0], msg_text );
// keep reading strings and using C format strings for subsituting the strings into the localised text string
char *sstr1 = LookupString( READ_STRING() );
sstr1 = strcpy( szBuf[1], sstr1 );
StripEndNewlineFromString( sstr1 ); // these strings are meant for subsitution into the main strings, so cull the automatic end newlines
char *sstr2 = LookupString( READ_STRING() );
sstr2 = strcpy( szBuf[2], sstr2 );
StripEndNewlineFromString( sstr2 );
char *sstr3 = LookupString( READ_STRING() );
sstr3 = strcpy( szBuf[3], sstr3 );
StripEndNewlineFromString( sstr3 );
char *sstr4 = LookupString( READ_STRING() );
sstr4 = strcpy( szBuf[4], sstr4 );
StripEndNewlineFromString( sstr4 );
char *psz = szBuf[5];
int destination;
StringList message;
NetMsg_TextMsg( pbuf, iSize, destination, message );
if ( gViewPort && gViewPort->AllowedToPrintText() == FALSE )
return 1;
switch ( msg_dest )
while( message.size() < 5 )
{ message.push_back( string("") ); }
char psz[1024];
char* origin = psz;
if( destination == HUD_PRINTNOTIFY )
{
psz[0] = 1;
origin = psz + 1;
}
sprintf( origin, message[0].c_str(), message[1].c_str(), message[2].c_str(), message[3].c_str(), message[4].c_str() );
ConvertCRtoNL(psz);
switch ( destination )
{
case HUD_PRINTCENTER:
sprintf( psz, msg_text, sstr1, sstr2, sstr3, sstr4 );
CenterPrint( ConvertCRtoNL( psz ) );
break;
case HUD_PRINTNOTIFY:
psz[0] = 1; // mark this message to go into the notify buffer
sprintf( psz+1, msg_text, sstr1, sstr2, sstr3, sstr4 );
ConsolePrint( ConvertCRtoNL( psz ) );
break;
case HUD_PRINTTALK:
sprintf( psz, msg_text, sstr1, sstr2, sstr3, sstr4 );
gHUD.m_SayText.SayTextPrint( ConvertCRtoNL( psz ), 128 );
break;
case HUD_PRINTCONSOLE:
sprintf( psz, msg_text, sstr1, sstr2, sstr3, sstr4 );
ConsolePrint( ConvertCRtoNL( psz ) );
ConsolePrint(psz);
break;
case HUD_PRINTCENTER:
CenterPrint(psz);
break;
case HUD_PRINTTALK:
gHUD.m_SayText.SayTextPrint(psz, 1024);
break;
}

View file

@ -22,7 +22,7 @@
#include "cl_util.h"
#include <string.h>
#include <stdio.h>
#include "parsemsg.h"
#include "mod/AvHNetworkMessages.h"
DECLARE_MESSAGE(m_Train, Train )
@ -71,12 +71,10 @@ int CHudTrain::Draw(float fTime)
int CHudTrain::MsgFunc_Train(const char *pszName, int iSize, void *pbuf)
{
BEGIN_READ( pbuf, iSize );
int state;
NetMsg_Train( pbuf, iSize, state );
// update Train data
m_iPos = READ_BYTE();
if (m_iPos)
if (state)
m_iFlags |= HUD_ACTIVE;
else
m_iFlags &= ~HUD_ACTIVE;

View file

@ -7,19 +7,19 @@
// Triangle rendering apis are in gEngfuncs.pTriAPI
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "triangleapi.h"
#include "APIProxy.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "common/triangleapi.h"
#include "engine/APIProxy.h"
#include "Exports.h"
#include "particles/p_vector.h"
#include "particles/papi.h"
#include <p_vector.h>
#include <papi.h>
#include "mod/AvHParticleSystemManager.h"
#include "pm_defs.h"
#include "pm_shared.h"
#include "pm_movevars.h"
#include "pm_shared/pm_defs.h"
#include "pm_shared/pm_shared.h"
#include "pm_shared/pm_movevars.h"
#include "mod/AvHEvents.h"
#include "mod/AvHScriptManager.h"
#include "mod/AvHClientVariables.h"
@ -420,14 +420,6 @@ void CL_DLLEXPORT HUD_DrawTransparentTriangles( void )
// Draw the hitboxes for all of the objects.
/*
#ifdef AVH_PLAYTEST_BUILD
if (CVAR_GET_FLOAT("sv_cheats") != 0 && CVAR_GET_FLOAT("cl_drawhitboxes") != 0)
{
DrawHitBoxes();
}
#endif
*/
// Assumes that the only time players don't have view models is when they are commanding, gestating, cocooned
// or when they aren't playing. See the end of StudioModelRenderer::StudioDrawModel().
//if((gHUD.GetRole() == ROLE_COMMANDER) || (gHUD.GetRole() == ROLE_GESTATING) || (gHUD.GetRole() == ROLE_COCOONED) || (gHUD.GetPlayMode() != PLAYMODE_PLAYING))

View file

@ -30,9 +30,9 @@
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#include "pm_defs.h"
#include "pm_shared.h"
#include "pm_movevars.h"
#include "pm_shared/pm_defs.h"
#include "pm_shared/pm_shared.h"
#include "pm_shared/pm_movevars.h"
extern playermove_t *pmove;
extern float HUD_GetFOV( void );

View file

@ -32,12 +32,11 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "parsemsg.h"
#include "vgui_int.h"
#include "vgui_TeamFortressViewport.h"

View file

@ -96,7 +96,7 @@ public:
}
virtual Panel* startCellEditing(int column,int row)
{
_textEntry->setText("Goat",strlen("Goat"));
_textEntry->setText("Goat",(int)strlen("Goat"));
_textEntry->requestFocus();
return _textEntry;
}

View file

@ -28,12 +28,11 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "parsemsg.h"
#include "vgui_int.h"
#include "vgui_TeamFortressViewport.h"

View file

@ -39,7 +39,7 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "const.h"
#include "common/const.h"
#include "vgui_int.h"
#include "vgui_TeamFortressViewport.h"

View file

@ -31,7 +31,7 @@
#include "hud.h"
#include "vgui_SchemeManager.h"
#include "cvardef.h"
#include "common/cvardef.h"
#include <string.h>

View file

@ -66,9 +66,9 @@
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "vgui_TeamFortressViewport.h"
#include "vgui_ScorePanel.h"
#include "..\game_shared\vgui_helpers.h"
@ -79,8 +79,9 @@
#include "cl_dll/demo.h"
#include "mod/AvHServerVariables.h"
#include "util\STLUtil.h"
#include "ui/ScoreboardIcon.h"
#include "ITrackerUser.h"
#include "common/ITrackerUser.h"
extern ITrackerUser *g_pTrackerUser;
hud_player_info_t g_PlayerInfoList[MAX_PLAYERS+1]; // player info from the engine
@ -159,13 +160,6 @@ SBColumnInfo g_ColumnInfo[NUM_COLUMNS] =
#define TEAM_SPECTATORS 2
#define TEAM_BLANK 3
Color BuildColor(int inR, int inG, int inB, float inScalar)
{
Color theColor = Color((int)(inR/inScalar), (int)(inG/inScalar), (int)(inB/inScalar), 0);
return theColor;
}
//-----------------------------------------------------------------------------
// ScorePanel::HitTestPanel.
//-----------------------------------------------------------------------------
@ -178,7 +172,13 @@ void ScorePanel::HitTestPanel::internalMousePressed(MouseCode code)
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vgui::Color BuildColor( int R, int G, int B, float gamma )
{
ASSERT( gamma != 0 );
return vgui::Color( R/gamma, G/gamma, B/gamma, 0 );
}
//-----------------------------------------------------------------------------
// Purpose: Create the ScoreBoard panel
@ -196,24 +196,8 @@ ScorePanel::ScorePanel(int x,int y,int wide,int tall) : Panel(x,y,wide,tall)
setBgColor(0, 0, 0, 96);
m_pCurrentHighlightLabel = NULL;
m_iHighlightRow = -1;
m_pTrackerIcon = NULL;
m_pDevIcon = NULL;
m_pPTIcon = NULL;
m_pGuideIcon = NULL;
m_pServerOpIcon = NULL;
m_pContribIcon = NULL;
m_pCheatingDeathIcon = NULL;
m_pVeteranIcon = NULL;
m_pTrackerIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardtracker.tga");
m_pDevIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboarddev.tga");
m_pPTIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardpt.tga");
m_pGuideIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardguide.tga");
m_pServerOpIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardserverop.tga");
m_pContribIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardcontrib.tga");
m_pCheatingDeathIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardcd.tga");
m_pVeteranIcon = vgui_LoadTGANoInvertAlpha("gfx/vgui/640_scoreboardveteran.tga");
m_iIconFrame = 0;
m_iLastFrameIncrementTime = gHUD.GetTimeOfLastUpdate();
// Initialize the top title.
m_TitleLabel.setFont(tfont);
@ -362,6 +346,10 @@ void ScorePanel::Initialize( void )
m_fLastKillTime = 0;
m_iPlayerNum = 0;
m_iNumTeams = 0;
for( int counter = 0; counter < MAX_PLAYERS+1; counter++ )
{
delete g_PlayerExtraInfo[counter].icon;
}
memset( g_PlayerExtraInfo, 0, sizeof g_PlayerExtraInfo );
memset( g_TeamInfo, 0, sizeof g_TeamInfo );
}
@ -380,18 +368,13 @@ void ScorePanel::Update()
if (gViewPort->m_szServerName)
{
char sz[MAX_SERVERNAME_LENGTH + MAX_MAPNAME_LENGTH + 256];
sprintf(sz, "%s", gViewPort->m_szServerName );
string theServerName = string(sz);
if(theServerName.length() > MAX_SERVERNAME_LENGTH) //string wasn't terminated
{ theServerName.resize(MAX_SERVERNAME_LENGTH); }
theTitleName += theServerName;
int iServerNameLength = max((int)strlen(gViewPort->m_szServerName),MAX_SERVERNAME_LENGTH);
theTitleName += string(gViewPort->m_szServerName,iServerNameLength);
}
string theMapName = gHUD.GetMapName();
if(theMapName != "")
{
//sprintf(sz, "%s : %s", gViewPort->m_szServerName, theMapName.c_str());
if(theTitleName != "")
{
theTitleName += " ";
@ -431,11 +414,7 @@ void ScorePanel::Update()
m_bHasBeenSorted[i] = false;
}
// If it's not teamplay, sort all the players. Otherwise, sort the teams.
if ( !gHUD.m_Teamplay )
SortPlayers( 0, NULL );
else
SortTeams();
SortTeams();
// set scrollbar range
m_PlayerList.SetScrollRange(m_iRows);
@ -505,7 +484,6 @@ void ScorePanel::SortTeams()
// find team ping/packetloss averages
for ( i = 1; i <= m_iNumTeams; i++ )
//for ( i = 0; i <= m_iNumTeams; i++ )
{
g_TeamInfo[i].already_drawn = FALSE;
@ -516,61 +494,12 @@ void ScorePanel::SortTeams()
}
}
// Draw the teams
// while ( 1 )
// {
// int highest_frags = -99999; int lowest_deaths = 99999;
// int best_team = 0;
//
// for ( i = 1; i <= m_iNumTeams; i++ )
// {
// if ( g_TeamInfo[i].players < 1 )
// continue;
//
// // Spectator team can't be the best team if there are others
// if ( !g_TeamInfo[i].already_drawn && g_TeamInfo[i].frags >= highest_frags )
// {
// if ( g_TeamInfo[i].frags > highest_frags || g_TeamInfo[i].deaths < lowest_deaths )
// {
// best_team = i;
// lowest_deaths = g_TeamInfo[i].deaths;
// highest_frags = g_TeamInfo[i].frags;
// }
// }
// }
//
// // draw the best team on the scoreboard
// if ( !best_team )
// break;
// for(i = 1 ; i <= m_iNumTeams; i++)
// {
// int best_team = i;
//
// // Put this team in the sorted list
// m_iSortedRows[ m_iRows ] = best_team;
// m_iIsATeam[ m_iRows ] = TEAM_YES;
// g_TeamInfo[best_team].already_drawn = TRUE; // set the already_drawn to be TRUE, so this team won't get sorted again
// m_iRows++;
//
// // Now sort all the players on this team
// SortPlayers( 0, g_TeamInfo[best_team].name );
// }
// Sort the teams by numerical order, skipping spectators
// for(i = 1; i < m_iNumTeams; i++)
// {
// SortPlayers(0, g_TeamInfo[i].name);
// }
SortActivePlayers(kMarine1Team);
SortActivePlayers(kAlien1Team);
SortActivePlayers(kMarine2Team);
SortActivePlayers(kAlien2Team);
SortActivePlayers(kSpectatorTeam);
SortActivePlayers(kUndefinedTeam);
// Add all the players who aren't in a team yet into spectators
//SortPlayers( TEAM_SPECTATORS, NULL );
}
void ScorePanel::SortActivePlayers(char* inTeam, bool inSortByEntityIndex)
@ -610,7 +539,7 @@ void ScorePanel::SortPlayers( int iTeam, char *team, bool inSortByEntityIndex)
for ( int i = 1; i <= MAX_PLAYERS; i++ )
{
if ( m_bHasBeenSorted[i] == false && g_PlayerInfoList[i].name /*&& g_PlayerExtraInfo[i].frags >= theBestTotalScore*/ )
if ( m_bHasBeenSorted[i] == false && g_PlayerInfoList[i].name )
{
cl_entity_t *ent = gEngfuncs.GetEntityByIndex( i );
@ -629,7 +558,7 @@ void ScorePanel::SortPlayers( int iTeam, char *team, bool inSortByEntityIndex)
else
{
// overall rank = score + kills (with least deaths breaking ties)
int thePlayerScore = pl_info->score;// + pl_info->frags - pl_info->deaths;
int thePlayerScore = pl_info->score;
int thePlayerDeaths = pl_info->deaths;
if((thePlayerScore > theBestTotalScore) || ((thePlayerScore == theBestTotalScore) && (pl_info->deaths < theBestDeaths)))
{
@ -726,6 +655,26 @@ void ScorePanel::RebuildTeams()
Update();
}
//-----------------------------------------------------------------------------
int ScorePanel::GetIconFrame(void)
{
const static int kIconFrameDuration = 0.25;
int current_time = gHUD.GetTimeOfLastUpdate();
if( (m_iLastFrameIncrementTime - current_time) > kIconFrameDuration )
{
m_iLastFrameIncrementTime = current_time;
m_iIconFrame++;
if( m_iIconFrame >= 1000 )
{
m_iIconFrame = 0;
}
}
return m_iIconFrame;
}
//-----------------------------------------------------------------------------
void ScorePanel::FillGrid()
{
@ -778,11 +727,16 @@ void ScorePanel::FillGrid()
hud_player_info_t* pl_info = &g_PlayerInfoList[theSortedRow];
extra_player_info_t* theExtraPlayerInfo = &g_PlayerExtraInfo[theSortedRow];
int thePlayerClass = theExtraPlayerInfo->playerclass;
short thePlayerAuthentication = theExtraPlayerInfo->auth;
int theIconColor = theExtraPlayerInfo->color;
bool thePlayerIsDead = (thePlayerClass == (int)(PLAYERCLASS_DEAD_MARINE)) || (thePlayerClass == (int)(PLAYERCLASS_DEAD_ALIEN)) || (thePlayerClass == (int)(PLAYERCLASS_REINFORCING));
short theTeamNumber = theExtraPlayerInfo->teamnumber;
string theCustomIcon = (string)theExtraPlayerInfo->customicon;
bool thePlayerIsDead = false;
switch( thePlayerClass )
{
case PLAYERCLASS_DEAD_MARINE:
case PLAYERCLASS_DEAD_ALIEN:
case PLAYERCLASS_REINFORCING:
thePlayerIsDead = true;
break;
}
// Code to test DEBUG
#if 0
@ -827,21 +781,6 @@ void ScorePanel::FillGrid()
char sz[128];
// This could be zero if the player hits tab before getting the first message from the server
//ASSERT(this->m_iNumTeams > 0);
// Get the team's data
// team_info_t* team_info = &g_TeamInfo[0];
// for(int i = 0; i < this->m_iNumTeams; i++)
// {
// team_info_t* theCurrentTeam = &g_TeamInfo[i+1];
// if(theCurrentTeam->teamnumber == theTeamNumber)
// {
// team_info = theCurrentTeam;
// break;
// }
// }
Color gammaAdjustedTeamColor = BuildColor(kTeamColors[theColorIndex][0], kTeamColors[theColorIndex][1], kTeamColors[theColorIndex][2], gHUD.GetGammaSlope());
pLabel->setFgColor(gammaAdjustedTeamColor[0], gammaAdjustedTeamColor[1], gammaAdjustedTeamColor[2], 0);
@ -1104,169 +1043,10 @@ void ScorePanel::FillGrid()
break;
case COLUMN_RANK_ICON:
if(thePlayerAuthentication & PLAYERAUTH_UPP_MODE)
if( theExtraPlayerInfo->icon )
{
if(g_pTrackerUser)
{
int playerSlot = theSortedRow;
int trackerID = gEngfuncs.GetTrackerIDForPlayer(playerSlot);
if (g_pTrackerUser->IsFriend(trackerID) && trackerID != g_pTrackerUser->GetTrackerID())
{
pLabel->setImage(m_pTrackerIcon);
pLabel->setFgColorAsImageColor(false);
m_pTrackerIcon->setColor(Color(255, 255, 255, 0));
}
}
else
{
//find the filename
short theIconNameBytes = (thePlayerAuthentication & ~PLAYERAUTH_UPP_MODE);
string theIconName;
MakeHexPairsFromBytes((unsigned char*)&theIconNameBytes,theIconName,2);
theIconName = string("gfx/vgui/icons/") + theIconName + string(".tga");
//find the color - 2 bits apiece for R,G,B
int theColor[3] = {0,0,0};
theColor[0] = ((theIconColor >> 6) & 0x03) * 64; //Red
theColor[1] = ((theIconColor >> 4) & 0x03) * 64; //Green
theColor[2] = ((theIconColor >> 2) & 0x03) * 64; //Blue
//remaining two bits are fine granularity brightness shift for all three colors
int brightness_shift = (theIconColor & 0x03) * 16;
float max = max(theColor[0],max(theColor[1],theColor[2]));
theColor[0] += ((int)(theColor[0]/max))*brightness_shift;
theColor[1] += ((int)(theColor[1]/max))*brightness_shift;
theColor[2] += ((int)(theColor[2]/max))*brightness_shift;
vgui::BitmapTGA *pIcon = GetIconPointer(theIconName);
//Icon hasnt been loaded, load it now and add it to list of icons.
if(pIcon == NULL)
{
pIcon = vgui_LoadTGANoInvertAlpha(theIconName.c_str());
if(pIcon)
m_CustomIconList.push_back( make_pair(pIcon, theIconName) );
}
//set the icon + color
if(pIcon)
{
pLabel->setImage(pIcon);
pLabel->setFgColorAsImageColor(false);
pIcon->setColor(BuildColor(theColor[0],theColor[1],theColor[2], gHUD.GetGammaSlope()));
}
}
}
else //NOT UPP
{
// Check if we have authority. Right now these override the tracker icons. Listed in increasing order of "importance".
if(thePlayerAuthentication & PLAYERAUTH_CHEATINGDEATH)
{
// Red
pLabel->setImage(m_pCheatingDeathIcon);
pLabel->setFgColorAsImageColor(false);
m_pCheatingDeathIcon->setColor(BuildColor(255, 69, 9, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_VETERAN)
{
// Yellow
pLabel->setImage(m_pVeteranIcon);
pLabel->setFgColorAsImageColor(false);
m_pVeteranIcon->setColor(BuildColor(248, 252, 0, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_BETASERVEROP)
{
// Whitish
pLabel->setImage(m_pServerOpIcon);
pLabel->setFgColorAsImageColor(false);
m_pServerOpIcon->setColor(BuildColor(220, 220, 220, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_CONTRIBUTOR)
{
// Light blue
pLabel->setImage(m_pContribIcon);
pLabel->setFgColorAsImageColor(false);
m_pContribIcon->setColor(BuildColor(117, 214, 241, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_GUIDE)
{
// Magenta
pLabel->setImage(m_pGuideIcon);
pLabel->setFgColorAsImageColor(false);
m_pGuideIcon->setColor(BuildColor(208, 16, 190, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_PLAYTESTER)
{
// Orange
pLabel->setImage(m_pPTIcon);
pLabel->setFgColorAsImageColor(false);
m_pPTIcon->setColor(BuildColor(255, 167, 54, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_DEVELOPER)
{
// TSA blue
pLabel->setImage(m_pDevIcon);
pLabel->setFgColorAsImageColor(false);
m_pDevIcon->setColor(BuildColor(100, 215, 255, gHUD.GetGammaSlope()));
}
if(thePlayerAuthentication & PLAYERAUTH_SERVEROP)
{
// Bright green
pLabel->setImage(m_pServerOpIcon);
pLabel->setFgColorAsImageColor(false);
m_pServerOpIcon->setColor(BuildColor(0, 255, 0, gHUD.GetGammaSlope()));
}
// Allow custom icons to override other general icons
if(thePlayerAuthentication & PLAYERAUTH_CUSTOM)
{
if(theCustomIcon != "")
{
string theIconName = theCustomIcon.substr(0, strlen(theCustomIcon.c_str()) - 3);
string theFullCustomIconString = string("gfx/vgui/640_") + theIconName + string(".tga");
vgui::BitmapTGA *pIcon = GetIconPointer(theCustomIcon);
//Icon hasnt been loaded, load it now and add it to list of icons.
if(pIcon == NULL)
{
pIcon = vgui_LoadTGANoInvertAlpha(theFullCustomIconString.c_str());
if(pIcon)
m_CustomIconList.push_back( make_pair(pIcon, theCustomIcon) );
}
if(pIcon)
{
pLabel->setImage(pIcon);
pLabel->setFgColorAsImageColor(false);
// Parse color (last 3 bytes are the RGB values 1-9)
string theColor = theCustomIcon.substr( strlen(theCustomIcon.c_str())-3, 3);
int theRed = (MakeIntFromString(theColor.substr(0, 1))/9.0f)*255;
int theGreen = (MakeIntFromString(theColor.substr(1, 1))/9.0f)*255;
int theBlue = (MakeIntFromString(theColor.substr(2, 1))/9.0f)*255;
pIcon->setColor(BuildColor(theRed, theGreen, theBlue, gHUD.GetGammaSlope()));
}
}
}
if(g_pTrackerUser)
{
int playerSlot = theSortedRow;
int trackerID = gEngfuncs.GetTrackerIDForPlayer(playerSlot);
if (g_pTrackerUser->IsFriend(trackerID) && trackerID != g_pTrackerUser->GetTrackerID())
{
pLabel->setImage(m_pTrackerIcon);
pLabel->setFgColorAsImageColor(false);
m_pTrackerIcon->setColor(Color(255, 255, 255, 0));
}
}
vgui::Bitmap* image = theExtraPlayerInfo->icon->getImage( this->GetIconFrame() );
if( image ) { pLabel->setImage( image ); }
}
break;
case COLUMN_SCORE:
@ -1401,7 +1181,7 @@ void ScorePanel::mousePressed(MouseCode code, Panel* panel)
sprintf( string1, CHudTextMessage::BufferedLocaliseTextString( "#Unmuted" ), pl_info->name );
sprintf( string, "%c** %s\n", HUD_PRINTTALK, string1 );
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, strlen(string)+1, string );
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(string)+1, string );
}
else
{
@ -1415,7 +1195,7 @@ void ScorePanel::mousePressed(MouseCode code, Panel* panel)
sprintf( string2, CHudTextMessage::BufferedLocaliseTextString( "#No_longer_hear_that_player" ) );
sprintf( string, "%c** %s %s\n", HUD_PRINTTALK, string1, string2 );
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, strlen(string)+1, string );
gHUD.m_TextMessage.MsgFunc_TextMsg(NULL, (int)strlen(string)+1, string );
}
}
}

View file

@ -88,6 +88,9 @@ private:
vgui::BitmapTGA *m_pVeteranIcon;
vector< pair <vgui::BitmapTGA *, string> > m_CustomIconList;
unsigned int m_iIconFrame;
unsigned int m_iLastFrameIncrementTime;
public:
int m_iNumTeams;
@ -105,6 +108,8 @@ public:
ScorePanel(int x,int y,int wide,int tall);
void Update( void );
int GetIconFrame(void);
void SortTeams( void );
void SortActivePlayers(char* inTeam, bool inSortByEntityIndex = false);

View file

@ -9,7 +9,7 @@
#include "hud.h"
#include "cl_util.h"
#include "hud_servers.h"
#include "net_api.h"
#include "common/net_api.h"
#include "vgui_TeamFortressViewport.h"
#include "vgui_ServerBrowser.h"

View file

@ -11,10 +11,10 @@
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "pm_shared.h"
#include "common/const.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "pm_shared/pm_shared.h"
#include "vgui_TeamFortressViewport.h"
#include "vgui_SpectatorPanel.h"
#include "vgui_scorepanel.h"

View file

@ -78,16 +78,15 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "parsemsg.h"
#include "pm_shared.h"
#include "pm_shared/pm_shared.h"
#include "../engine/keydefs.h"
#include "demo.h"
#include "demo_api.h"
#include "common/demo_api.h"
#include "vgui_int.h"
#include "vgui_TeamFortressViewport.h"
@ -100,8 +99,9 @@
#include "mod/AvHPieMenuHandler.h"
#include "mod/AvHSharedUtil.h"
#include "mod/AvHCommandConstants.h"
#include "mod/AvHBalanceAnalysis.h"
#include "mod/ChatPanel.h"
#include "ui/ChatPanel.h"
#include "mod/AvHNetworkMessages.h"
#include "util/STLUtil.h"
extern int g_iVisibleMouse;
class CCommandMenu;
@ -524,21 +524,6 @@ void CCommandMenu::RecalculatePositions( int iYOffset )
// Make this menu and all menus above it in the chain visible
void CCommandMenu::MakeVisible( CCommandMenu *pChildMenu )
{
/*
// Push down the button leading to the child menu
for (int i = 0; i < m_iButtons; i++)
{
if ( (pChildMenu != NULL) && (m_aButtons[i]->GetSubMenu() == pChildMenu) )
{
m_aButtons[i]->setArmed( true );
}
else
{
m_aButtons[i]->setArmed( false );
}
}
*/
setVisible(true);
if (m_pParentMenu)
m_pParentMenu->MakeVisible( this );
@ -648,12 +633,6 @@ TeamFortressViewport::TeamFortressViewport(int x,int y,int wide,int tall) : Pane
mOptionsScreen = NULL;
mOptionsButtons = new CommandButton*[kNumOptionsButtons];
#ifdef AVH_PLAYTEST_BUILD
mPlaytestVariables = new CListBox();
memset(this->mOptionsButtons, NULL, sizeof(CommandButton*)*kNumOptionsButtons);
mPlaytestAnalysis = new CListBox();
#endif
m_pSpectatorPanel = NULL;
m_pCurrentMenu = NULL;
m_pCurrentCommandMenu = NULL;
@ -753,10 +732,6 @@ void TeamFortressViewport::Initialize( void )
m_pScoreBoard->Initialize();
HideScoreBoard();
}
// if(mOptionsScreen)
// {
// mOptionsScreen->Initialize();
// }
if (m_pSpectatorPanel)
{
// Spectator menu doesn't need initializing
@ -785,10 +760,6 @@ void TeamFortressViewport::Initialize( void )
strcpy(m_sTeamNames[i], "");
}
#ifdef AVH_PLAYTEST_BUILD
this->mBalanceChanged = false;
#endif
App::getInstance()->setCursorOveride( App::getInstance()->getScheme()->getCursor(Scheme::SchemeCursor::scu_none) );
}
@ -1524,285 +1495,10 @@ void TeamFortressViewport::ShowOptionsMenu()
}
}
#ifdef AVH_PLAYTEST_BUILD
this->mNSLogoLabel->setVisible(true);
// Only create control if server sent them down
const BalanceIntListType& theBalanceInts = gHUD.GetBalanceInts();
int theNumBalanceInts = theBalanceInts.size();
if(this->mPlaytestVariables && (theNumBalanceInts > 0))
{
// Clear out existing entries
this->mPlaytestVariables->Init();
// Populate playtest info
this->mPlaytestVariableRow = 0;
for(BalanceIntListType::const_iterator theIter = theBalanceInts.begin(); theIter != theBalanceInts.end(); theIter++)
{
this->AddBalanceVariable(theIter->first);
}
const BalanceFloatListType& theBalanceFloats = gHUD.GetBalanceFloats();
for(BalanceFloatListType::const_iterator theFloatIter = theBalanceFloats.begin(); theFloatIter != theBalanceFloats.end(); theFloatIter++)
{
this->AddBalanceVariable(theFloatIter->first);
}
this->mPlaytestVariables->setSize(this->mPlaytestVariableWidth, this->mPlaytestVariableHeight);
this->mPlaytestVariables->setVisible(true);
}
if(this->mPlaytestAnalysis)
{
this->mPlaytestAnalysis->setSize(this->mPlaytestAnalysisWidth, this->mPlaytestAnalysisHeight);
this->mPlaytestAnalysis->setVisible(true);
}
this->mPlaytestVariableValue->addInputSignal(&this->mPlaytestInputSignal);
this->mPlaytestVariableValue->setSize(kButtonWidth*ScreenWidth(), kButtonHeight*ScreenHeight());
this->mPlaytestVariableValue->setParent(this->mOptionsScreen);
// this->mPlaytestVariableValue->setFont(Scheme::sf_primary1);
this->mPlaytestVariableValue->setVisible(true);
this->mPlaytestVariableValue->setText(this->mPlaytestVariableValueBeforeHide.c_str(), this->mPlaytestVariableValueBeforeHide.length());
this->mPlaytestVariableName.setVisible(true);
#endif
//this->mOptionsEscapeButton->setVisible(true);
gHUD.GetManager().SetMouseVisibility(true);
}
}
#ifdef AVH_PLAYTEST_BUILD
Color kPlaytestEntryLabelBGColor(0, 0, 0, 50);
Color kPlaytestEntryLabelFGColor(255, 255, 255, 70);
Color kPlaytestEntryLabelSelectedBGColor(0, 0, 0, 50);
Color kPlaytestEntryLabelSelectedFGColor(255, 255, 255, 0);
void TeamFortressViewport::AddAnalysisLine(const string& inAnalysisLine)
{
// Add entry
vgui::Label* theCurrentLabel = this->mPlaytestAnalysisLabels + this->mPlaytestAnalysisRow;
string theLabelText = inAnalysisLine;
theCurrentLabel->setText(theLabelText.c_str());
theCurrentLabel->setVisible(true);
theCurrentLabel->setSize(this->mPlaytestAnalysisWidth, kButtonHeight*ScreenHeight());
theCurrentLabel->setParent(this->mOptionsScreen);
//theCurrentLabel->addInputSignal(&this->mPlaytestInputSignal);
int theR, theG, theB, theA;
kPlaytestEntryLabelFGColor.getColor(theR, theG, theB, theA);
theCurrentLabel->setFgColor(theR, theG, theB, theA);
theCurrentLabel->setBgColor(kPlaytestEntryLabelBGColor);
theCurrentLabel->setFont(Scheme::sf_primary1);
theCurrentLabel->setContentAlignment(vgui::Label::a_west);
this->mPlaytestAnalysis->AddItem(this->mPlaytestAnalysisLabels + this->mPlaytestAnalysisRow);
this->mPlaytestAnalysisRow++;
}
void TeamFortressViewport::RecomputeAnalysis()
{
if(this->mPlaytestAnalysis)
{
//this->mPlaytestAnalysis->setVisible(false);
this->mPlaytestAnalysis->Init();
this->mPlaytestAnalysisRow = 0;
// Fetch list of balance strings
StringList theBalanceAnalyses;
AvHBAComputeAnalysis(theBalanceAnalyses);
// Add them
for(StringList::const_iterator theIter = theBalanceAnalyses.begin(); theIter != theBalanceAnalyses.end(); theIter++)
{
this->AddAnalysisLine(*theIter);
}
//this->mPlaytestAnalysis->setVisible(true);
}
}
void TeamFortressViewport::AddBalanceVariable(const string& inVariableName)
{
// Add entry
vgui::Label* theCurrentLabel = this->mPlaytestEntryLabels + this->mPlaytestVariableRow;
string theLabelText = inVariableName;
theCurrentLabel->setText(theLabelText.c_str());
theCurrentLabel->setVisible(true);
theCurrentLabel->setSize(this->mPlaytestVariableWidth, kButtonHeight*ScreenHeight());
theCurrentLabel->setParent(this->mOptionsScreen);
theCurrentLabel->addInputSignal(&this->mPlaytestInputSignal);
int theR, theG, theB, theA;
kPlaytestEntryLabelFGColor.getColor(theR, theG, theB, theA);
theCurrentLabel->setFgColor(theR, theG, theB, theA);
theCurrentLabel->setBgColor(kPlaytestEntryLabelBGColor);
theCurrentLabel->setFont(Scheme::sf_primary1);
theCurrentLabel->setContentAlignment(vgui::Label::a_west);
this->mPlaytestVariables->AddItem(this->mPlaytestEntryLabels + this->mPlaytestVariableRow);
this->mPlaytestVariableRow++;
}
// Input signal for playtest labels in options menu
void OptionsScreenInputSignal::SelectLabel(Panel* inPanel)
{
SmartLabel* theLabel = dynamic_cast<SmartLabel*>(inPanel);
if(theLabel)
{
// Look up variable name
string theString = theLabel->getText();
float theValue = 0.0f;
bool theFoundValue = false;
bool theFoundFloat = false;
const BalanceIntListType& theBalanceInts = gHUD.GetBalanceInts();
for(BalanceIntListType::const_iterator theIter = theBalanceInts.begin(); theIter != theBalanceInts.end(); theIter++)
{
if(theIter->first == theString)
{
theValue = theIter->second;
theFoundValue = true;
break;
}
}
if(!theFoundValue)
{
const BalanceFloatListType& theBalanceFloats = gHUD.GetBalanceFloats();
for(BalanceFloatListType::const_iterator theIter = theBalanceFloats.begin(); theIter != theBalanceFloats.end(); theIter++)
{
if(theIter->first == theString)
{
theValue = theIter->second;
theFoundValue = true;
theFoundFloat = true;
break;
}
}
}
if(theFoundValue)
{
const char* theSound = AvHSHUGetCommonSoundName(gHUD.GetIsAlien(), WEAPON_SOUND_MOVE_SELECT);
gHUD.PlayHUDSound(theSound, kHUDSoundVolume);
// Read value from this label
gViewPort->mPlaytestVariableName.setText(theString.length(), theString.c_str());
// Set text entry value
char theReadableValue[1024];
if(theFoundFloat)
{
sprintf(theReadableValue, "%.2f", theValue);
}
else
{
sprintf(theReadableValue, "%d", (int)theValue);
}
gViewPort->mPlaytestVariableValue->setText(theReadableValue, strlen(theReadableValue));
}
}
}
void OptionsScreenInputSignal::cursorMoved(int x,int y,Panel* panel)
{
}
void OptionsScreenInputSignal::cursorEntered(Panel* inPanel)
{
SmartLabel* theCurrentLabel = dynamic_cast<SmartLabel*>(inPanel);
if(theCurrentLabel)
{
int theR, theG, theB, theA;
kPlaytestEntryLabelSelectedFGColor.getColor(theR, theG, theB, theA);
theCurrentLabel->setFgColor(theR, theG, theB, theA);
theCurrentLabel->setBgColor(kPlaytestEntryLabelSelectedBGColor);
}
}
void OptionsScreenInputSignal::cursorExited(Panel* inPanel)
{
SmartLabel* theCurrentLabel = dynamic_cast<SmartLabel*>(inPanel);
if(theCurrentLabel)
{
int theR, theG, theB, theA;
kPlaytestEntryLabelFGColor.getColor(theR, theG, theB, theA);
theCurrentLabel->setFgColor(theR, theG, theB, theA);
theCurrentLabel->setBgColor(kPlaytestEntryLabelBGColor);
}
}
void OptionsScreenInputSignal::mousePressed(MouseCode code,Panel* panel)
{
if(code == MOUSE_LEFT)
{
this->SelectLabel(panel);
}
}
void OptionsScreenInputSignal::mouseDoublePressed(MouseCode code,Panel* panel)
{
}
void OptionsScreenInputSignal::mouseReleased(MouseCode code,Panel* panel)
{
}
void OptionsScreenInputSignal::mouseWheeled(int delta,Panel* panel)
{
}
void OptionsScreenInputSignal::keyPressed(KeyCode code,Panel* panel)
{
}
void OptionsScreenInputSignal::keyTyped(KeyCode code, Panel* panel)
{
if((panel == gViewPort->mPlaytestVariableValue) && (code == KEY_ENTER))
{
// Read variable name
string theVariableName = gViewPort->mPlaytestVariableName.getText();
// Read variable value out of text entry
char theBuff[256];
gViewPort->mPlaytestVariableValue->getText(0, theBuff, 256);
string theValue(theBuff);
// Emit console command to change this value
string theConsoleCommand = string(kcSetBalanceVar) + " " + theVariableName + " " + theValue;
char theBuff2[256];
sprintf(theBuff2, "%s", theConsoleCommand.c_str());
gEngfuncs.pfnClientCmd(theBuff2);
}
}
void OptionsScreenInputSignal::keyReleased(KeyCode code,Panel* panel)
{
}
void OptionsScreenInputSignal::keyFocusTicked(Panel* panel)
{
}
#endif
void TeamFortressViewport::HideOptionsMenu()
{
if(this->mOptionsScreen)
@ -1818,40 +1514,6 @@ void TeamFortressViewport::HideOptionsMenu()
this->mOptionsButtons[i]->setVisible(false);
}
}
#ifdef AVH_PLAYTEST_BUILD
this->mNSLogoLabel->setVisible(false);
if(this->mPlaytestVariables)
{
this->mPlaytestVariables->setVisible(false);
this->mPlaytestVariables->setBgColor(128, 128, 128, 10);
this->mPlaytestVariables->setFgColor(128, 128, 128, 40);
}
if(this->mPlaytestAnalysis)
{
this->mPlaytestAnalysis->setVisible(false);
this->mPlaytestAnalysis->setBgColor(128, 128, 128, 10);
this->mPlaytestAnalysis->setFgColor(128, 128, 128, 40);
}
this->mPlaytestVariableValue->setVisible(false);
this->mPlaytestVariableValue->removeInputSignal(&this->mPlaytestInputSignal);
// Save text of the value so we can restore it when the screen comes back up (can't figure out way to turn off input)
char theText[1024];
this->mPlaytestVariableValue->getText(0, theText, 1024);
this->mPlaytestVariableValueBeforeHide = "";
if(theText[0] != '\0')
{
this->mPlaytestVariableValueBeforeHide = string(theText);
}
this->mPlaytestVariableValue->requestFocusNext();
this->mPlaytestVariableName.setVisible(false);
#endif
gHUD.GetManager().SetMouseVisibility(false);
@ -1871,32 +1533,6 @@ bool TeamFortressViewport::IsOptionsMenuVisible()
return theIsVisible;
}
//-----------------------------------------------------------------------------
// Purpose: Activate's the player special ability
// called when the player hits their "special" key
//-----------------------------------------------------------------------------
void TeamFortressViewport::InputPlayerSpecial( void )
{
if (!m_iInitialized)
return;
if ( g_iPlayerClass == PC_ENGINEER || g_iPlayerClass == PC_SPY )
{
ShowCommandMenu( gViewPort->m_StandardMenu );
if ( m_pCurrentCommandMenu )
{
m_pCurrentCommandMenu->KeyInput( '7' );
}
}
else
{
// if it's any other class, just send the command down to the server
ClientCmd( "_special" );
}
}
// Set the submenu of the Command Menu
void TeamFortressViewport::SetCurrentCommandMenu( CCommandMenu *pNewMenu )
{
@ -2054,15 +1690,6 @@ void TeamFortressViewport::UpdateSpectatorPanel()
}
// If balance has changed, recompute balance
#ifdef AVH_PLAYTEST_BUILD
if(this->mBalanceChanged && this->IsOptionsMenuVisible())
{
this->RecomputeAnalysis();
this->mBalanceChanged = false;
}
#endif
m_flSpectatorPanelLastUpdated = gHUD.m_flTime + 1.0; // update every seconds
}
@ -2098,62 +1725,6 @@ void TeamFortressViewport::CreateOptionsMenu()
int theScreenWidth = ScreenWidth();
int theScreenHeight = ScreenHeight();
// Populate playtest info
#ifdef AVH_PLAYTEST_BUILD
this->mPlaytestVariables->setVisible(false);
this->mPlaytestVariables->setParent(this->mOptionsScreen);
int thePlaytestX = (xInset /*+ kButtonWidth + kButtonHorizontalSpacing*/)*ScreenWidth();
int thePlaytestY = yInset*ScreenHeight();
this->mPlaytestVariables->setPos(thePlaytestX, thePlaytestY);
this->mPlaytestVariableWidth = kButtonWidth*2.1f*ScreenWidth();
this->mPlaytestVariableHeight = kButtonHeight*10.0f*ScreenHeight();
int theColumnTwoX = thePlaytestX + this->mPlaytestVariableWidth + xInset*ScreenWidth();
this->mPlaytestAnalysis->setVisible(false);
this->mPlaytestAnalysis->setParent(this->mOptionsScreen);
this->mPlaytestAnalysis->setPos(.4f*ScreenWidth(), .6*ScreenHeight());
this->mPlaytestAnalysisWidth = .4*ScreenWidth();
this->mPlaytestAnalysisHeight = .3*ScreenHeight();
this->mNSLogoBitmap = vgui_LoadTGANoInvertAlpha("gfx/vgui/ns-logo.tga");
this->mNSLogoBitmap->setColor(Color(255, 255, 255, 0));
int theBitmapWidth, theBitmapHeight;
this->mNSLogoBitmap->getSize(theBitmapWidth, theBitmapHeight);
this->mNSLogoLabel = new vgui::Label("", theColumnTwoX, thePlaytestY, theBitmapWidth, theBitmapHeight);
this->mNSLogoLabel->setParent(this->mOptionsScreen);
this->mNSLogoLabel->setImage(this->mNSLogoBitmap);
//this->mNSLogoLabel->setFgColorAsImageColor(false);
Color thePlaytestBGColor(0, 0, 0, 0);
Color thePlaytestFGColor(128, 128, 128, 128);
this->mPlaytestVariableName.setParent(this);
int thePlaytestVariableNameY = thePlaytestY + theBitmapHeight + yInset*ScreenHeight();
this->mPlaytestVariableName.setPos(theColumnTwoX, thePlaytestVariableNameY);//= new vgui::Label("", kPlaytestVariableXOffset*theScreenWidth, kPlaytestVariableYOffset*theScreenHeight, kButtonWidth, kButtonHeight);
this->mPlaytestVariableName.setSize(kButtonWidth, kButtonHeight);
this->mPlaytestVariableName.setBgColor(thePlaytestBGColor);
this->mPlaytestVariableName.setFgColor(Scheme::sc_white);
this->mPlaytestVariableValue = new TextEntry("", theColumnTwoX, thePlaytestVariableNameY + yInset*theScreenHeight, kButtonWidth, kButtonHeight/2.0f);
this->mPlaytestVariableValue->setBgColor(thePlaytestBGColor);
this->mPlaytestVariableValue->setFgColor(Scheme::sc_white);
for(int i = 0; i < kNumOptionsButtons; i++)
{
const char* theLabel = kOptionsButtons[i*2];
char* theCommand = kOptionsButtons[i*2 + 1];
//CommandButton* theCurrentCommandButton = this->mOptionsButtons[i];
this->mOptionsButtons[i] = new CommandButton(CHudTextMessage::BufferedLocaliseTextString(theLabel), theColumnTwoX + theBitmapWidth + xInset*theScreenWidth, yInset*theScreenHeight + (float)i*(kButtonHeight+kButtonVerticalSpacing)*ScreenHeight(), kButtonWidth*theScreenWidth, kButtonHeight*theScreenHeight);
this->mOptionsButtons[i]->setParent(this->mOptionsScreen);
this->mOptionsButtons[i]->setBgColor(128, 128, 128, 40);
this->mOptionsButtons[i]->addActionSignal(new COptionsScreen_StringCommand(theCommand));
this->mOptionsButtons[i]->setVisible(false);
this->mOptionsButtons[i]->setFont(Scheme::sf_primary1);
}
#endif
}
void TeamFortressViewport::CreateServerBrowser( void )
@ -2812,29 +2383,17 @@ int TeamFortressViewport::KeyInput( int down, int keynum, const char *pszCurrent
{
m_chatPanel->setVisible(true);
m_chatPanel->requestFocus();
m_chatPanel->SetChatMode("say");
m_chatPanel->SetChatMode(ChatPanel::chatModeAll);
return 0;
}
else if (down && pszCurrentBinding && !strcmp(pszCurrentBinding, kcTeamChat))
{
m_chatPanel->setVisible(true);
m_chatPanel->requestFocus();
m_chatPanel->SetChatMode("say_team");
m_chatPanel->SetChatMode(ChatPanel::chatModeTeam);
return 0;
}
// Enter gets out of Spectator Mode by bringing up the Team Menu
// if (m_iUser1 && gEngfuncs.Con_IsVisible() == false )
// {
// //if ( down && (keynum == K_ENTER || keynum == K_KP_ENTER) )
// if ( down && keynum == K_F1 )
// {
// //ShowVGUIMenu( MENU_TEAM );
// gEngfuncs.pfnClientCmd(kcReadyRoom);
// }
// }
// Open Text Window?
if (m_pCurrentMenu && gEngfuncs.Con_IsVisible() == false)
{
@ -2918,105 +2477,31 @@ ChatPanel* TeamFortressViewport::GetChatPanel()
//================================================================
// Message Handlers
int TeamFortressViewport::MsgFunc_ValClass(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
for (int i = 0; i < 5; i++)
m_iValidClasses[i] = READ_SHORT();
// Force the menu to update
UpdateCommandMenu( m_StandardMenu );
return 1;
}
int TeamFortressViewport::MsgFunc_TeamNames(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iNumberOfTeams = READ_BYTE();
StringList team_names;
NetMsg_TeamNames( pbuf, iSize, team_names );
for (int i = 0; i < m_iNumberOfTeams; i++)
char team_translated[128];
strcpy(team_translated, gHUD.m_TextMessage.LookupString(kTeamTitle));
char team_name_translated[MAX_TEAMNAME_SIZE];
for( int team_number = 0; team_number < team_names.size(); team_number++ )
{
//int teamNum = i + 1;
int teamNum = i;
gHUD.m_TextMessage.LocaliseTextString( team_names[team_number].c_str(), team_name_translated, MAX_TEAMNAME_SIZE );
// Build team title
gHUD.m_TextMessage.LocaliseTextString( READ_STRING(), m_sTeamNames[teamNum], MAX_TEAMNAME_SIZE );
// Don't append "Team: 0" or "Team: Spectators", only for higher teams
if((i >= 1) && (i < m_iNumberOfTeams-1))
team_names[team_number] = "";
if( team_number != 0 && team_number < (m_iNumberOfTeams-1) ) //don't prepend information for spectators or team 0
{
char theTeamTranslation[128];
strcpy(theTeamTranslation, gHUD.m_TextMessage.LookupString(kTeamTitle));
char theFullTeamName[256];
sprintf(theFullTeamName, "%s %d: %s", theTeamTranslation, i, m_sTeamNames[teamNum]);
strcpy(m_sTeamNames[teamNum], theFullTeamName);
}
// Set the team name buttons
if (m_pTeamButtons[i])
m_pTeamButtons[i]->setText( m_sTeamNames[teamNum] );
// range check this value...m_pDisguiseButtons[5];
if ( teamNum < 5 )
{
// Set the disguise buttons
if ( m_pDisguiseButtons[teamNum] )
m_pDisguiseButtons[teamNum]->setText( m_sTeamNames[teamNum] );
team_names[team_number] += team_translated;
team_names[team_number] += " ";
team_names[team_number] += MakeStringFromInt( team_number );
team_names[team_number] += ": ";
}
team_names[team_number] += team_name_translated;
strcpy(m_sTeamNames[team_number], team_names[team_number].c_str());
}
// Update the Team Menu
if (m_pTeamMenu)
m_pTeamMenu->Update();
return 1;
}
int TeamFortressViewport::MsgFunc_Feign(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iIsFeigning = READ_BYTE();
// Force the menu to update
UpdateCommandMenu( m_StandardMenu );
return 1;
}
int TeamFortressViewport::MsgFunc_Detpack(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iIsSettingDetpack = READ_BYTE();
// Force the menu to update
UpdateCommandMenu( m_StandardMenu );
return 1;
}
int TeamFortressViewport::MsgFunc_VGUIMenu(const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
int iMenu = READ_BYTE();
// Map briefing includes the name of the map (because it's sent down before the client knows what map it is)
if (iMenu == MENU_MAPBRIEFING)
{
strncpy( m_sMapName, READ_STRING(), sizeof(m_sMapName) );
m_sMapName[ sizeof(m_sMapName) - 1 ] = '\0';
}
// Bring up the menu6
ShowVGUIMenu( iMenu );
return 1;
}
@ -3025,110 +2510,54 @@ int TeamFortressViewport::MsgFunc_MOTD( const char *pszName, int iSize, void *pb
if (m_iGotAllMOTD)
m_szMOTD[0] = 0;
BEGIN_READ( pbuf, iSize );
string MOTD;
bool is_finished;
NetMsg_MOTD( pbuf, iSize, is_finished, MOTD );
m_iGotAllMOTD = READ_BYTE();
m_iGotAllMOTD = is_finished ? 1 : 0;
int roomInArray = sizeof(m_szMOTD) - strlen(m_szMOTD) - 1;
int roomInArray = (int)max( 0, sizeof(m_szMOTD) - strlen(m_szMOTD) - 1);
strncat( m_szMOTD, READ_STRING(), roomInArray >= 0 ? roomInArray : 0 );
strncat( m_szMOTD, MOTD.c_str(), roomInArray );
m_szMOTD[ sizeof(m_szMOTD)-1 ] = '\0';
// don't show MOTD for HLTV spectators
if ( m_iGotAllMOTD && !gEngfuncs.IsSpectateOnly() )
{
//ShowVGUIMenu( MENU_INTRO );
//gHUD.GetManager().SetMouseVisibility(true);
//ShowOptionsMenu();
// gHUD.AddTooltip(m_szMOTD, false, kMOTDToolTipMaxWidth);
}
return 1;
}
int TeamFortressViewport::MsgFunc_BuildSt( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iBuildState = READ_BYTE();
// Force the menu to update
UpdateCommandMenu( m_StandardMenu );
return 1;
}
int TeamFortressViewport::MsgFunc_RandomPC( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iRandomPC = READ_BYTE();
return 1;
}
int TeamFortressViewport::MsgFunc_ServerName( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
string name;
NetMsg_ServerName( pbuf, iSize, name );
memset(this->m_szServerName, 0, MAX_SERVERNAME_LENGTH);
strncpy( m_szServerName, READ_STRING(), MAX_SERVERNAME_LENGTH );
strncpy( m_szServerName, name.c_str(), MAX_SERVERNAME_LENGTH );
return 1;
}
int TeamFortressViewport::MsgFunc_ScoreInfo( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
short cl = READ_BYTE();
short score = READ_SHORT();
short frags = READ_SHORT();
short deaths = READ_SHORT();
short playerclass = READ_BYTE();
short auth = READ_SHORT();
bool is_upp = (auth & PLAYERAUTH_UPP_MODE);
short teamnumber = READ_SHORT();
short color = 0;
if(is_upp)
{
color = READ_BYTE();
}
else if(auth & PLAYERAUTH_CUSTOM)
{
//clear the string (I dont think this array is reset anywhere else (since everything is set when the score info message is sent anyways)
//so just memset it here to prevent any possible problems.
memset(&g_PlayerExtraInfo[cl].customicon, 0, sizeof(g_PlayerExtraInfo[cl].customicon));
ScoreInfo info;
NetMsg_ScoreInfo( pbuf, iSize, info );
// Read custom icon
char* theString = READ_STRING();
if(theString && strlen(theString) >= 4 && strlen(theString) <= CUSTOM_ICON_LENGTH+2)//make sure the string is within the right size.
strncpy(g_PlayerExtraInfo[cl].customicon, theString, sizeof(g_PlayerExtraInfo[cl].customicon)-1);
}
if ( cl > 0 && cl <= MAX_PLAYERS )
if ( info.player_index > 0 && info.player_index <= MAX_PLAYERS )
{
// Update score, but show + or - indicator on scoreboard when it changes
g_PlayerExtraInfo[cl].lastScore = g_PlayerExtraInfo[cl].score;
g_PlayerExtraInfo[cl].score = score;
if(g_PlayerExtraInfo[cl].score != g_PlayerExtraInfo[cl].lastScore)
g_PlayerExtraInfo[info.player_index].lastScore = g_PlayerExtraInfo[info.player_index].score;
g_PlayerExtraInfo[info.player_index].score = info.score;
if(g_PlayerExtraInfo[info.player_index].score != g_PlayerExtraInfo[info.player_index].lastScore)
{
g_PlayerExtraInfo[cl].timeOfLastScoreChange = gHUD.GetTimeOfLastUpdate();
g_PlayerExtraInfo[info.player_index].timeOfLastScoreChange = gHUD.GetTimeOfLastUpdate();
}
// Update other info
g_PlayerExtraInfo[cl].frags = frags;
g_PlayerExtraInfo[cl].deaths = deaths;
g_PlayerExtraInfo[cl].playerclass = playerclass;
g_PlayerExtraInfo[cl].teamnumber = teamnumber;
g_PlayerExtraInfo[cl].auth = auth;
g_PlayerExtraInfo[cl].color = color;
g_PlayerExtraInfo[info.player_index].frags = info.frags;
g_PlayerExtraInfo[info.player_index].deaths = info.deaths;
g_PlayerExtraInfo[info.player_index].playerclass = info.player_class;
g_PlayerExtraInfo[info.player_index].teamnumber = max( info.team, 0 );
// Don't go below 0!
if ( g_PlayerExtraInfo[cl].teamnumber < 0 )
g_PlayerExtraInfo[cl].teamnumber = 0;
// Icon is now handled through the ProfileInfo update
UpdateOnPlayerInfo();
}
@ -3144,23 +2573,24 @@ int TeamFortressViewport::MsgFunc_ScoreInfo( const char *pszName, int iSize, voi
// if this message is never received, then scores will simply be the combined totals of the players.
int TeamFortressViewport::MsgFunc_TeamScore( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
char *TeamName = READ_STRING();
string team_name;
int score, deaths;
NetMsg_TeamScore( pbuf, iSize, team_name, score, deaths );
// find the team matching the name
for ( int i = 1; i <= m_pScoreBoard->m_iNumTeams; i++ )
{
if ( !stricmp( TeamName, g_TeamInfo[i].name ) )
if ( !stricmp( team_name.c_str(), g_TeamInfo[i].name ) )
break;
}
if ( i > m_pScoreBoard->m_iNumTeams )
return 1;
// use this new score data instead of combined player scoresw
// use this new score data instead of combined player scores
g_TeamInfo[i].scores_overriden = TRUE;
g_TeamInfo[i].frags = READ_SHORT();
g_TeamInfo[i].deaths = READ_SHORT();
g_TeamInfo[i].frags = score;
g_TeamInfo[i].deaths = deaths;
return 1;
}
@ -3174,13 +2604,14 @@ int TeamFortressViewport::MsgFunc_TeamInfo( const char *pszName, int iSize, void
if (!m_pScoreBoard)
return 1;
BEGIN_READ( pbuf, iSize );
short cl = READ_BYTE();
int player_index;
string team_id;
NetMsg_TeamInfo( pbuf, iSize, player_index, team_id );
if ( cl > 0 && cl <= MAX_PLAYERS )
if ( player_index > 0 && player_index <= MAX_PLAYERS )
{
// set the players team
strncpy( g_PlayerExtraInfo[cl].teamname, READ_STRING(), MAX_TEAM_NAME );
strncpy( g_PlayerExtraInfo[player_index].teamname, team_id.c_str(), MAX_TEAM_NAME );
}
// rebuild the list of teams
@ -3193,33 +2624,3 @@ void TeamFortressViewport::DeathMsg( int killer, int victim )
{
m_pScoreBoard->DeathMsg(killer,victim);
}
int TeamFortressViewport::MsgFunc_Spectator( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
short cl = READ_BYTE();
if ( cl > 0 && cl <= MAX_PLAYERS )
{
g_IsSpectator[cl] = READ_BYTE();
}
return 1;
}
int TeamFortressViewport::MsgFunc_AllowSpec( const char *pszName, int iSize, void *pbuf )
{
BEGIN_READ( pbuf, iSize );
m_iAllowSpectators = READ_BYTE();
// Force the menu to update
UpdateCommandMenu( m_StandardMenu );
// If the team menu is up, update it too
if (m_pTeamMenu)
m_pTeamMenu->Update();
return 1;
}

View file

@ -21,10 +21,9 @@
#include<VGUI_ScrollPanel.h>
#include<VGUI_ScrollBar.h>
#include<VGUI_Slider.h>
#include<VGUI_ListBox.h>
#include<VGUI_TextEntry.h>
#include "cl_dll/CLabelHeader.h"
#include "build.h"
#include "game_shared/VGUI_ListBox.h"
#include "game_shared/VGUI_Grid.h"
@ -408,27 +407,6 @@ public:
virtual void paintBackground();
};
#ifdef AVH_PLAYTEST_BUILD
class OptionsScreenInputSignal : public InputSignal
{
public:
virtual void cursorMoved(int x,int y,Panel* panel);
virtual void cursorEntered(Panel* panel);
virtual void cursorExited(Panel* panel);
virtual void mousePressed(MouseCode code,Panel* panel);
virtual void mouseDoublePressed(MouseCode code,Panel* panel);
virtual void mouseReleased(MouseCode code,Panel* panel);
virtual void mouseWheeled(int delta,Panel* panel);
virtual void keyPressed(KeyCode code,Panel* panel);
virtual void keyTyped(KeyCode code,Panel* panel);
virtual void keyReleased(KeyCode code,Panel* panel);
virtual void keyFocusTicked(Panel* panel);
private:
void SelectLabel(Panel* inPanel);
};
#endif
class SmartLabel : public vgui::Label
{
public:
@ -534,7 +512,6 @@ public:
void UpdateSpectatorPanel( void );
int KeyInput( int down, int keynum, const char *pszCurrentBinding );
void InputPlayerSpecial( void );
void GetAllPlayersInfo( void );
void DeathMsg( int killer, int victim );
@ -577,20 +554,12 @@ public:
int GetAllowSpectators() { return m_iAllowSpectators; };
// Message Handlers
int MsgFunc_ValClass(const char *pszName, int iSize, void *pbuf );
int MsgFunc_TeamNames(const char *pszName, int iSize, void *pbuf );
int MsgFunc_Feign(const char *pszName, int iSize, void *pbuf );
int MsgFunc_Detpack(const char *pszName, int iSize, void *pbuf );
int MsgFunc_VGUIMenu(const char *pszName, int iSize, void *pbuf );
int MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf );
int MsgFunc_BuildSt( const char *pszName, int iSize, void *pbuf );
int MsgFunc_RandomPC( const char *pszName, int iSize, void *pbuf );
int MsgFunc_ServerName( const char *pszName, int iSize, void *pbuf );
int MsgFunc_ScoreInfo( const char *pszName, int iSize, void *pbuf );
int MsgFunc_TeamScore( const char *pszName, int iSize, void *pbuf );
int MsgFunc_TeamInfo( const char *pszName, int iSize, void *pbuf );
int MsgFunc_Spectator( const char *pszName, int iSize, void *pbuf );
int MsgFunc_AllowSpec( const char *pszName, int iSize, void *pbuf );
// Input
bool SlotInput( int iSlot );
@ -615,34 +584,6 @@ public:
CTransparentPanel* mOptionsScreen;
CommandButton** mOptionsButtons;
#ifdef AVH_PLAYTEST_BUILD
void AddAnalysisLine(const string& inAnalysisLine);
void AddBalanceVariable(const string& inVariableName);
#define kMaxPlaytestVariables 2048
CListBox* mPlaytestVariables;
SmartLabel mPlaytestEntryLabels[kMaxPlaytestVariables];
int mPlaytestVariableRow;
CListBox* mPlaytestAnalysis;
SmartLabel mPlaytestAnalysisLabels[kMaxPlaytestVariables];
int mPlaytestAnalysisRow;
bool mBalanceChanged;
void RecomputeAnalysis();
OptionsScreenInputSignal mPlaytestInputSignal;
SmartLabel mPlaytestVariableName;
TextEntry* mPlaytestVariableValue;
string mPlaytestVariableValueBeforeHide;
int mPlaytestVariableWidth;
int mPlaytestVariableHeight;
int mPlaytestAnalysisWidth;
int mPlaytestAnalysisHeight;
vgui::BitmapTGA* mNSLogoBitmap;
vgui::Label* mNSLogoLabel;
#endif
SpectatorPanel *m_pSpectatorPanel;
char m_szServerName[ MAX_SERVERNAME_LENGTH ];
};

View file

@ -11,9 +11,9 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "camera.h"
#include "in_defs.h"
#include "vgui_TeamFortressViewport.h"

View file

@ -9,25 +9,25 @@
#include "hud.h"
#include "cl_util.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "common/cvardef.h"
#include "common/usercmd.h"
#include "common/const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "ref_params.h"
#include "common/entity_state.h"
#include "common/cl_entity.h"
#include "common/ref_params.h"
#include "in_defs.h" // PITCH YAW ROLL
#include "pm_movevars.h"
#include "pm_shared.h"
#include "pm_defs.h"
#include "event_api.h"
#include "pmtrace.h"
#include "screenfade.h"
#include "shake.h"
#include "pm_shared/pm_movevars.h"
#include "pm_shared/pm_shared.h"
#include "pm_shared/pm_defs.h"
#include "common/event_api.h"
#include "common/pmtrace.h"
#include "common/screenfade.h"
#include "engine/shake.h"
#include "mod/AvHClientUtil.h"
#include "APIProxy.h"
#include "engine/APIProxy.h"
#include "Exports.h"
#include "hltv.h"
#include "common/hltv.h"
#include "util/MathUtil.h"
#include "util/STLUtil.h"
#include "mod/AvHMarineEquipmentConstants.h"
@ -57,7 +57,7 @@ extern float vJumpOrigin[3];
extern float vJumpAngles[3];
#include "r_studioint.h"
#include "com_model.h"
#include "common/com_model.h"
extern engine_studio_api_t IEngineStudio;
@ -1441,7 +1441,7 @@ float MaxAngleBetweenAngles( float * a1, float * a2 )
return maxd;
}
void V_GetDoubleTargetsCam(cl_entity_t * ent1, cl_entity_t * ent2,float * angle, float * origin)
void V_GetDoubleTargetsCam(cl_entity_t * ent1, const cl_entity_t * ent2,float * angle, float * origin)
{
float newAngle[3]; float newOrigin[3]; float tempVec[3];
@ -1525,8 +1525,13 @@ void V_GetDoubleTargetsCam(cl_entity_t * ent1, cl_entity_t * ent2,float * angle
InterpolateAngles( newAngle, tempVec, newAngle, 0.5f); */
}
#pragma warning(push)
#pragma warning(disable: 312)
const static cl_entity_t* NO_ENTITY = (cl_entity_t*)0xFFFFFFFF;
#pragma warning(pop)
void V_GetDirectedChasePosition(cl_entity_t * ent1, cl_entity_t * ent2,float * angle, float * origin)
void V_GetDirectedChasePosition(cl_entity_t * ent1, const cl_entity_t * ent2,float * angle, float * origin)
{
if ( v_resetCamera )
@ -1534,8 +1539,8 @@ void V_GetDirectedChasePosition(cl_entity_t * ent1, cl_entity_t * ent2,float *
v_lastDistance = 4096.0f;
// v_cameraMode = CAM_MODE_FOCUS;
}
if ( ( ent2 == (cl_entity_t*)0xFFFFFFFF ) || ( ent1->player && (ent1->curstate.solid == SOLID_NOT) ) )
if ( ent2 == NO_ENTITY || ( ent1->player && (ent1->curstate.solid == SOLID_NOT) ) )
{
// we have no second target or player just died
V_GetSingleTargetCam(ent1, angle, origin);
@ -1606,7 +1611,7 @@ void V_GetChasePos(int target, float * cl_angles, float * origin, float * angles
V_GetDirectedChasePosition( ent, gEngfuncs.GetEntityByIndex( g_iUser3 ),
angles, origin );
else
V_GetDirectedChasePosition( ent, ( cl_entity_t*)0xFFFFFFFF,
V_GetDirectedChasePosition( ent, NO_ENTITY,
angles, origin );
}
else

View file

@ -69,7 +69,7 @@ typedef struct cl_entity_s cl_entity_t;
#endif
#if !defined( PROGS_H )
#include "progs.h"
#include "engine/progs.h"
#endif
struct cl_entity_s

View file

@ -303,7 +303,7 @@ typedef struct auxvert_s
float fv[3]; // viewspace x, y
} auxvert_t;
#include "custom.h"
#include "engine/custom.h"
#define MAX_INFO_STRING 256
#define MAX_SCOREBOARDNAME 32

View file

@ -123,7 +123,7 @@ struct entity_state_s
vec3_t vuser4;
};
#include "pm_info.h"
#include "pm_shared/pm_info.h"
typedef struct clientdata_s
{

File diff suppressed because it is too large Load diff

View file

@ -1,21 +0,0 @@
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2003, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.

View file

@ -1,664 +0,0 @@
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
# $Id: Makefile.am,v 1.41 2003/03/31 11:37:47 bagder Exp $
#
srcdir = .
top_srcdir = .
pkgdatadir = $(datadir)/curl
pkglibdir = $(libdir)/curl
pkgincludedir = $(includedir)/curl
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = i686-pc-linux-gnu
ACLOCAL = ${SHELL} /home/hjw/ns/source/curl/missing --run aclocal-1.7
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/hjw/ns/source/curl/missing --run tar
AR = ar
AS = as
AUTOCONF = ${SHELL} /home/hjw/ns/source/curl/missing --run autoconf
AUTOHEADER = ${SHELL} /home/hjw/ns/source/curl/missing --run autoheader
AUTOMAKE = ${SHELL} /home/hjw/ns/source/curl/missing --run automake-1.7
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CURL_CA_BUNDLE =
CURL_DISABLE_DICT =
CURL_DISABLE_FILE =
CURL_DISABLE_FTP =
CURL_DISABLE_GOPHER =
CURL_DISABLE_HTTP =
CURL_DISABLE_LDAP =
CURL_DISABLE_TELNET =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = dlltool
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
F77 = g77
FFLAGS = -g -O2
HAVE_LIBZ =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
IPV6_ENABLED =
KRB4_ENABLED =
LDFLAGS =
LIBOBJS =
LIBS = -ldl
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAINT = #
MAINTAINER_MODE_FALSE =
MAINTAINER_MODE_TRUE = #
MAKEINFO = ${SHELL} /home/hjw/ns/source/curl/missing --run makeinfo
NO_UNDEFINED_FALSE =
NO_UNDEFINED_TRUE = #
NROFF = /usr/bin/gnroff
OBJDUMP = objdump
OBJEXT = o
OPENSSL_ENABLED =
PACKAGE = curl
PACKAGE_BUGREPORT = curl-bug@haxx.se
PACKAGE_NAME = curl
PACKAGE_STRING = curl -
PACKAGE_TARNAME = curl
PACKAGE_VERSION = -
PATH_SEPARATOR = :
PERL = /usr/bin/perl
PKGADD_NAME = cURL - a client that groks URLs
PKGADD_PKG = HAXXcurl
PKGADD_VENDOR = curl.haxx.se
PKGCONFIG = /usr/bin/pkg-config
RANDOM_FILE = /dev/urandom
RANLIB = ranlib
SED = /bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
VERSION = 7.10.5
VERSIONNUM = 070a05
YACC = bison -y
ac_ct_AR = ar
ac_ct_AS =
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_DLLTOOL =
ac_ct_F77 = g77
ac_ct_OBJDUMP =
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__fastdepCXX_FALSE = #
am__fastdepCXX_TRUE =
am__include = include
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias = i686-linux
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/hjw/ns/source/curl/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = CHANGES COPYING maketgz SSLCERTS reconf Makefile.dist \
curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh
bin_SCRIPTS = curl-config
SUBDIRS = docs lib src include tests packages
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/lib/config.h \
$(top_builddir)/src/config.h \
$(top_builddir)/tests/server/config.h \
$(top_builddir)/lib/ca-bundle.h
CONFIG_CLEAN_FILES = curl-config
SCRIPTS = $(bin_SCRIPTS)
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README COPYING Makefile.am Makefile.in acinclude.m4 \
aclocal.m4 config.guess config.sub configure configure.ac \
curl-config.in depcomp install-sh ltmain.sh missing \
mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
.SUFFIXES:
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: # $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): # configure.ac acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
curl-config: $(top_builddir)/config.status curl-config.in
cd $(top_builddir) && $(SHELL) ./config.status $@
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
$(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(SCRIPTS)
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir)
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am: install-binSCRIPTS
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive ctags \
ctags-recursive dist dist-all dist-gzip distcheck distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am dvi-recursive info info-am info-recursive install \
install-am install-binSCRIPTS install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
uninstall-info-am uninstall-info-recursive uninstall-recursive
# create a root makefile in the distribution:
dist-hook:
rm -rf $(top_builddir)/tests/log
cp $(srcdir)/Makefile.dist $(distdir)/Makefile
html:
cd docs; make html
pdf:
cd docs; make pdf
check: test
test:
@(cd tests; $(MAKE) quiet-test)
test-full:
@(cd tests; $(MAKE) full-test)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:
# %_topdir /home/loic/local/rpm
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
#
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
#
# If additional configure flags are needed to build the package, add the
# following in ~/.rpmmacros
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
# and run make rpm in the following way:
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
#
rpms:
$(MAKE) RPMDIST=curl rpm
$(MAKE) RPMDIST=curl-ssl rpm
rpm:
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
#
# Build a Solaris pkkgadd format file
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
# file (which ends up back in this directory).
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
# pkgadd -d ./HAXXcurl-*
#
# gak - libtool requires an absoulte directory, hence the pwd below...
pkgadd:
umask 022 ; \
make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
cd $(srcdir)/packages/Solaris && $(MAKE) package
#
# Build a cygwin binary tarball installation file
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
cygwinbin:
$(MAKE) -C packages/Win32/cygwin cygwinbin
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,79 +0,0 @@
#
# $Id: Makefile.am,v 1.41 2003/03/31 11:37:47 bagder Exp $
#
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = CHANGES COPYING maketgz SSLCERTS reconf Makefile.dist \
curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh
bin_SCRIPTS = curl-config
SUBDIRS = docs lib src include tests packages
# create a root makefile in the distribution:
dist-hook:
rm -rf $(top_builddir)/tests/log
cp $(srcdir)/Makefile.dist $(distdir)/Makefile
html:
cd docs; make html
pdf:
cd docs; make pdf
check: test
test:
@(cd tests; $(MAKE) quiet-test)
test-full:
@(cd tests; $(MAKE) full-test)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:
# %_topdir /home/loic/local/rpm
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
#
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
#
# If additional configure flags are needed to build the package, add the
# following in ~/.rpmmacros
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
# and run make rpm in the following way:
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
#
rpms:
$(MAKE) RPMDIST=curl rpm
$(MAKE) RPMDIST=curl-ssl rpm
rpm:
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
#
# Build a Solaris pkkgadd format file
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
# file (which ends up back in this directory).
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
# pkgadd -d ./HAXXcurl-*
#
# gak - libtool requires an absoulte directory, hence the pwd below...
pkgadd:
umask 022 ; \
make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
cd $(srcdir)/packages/Solaris && $(MAKE) package
#
# Build a cygwin binary tarball installation file
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
cygwinbin:
$(MAKE) -C packages/Win32/cygwin cygwinbin

View file

@ -1,76 +0,0 @@
#############################################################################
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# In order to be useful for every potential user, curl and libcurl are
# dual-licensed under the MPL and the MIT/X-derivate licenses.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the MPL or the MIT/X-derivate
# licenses. You may pick one of these licenses.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# $Id: Makefile.dist,v 1.12 2002/09/07 21:44:02 hartroth Exp $
#############################################################################
all:
./configure
make
ssl:
./configure --with-ssl
make
borland:
cd lib & make -f Makefile.b32
cd src & make -f Makefile.b32
mingw32:
cd lib & make -f Makefile.m32 ZLIB=1
cd src & make -f Makefile.m32 ZLIB=1
mingw32-ssl:
cd lib & make -f Makefile.m32 SSL=1 ZLIB=1
cd src & make -f Makefile.m32 SSL=1 ZLIB=1
vc:
cd lib
nmake -f Makefile.vc6 cfg=release
cd ..\src
nmake -f Makefile.vc6
vc-ssl:
cd lib
nmake -f Makefile.vc6 cfg=release-ssl
cd ..\src
nmake -f Makefile.vc6 cfg=release-ssl
vc-ssl-dll:
cd lib
nmake -f Makefile.vc6 cfg=release-ssl-dll
cd ..\src
nmake -f Makefile.vc6
cygwin:
./configure
make
cygwin-ssl:
./configure --with-ssl
make
unix: all
unix-ssl: ssl
linux: all
linux-ssl: ssl

View file

@ -1,664 +0,0 @@
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# $Id: Makefile.am,v 1.41 2003/03/31 11:37:47 bagder Exp $
#
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
HAVE_LIBZ = @HAVE_LIBZ@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPV6_ENABLED = @IPV6_ENABLED@
KRB4_ENABLED = @KRB4_ENABLED@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
NROFF = @NROFF@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL_ENABLED = @OPENSSL_ENABLED@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKGADD_NAME = @PKGADD_NAME@
PKGADD_PKG = @PKGADD_PKG@
PKGADD_VENDOR = @PKGADD_VENDOR@
PKGCONFIG = @PKGCONFIG@
RANDOM_FILE = @RANDOM_FILE@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONNUM = @VERSIONNUM@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = CHANGES COPYING maketgz SSLCERTS reconf Makefile.dist \
curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh
bin_SCRIPTS = curl-config
SUBDIRS = docs lib src include tests packages
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/lib/config.h \
$(top_builddir)/src/config.h \
$(top_builddir)/tests/server/config.h \
$(top_builddir)/lib/ca-bundle.h
CONFIG_CLEAN_FILES = curl-config
SCRIPTS = $(bin_SCRIPTS)
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README COPYING Makefile.am Makefile.in acinclude.m4 \
aclocal.m4 config.guess config.sub configure configure.ac \
curl-config.in depcomp install-sh ltmain.sh missing \
mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
.SUFFIXES:
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
curl-config: $(top_builddir)/config.status curl-config.in
cd $(top_builddir) && $(SHELL) ./config.status $@
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
$(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" \
distdir=../$(distdir)/$$subdir \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(SCRIPTS)
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(bindir)
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
info: info-recursive
info-am:
install-data-am:
install-exec-am: install-binSCRIPTS
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-libtool clean-recursive ctags \
ctags-recursive dist dist-all dist-gzip distcheck distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am dvi-recursive info info-am info-recursive install \
install-am install-binSCRIPTS install-data install-data-am \
install-data-recursive install-exec install-exec-am \
install-exec-recursive install-info install-info-am \
install-info-recursive install-man install-recursive \
install-strip installcheck installcheck-am installdirs \
installdirs-am installdirs-recursive maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
uninstall-info-am uninstall-info-recursive uninstall-recursive
# create a root makefile in the distribution:
dist-hook:
rm -rf $(top_builddir)/tests/log
cp $(srcdir)/Makefile.dist $(distdir)/Makefile
html:
cd docs; make html
pdf:
cd docs; make pdf
check: test
test:
@(cd tests; $(MAKE) quiet-test)
test-full:
@(cd tests; $(MAKE) full-test)
#
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:
# %_topdir /home/loic/local/rpm
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
#
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
#
# If additional configure flags are needed to build the package, add the
# following in ~/.rpmmacros
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
# and run make rpm in the following way:
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
#
rpms:
$(MAKE) RPMDIST=curl rpm
$(MAKE) RPMDIST=curl-ssl rpm
rpm:
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
#
# Build a Solaris pkkgadd format file
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
# file (which ends up back in this directory).
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
# pkgadd -d ./HAXXcurl-*
#
# gak - libtool requires an absoulte directory, hence the pwd below...
pkgadd:
umask 022 ; \
make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
cd $(srcdir)/packages/Solaris && $(MAKE) package
#
# Build a cygwin binary tarball installation file
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
cygwinbin:
$(MAKE) -C packages/Win32/cygwin cygwinbin
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,68 +0,0 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
README
Curl is a command line tool for transfering data specified with URL
syntax. Find out how to use Curl by reading the curl.1 man page or the
MANUAL document. Find out how to install Curl by reading the INSTALL
document.
libcurl is the library curl is using to do its job. It is readily
available to be used by your software. Read the libcurl.3 man page to
learn how!
You find answers to the most frequent questions we get in the FAQ document.
Study the COPYING file for distribution terms and similar.
CONTACT
If you have problems, questions, ideas or suggestions, please contact us
by posting to a suitable mailing list. See http://curl.haxx.se/mail/
Many major contributors to the project are listed in the THANKS document.
WEB SITE
Visit the curl web site or mirrors for the latest news:
Sweden -- http://curl.haxx.se/
US -- http://curl.sf.net/
Australia -- http://curl.planetmirror.com/
DOWNLOAD
The official download mirror sites are:
Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/
Sweden -- http://cool.haxx.se/curl/
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
Australia -- http://curl.planetmirror.com/download/
US -- http://curl.sourceforge.net/download/
Hongkong -- http://www.execve.net/curl/
CVS
To download the very latest source off the CVS server do this:
cvs -d :pserver:anonymous@cvs.curl.sourceforge.net:/cvsroot/curl login
(just press enter when asked for password)
cvs -d :pserver:anonymous@cvs.curl.sourceforge.net:/cvsroot/curl co curl
(you'll get a directory named curl created, filled with the source code)
cvs -d :pserver:anonymous@cvs.curl.sourceforge.net:/cvsroot/curl logout
(you're off the hook!)
NOTICE
Curl contains pieces of source code that is Copyright (c) 1998, 1999
Kungliga Tekniska Högskolan. This notice is included here to comply with the
distribution terms.

View file

@ -1,39 +0,0 @@
Peer SSL Certificate Verification
=================================
Starting in 7.10, libcurl performs peer SSL certificate verification by
default. This is done by installing a default CA cert bundle on 'make install'
(or similar), that CA bundle package is used by default on operations against
SSL servers.
Alas, if you communicate with HTTPS servers using certificates that are signed
by CAs present in the bundle, you will not notice any changed behavior and you
will seamlessly get a higher security level on your SSL connections since you
can be sure that the remote server really is the one it claims to be.
If the remote server uses a self-signed certificate, or if you don't install
curl's CA cert bundle or if it uses a certificate signed by a CA that isn't
included in the bundle, then you need to do one of the following:
1. Tell libcurl to *not* verify the peer. With libcurl you disable with with
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
With the curl command tool, you disable this with -k/--insecure.
2. Get a CA certificate that can verify the remote server and use the proper
option to point out this CA cert for verification when connecting. For
libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath);
With the curl command tool: --cacert [file]
Neglecting to use one of the above menthods when dealing with a server using a
certficate that isn't signed by one of the certficates in the installed CA
cert bundle, will cause SSL to report an error ("certificate verify failed")
during the handshake and SSL will then refuse further communication with that
server.
This procedure has been deemed The Right Thing even though it adds this extra
trouble for some users, since it adds security to a majority of the SSL
connections that previously weren't really secure. It turned out many people
were using previous versions of curl/libcurl without realizing the need for
the CA cert options to get truly secure SSL connections.

View file

@ -1,445 +0,0 @@
dnl Check for how to set a socket to non-blocking state. There seems to exist
dnl four known different ways, with the one used almost everywhere being POSIX
dnl and XPG3, while the other different ways for different systems (old BSD,
dnl Windows and Amiga).
dnl
dnl There are two known platforms (AIX 3.x and SunOS 4.1.x) where the
dnl O_NONBLOCK define is found but does not work. This condition is attempted
dnl to get caught in this script by using an excessive number of #ifdefs...
dnl
AC_DEFUN(CURL_CHECK_NONBLOCKING_SOCKET,
[
AC_MSG_CHECKING([non-blocking sockets style])
AC_TRY_COMPILE([
/* headers for O_NONBLOCK test */
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
],[
/* try to compile O_NONBLOCK */
#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
# define PLATFORM_SOLARIS
# else
# define PLATFORM_SUNOS4
# endif
#endif
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4)
# define PLATFORM_AIX_V3
#endif
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
#error "O_NONBLOCK does not work on this platform"
#endif
int socket;
int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK);
],[
dnl the O_NONBLOCK test was fine
nonblock="O_NONBLOCK"
AC_DEFINE(HAVE_O_NONBLOCK, 1, [use O_NONBLOCK for non-blocking sockets])
],[
dnl the code was bad, try a different program now, test 2
AC_TRY_COMPILE([
/* headers for FIONBIO test */
#include <unistd.h>
#include <stropts.h>
],[
/* FIONBIO source test */
int flags = ioctl(socket, FIONBIO, &flags);
],[
dnl FIONBIO test was good
nonblock="FIONBIO"
AC_DEFINE(HAVE_FIONBIO, 1, [use FIONBIO for non-blocking sockets])
],[
dnl FIONBIO test was also bad
dnl the code was bad, try a different program now, test 3
AC_TRY_COMPILE([
/* headers for ioctlsocket test (cygwin?) */
#include <windows.h>
],[
/* ioctlsocket source code */
int flags = ioctlsocket(socket, FIONBIO, &flags);
],[
dnl ioctlsocket test was good
nonblock="ioctlsocket"
AC_DEFINE(HAVE_IOCTLSOCKET, 1, [use ioctlsocket() for non-blocking sockets])
],[
dnl ioctlsocket didnt compile!
AC_TRY_COMPILE([
/* headers for IoctlSocket test (Amiga?) */
#include <sys/ioctl.h>
],[
/* IoctlSocket source code */
int flags = IoctlSocket(socket, FIONBIO, (long)1);
],[
dnl ioctlsocket test was good
nonblock="IoctlSocket"
AC_DEFINE(HAVE_IOCTLSOCKET_CASE, 1, [use Ioctlsocket() for non-blocking sockets])
],[
dnl ioctlsocket didnt compile!
nonblock="nada"
AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1, [disabled non-blocking sockets])
])
dnl end of forth test
])
dnl end of third test
])
dnl end of second test
])
dnl end of non-blocking try-compile test
AC_MSG_RESULT($nonblock)
if test "$nonblock" = "nada"; then
AC_MSG_WARN([non-block sockets disabled])
fi
])
dnl Check for socklen_t: historically on BSD it is an int, and in
dnl POSIX 1g it is a type of its own, but some platforms use different
dnl types for the argument to getsockopt, getpeername, etc. So we
dnl have to test to find something that will work.
AC_DEFUN([TYPE_SOCKLEN_T],
[
AC_CHECK_TYPE([socklen_t], ,[
AC_MSG_CHECKING([for socklen_t equivalent])
AC_CACHE_VAL([curl_cv_socklen_t_equiv],
[
# Systems have either "struct sockaddr *" or
# "void *" as the second argument to getpeername
curl_cv_socklen_t_equiv=
for arg2 in "struct sockaddr" void; do
for t in int size_t unsigned long "unsigned long"; do
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
int getpeername (int, $arg2 *, $t *);
],[
$t len;
getpeername(0,0,&len);
],[
curl_cv_socklen_t_equiv="$t"
break
])
done
done
if test "x$curl_cv_socklen_t_equiv" = x; then
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
fi
])
AC_MSG_RESULT($curl_cv_socklen_t_equiv)
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
[type to use in place of socklen_t if not defined])],
[#include <sys/types.h>
#include <sys/socket.h>])
])
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
dnl and a few other things. If not found, we set it to unsigned int, as even
dnl 64-bit implementations use to set it to a 32-bit type.
AC_DEFUN([TYPE_IN_ADDR_T],
[
AC_CHECK_TYPE([in_addr_t], ,[
AC_MSG_CHECKING([for in_addr_t equivalent])
AC_CACHE_VAL([curl_cv_in_addr_t_equiv],
[
curl_cv_in_addr_t_equiv=
for t in "unsigned long" int size_t unsigned long; do
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
],[
$t data = inet_addr ("1.2.3.4");
],[
curl_cv_in_addr_t_equiv="$t"
break
])
done
if test "x$curl_cv_in_addr_t_equiv" = x; then
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
fi
])
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
[type to use in place of in_addr_t if not defined])],
[#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>])
])
dnl ************************************************************
dnl check for "localhost", if it doesn't exist, we can't do the
dnl gethostbyname_r tests!
dnl
AC_DEFUN(CURL_CHECK_WORKING_RESOLVER,[
AC_MSG_CHECKING([if "localhost" resolves])
AC_TRY_RUN([
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
int
main () {
struct hostent *h;
h = gethostbyname("localhost");
exit (h == NULL ? 1 : 0); }],[
AC_MSG_RESULT(yes)],[
AC_MSG_RESULT(no)
AC_MSG_ERROR([can't figure out gethostbyname_r() since localhost doesn't resolve])
]
)
])
dnl ************************************************************
dnl check for working getaddrinfo()
dnl
AC_DEFUN(CURL_CHECK_WORKING_GETADDRINFO,[
AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
AC_TRY_RUN( [
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
void main(void) {
struct addrinfo hints, *ai;
int error;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
if (error) {
exit(1);
}
else {
exit(0);
}
}
],[
ac_cv_working_getaddrinfo="yes"
],[
ac_cv_working_getaddrinfo="no"
],[
ac_cv_working_getaddrinfo="yes"
])])
if test "$ac_cv_working_getaddrinfo" = "yes"; then
AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works])
AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
IPV6_ENABLED=1
AC_SUBST(IPV6_ENABLED)
fi
])
AC_DEFUN(CURL_CHECK_LOCALTIME_R,
[
dnl check for a few thread-safe functions
AC_CHECK_FUNCS(localtime_r,[
AC_MSG_CHECKING(whether localtime_r is declared)
AC_EGREP_CPP(localtime_r,[
#include <time.h>],[
AC_MSG_RESULT(yes)],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(whether localtime_r with -D_REENTRANT is declared)
AC_EGREP_CPP(localtime_r,[
#define _REENTRANT
#include <time.h>],[
AC_DEFINE(NEED_REENTRANT)
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])])
])
AC_DEFUN(CURL_CHECK_INET_NTOA_R,
[
dnl determine if function definition for inet_ntoa_r exists.
AC_CHECK_FUNCS(inet_ntoa_r,[
AC_MSG_CHECKING(whether inet_ntoa_r is declared)
AC_EGREP_CPP(inet_ntoa_r,[
#include <arpa/inet.h>],[
AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
AC_MSG_RESULT(yes)],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(whether inet_ntoa_r with -D_REENTRANT is declared)
AC_EGREP_CPP(inet_ntoa_r,[
#define _REENTRANT
#include <arpa/inet.h>],[
AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT defined])
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))])])
])
AC_DEFUN(CURL_CHECK_GETHOSTBYADDR_R,
[
dnl check for number of arguments to gethostbyaddr_r. it might take
dnl either 5, 7, or 8 arguments.
AC_CHECK_FUNCS(gethostbyaddr_r,[
AC_MSG_CHECKING(if gethostbyaddr_r takes 5 arguments)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netdb.h>],[
char * address;
int length;
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
rc = gethostbyaddr_r(address, length, type, &h, &hdata);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
ac_cv_gethostbyaddr_args=5],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyaddr_r with -D_REENTRANT takes 5 arguments)
AC_TRY_COMPILE([
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>],[
char * address;
int length;
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
rc = gethostbyaddr_r(address, length, type, &h, &hdata);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
ac_cv_gethostbyaddr_args=5],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyaddr_r takes 7 arguments)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netdb.h>],[
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
hp = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &h_errnop);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args] )
ac_cv_gethostbyaddr_args=7],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if gethostbyaddr_r takes 8 arguments)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netdb.h>],[
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args])
ac_cv_gethostbyaddr_args=8],[
AC_MSG_RESULT(no)
have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"])])])])])
])
AC_DEFUN(CURL_CHECK_GETHOSTBYNAME_R,
[
dnl check for number of arguments to gethostbyname_r. it might take
dnl either 3, 5, or 6 arguments.
AC_CHECK_FUNCS(gethostbyname_r,[
AC_MSG_CHECKING([if gethostbyname_r takes 3 arguments])
AC_TRY_COMPILE([
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
gethostbyname_r(const char *, struct hostent *, struct hostent_data *);],[
struct hostent_data data;
gethostbyname_r(NULL, NULL, NULL);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
ac_cv_gethostbyname_args=3],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING([if gethostbyname_r with -D_REENTRANT takes 3 arguments])
AC_TRY_COMPILE([
#define _REENTRANT
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
gethostbyname_r(const char *,struct hostent *, struct hostent_data *);],[
struct hostent_data data;
gethostbyname_r(NULL, NULL, NULL);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
AC_DEFINE(NEED_REENTRANT, 1, [needs REENTRANT])
ac_cv_gethostbyname_args=3],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING([if gethostbyname_r takes 5 arguments])
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
struct hostent *
gethostbyname_r(const char *, struct hostent *, char *, int, int *);],[
gethostbyname_r(NULL, NULL, NULL, 0, NULL);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5, 1, [gethostbyname_r() takes 5 args])
ac_cv_gethostbyname_args=5],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING([if gethostbyname_r takes 6 arguments])
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
gethostbyname_r(const char *, struct hostent *, char *, size_t,
struct hostent **, int *);],[
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1, [gethostbyname_r() takes 6 args])
ac_cv_gethostbyname_args=6],[
AC_MSG_RESULT(no)
have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"],
[ac_cv_gethostbyname_args=0])],
[ac_cv_gethostbyname_args=0])],
[ac_cv_gethostbyname_args=0])],
[ac_cv_gethostbyname_args=0])])
if test "$ac_cv_func_gethostbyname_r" = "yes"; then
if test "$ac_cv_gethostbyname_args" = "0"; then
dnl there's a gethostbyname_r() function, but we don't know how
dnl many arguments it wants!
AC_MSG_ERROR([couldn't figure out how to use gethostbyname_r()])
fi
fi
])

File diff suppressed because it is too large Load diff

View file

@ -1,69 +0,0 @@
$!
$
$ on control_y then goto Common_Exit!
$ orig = f$environment("DEFAULT")
$ loc = f$environment("PROCEDURE")
$ def = f$parse("X.X;1",loc) - "X.X;1"
$
$ set def 'def'
$ cc_qual = "/define=HAVE_CONFIG_H=1/include=(""../include/"",""../"",""../../openssl-0_9_7/include/"")"
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/MACHINE"
$ if p1 .eqs. "DEBUG" then cc_qual = cc_qual + "/LIST/MACHINE/DEBUG"
$ msg_qual = ""
$ call build "[.lib]" "*.c"
$ call build "[.src]" "*.c"
$ call build "[.src]" "*.msg"
$ link /exe=curl.exe [.src]curl/lib/include=main,[.lib]curl/lib, -
[-.openssl-0_9_7.axp.exe.ssl]libssl/lib, -
[-.openssl-0_9_7.axp.exe.crypto]libcrypto/lib
$
$
$ goto Common_Exit
$build: subroutine
$ set noon
$ set default 'p1'
$ search = p2
$ reset = f$search("reset")
$ if f$search("CURL.OLB") .eqs. ""
$ then
$ LIB/CREATE/OBJECT CURL.OLB
$ endif
$ reset = f$search("reset",1)
$Loop:
$ file = f$search(search,1)
$ if file .eqs. "" then goto EndLoop
$ obj = f$search(f$parse(".OBJ;",file),2)
$ if (obj .nes. "")
$ then
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
$ then
$ call compile 'file'
$ lib/object curl.OLB 'f$parse(".obj;",file)'
$ else
$! write sys$output "File: ''file' is up to date"
$ endif
$ else
$! write sys$output "Object for file: ''file' does not exist"
$ call compile 'file'
$ lib/object curl.OLB 'f$parse(".obj;",file)'
$ endif
$ goto Loop
$EndLoop:
$ purge
$ set def 'def'
$ endsubroutine ! Build
$
$compile: subroutine
$ set noon
$ file = p1
$ qual = p2+p3+p4+p5+p6+p7+p8
$ typ = f$parse(file,,,"TYPE") - "."
$ cmd_c = "CC "+cc_qual
$ cmd_msg = "MESSAGE "+msg_qual
$ x = cmd_'typ'
$ 'x' 'file'
$ ENDSUBROUTINE ! Compile
$
$Common_Exit:
$ set default 'orig'
$ exit

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,921 +0,0 @@
dnl $Id: configure.ac,v 1.5 2003/05/04 16:07:19 bagder Exp $
dnl Process this file with autoconf to produce a configure script.
dnl Ensure that this file is processed with autoconf 2.50 or newer
dnl Don't even think about removing this check!
AC_PREREQ(2.50)
dnl We don't know the version number "staticly" so we use a dash here
AC_INIT(curl, [-], [curl-bug@haxx.se])
dnl configure script copyright
AC_COPYRIGHT([Copyright (c) 1998 - 2003 Daniel Stenberg, <daniel@haxx.se>
This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])
AC_CONFIG_SRCDIR([lib/urldata.h])
AM_CONFIG_HEADER(lib/config.h src/config.h tests/server/config.h lib/ca-bundle.h)
AM_MAINTAINER_MODE
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
AC_SUBST(SED)
dnl figure out the libcurl version
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h`
AM_INIT_AUTOMAKE(curl,$VERSION)
AC_MSG_CHECKING([curl version])
AC_MSG_RESULT($VERSION)
dnl
dnl we extract the numerical version for curl-config only
VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h`
AC_SUBST(VERSIONNUM)
dnl Solaris pkgadd support definitions
PKGADD_PKG="HAXXcurl"
PKGADD_NAME="cURL - a client that groks URLs"
PKGADD_VENDOR="curl.haxx.se"
AC_SUBST(PKGADD_PKG)
AC_SUBST(PKGADD_NAME)
AC_SUBST(PKGADD_VENDOR)
dnl
dnl Detect the canonical host and target build environment
dnl
AC_CANONICAL_HOST
dnl Get system canonical name
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
dnl Check for AIX weirdos
AC_AIX
dnl Checks for programs.
AC_PROG_CC
dnl check for how to do large files
AC_SYS_LARGEFILE
dnl check for cygwin stuff
AC_LIBTOOL_WIN32_DLL
dnl libtool setup
AM_PROG_LIBTOOL
case $host in
*-*-cygwin | *-*-mingw* | *-*-pw32*)
need_no_undefined=yes
;;
*)
need_no_undefined=no
;;
esac
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
dnl The install stuff has already been taken care of by the automake stuff
dnl AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl ************************************************************
dnl switch off particular protocols
dnl
AC_MSG_CHECKING([whether to support http])
AC_ARG_ENABLE(http,
AC_HELP_STRING([--enable-http],[Enable HTTP support])
AC_HELP_STRING([--disable-http],[Disable HTTP support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
AC_MSG_WARN([disable HTTP disables FTP over proxy and GOPHER too])
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER])
AC_SUBST(CURL_DISABLE_HTTP)
AC_SUBST(CURL_DISABLE_GOPHER)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support ftp])
AC_ARG_ENABLE(ftp,
AC_HELP_STRING([--enable-ftp],[Enable FTP support])
AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
AC_SUBST(CURL_DISABLE_FTP)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support gopher])
AC_ARG_ENABLE(gopher,
AC_HELP_STRING([--enable-gopher],[Enable GOPHER support])
AC_HELP_STRING([--disable-gopher],[Disable GOPHER support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER])
AC_SUBST(CURL_DISABLE_GOPHER)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support file])
AC_ARG_ENABLE(file,
AC_HELP_STRING([--enable-file],[Enable FILE support])
AC_HELP_STRING([--disable-file],[Disable FILE support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
AC_SUBST(CURL_DISABLE_FILE)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support ldap])
AC_ARG_ENABLE(ldap,
AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support dict])
AC_ARG_ENABLE(dict,
AC_HELP_STRING([--enable-dict],[Enable DICT support])
AC_HELP_STRING([--disable-dict],[Disable DICT support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
AC_SUBST(CURL_DISABLE_DICT)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support telnet])
AC_ARG_ENABLE(telnet,
AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
AC_SUBST(CURL_DISABLE_TELNET)
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
dnl **********************************************************************
dnl Checks for IPv6
dnl **********************************************************************
AC_MSG_CHECKING([whether to enable ipv6])
AC_ARG_ENABLE(ipv6,
AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support])
AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
ipv6=no
;;
*) AC_MSG_RESULT(yes)
ipv6=yes
;;
esac ],
AC_TRY_RUN([ /* is AF_INET6 available? */
#include <sys/types.h>
#include <sys/socket.h>
main()
{
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
else
exit(0);
}
],
AC_MSG_RESULT(yes)
ipv6=yes,
AC_MSG_RESULT(no)
ipv6=no,
AC_MSG_RESULT(no)
ipv6=no
))
if test "$ipv6" = "yes"; then
CURL_CHECK_WORKING_GETADDRINFO
fi
dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
dnl gethostbyname in the nsl lib?
AC_CHECK_FUNC(gethostbyname, , [ AC_CHECK_LIB(nsl, gethostbyname) ])
if test "$ac_cv_lib_nsl_gethostbyname" != "yes" -a "$ac_cv_func_gethostbyname" != "yes"; then
dnl gethostbyname in the socket lib?
AC_CHECK_FUNC(gethostbyname, , [ AC_CHECK_LIB(socket, gethostbyname) ])
fi
dnl At least one system has been identified to require BOTH nsl and
dnl socket libs to link properly.
if test "$ac_cv_lib_nsl_gethostbyname" = "$ac_cv_func_gethostbyname"; then
AC_MSG_CHECKING([trying both nsl and socket libs])
my_ac_save_LIBS=$LIBS
LIBS="-lnsl -lsocket $LIBS"
AC_TRY_LINK( ,
[gethostbyname();],
my_ac_link_result=success,
my_ac_link_result=failure )
if test "$my_ac_link_result" = "failure"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
dnl restore LIBS
LIBS=$my_ac_save_LIBS
else
AC_MSG_RESULT([yes])
fi
fi
dnl resolve lib?
AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
AC_CHECK_LIB(resolve, strcasecmp,
[LIBS="-lresolve $LIBS"],
,
-lnsl)
fi
dnl socket lib?
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
dnl dl lib?
AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ])
AC_MSG_CHECKING([whether to use libgcc])
AC_ARG_ENABLE(libgcc,
AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
[ case "$enableval" in
yes)
LIBS="$LIBS -lgcc"
AC_MSG_RESULT(yes)
;;
*) AC_MSG_RESULT(no)
;;
esac ],
AC_MSG_RESULT(no)
)
dnl **********************************************************************
dnl Check how non-blocking sockets are set
dnl **********************************************************************
AC_ARG_ENABLE(nonblocking,
AC_HELP_STRING([--enable-nonblocking],[Enable detecting how to do it])
AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking socket detection]),
[
if test "$enableval" = "no" ; then
AC_MSG_WARN([non-blocking sockets disabled])
AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1,
[to disable NON-BLOCKING connections])
else
CURL_CHECK_NONBLOCKING_SOCKET
fi
],
[
CURL_CHECK_NONBLOCKING_SOCKET
])
dnl **********************************************************************
dnl Check for the random seed preferences
dnl **********************************************************************
AC_ARG_WITH(egd-socket,
AC_HELP_STRING([--with-egd-socket=FILE],
[Entropy Gathering Daemon socket pathname]),
[ EGD_SOCKET="$withval" ]
)
if test -n "$EGD_SOCKET" ; then
AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
[your Entropy Gathering Daemon socket pathname] )
fi
dnl Check for user-specified random device
AC_ARG_WITH(random,
AC_HELP_STRING([--with-random=FILE],[read randomness from FILE (default=/dev/urandom)]),
[ RANDOM_FILE="$withval" ],
[
dnl Check for random device
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
]
)
if test -n "$RANDOM_FILE" ; then
AC_SUBST(RANDOM_FILE)
AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
[a suitable file to read random data from])
fi
dnl **********************************************************************
dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************
AC_MSG_CHECKING([if argv can be written to])
AC_RUN_IFELSE([[
int main(int argc, char ** argv) {
argv[0][0] = ' ';
return (argv[0][0] == ' ')?0:1;
}
]],
AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no),
AC_MSG_RESULT(no)
AC_MSG_WARN([the previous check could not be made default was used])
)
dnl **********************************************************************
dnl Check for the presence of Kerberos4 libraries and headers
dnl **********************************************************************
AC_ARG_WITH(krb4-includes,
AC_HELP_STRING([--with-krb4-includes=DIR],
[Specify location of kerberos4 headers]),[
CPPFLAGS="$CPPFLAGS -I$withval"
KRB4INC="$withval"
want_krb4=yes
])
AC_ARG_WITH(krb4-libs,
AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[
LDFLAGS="$LDFLAGS -L$withval"
KRB4LIB="$withval"
want_krb4=yes
])
OPT_KRB4=off
AC_ARG_WITH(krb4,dnl
AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
OPT_KRB4="$withval"
if test X"$OPT_KRB4" != Xyes
then
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib"
KRB4LIB="$OPT_KRB4/lib"
CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
KRB4INC="$OPT_KRB4/include"
fi
want_krb4="yes"
])
AC_MSG_CHECKING([if Kerberos4 support is requested])
if test "$want_krb4" = yes
then
if test "$ipv6" = "yes"; then
echo krb4 is not compatible with IPv6
exit 1
fi
AC_MSG_RESULT(yes)
dnl Check for & handle argument to --with-krb4
AC_MSG_CHECKING(where to look for Kerberos4)
if test X"$OPT_KRB4" = Xyes
then
AC_MSG_RESULT([defaults])
else
AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
fi
dnl Check for DES library
AC_CHECK_LIB(des, des_pcbc_encrypt,
[
AC_CHECK_HEADERS(des.h)
dnl resolv lib?
AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)])
dnl Check for the Kerberos4 library
AC_CHECK_LIB(krb, krb_net_read,
[
dnl Check for header files
AC_CHECK_HEADERS(krb.h)
dnl we found the required libraries, add to LIBS
LIBS="-lkrb -ldes $LIBS"
dnl Check for function krb_get_our_ip_for_realm
dnl this is needed for NAT networks
AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
dnl add define KRB4
AC_DEFINE(KRB4, 1,
[if you have the Kerberos4 libraries (including -ldes)])
dnl substitute it too!
KRB4_ENABLED=1
AC_SUBST(KRB4_ENABLED)
dnl the krb4 stuff needs a strlcpy()
AC_CHECK_FUNCS(strlcpy)
])
])
else
AC_MSG_RESULT(no)
fi
dnl Detect the pkg-config tool, as it may have extra info about the
dnl openssl installation we can use. I *believe* this is what we are
dnl expected to do on really recent Redhat Linux hosts.
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test "$PKGCONFIG" != "no" ; then
AC_MSG_CHECKING([for OpenSSL options using pkg-config])
$PKGCONFIG --exists openssl
SSL_EXISTS=$?
if test "$SSL_EXISTS" -eq "0"; then
SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
LIBS="$LIBS $SSL_LIBS"
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers
dnl **********************************************************************
dnl Default to compiler & linker defaults for SSL files & libraries.
OPT_SSL=off
AC_ARG_WITH(ssl,dnl
AC_HELP_STRING([--with-ssl=PATH],[where to look for SSL, PATH points to the SSL installation (default: /usr/local/ssl)])
AC_HELP_STRING([--without-ssl], [disable SSL]),
OPT_SSL=$withval)
if test X"$OPT_SSL" = Xno
then
AC_MSG_WARN(SSL/https support disabled)
else
dnl Check for and handle argument to --with-ssl.
dnl save the pre-ssl check flags for a while
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
case "$OPT_SSL" in
yes)
EXTRA_SSL=/usr/local/ssl ;;
off)
EXTRA_SSL= ;;
*)
dnl check the given spot right away!
EXTRA_SSL=$OPT_SSL
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
;;
esac
AC_CHECK_LIB(crypto, CRYPTO_lock,[
HAVECRYPTO="yes"
],[
OLDLDFLAGS="$LDFLAGS"
OLDCPPFLAGS="$CPPFLAGS"
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib"
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
HAVECRYPTO="yes" ], [
LDFLAGS="$OLDLDFLAGS"
CPPFLAGS="$OLDCPPFLAGS"
])
])
if test "$HAVECRYPTO" = "yes"; then
dnl This is only reasonable to do if crypto actually is there: check for
dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
AC_CHECK_LIB(crypto, CRYPTO_add_lock)
AC_CHECK_LIB(ssl, SSL_connect)
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
OLIBS=$LIBS
LIBS="$LIBS -lRSAglue -lrsaref"
AC_CHECK_LIB(ssl, SSL_connect)
if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
dnl still no SSL_connect
AC_MSG_RESULT(no)
LIBS=$OLIBS
else
AC_MSG_RESULT(yes)
fi
fi
dnl Check for SSLeay headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h,
OPENSSL_ENABLED=1)
if test $ac_cv_header_openssl_x509_h = no; then
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
OPENSSL_ENABLED=1)
fi
dnl If the ENGINE library seems to be around, check for the OpenSSL engine
dnl header, it is kind of "separated" from the main SSL check
AC_CHECK_FUNC(ENGINE_init, [ AC_CHECK_HEADERS(openssl/engine.h) ])
AC_SUBST(OPENSSL_ENABLED)
fi
if test X"$OPT_SSL" != Xoff &&
test "$OPENSSL_ENABLED" != "1"; then
AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
fi
dnl these can only exist if openssl exists
AC_CHECK_FUNCS( RAND_status \
RAND_screen \
RAND_egd )
fi
dnl **********************************************************************
dnl Check for the presence of ZLIB libraries and headers
dnl **********************************************************************
dnl Check for & handle argument to --with-zlib.
_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS
OPT_ZLIB="/usr/local"
AC_ARG_WITH(zlib,
AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
AC_HELP_STRING([--without-zlib],[disable use of zlib]),
[OPT_ZLIB="$withval"])
case "$OPT_ZLIB" in
no)
AC_MSG_WARN([zlib disabled]) ;;
*)
dnl check for the lib first without setting any new path, since many
dnl people have it in the default path
AC_CHECK_LIB(z, inflateEnd, ,
[if test -d "$OPT_ZLIB"; then
CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib"
fi])
AC_CHECK_HEADER(zlib.h,[
AC_CHECK_LIB(z, gzread,
[HAVE_LIBZ="1"
AC_SUBST(HAVE_LIBZ)
LIBS="$LIBS -lz"
AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
AC_DEFINE(HAVE_LIBZ, 1, [If zlib is available])],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags])],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags]
)
;;
esac
dnl Default is to try the thread-safe versions of a few functions
OPT_THREAD=on
dnl detect AIX 4.3 or later
dnl see full docs on this reasoning in the lib/hostip.c source file
AC_MSG_CHECKING([AIX 4.3 or later])
AC_PREPROC_IFELSE([
#if defined(_AIX) && defined(_AIX43)
printf("just fine");
#else
#error "this is not AIX 4.3 or later"
#endif
],
[ AC_MSG_RESULT([yes])
OPT_THREAD=off ],
[ AC_MSG_RESULT([no]) ]
)
AC_ARG_ENABLE(thread,dnl
AC_HELP_STRING([--disable-thread],[don't look for thread-safe functions]),
OPT_THREAD=off
AC_MSG_WARN(libcurl will not get built using thread-safe functions)
)
if test X"$OPT_THREAD" = Xoff
then
AC_DEFINE(DISABLED_THREADSAFE, 1, \
Set to explicitly specify we don't want to use thread-safe functions)
else
dnl dig around for gethostbyname_r()
CURL_CHECK_GETHOSTBYNAME_R()
dnl dig around for gethostbyaddr_r()
CURL_CHECK_GETHOSTBYADDR_R()
dnl poke around for inet_ntoa_r()
CURL_CHECK_INET_NTOA_R()
dnl is there a localtime_r()
CURL_CHECK_LOCALTIME_R()
AC_CHECK_FUNCS( gmtime_r )
fi
dnl **********************************************************************
dnl Back to "normal" configuring
dnl **********************************************************************
dnl Checks for header files.
AC_HEADER_STDC
dnl First check for the very most basic headers. Then we can use these
dnl ones as default-headers when checking for the rest!
AC_CHECK_HEADERS(
sys/types.h \
sys/time.h \
sys/select.h \
sys/socket.h \
unistd.h \
malloc.h \
stdlib.h \
arpa/inet.h \
net/if.h \
netinet/in.h \
netdb.h \
sys/sockio.h \
sys/stat.h \
sys/param.h \
termios.h \
termio.h \
sgtty.h \
fcntl.h \
dlfcn.h \
alloca.h \
winsock.h \
time.h \
io.h \
pwd.h \
utime.h \
sys/utime.h \
sys/poll.h \
setjmp.h,
dnl to do if not found
[],
dnl to do if found
[],
dnl default includes
[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
]
)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
# mprintf() checks:
# check for 'long double'
# AC_CHECK_SIZEOF(long double, 8)
# check for 'long long'
# AC_CHECK_SIZEOF(long long, 4)
# check for ssize_t
AC_CHECK_TYPE(ssize_t, int)
TYPE_SOCKLEN_T
TYPE_IN_ADDR_T
AC_FUNC_SELECT_ARGTYPES
dnl Checks for library functions.
dnl AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
dnl AC_FUNC_VPRINTF
AC_CHECK_FUNCS( socket \
select \
strdup \
strstr \
strtok_r \
strftime \
uname \
strcasecmp \
stricmp \
strcmpi \
gethostbyaddr \
gettimeofday \
inet_addr \
inet_ntoa \
tcsetattr \
tcgetattr \
perror \
closesocket \
setvbuf \
sigaction \
signal \
getpass_r \
strlcat \
getpwuid \
geteuid \
dlopen \
utime \
sigsetjmp \
poll,
dnl if found
[],
dnl if not found, $ac_func is the name we check for
func="$ac_func"
AC_MSG_CHECKING([deeper for $func])
AC_TRY_LINK( [],
[ $func ();],
AC_MSG_RESULT(yes!)
eval "ac_cv_func_$func=yes"
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
AC_MSG_RESULT(but still no)
)
)
dnl sigsetjmp() might be a macro and no function so if it isn't found already
dnl we make an extra check here!
if test "$ac_cv_func_sigsetjmp" != "yes"; then
AC_MSG_CHECKING([for sigsetjmp defined as macro])
AC_TRY_LINK( [#include <setjmp.h>],
[sigjmp_buf jmpenv;
sigsetjmp(jmpenv, 1);],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp]),
AC_MSG_RESULT(no)
)
fi
AC_PATH_PROG( PERL, perl, ,
$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
AC_SUBST(PERL)
AC_PATH_PROGS( NROFF, gnroff nroff, ,
$PATH:/usr/bin/:/usr/local/bin )
AC_SUBST(NROFF)
AC_MSG_CHECKING([CA cert bundle install path])
AC_ARG_WITH(ca-bundle,
AC_HELP_STRING([--with-ca-bundle=FILE], [File name to install the CA bundle as])
AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
[ ca="$withval" ],
[
if test "x$prefix" != xNONE; then
ca="$prefix/share/curl/curl-ca-bundle.crt"
else
ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
fi
] )
if test X"$OPT_SSL" = Xno
then
ca="no"
fi
if test "x$ca" = "xno"; then
dnl let's not keep "no" as path name, blank it instead
ca=""
else
AC_DEFINE_UNQUOTED(CURL_CA_BUNDLE, "$ca", [CA bundle full path name])
fi
CURL_CA_BUNDLE="$ca"
AC_SUBST(CURL_CA_BUNDLE)
AC_MSG_RESULT([$ca])
AC_PROG_YACC
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,
dnl $PATH:/usr/bin/:/usr/local/bin )
dnl AC_SUBST(RANLIB)
dnl ************************************************************
dnl lame option to switch on debug options
dnl
AC_MSG_CHECKING([whether to enable debug options])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[Enable pedantic debug options])
AC_HELP_STRING([--disable-debug],[Disable debug options]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*) AC_MSG_RESULT(yes)
CPPFLAGS="$CPPFLAGS -DMALLOCDEBUG"
CFLAGS="$CFLAGS -g"
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -W -Wall -Wwrite-strings -pedantic -Wundef -Wpointer-arith -Wnested-externs"
fi
dnl strip off optimizer flags
NEWFLAGS=""
for flag in $CFLAGS; do
case "$flag" in
-O*)
dnl echo "cut off $flag"
;;
*)
NEWFLAGS="$NEWFLAGS $flag"
;;
esac
done
CFLAGS=$NEWFLAGS
;;
esac ],
AC_MSG_RESULT(no)
)
AC_CONFIG_FILES([Makefile \
docs/Makefile \
docs/examples/Makefile \
docs/libcurl/Makefile \
include/Makefile \
include/curl/Makefile \
src/Makefile \
lib/Makefile \
tests/Makefile \
tests/data/Makefile \
tests/server/Makefile \
tests/libtest/Makefile \
packages/Makefile \
packages/Win32/Makefile \
packages/Win32/cygwin/Makefile \
packages/Linux/Makefile \
packages/Linux/RPM/Makefile \
packages/Linux/RPM/curl.spec \
packages/Linux/RPM/curl-ssl.spec \
packages/Solaris/Makefile \
packages/EPM/curl.list \
packages/EPM/Makefile \
curl-config
])
AC_OUTPUT

View file

@ -1,130 +0,0 @@
#! /bin/sh
#
# The idea to this kind of setup info script was stolen from numerous
# other packages, such as neon, libxml and gnome.
#
# $Id: curl-config.in,v 1.17 2003/01/16 10:58:49 bagder Exp $
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
usage()
{
cat <<EOF
Usage: curl-config [OPTION]
Available values for OPTION include:
--ca ca bundle install path
--cc compiler
--cflags pre-processor and compiler flags
--feature newline separated list of enabled features
--help display this help and exit
--libs library linking information
--prefix curl install prefix
--version output version information
--vernum output the version information as a number (hexadecimal)
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
while test $# -gt 0; do
case "$1" in
# this deals with options in the style
# --option=value and extracts the value part
# [not currently used]
-*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) value= ;;
esac
case "$1" in
--ca)
echo @CURL_CA_BUNDLE@
;;
--cc)
echo @CC@
;;
--prefix)
echo $prefix
;;
--feature)
if test "@OPENSSL_ENABLED@" = "1"; then
echo "SSL"
fi
if test "@KRB4_ENABLED@" = "1"; then
echo "KRB4"
fi
if test "@IPV6_ENABLED@" = "1"; then
echo "IPv6"
fi
if test "@HAVE_LIBZ@" = "1"; then
echo "libz"
fi
if test "@CURL_DISABLE_HTTP@" = "1"; then
echo "HTTP-disabled"
fi
if test "@CURL_DISABLE_FTP@" = "1"; then
echo "FTP-disabled"
fi
if test "@CURL_DISABLE_GOPHER@" = "1"; then
echo "GOPHER-disabled"
fi
if test "@CURL_DISABLE_FILE@" = "1"; then
echo "FILE-disabled"
fi
if test "@CURL_DISABLE_TELNET@" = "1"; then
echo "TELNET-disabled"
fi
if test "@CURL_DISABLE_LDAP@" = "1"; then
echo "LDAP-disabled"
fi
if test "@CURL_DISABLE_DICT@" = "1"; then
echo "DICT-disabled"
fi
;;
--version)
echo libcurl @VERSION@
exit 0
;;
--vernum)
echo @VERSIONNUM@
exit 0
;;
--help)
usage 0
;;
--cflags)
if test "X@includedir@" = "X/usr/include"; then
echo ""
else
echo "-I@includedir@"
fi
;;
--libs)
echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@
;;
*)
echo "unknown option: $1"
usage
exit 1
;;
esac
shift
done
exit 0

View file

@ -1,50 +0,0 @@
;;;; Emacs Lisp help for writing curl code. ;;;;
;;;; $Id: curl-style.el,v 1.3 2003/03/12 08:11:24 bagder Exp $
;;; The curl hacker's C conventions.
;;; After loading this file and added the mode-hook you can in C
;;; files, put something like this to use the curl style
;;; automatically:
;;
;; /* -----------------------------------------------------------------
;; * local variables:
;; * eval: (set c-file-style "curl")
;; * end:
;; */
;;
(defconst curl-c-style
'((c-basic-offset . 2)
(c-comment-only-line-offset . 0)
(c-hanging-braces-alist . ((substatement-open before after)))
(c-offsets-alist . ((topmost-intro . 0)
(topmost-intro-cont . 0)
(substatement . +)
(substatement-open . 0)
(statement-case-intro . +)
(statement-case-open . 0)
(case-label . 0)
))
)
"Curl C Programming Style")
;; Customizations for all of c-mode, c++-mode, and objc-mode
(defun curl-c-mode-common-hook ()
"Curl C mode hook"
;; add curl style and set it for the current buffer
(c-add-style "curl" curl-c-style t)
(setq tab-width 8
indent-tabs-mode nil ; Use spaces. Not tabs.
comment-column 40
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set"))
)
;; keybindings for C, C++, and Objective-C. We can put these in
;; c-mode-base-map because of inheritance ...
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
(setq c-recognize-knr-p nil)
)
;; Set this is in your .emacs if you want to use the c-mode-hook as
;; defined here right out of the box.
; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)

View file

@ -1,411 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 AIX compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
tmpdepfile1="$object.d"
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then
"$@" -Wc,-MD
else
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
test -z "$dashmflag" && dashmflag=-M
( IFS=" "
case " $* " in
*" --mode=compile "*) # this is libtool, let us make it quiet
for arg
do # cycle over the arguments
case "$arg" in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
# X makedepend
(
shift
cleared=no
for arg in "$@"; do
case $cleared in no)
set ""; shift
cleared=yes
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift;;
-*)
;;
*)
set fnord "$@" "$arg"; shift;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tail +3 "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

Some files were not shown because too many files have changed in this diff Show more