Line-ending fixes for most of the remaining files.

Fixes line-endings for files with extensions vcd, cc, txt, bat, fxc, inc, lst,
proto, mak, mm, cfg, res, rc, def, vmt, vsh, vbsp, inl, asm, m4, vcproj,
vcxproj, sln, in, java, la, manifest, am, and rad.

Also fixes README, CONTRIBUTING, CONTRIBUTORS, LICENSE, CHANGES, COPYING, and
gitignore.

Finally, fixes executable bits.
This commit is contained in:
Jørgen P. Tjernø 2013-12-03 10:39:23 -08:00
parent 30064a1977
commit b5dc4a8543
5745 changed files with 1504984 additions and 1504956 deletions

28
.gitattributes vendored
View File

@ -6,9 +6,12 @@ vpc_linux binary
vpc_osx binary vpc_osx binary
*.sh text *.sh text
*.bat text
*.txt text
*.c text *.c text
*.h text *.h text
*.H text *.H text
*.cc text
*.cpp text *.cpp text
*.vpc text *.vpc text
*.vgc text *.vgc text
@ -17,7 +20,32 @@ vpc_osx binary
*.pl text *.pl text
*.py text *.py text
*.xcconfig text *.xcconfig text
*.vcd text
*.vbsp text
*.proto text
*.inc text
*.fxc text
*.vsh text
*.lst text
*.mm text
*.cfg text
*.res text
*.rc text
*.def text
*.vmt text
*.inl text
*.asm text
.gitignore text
sourcesdk_def.mak text
smdlexp.mak text
README text
CONTRIBUTING text
LICENSE text
*.exe binary *.exe binary
protoc binary protoc binary
ccache binary ccache binary
gtest_output_test_golden_lin.txt binary
mod_*_english.txt binary

112
.gitignore vendored
View File

@ -1,56 +1,56 @@
# Files to ignore when considering what GIT should commit. # Files to ignore when considering what GIT should commit.
# Visual Studio # Visual Studio
*.suo *.suo
*.user *.user
*.sln.docstates *.sln.docstates
*.obj *.obj
*.pch *.pch
*.tlog *.tlog
*.log *.log
*.scc *.scc
*.exp *.exp
*.ilk *.ilk
*.lastbuildstate *.lastbuildstate
vc100.pdb vc100.pdb
ipch ipch
*.sdf *.sdf
*.opensdf *.opensdf
*.idb *.idb
*.vcxproj *.vcxproj
*.sln *.sln
# OSX/Linux build products # OSX/Linux build products
*.mak *.mak
*.mak.vpc_crc *.mak.vpc_crc
*.xcodeproj/ *.xcodeproj/
obj*/ obj*/
!devtools/*.mak !devtools/*.mak
!utils/smdlexp/smdlexp.mak !utils/smdlexp/smdlexp.mak
# Specific Source build products # Specific Source build products
client.pdb client.pdb
client.dll client.dll
client.lib client.lib
server.pdb server.pdb
server.dll server.dll
server.lib server.lib
client.so client.so
client.so.dbg client.so.dbg
server.so server.so
server.so.dbg server.so.dbg
server_srv.so server_srv.so
server_srv.so.dbg server_srv.so.dbg
client.dylib client.dylib
client.dylib.dSYM/ client.dylib.dSYM/
server.dylib server.dylib
server.dylib.dSYM/ server.dylib.dSYM/
# files generated by running a mod # files generated by running a mod
config.cfg config.cfg
# shader files # shader files
*.tmp *.tmp

View File

@ -1,39 +1,39 @@
Thanks for your interest in the Source SDK 2013 project. When you make a Thanks for your interest in the Source SDK 2013 project. When you make a
contribution to the project (e.g. create an Issue or submit a Pull Request) contribution to the project (e.g. create an Issue or submit a Pull Request)
(a "Contribution"), Valve wants to be able to use your Contribution to improve (a "Contribution"), Valve wants to be able to use your Contribution to improve
the SDK and other Valve products. the SDK and other Valve products.
As a condition of providing a Contribution, you agree that: As a condition of providing a Contribution, you agree that:
- You grant Valve a non-exclusive, irrevocable, royalty-free, worldwide license - You grant Valve a non-exclusive, irrevocable, royalty-free, worldwide license
to make, use, sell, reproduce, modify, distribute (directly and indirectly), to make, use, sell, reproduce, modify, distribute (directly and indirectly),
and publicly display and perform the Contribution, and any derivative works and publicly display and perform the Contribution, and any derivative works
that Valve may make from the Contribution, under any intellectual property you that Valve may make from the Contribution, under any intellectual property you
own or have the right to license. own or have the right to license.
- You warrant and represent that the Contribution is your original creation, - You warrant and represent that the Contribution is your original creation,
that you have the authority to grant this license to Valve, and that this that you have the authority to grant this license to Valve, and that this
license does not require the permission of any third party. Otherwise, you license does not require the permission of any third party. Otherwise, you
provide your Contribution "as is" without warranties. provide your Contribution "as is" without warranties.
Should you wish to submit a suggestion or work that is not your original Should you wish to submit a suggestion or work that is not your original
creation, you may submit it to Valve separate from any Contribution, creation, you may submit it to Valve separate from any Contribution,
explicitly identifying it as sourced from a third party, stating the details explicitly identifying it as sourced from a third party, stating the details
of its origin, and informing Valve of any license or other restriction of of its origin, and informing Valve of any license or other restriction of
which you are personally aware. which you are personally aware.
Valve is happy to accept pull requests and issues in the source-sdk-2013 Valve is happy to accept pull requests and issues in the source-sdk-2013
repository in these cases: repository in these cases:
* Changes that fix bugs in the SDK deployment process itself. The repository * Changes that fix bugs in the SDK deployment process itself. The repository
should build out of the box, and anything that prevents that is a pull should build out of the box, and anything that prevents that is a pull
request we want. request we want.
* High priority bugs in HL2, the Episodes, or HL2MP that can be fixed in * High priority bugs in HL2, the Episodes, or HL2MP that can be fixed in
client.dll or server.dll. client.dll or server.dll.
For other changes we suggest that you issue a pull request to one of these For other changes we suggest that you issue a pull request to one of these
fine community-maintained repositories instead: fine community-maintained repositories instead:
https://developer.valvesoftware.com/wiki/Source-sdk-2013-community-repos https://developer.valvesoftware.com/wiki/Source-sdk-2013-community-repos
If you are going to make a pull request, please keep them as granular as If you are going to make a pull request, please keep them as granular as
possible. Pull requests with 3-4 unrelated changes in them aren't going to possible. Pull requests with 3-4 unrelated changes in them aren't going to
be accepted. be accepted.

86
LICENSE
View File

@ -1,43 +1,43 @@
SOURCE 1 SDK LICENSE SOURCE 1 SDK LICENSE
Source SDK Copyright(c) Valve Corp. Source SDK Copyright(c) Valve Corp.
THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE
CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING
THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE
SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO
THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK. THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK.
You may, free of charge, download and use the SDK to develop a modified Valve game You may, free of charge, download and use the SDK to develop a modified Valve game
running on the Source engine. You may distribute your modified Valve game in source and running on the Source engine. You may distribute your modified Valve game in source and
object code form, but only for free. Terms of use for Valve games are found in the Steam object code form, but only for free. Terms of use for Valve games are found in the Steam
Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/ Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/
You may copy, modify, and distribute the SDK and any modifications you make to the You may copy, modify, and distribute the SDK and any modifications you make to the
SDK in source and object code form, but only for free. Any distribution of this SDK must SDK in source and object code form, but only for free. Any distribution of this SDK must
include this LICENSE file and thirdpartylegalnotices.txt. include this LICENSE file and thirdpartylegalnotices.txt.
Any distribution of the SDK or a substantial portion of the SDK must include the above Any distribution of the SDK or a substantial portion of the SDK must include the above
copyright notice and the following: copyright notice and the following:
DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY
OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED
"AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL "AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL
WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,
TITLE AND FITNESS FOR A PARTICULAR PURPOSE. TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR
ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
ARISING OUT OF THE USE OF OR INABILITY TO USE THE ARISING OUT OF THE USE OF OR INABILITY TO USE THE
ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If you would like to use the SDK for a commercial purpose, please contact Valve at If you would like to use the SDK for a commercial purpose, please contact Valve at
sourceengine@valvesoftware.com. sourceengine@valvesoftware.com.

86
README
View File

@ -1,43 +1,43 @@
SOURCE 1 SDK LICENSE SOURCE 1 SDK LICENSE
Source SDK Copyright(c) Valve Corp. Source SDK Copyright(c) Valve Corp.
THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE
CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING CORPORATION ("Valve"). PLEASE READ IT BEFORE DOWNLOADING OR USING
THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE
SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO SOURCE ENGINE SDK YOU ACCEPT THIS LICENSE. IF YOU DO NOT AGREE TO
THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK. THE TERMS OF THIS LICENSE PLEASE DONT DOWNLOAD OR USE THE SDK.
You may, free of charge, download and use the SDK to develop a modified Valve game You may, free of charge, download and use the SDK to develop a modified Valve game
running on the Source engine. You may distribute your modified Valve game in source and running on the Source engine. You may distribute your modified Valve game in source and
object code form, but only for free. Terms of use for Valve games are found in the Steam object code form, but only for free. Terms of use for Valve games are found in the Steam
Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/ Subscriber Agreement located here: http://store.steampowered.com/subscriber_agreement/
You may copy, modify, and distribute the SDK and any modifications you make to the You may copy, modify, and distribute the SDK and any modifications you make to the
SDK in source and object code form, but only for free. Any distribution of this SDK must SDK in source and object code form, but only for free. Any distribution of this SDK must
include this LICENSE file and thirdpartylegalnotices.txt. include this LICENSE file and thirdpartylegalnotices.txt.
Any distribution of the SDK or a substantial portion of the SDK must include the above Any distribution of the SDK or a substantial portion of the SDK must include the above
copyright notice and the following: copyright notice and the following:
DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY DISCLAIMER OF WARRANTIES. THE SOURCE SDK AND ANY
OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED OTHER MATERIAL DOWNLOADED BY LICENSEE IS PROVIDED
"AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL "AS IS". VALVE AND ITS SUPPLIERS DISCLAIM ALL
WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,
TITLE AND FITNESS FOR A PARTICULAR PURPOSE. TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR
ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS)
ARISING OUT OF THE USE OF OR INABILITY TO USE THE ARISING OUT OF THE USE OF OR INABILITY TO USE THE
ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN ENGINE AND/OR THE SDK, EVEN IF VALVE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If you would like to use the SDK for a commercial purpose, please contact Valve at If you would like to use the SDK for a commercial purpose, please contact Valve at
sourceengine@valvesoftware.com. sourceengine@valvesoftware.com.

View File

@ -1,15 +1,15 @@
// HEALTH/SUIT CHARGE DISTRIBUTION // HEALTH/SUIT CHARGE DISTRIBUTION
sk_suitcharger "75" sk_suitcharger "75"
sk_suitcharger_citadel "200" sk_suitcharger_citadel "200"
sk_suitcharger_citadel_maxarmor "200" sk_suitcharger_citadel_maxarmor "200"
sk_battery "15" sk_battery "15"
sk_healthcharger "50" sk_healthcharger "50"
sk_healthkit "25" sk_healthkit "25"
sk_healthvial "10" sk_healthvial "10"
// player damage adjusters // player damage adjusters
sk_player_head "3" sk_player_head "3"
sk_player_chest "1" sk_player_chest "1"
sk_player_stomach "1" sk_player_stomach "1"
sk_player_arm "1" sk_player_arm "1"
sk_player_leg "1" sk_player_leg "1"

View File

@ -1 +1 @@
exec skill.cfg exec skill.cfg

View File

@ -1,84 +1,84 @@
"GameInfo" "GameInfo"
{ {
game "My First HL2MP Mod" game "My First HL2MP Mod"
title "HALF+LIFE'" title "HALF+LIFE'"
title2 "deathmatch mod" title2 "deathmatch mod"
type multiplayer_only type multiplayer_only
nomodels 0 nomodels 0
nohimodel 1 nohimodel 1
nocrosshair 1 nocrosshair 1
hidden_maps hidden_maps
{ {
"test_speakers" 1 "test_speakers" 1
"test_hardware" 1 "test_hardware" 1
} }
FileSystem FileSystem
{ {
SteamAppId 243750 SteamAppId 243750
// //
// The code that loads this file automatically does a few things here: // The code that loads this file automatically does a few things here:
// //
// 1. For each "Game" search path, it adds a "GameBin" path, in <dir>\bin // 1. For each "Game" search path, it adds a "GameBin" path, in <dir>\bin
// 2. For each "Game" search path, it adds another "Game" path in front of it with _<langage> at the end. // 2. For each "Game" search path, it adds another "Game" path in front of it with _<langage> at the end.
// For example: c:\hl2\cstrike on a french machine would get a c:\hl2\cstrike_french path added to it. // For example: c:\hl2\cstrike on a french machine would get a c:\hl2\cstrike_french path added to it.
// 3. For the first "Game" search path, it adds a search path called "MOD". // 3. For the first "Game" search path, it adds a search path called "MOD".
// 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH". // 4. For the first "Game" search path, it adds a search path called "DEFAULT_WRITE_PATH".
// //
// //
// Search paths are relative to the base directory, which is where hl2.exe is found. // Search paths are relative to the base directory, which is where hl2.exe is found.
// //
// |gameinfo_path| points at the directory where gameinfo.txt is. // |gameinfo_path| points at the directory where gameinfo.txt is.
// We always want to mount that directory relative to gameinfo.txt, so // We always want to mount that directory relative to gameinfo.txt, so
// people can mount stuff in c:\mymod, and the main game resources are in // people can mount stuff in c:\mymod, and the main game resources are in
// someplace like c:\program files\valve\steam\steamapps\half-life 2. // someplace like c:\program files\valve\steam\steamapps\half-life 2.
// //
SearchPaths SearchPaths
{ {
// First, mount all user customizations. This will search for VPKs and subfolders // First, mount all user customizations. This will search for VPKs and subfolders
// and mount them in alphabetical order. The easiest way to distribute a mod is to // and mount them in alphabetical order. The easiest way to distribute a mod is to
// pack up the custom content into a VPK. To "install" a mod, just drop it in this // pack up the custom content into a VPK. To "install" a mod, just drop it in this
// folder. // folder.
// //
// Note that this folder is scanned only when the game is booted. // Note that this folder is scanned only when the game is booted.
game+mod hl2mp/custom/* game+mod hl2mp/custom/*
game+mod hl2/custom/* game+mod hl2/custom/*
// Now search loose files. We'll set the directory containing the gameinfo.txt file // Now search loose files. We'll set the directory containing the gameinfo.txt file
// as the first "mod" search path (after any user customizations). This is also the one // as the first "mod" search path (after any user customizations). This is also the one
// that's used when writing to the "mod" path. // that's used when writing to the "mod" path.
game+mod+mod_write+default_write_path |gameinfo_path|. game+mod+mod_write+default_write_path |gameinfo_path|.
gamebin |gameinfo_path|bin gamebin |gameinfo_path|bin
// We search VPK files before ordinary folders, because most files will be found in // We search VPK files before ordinary folders, because most files will be found in
// VPK and we can avoid making thousands of file system calls to attempt to open files // VPK and we can avoid making thousands of file system calls to attempt to open files
// in folders where they don't exist. (Searching a VPK is much faster than making an operating // in folders where they don't exist. (Searching a VPK is much faster than making an operating
// system call.) // system call.)
game_lv hl2/hl2_lv.vpk game_lv hl2/hl2_lv.vpk
game+mod hl2mp/hl2mp_english.vpk game+mod hl2mp/hl2mp_english.vpk
game+mod hl2mp/hl2mp_pak.vpk game+mod hl2mp/hl2mp_pak.vpk
game |all_source_engine_paths|hl2/hl2_english.vpk game |all_source_engine_paths|hl2/hl2_english.vpk
game |all_source_engine_paths|hl2/hl2_pak.vpk game |all_source_engine_paths|hl2/hl2_pak.vpk
game |all_source_engine_paths|hl2/hl2_textures.vpk game |all_source_engine_paths|hl2/hl2_textures.vpk
game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
game |all_source_engine_paths|hl2/hl2_sound_misc.vpk game |all_source_engine_paths|hl2/hl2_sound_misc.vpk
game |all_source_engine_paths|hl2/hl2_misc.vpk game |all_source_engine_paths|hl2/hl2_misc.vpk
platform |all_source_engine_paths|platform/platform_misc.vpk platform |all_source_engine_paths|platform/platform_misc.vpk
// Add the HL2 directory as a game search path. This is also where where writes // Add the HL2 directory as a game search path. This is also where where writes
// to the "game" path go. // to the "game" path go.
game+game_write hl2mp game+game_write hl2mp
// Where the game's binaries are // Where the game's binaries are
gamebin hl2mp/bin gamebin hl2mp/bin
// Last, mount in shared HL2 loose files // Last, mount in shared HL2 loose files
game |all_source_engine_paths|hl2mp game |all_source_engine_paths|hl2mp
game |all_source_engine_paths|hl2 game |all_source_engine_paths|hl2
platform |all_source_engine_paths|platform platform |all_source_engine_paths|platform
} }
} }
} }

View File

@ -1,7 +1,7 @@
"Mod_Example_Model" "Mod_Example_Model"
{ {
"$basetexture" "Models/props_c17/Oil_Drum001g" "$basetexture" "Models/props_c17/Oil_Drum001g"
// "$basetexturetransform" "center 0 0 scale 1 2 rotate 0 translate 0 0" // "$basetexturetransform" "center 0 0 scale 1 2 rotate 0 translate 0 0"
// "$AlphaTestReference" "0.5" // "$AlphaTestReference" "0.5"
"$surfaceprop" "metal" "$surfaceprop" "metal"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,64 +1,64 @@
"GameMenu" "GameMenu"
{ {
"1" "1"
{ {
"label" "#GameUI_GameMenu_ResumeGame" "label" "#GameUI_GameMenu_ResumeGame"
"command" "ResumeGame" "command" "ResumeGame"
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"2" "2"
{ {
"label" "#GameUI_GameMenu_Disconnect" "label" "#GameUI_GameMenu_Disconnect"
"command" "Disconnect" "command" "Disconnect"
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"3" "3"
{ {
"label" "#GameUI_GameMenu_PlayerList" "label" "#GameUI_GameMenu_PlayerList"
"command" "OpenPlayerListDialog" "command" "OpenPlayerListDialog"
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"4" "4"
{ {
"label" "" "label" ""
"command" "" "command" ""
"OnlyInGame" "1" "OnlyInGame" "1"
} }
"5" "5"
{ {
"label" "#GameUI_GameMenu_FindServers" "label" "#GameUI_GameMenu_FindServers"
"command" "OpenServerBrowser" "command" "OpenServerBrowser"
} }
"6" "6"
{ {
"label" "#GameUI_GameMenu_CreateServer" "label" "#GameUI_GameMenu_CreateServer"
"command" "OpenCreateMultiplayerGameDialog" "command" "OpenCreateMultiplayerGameDialog"
} }
"7" "7"
{ {
"label" "#GameUI_GameMenu_ActivateVR" "label" "#GameUI_GameMenu_ActivateVR"
"command" "engine vr_activate" "command" "engine vr_activate"
"InGameOrder" "40" "InGameOrder" "40"
"OnlyWhenVREnabled" "1" "OnlyWhenVREnabled" "1"
"OnlyWhenVRInactive" "1" "OnlyWhenVRInactive" "1"
} }
"8" "8"
{ {
"label" "#GameUI_GameMenu_DeactivateVR" "label" "#GameUI_GameMenu_DeactivateVR"
"command" "engine vr_deactivate" "command" "engine vr_deactivate"
"InGameOrder" "40" "InGameOrder" "40"
"OnlyWhenVREnabled" "1" "OnlyWhenVREnabled" "1"
"OnlyWhenVRActive" "1" "OnlyWhenVRActive" "1"
} }
"10" "10"
{ {
"label" "#GameUI_GameMenu_Options" "label" "#GameUI_GameMenu_Options"
"command" "OpenOptionsDialog" "command" "OpenOptionsDialog"
} }
"11" "11"
{ {
"label" "#GameUI_GameMenu_Quit" "label" "#GameUI_GameMenu_Quit"
"command" "Quit" "command" "Quit"
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +1,51 @@
//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. =========== //=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========
// //
// The copyright to the contents herein is the property of Valve, L.L.C. // The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of // The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in // Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the agreement/contract under which the contents have been supplied. // the agreement/contract under which the contents have been supplied.
//============================================================================= //=============================================================================
// No spaces in event names, max length 32 // No spaces in event names, max length 32
// All strings are case sensitive // All strings are case sensitive
// //
// valid data key types are: // valid data key types are:
// string : a zero terminated string // string : a zero terminated string
// bool : unsigned int, 1 bit // bool : unsigned int, 1 bit
// byte : unsigned int, 8 bit // byte : unsigned int, 8 bit
// short : signed int, 16 bit // short : signed int, 16 bit
// long : signed int, 32 bit // long : signed int, 32 bit
// float : float, 32 bit // float : float, 32 bit
// local : any data, but not networked to clients // local : any data, but not networked to clients
// //
// following key names are reserved: // following key names are reserved:
// local : if set to 1, event is not networked to clients // local : if set to 1, event is not networked to clients
// unreliable : networked, but unreliable // unreliable : networked, but unreliable
// suppress : never fire this event // suppress : never fire this event
// time : firing server time // time : firing server time
// eventid : holds the event ID // eventid : holds the event ID
"modevents" "modevents"
{ {
"player_death" // a game event, name may be 32 charaters long "player_death" // a game event, name may be 32 charaters long
{ {
"userid" "short" // user ID who died "userid" "short" // user ID who died
"attacker" "short" // user ID who killed "attacker" "short" // user ID who killed
"weapon" "string" // weapon name killed used "weapon" "string" // weapon name killed used
} }
"teamplay_round_start" // round restart "teamplay_round_start" // round restart
{ {
"full_reset" "bool" // is this a full reset of the map "full_reset" "bool" // is this a full reset of the map
} }
"spec_target_updated" "spec_target_updated"
{ {
} }
"achievement_earned" "achievement_earned"
{ {
"player" "byte" // entindex of the player "player" "byte" // entindex of the player
"achievement" "short" // achievement ID "achievement" "short" // achievement ID
} }
} }

View File

@ -1,4 +1,4 @@
"chapters" "chapters"
{ {
1 "background01" 1 "background01"
} }

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,2 +1,2 @@
// Game specific definitions // Game specific definitions
"$game" "HL2MP" "$game" "HL2MP"

View File

@ -1,332 +1,332 @@
"HL2Player.SprintNoPower" "HL2Player.SprintNoPower"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_60dB" "soundlevel" "SNDLVL_60dB"
"wave" "player/suit_denydevice.wav" "wave" "player/suit_denydevice.wav"
} }
"HL2Player.SprintStart" "HL2Player.SprintStart"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.9" "volume" "0.9"
"soundlevel" "SNDLVL_60dB" "soundlevel" "SNDLVL_60dB"
"wave" "player/suit_sprint.wav" "wave" "player/suit_sprint.wav"
} }
"HL2Player.FlashLightOn" "HL2Player.FlashLightOn"
{ {
"channel" "CHAN_WEAPON" "channel" "CHAN_WEAPON"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"wave" "items/flashlight1.wav" "wave" "items/flashlight1.wav"
} }
"HL2Player.FlashLightOff" "HL2Player.FlashLightOff"
{ {
"channel" "CHAN_WEAPON" "channel" "CHAN_WEAPON"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"wave" "items/flashlight1.wav" "wave" "items/flashlight1.wav"
} }
"HL2Player.PickupWeapon" "HL2Player.PickupWeapon"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "items/ammo_pickup.wav" "wave" "items/ammo_pickup.wav"
} }
"HL2Player.TrainUse" "HL2Player.TrainUse"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "plats/train_use1.wav" "wave" "plats/train_use1.wav"
} }
"HL2Player.Use" "HL2Player.Use"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_select.wav" "wave" "common/wpn_select.wav"
} }
"HL2Player.UseNPC" "HL2Player.UseNPC"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_select.wav" "wave" "common/wpn_select.wav"
} }
"HL2Player.UseDeny" "HL2Player.UseDeny"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_denyselect.wav" "wave" "common/wpn_denyselect.wav"
} }
"HL2Player.BurnPain" "HL2Player.BurnPain"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.5" "volume" "0.5"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/pl_burnpain1.wav" "wave" "player/pl_burnpain1.wav"
"wave" "player/pl_burnpain2.wav" "wave" "player/pl_burnpain2.wav"
"wave" "player/pl_burnpain3.wav" "wave" "player/pl_burnpain3.wav"
} }
} }
// SHARED player sounds // SHARED player sounds
"Player.Death" "Player.Death"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/pl_pain5.wav" "wave" "player/pl_pain5.wav"
"wave" "player/pl_pain6.wav" "wave" "player/pl_pain6.wav"
"wave" "player/pl_pain7.wav" "wave" "player/pl_pain7.wav"
} }
} }
"Player.PlasmaDamage" "Player.PlasmaDamage"
{ {
"channel" "CHAN_BODY" "channel" "CHAN_BODY"
"volume" "0.5" "volume" "0.5"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "player/general/flesh_burn.wav" "wave" "player/general/flesh_burn.wav"
} }
"Player.SonicDamage" "Player.SonicDamage"
{ {
"channel" "CHAN_BODY" "channel" "CHAN_BODY"
"volume" "0.7" "volume" "0.7"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/pl_pain5.wav" "wave" "player/pl_pain5.wav"
"wave" "player/pl_pain6.wav" "wave" "player/pl_pain6.wav"
"wave" "player/pl_pain7.wav" "wave" "player/pl_pain7.wav"
} }
} }
"Player.DrownStart" "Player.DrownStart"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "1.0" "volume" "1.0"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "90,110" "pitch" "90,110"
"wave" "player/pl_drown1.wav" "wave" "player/pl_drown1.wav"
} }
"Player.Swim" "Player.Swim"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"volume" "0.5" "volume" "0.5"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/footsteps/wade5.wav" "wave" "player/footsteps/wade5.wav"
"wave" "player/footsteps/wade6.wav" "wave" "player/footsteps/wade6.wav"
"wave" "player/footsteps/wade7.wav" "wave" "player/footsteps/wade7.wav"
"wave" "player/footsteps/wade8.wav" "wave" "player/footsteps/wade8.wav"
} }
} }
"Player.FallDamage" "Player.FallDamage"
{ {
"channel" "CHAN_AUTO" "channel" "CHAN_AUTO"
"volume" "0.75" "volume" "0.75"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/pl_fallpain1.wav" "wave" "player/pl_fallpain1.wav"
"wave" "player/pl_fallpain3.wav" "wave" "player/pl_fallpain3.wav"
} }
} }
"Player.FallGib" "Player.FallGib"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.75" "volume" "0.75"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "physics/body/body_medium_break2.wav" "wave" "physics/body/body_medium_break2.wav"
} }
} }
"Player.DrownContinue" "Player.DrownContinue"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "1.0" "volume" "1.0"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "90,110" "pitch" "90,110"
"rndwave" "rndwave"
{ {
"wave" "player/pl_drown1.wav" "wave" "player/pl_drown1.wav"
"wave" "player/pl_drown2.wav" "wave" "player/pl_drown2.wav"
"wave" "player/pl_drown3.wav" "wave" "player/pl_drown3.wav"
} }
} }
"Player.Wade" "Player.Wade"
{ {
"channel" "CHAN_BODY" "channel" "CHAN_BODY"
"volume" "0.25" "volume" "0.25"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"rndwave" "rndwave"
{ {
"wave" "player/footsteps/wade5.wav" "wave" "player/footsteps/wade5.wav"
"wave" "player/footsteps/wade6.wav" "wave" "player/footsteps/wade6.wav"
"wave" "player/footsteps/wade7.wav" "wave" "player/footsteps/wade7.wav"
"wave" "player/footsteps/wade8.wav" "wave" "player/footsteps/wade8.wav"
} }
} }
"Player.AmbientUnderWater" "Player.AmbientUnderWater"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"volume" "0.22" "volume" "0.22"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "ambient/water/underwater.wav" "wave" "ambient/water/underwater.wav"
} }
"Player.UseTrain" "Player.UseTrain"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "plats/train_use1.wav" "wave" "plats/train_use1.wav"
} }
"Player.UseDeny" "Player.UseDeny"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.4" "volume" "0.4"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"wave" "common/wpn_select.wav" "wave" "common/wpn_select.wav"
} }
"Player.PickupWeapon" "Player.PickupWeapon"
{ {
"channel" "CHAN_ITEM" "channel" "CHAN_ITEM"
"volume" "0.8" "volume" "0.8"
"soundlevel" "SNDLVL_75dB" "soundlevel" "SNDLVL_75dB"
"pitch" "95,105" "pitch" "95,105"
"wave" "items/ammo_pickup.wav" "wave" "items/ammo_pickup.wav"
} }
"Geiger.BeepLow" "Geiger.BeepLow"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"soundlevel" "SNDLVL_NONE" "soundlevel" "SNDLVL_NONE"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/geiger1.wav" "wave" "player/geiger1.wav"
"wave" "player/geiger2.wav" "wave" "player/geiger2.wav"
} }
} }
"Geiger.BeepHigh" "Geiger.BeepHigh"
{ {
"channel" "CHAN_STATIC" "channel" "CHAN_STATIC"
"soundlevel" "SNDLVL_NONE" "soundlevel" "SNDLVL_NONE"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"rndwave" "rndwave"
{ {
"wave" "player/geiger2.wav" "wave" "player/geiger2.wav"
"wave" "player/geiger3.wav" "wave" "player/geiger3.wav"
} }
} }
//HL2MP //HL2MP
"NPC_MetroPolice.Die" "NPC_MetroPolice.Die"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.500" "volume" "0.500"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_80dB" "soundlevel" "SNDLVL_80dB"
"rndwave" "rndwave"
{ {
"wave" "npc/metropolice/die1.wav" "wave" "npc/metropolice/die1.wav"
"wave" "npc/metropolice/die2.wav" "wave" "npc/metropolice/die2.wav"
"wave" "npc/metropolice/die3.wav" "wave" "npc/metropolice/die3.wav"
"wave" "npc/metropolice/die4.wav" "wave" "npc/metropolice/die4.wav"
} }
} }
"NPC_CombineS.Die" "NPC_CombineS.Die"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "0.500" "volume" "0.500"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_80dB" "soundlevel" "SNDLVL_80dB"
"rndwave" "rndwave"
{ {
"wave" "npc/combine_soldier/die1.wav" "wave" "npc/combine_soldier/die1.wav"
"wave" "npc/combine_soldier/die2.wav" "wave" "npc/combine_soldier/die2.wav"
"wave" "npc/combine_soldier/die3.wav" "wave" "npc/combine_soldier/die3.wav"
} }
} }
"NPC_Citizen.die" "NPC_Citizen.die"
{ {
"channel" "CHAN_VOICE" "channel" "CHAN_VOICE"
"volume" "VOL_NORM" "volume" "VOL_NORM"
"pitch" "PITCH_NORM" "pitch" "PITCH_NORM"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "*vo/npc/$gender01/pain07.wav" "wave" "*vo/npc/$gender01/pain07.wav"
"wave" "*vo/npc/$gender01/pain08.wav" "wave" "*vo/npc/$gender01/pain08.wav"
"wave" "*vo/npc/$gender01/pain09.wav" "wave" "*vo/npc/$gender01/pain09.wav"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,69 +1,69 @@
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Movement_Title" "blank" "#Valve_Movement_Title"
"blank" "==========================" "blank" "=========================="
"+forward" "#Valve_Move_Forward" "+forward" "#Valve_Move_Forward"
"+back" "#Valve_Move_Back" "+back" "#Valve_Move_Back"
"+moveleft" "#Valve_Move_Left" "+moveleft" "#Valve_Move_Left"
"+moveright" "#Valve_Move_Right" "+moveright" "#Valve_Move_Right"
"+speed" "#Valve_Sprint" "+speed" "#Valve_Sprint"
"+jump" "#Valve_Jump" "+jump" "#Valve_Jump"
"+duck" "#Valve_Duck" "+duck" "#Valve_Duck"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Combat_Title" "blank" "#Valve_Combat_Title"
"blank" "==========================" "blank" "=========================="
"+attack" "#Valve_Primary_Attack" "+attack" "#Valve_Primary_Attack"
"+attack2" "#Valve_Secondary_Attack" "+attack2" "#Valve_Secondary_Attack"
"+reload" "#Valve_Reload_Weapon" "+reload" "#Valve_Reload_Weapon"
"+use" "#Valve_Use_Items" "+use" "#Valve_Use_Items"
"phys_swap" "#Valve_Gravity_Gun" "phys_swap" "#Valve_Gravity_Gun"
"impulse 100" "#Valve_Flashlight" "impulse 100" "#Valve_Flashlight"
"+zoom" "#Valve_Suit_Zoom" "+zoom" "#Valve_Suit_Zoom"
"slot1" "#Valve_Weapon_Category_1" "slot1" "#Valve_Weapon_Category_1"
"slot2" "#Valve_Weapon_Category_2" "slot2" "#Valve_Weapon_Category_2"
"slot3" "#Valve_Weapon_Category_3" "slot3" "#Valve_Weapon_Category_3"
"slot4" "#Valve_Weapon_Category_4" "slot4" "#Valve_Weapon_Category_4"
"slot5" "#Valve_Weapon_Category_5" "slot5" "#Valve_Weapon_Category_5"
"slot6" "#Valve_Weapon_Category_6" "slot6" "#Valve_Weapon_Category_6"
"invnext" "#Valve_Next_Weapon" "invnext" "#Valve_Next_Weapon"
"invprev" "#Valve_Previous_Weapon" "invprev" "#Valve_Previous_Weapon"
"lastinv" "#Valve_Last_Weapon_Used" "lastinv" "#Valve_Last_Weapon_Used"
"use weapon_crowbar;use weapon_stunstick" "#HL2_Crowbar_Menu" "use weapon_crowbar;use weapon_stunstick" "#HL2_Crowbar_Menu"
"use weapon_physcannon" "#HL2_GravityGun_Menu" "use weapon_physcannon" "#HL2_GravityGun_Menu"
"use weapon_pistol" "#HL2_Pistol_Menu" "use weapon_pistol" "#HL2_Pistol_Menu"
"use weapon_357" "#HL2_357Handgun_Menu" "use weapon_357" "#HL2_357Handgun_Menu"
"use weapon_smg1" "#HL2_SMG1_Menu" "use weapon_smg1" "#HL2_SMG1_Menu"
"use weapon_ar2" "#HL2_Pulse_Rifle_Menu" "use weapon_ar2" "#HL2_Pulse_Rifle_Menu"
"use weapon_shotgun" "#HL2_Shotgun_Menu" "use weapon_shotgun" "#HL2_Shotgun_Menu"
"use weapon_crossbow" "#HL2_Crossbow_Menu" "use weapon_crossbow" "#HL2_Crossbow_Menu"
"use weapon_frag" "#HL2_Grenade_Menu" "use weapon_frag" "#HL2_Grenade_Menu"
"use weapon_rpg" "#HL2_RPG_Menu" "use weapon_rpg" "#HL2_RPG_Menu"
"use weapon_SLAM" "#HL2_SLAM_Menu" "use weapon_SLAM" "#HL2_SLAM_Menu"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Communication_Title" "blank" "#Valve_Communication_Title"
"blank" "==========================" "blank" "=========================="
"+voicerecord" "#Valve_Use_Voice_Communication" "+voicerecord" "#Valve_Use_Voice_Communication"
"messagemode" "#Valve_Chat_Message" "messagemode" "#Valve_Chat_Message"
"messagemode2" "#Valve_Team_Message" "messagemode2" "#Valve_Team_Message"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Miscellaneous_Title" "blank" "#Valve_Miscellaneous_Title"
"blank" "==========================" "blank" "=========================="
"jpeg" "#Valve_Take_Screen_Shot" "jpeg" "#Valve_Take_Screen_Shot"
"+showscores" "#Valve_Display_Scores" "+showscores" "#Valve_Display_Scores"
"impulse 201" "#Valve_Spray_Logo" "impulse 201" "#Valve_Spray_Logo"
"pause" "#Valve_Pause_Game" "pause" "#Valve_Pause_Game"
"quit" "#Valve_Quit_Game" "quit" "#Valve_Quit_Game"
"timeleft" "Time Left in Round" "timeleft" "Time Left in Round"
"askconnect_accept" "#Valve_Accept_Redirect" "askconnect_accept" "#Valve_Accept_Redirect"
"blank" "==========================" "blank" "=========================="
"blank" "#Valve_Miscellaneous_Keyboard_Keys_Title" "blank" "#Valve_Miscellaneous_Keyboard_Keys_Title"
"blank" "==========================" "blank" "=========================="
"+walk" "#Valve_Walk" "+walk" "#Valve_Walk"
"+left" "#Valve_Turn_Left" "+left" "#Valve_Turn_Left"
"+right" "#Valve_Turn_Right" "+right" "#Valve_Turn_Right"
"+moveup" "#Valve_Swim_Up" "+moveup" "#Valve_Swim_Up"
"+movedown" "#Valve_Swim_Down" "+movedown" "#Valve_Swim_Down"
"+lookup" "#Valve_Look_Up" "+lookup" "#Valve_Look_Up"
"+lookdown" "#Valve_Look_Down" "+lookdown" "#Valve_Look_Down"
"+strafe" "#Valve_Strafe_Modifier" "+strafe" "#Valve_Strafe_Modifier"
"+klook" "#Valve_Keyboard_Look_Modifier" "+klook" "#Valve_Keyboard_Look_Modifier"

View File

@ -1,59 +1,59 @@
"w" "+forward" "w" "+forward"
"UPARROW" "+forward" "UPARROW" "+forward"
"s" "+back" "s" "+back"
"DOWNARROW" "+back" "DOWNARROW" "+back"
"LEFTARROW" "+left" "LEFTARROW" "+left"
"RIGHTARROW" "+right" "RIGHTARROW" "+right"
"a" "+moveleft" "a" "+moveleft"
"," "+moveleft" "," "+moveleft"
"d" "+moveright" "d" "+moveright"
"." "+moveright" "." "+moveright"
"SPACE" "+jump" "SPACE" "+jump"
"CTRL" "+duck" "CTRL" "+duck"
"TAB" "+showscores" "TAB" "+showscores"
"e" "+use" "e" "+use"
"v" "+moveup" "v" "+moveup"
"'" "+moveup" "'" "+moveup"
"c" "impulse 50" "c" "impulse 50"
"/" "+movedown" "/" "+movedown"
"PGUP" "+lookup" "PGUP" "+lookup"
"PGDN" "+lookdown" "PGDN" "+lookdown"
"END" "centerview" "END" "centerview"
"z" "+strafe" "z" "+strafe"
"INS" "+klook" "INS" "+klook"
";" "+mlook" ";" "+mlook"
"r" "+reload" "r" "+reload"
"ALT" "+walk" "ALT" "+walk"
"SHIFT" "+speed" "SHIFT" "+speed"
"MOUSE1" "+attack" "MOUSE1" "+attack"
"ENTER" "+attack" "ENTER" "+attack"
"MOUSE2" "+attack2" "MOUSE2" "+attack2"
"\\" "+attack2" "\\" "+attack2"
"f" "impulse 100" "f" "impulse 100"
"1" "slot1" "1" "slot1"
"2" "slot2" "2" "slot2"
"3" "slot3" "3" "slot3"
"4" "slot4" "4" "slot4"
"5" "slot5" "5" "slot5"
"6" "slot6" "6" "slot6"
"MWHEELUP" "invprev" "MWHEELUP" "invprev"
"[" "invprev" "[" "invprev"
"MWHEELDOWN" "invnext" "MWHEELDOWN" "invnext"
"]" "invnext" "]" "invnext"
"q" "lastinv" "q" "lastinv"
"F5" "jpeg" "F5" "jpeg"
"F6" "save quick" "F6" "save quick"
"F7" "load quick" "F7" "load quick"
"F10" "quit prompt" "F10" "quit prompt"
"PAUSE" "pause" "PAUSE" "pause"
"ESCAPE" "escape" "ESCAPE" "escape"
"~" "toggleconsole" "~" "toggleconsole"
"`" "toggleconsole" "`" "toggleconsole"
"+" "sizeup" "+" "sizeup"
"=" "sizeup" "=" "sizeup"
"-" "sizedown" "-" "sizedown"
"t" "impulse 201" "t" "impulse 201"
"y" "messagemode" "y" "messagemode"
"u" "messagemode2" "u" "messagemode2"
"g" "dropprimary" "g" "dropprimary"
"z" "+zoom" "z" "+zoom"

View File

@ -1,256 +1,256 @@
0 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 0 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
1 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 1 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
2 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 2 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
3 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 3 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
4 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 4 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
5 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 5 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
6 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 6 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
7 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 7 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
8 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 8 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
9 "TAB" "TAB" DEFAULTCOLOR 9 "TAB" "TAB" DEFAULTCOLOR
10 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 10 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
11 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 11 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
12 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 12 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
13 "ENTER" "ENTER" DEFAULTCOLOR 13 "ENTER" "ENTER" DEFAULTCOLOR
14 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 14 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
15 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 15 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
16 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 16 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
17 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 17 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
18 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 18 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
19 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 19 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
20 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 20 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
21 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 21 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
22 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 22 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
23 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 23 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
24 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 24 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
25 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 25 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
26 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 26 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
27 "ESCAPE" "ESCAPE" DEFAULTCOLOR 27 "ESCAPE" "ESCAPE" DEFAULTCOLOR
28 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 28 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
29 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 29 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
30 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 30 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
31 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 31 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
32 "SPACE" "SPACE" DEFAULTCOLOR 32 "SPACE" "SPACE" DEFAULTCOLOR
33 "!" "!" DEFAULTCOLOR 33 "!" "!" DEFAULTCOLOR
34 """ """ DEFAULTCOLOR 34 """ """ DEFAULTCOLOR
35 "#" "#" DEFAULTCOLOR 35 "#" "#" DEFAULTCOLOR
36 "$" "$" DEFAULTCOLOR 36 "$" "$" DEFAULTCOLOR
37 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR 37 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR
38 "&" "&" DEFAULTCOLOR 38 "&" "&" DEFAULTCOLOR
39 "'" "'" DEFAULTCOLOR 39 "'" "'" DEFAULTCOLOR
40 "(" "(" DEFAULTCOLOR 40 "(" "(" DEFAULTCOLOR
41 ")" ")" DEFAULTCOLOR 41 ")" ")" DEFAULTCOLOR
42 "*" "*" DEFAULTCOLOR 42 "*" "*" DEFAULTCOLOR
43 "+" "+" DEFAULTCOLOR 43 "+" "+" DEFAULTCOLOR
44 "," "," DEFAULTCOLOR 44 "," "," DEFAULTCOLOR
45 "-" "-" DEFAULTCOLOR 45 "-" "-" DEFAULTCOLOR
46 "." "." DEFAULTCOLOR 46 "." "." DEFAULTCOLOR
47 "/" "/" DEFAULTCOLOR 47 "/" "/" DEFAULTCOLOR
48 "0" "0" DEFAULTCOLOR 48 "0" "0" DEFAULTCOLOR
49 "1" "1" DEFAULTCOLOR 49 "1" "1" DEFAULTCOLOR
50 "2" "2" DEFAULTCOLOR 50 "2" "2" DEFAULTCOLOR
51 "3" "3" DEFAULTCOLOR 51 "3" "3" DEFAULTCOLOR
52 "4" "4" DEFAULTCOLOR 52 "4" "4" DEFAULTCOLOR
53 "5" "5" DEFAULTCOLOR 53 "5" "5" DEFAULTCOLOR
54 "6" "6" DEFAULTCOLOR 54 "6" "6" DEFAULTCOLOR
55 "7" "7" DEFAULTCOLOR 55 "7" "7" DEFAULTCOLOR
56 "8" "8" DEFAULTCOLOR 56 "8" "8" DEFAULTCOLOR
57 "9" "9" DEFAULTCOLOR 57 "9" "9" DEFAULTCOLOR
58 ":" ":" DEFAULTCOLOR 58 ":" ":" DEFAULTCOLOR
59 ";" ";" DEFAULTCOLOR 59 ";" ";" DEFAULTCOLOR
60 "<" "<" DEFAULTCOLOR 60 "<" "<" DEFAULTCOLOR
61 "=" "=" DEFAULTCOLOR 61 "=" "=" DEFAULTCOLOR
62 ">" ">" DEFAULTCOLOR 62 ">" ">" DEFAULTCOLOR
63 "?" "?" DEFAULTCOLOR 63 "?" "?" DEFAULTCOLOR
64 "@" "@" DEFAULTCOLOR 64 "@" "@" DEFAULTCOLOR
65 "A" "A" DEFAULTCOLOR 65 "A" "A" DEFAULTCOLOR
66 "B" "B" DEFAULTCOLOR 66 "B" "B" DEFAULTCOLOR
67 "C" "C" DEFAULTCOLOR 67 "C" "C" DEFAULTCOLOR
68 "D" "D" DEFAULTCOLOR 68 "D" "D" DEFAULTCOLOR
69 "E" "E" DEFAULTCOLOR 69 "E" "E" DEFAULTCOLOR
70 "F" "F" DEFAULTCOLOR 70 "F" "F" DEFAULTCOLOR
71 "G" "G" DEFAULTCOLOR 71 "G" "G" DEFAULTCOLOR
72 "H" "H" DEFAULTCOLOR 72 "H" "H" DEFAULTCOLOR
73 "I" "I" DEFAULTCOLOR 73 "I" "I" DEFAULTCOLOR
74 "J" "J" DEFAULTCOLOR 74 "J" "J" DEFAULTCOLOR
75 "K" "K" DEFAULTCOLOR 75 "K" "K" DEFAULTCOLOR
76 "L" "L" DEFAULTCOLOR 76 "L" "L" DEFAULTCOLOR
77 "M" "M" DEFAULTCOLOR 77 "M" "M" DEFAULTCOLOR
78 "N" "N" DEFAULTCOLOR 78 "N" "N" DEFAULTCOLOR
79 "O" "O" DEFAULTCOLOR 79 "O" "O" DEFAULTCOLOR
80 "P" "P" DEFAULTCOLOR 80 "P" "P" DEFAULTCOLOR
81 "Q" "Q" DEFAULTCOLOR 81 "Q" "Q" DEFAULTCOLOR
82 "R" "R" DEFAULTCOLOR 82 "R" "R" DEFAULTCOLOR
83 "S" "S" DEFAULTCOLOR 83 "S" "S" DEFAULTCOLOR
84 "T" "T" DEFAULTCOLOR 84 "T" "T" DEFAULTCOLOR
85 "U" "U" DEFAULTCOLOR 85 "U" "U" DEFAULTCOLOR
86 "V" "V" DEFAULTCOLOR 86 "V" "V" DEFAULTCOLOR
87 "W" "W" DEFAULTCOLOR 87 "W" "W" DEFAULTCOLOR
88 "X" "X" DEFAULTCOLOR 88 "X" "X" DEFAULTCOLOR
89 "Y" "Y" DEFAULTCOLOR 89 "Y" "Y" DEFAULTCOLOR
90 "Z" "Z" DEFAULTCOLOR 90 "Z" "Z" DEFAULTCOLOR
91 "[" "[" DEFAULTCOLOR 91 "[" "[" DEFAULTCOLOR
92 "\" "\" DEFAULTCOLOR 92 "\" "\" DEFAULTCOLOR
93 "]" "]" DEFAULTCOLOR 93 "]" "]" DEFAULTCOLOR
94 "^" "^" DEFAULTCOLOR 94 "^" "^" DEFAULTCOLOR
95 "_" "_" DEFAULTCOLOR 95 "_" "_" DEFAULTCOLOR
96 "`" "`" DEFAULTCOLOR 96 "`" "`" DEFAULTCOLOR
97 "a" "a" DEFAULTCOLOR 97 "a" "a" DEFAULTCOLOR
98 "b" "b" DEFAULTCOLOR 98 "b" "b" DEFAULTCOLOR
99 "c" "c" DEFAULTCOLOR 99 "c" "c" DEFAULTCOLOR
100 "d" "d" DEFAULTCOLOR 100 "d" "d" DEFAULTCOLOR
101 "e" "e" DEFAULTCOLOR 101 "e" "e" DEFAULTCOLOR
102 "f" "f" DEFAULTCOLOR 102 "f" "f" DEFAULTCOLOR
103 "g" "g" DEFAULTCOLOR 103 "g" "g" DEFAULTCOLOR
104 "h" "h" DEFAULTCOLOR 104 "h" "h" DEFAULTCOLOR
105 "i" "i" DEFAULTCOLOR 105 "i" "i" DEFAULTCOLOR
106 "j" "j" DEFAULTCOLOR 106 "j" "j" DEFAULTCOLOR
107 "k" "k" DEFAULTCOLOR 107 "k" "k" DEFAULTCOLOR
108 "l" "l" DEFAULTCOLOR 108 "l" "l" DEFAULTCOLOR
109 "m" "m" DEFAULTCOLOR 109 "m" "m" DEFAULTCOLOR
110 "n" "n" DEFAULTCOLOR 110 "n" "n" DEFAULTCOLOR
111 "o" "o" DEFAULTCOLOR 111 "o" "o" DEFAULTCOLOR
112 "p" "p" DEFAULTCOLOR 112 "p" "p" DEFAULTCOLOR
113 "q" "q" DEFAULTCOLOR 113 "q" "q" DEFAULTCOLOR
114 "r" "r" DEFAULTCOLOR 114 "r" "r" DEFAULTCOLOR
115 "s" "s" DEFAULTCOLOR 115 "s" "s" DEFAULTCOLOR
116 "t" "t" DEFAULTCOLOR 116 "t" "t" DEFAULTCOLOR
117 "u" "u" DEFAULTCOLOR 117 "u" "u" DEFAULTCOLOR
118 "v" "v" DEFAULTCOLOR 118 "v" "v" DEFAULTCOLOR
119 "w" "w" DEFAULTCOLOR 119 "w" "w" DEFAULTCOLOR
120 "x" "x" DEFAULTCOLOR 120 "x" "x" DEFAULTCOLOR
121 "y" "y" DEFAULTCOLOR 121 "y" "y" DEFAULTCOLOR
122 "z" "z" DEFAULTCOLOR 122 "z" "z" DEFAULTCOLOR
123 "{" "{" DEFAULTCOLOR 123 "{" "{" DEFAULTCOLOR
124 "|" "|" DEFAULTCOLOR 124 "|" "|" DEFAULTCOLOR
125 "}" "}" DEFAULTCOLOR 125 "}" "}" DEFAULTCOLOR
126 "~" "~" DEFAULTCOLOR 126 "~" "~" DEFAULTCOLOR
127 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR 127 "BACKSPACE" "BACKSPACE" DEFAULTCOLOR
128 "UPARROW" "UPARROW" DEFAULTCOLOR 128 "UPARROW" "UPARROW" DEFAULTCOLOR
129 "DOWNARROW" "DOWNARROW" DEFAULTCOLOR 129 "DOWNARROW" "DOWNARROW" DEFAULTCOLOR
130 "LEFTARROW" "LEFTARROW" DEFAULTCOLOR 130 "LEFTARROW" "LEFTARROW" DEFAULTCOLOR
131 "RIGHTARROW" "RIGHTARROW" DEFAULTCOLOR 131 "RIGHTARROW" "RIGHTARROW" DEFAULTCOLOR
132 "ALT" "ALT" DEFAULTCOLOR 132 "ALT" "ALT" DEFAULTCOLOR
133 "CTRL" "CTRL" DEFAULTCOLOR 133 "CTRL" "CTRL" DEFAULTCOLOR
134 "SHIFT" "SHIFT" DEFAULTCOLOR 134 "SHIFT" "SHIFT" DEFAULTCOLOR
135 "F1" "F1" DEFAULTCOLOR 135 "F1" "F1" DEFAULTCOLOR
136 "F2" "F2" DEFAULTCOLOR 136 "F2" "F2" DEFAULTCOLOR
137 "F3" "F3" DEFAULTCOLOR 137 "F3" "F3" DEFAULTCOLOR
138 "F4" "F4" DEFAULTCOLOR 138 "F4" "F4" DEFAULTCOLOR
139 "F5" "F5" DEFAULTCOLOR 139 "F5" "F5" DEFAULTCOLOR
140 "F6" "F6" DEFAULTCOLOR 140 "F6" "F6" DEFAULTCOLOR
141 "F7" "F7" DEFAULTCOLOR 141 "F7" "F7" DEFAULTCOLOR
142 "F8" "F8" DEFAULTCOLOR 142 "F8" "F8" DEFAULTCOLOR
143 "F9" "F9" DEFAULTCOLOR 143 "F9" "F9" DEFAULTCOLOR
144 "F10" "F10" DEFAULTCOLOR 144 "F10" "F10" DEFAULTCOLOR
145 "F11" "F11" DEFAULTCOLOR 145 "F11" "F11" DEFAULTCOLOR
146 "F12" "F12" DEFAULTCOLOR 146 "F12" "F12" DEFAULTCOLOR
147 "INS" "INS" DEFAULTCOLOR 147 "INS" "INS" DEFAULTCOLOR
148 "DEL" "DEL" DEFAULTCOLOR 148 "DEL" "DEL" DEFAULTCOLOR
149 "PGDN" "PGDN" DEFAULTCOLOR 149 "PGDN" "PGDN" DEFAULTCOLOR
150 "PGUP" "PGUP" DEFAULTCOLOR 150 "PGUP" "PGUP" DEFAULTCOLOR
151 "HOME" "HOME" DEFAULTCOLOR 151 "HOME" "HOME" DEFAULTCOLOR
152 "END" "END" DEFAULTCOLOR 152 "END" "END" DEFAULTCOLOR
153 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 153 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
154 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 154 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
155 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 155 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
156 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 156 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
157 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 157 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
158 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 158 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
159 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 159 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
160 "KP_HOME" "KP_HOME" DEFAULTCOLOR 160 "KP_HOME" "KP_HOME" DEFAULTCOLOR
161 "KP_UPARROW" "KP_UPARROW" DEFAULTCOLOR 161 "KP_UPARROW" "KP_UPARROW" DEFAULTCOLOR
162 "KP_PGUP" "KP_PGUP" DEFAULTCOLOR 162 "KP_PGUP" "KP_PGUP" DEFAULTCOLOR
163 "KP_LEFTARROW" "KP_LEFTARROW" DEFAULTCOLOR 163 "KP_LEFTARROW" "KP_LEFTARROW" DEFAULTCOLOR
164 "KP_5" "KP_5" DEFAULTCOLOR 164 "KP_5" "KP_5" DEFAULTCOLOR
165 "KP_RIGHTARROW" "KP_RIGHTARROW" DEFAULTCOLOR 165 "KP_RIGHTARROW" "KP_RIGHTARROW" DEFAULTCOLOR
166 "KP_END" "KP_END" DEFAULTCOLOR 166 "KP_END" "KP_END" DEFAULTCOLOR
167 "KP_DOWNARROW" "KP_DOWNARROW" DEFAULTCOLOR 167 "KP_DOWNARROW" "KP_DOWNARROW" DEFAULTCOLOR
168 "KP_PGDN" "KP_PGDN" DEFAULTCOLOR 168 "KP_PGDN" "KP_PGDN" DEFAULTCOLOR
169 "KP_ENTER" "KP_ENTER" DEFAULTCOLOR 169 "KP_ENTER" "KP_ENTER" DEFAULTCOLOR
170 "KP_INS" "KP_INS" DEFAULTCOLOR 170 "KP_INS" "KP_INS" DEFAULTCOLOR
171 "KP_DEL" "KP_DEL" DEFAULTCOLOR 171 "KP_DEL" "KP_DEL" DEFAULTCOLOR
172 "KP_SLASH" "KP_SLASH" DEFAULTCOLOR 172 "KP_SLASH" "KP_SLASH" DEFAULTCOLOR
173 "KP_MINUS" "KP_MINUS" DEFAULTCOLOR 173 "KP_MINUS" "KP_MINUS" DEFAULTCOLOR
174 "KP_PLUS" "KP_PLUS" DEFAULTCOLOR 174 "KP_PLUS" "KP_PLUS" DEFAULTCOLOR
175 "CAPSLOCK" "CAPSLOCK" DEFAULTCOLOR 175 "CAPSLOCK" "CAPSLOCK" DEFAULTCOLOR
176 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 176 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
177 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 177 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
178 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 178 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
179 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 179 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
180 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 180 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
181 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 181 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
182 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 182 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
183 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 183 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
184 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 184 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
185 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 185 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
186 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 186 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
187 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 187 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
188 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 188 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
189 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 189 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
190 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 190 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
191 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 191 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
192 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 192 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
193 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 193 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
194 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 194 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
195 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 195 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
196 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 196 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
197 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 197 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
198 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 198 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
199 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 199 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
200 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR1 200 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR1
201 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 201 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
202 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 202 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
203 "JOY1" "JOY1" COLOR 255 0 0 203 "JOY1" "JOY1" COLOR 255 0 0
204 "JOY2" "JOY2" COLOR 255 0 0 204 "JOY2" "JOY2" COLOR 255 0 0
205 "JOY3" "JOY3" COLOR 255 0 0 205 "JOY3" "JOY3" COLOR 255 0 0
206 "JOY4" "JOY4" COLOR 255 0 0 206 "JOY4" "JOY4" COLOR 255 0 0
207 "AUX1" "AUX1" DEFAULTCOLOR 207 "AUX1" "AUX1" DEFAULTCOLOR
208 "AUX2" "AUX2" DEFAULTCOLOR 208 "AUX2" "AUX2" DEFAULTCOLOR
209 "AUX3" "AUX3" DEFAULTCOLOR 209 "AUX3" "AUX3" DEFAULTCOLOR
210 "AUX4" "AUX4" DEFAULTCOLOR 210 "AUX4" "AUX4" DEFAULTCOLOR
211 "AUX5" "AUX5" DEFAULTCOLOR 211 "AUX5" "AUX5" DEFAULTCOLOR
212 "AUX6" "AUX6" DEFAULTCOLOR 212 "AUX6" "AUX6" DEFAULTCOLOR
213 "AUX7" "AUX7" DEFAULTCOLOR 213 "AUX7" "AUX7" DEFAULTCOLOR
214 "AUX8" "AUX8" DEFAULTCOLOR 214 "AUX8" "AUX8" DEFAULTCOLOR
215 "AUX9" "AUX9" DEFAULTCOLOR 215 "AUX9" "AUX9" DEFAULTCOLOR
216 "AUX10" "AUX10" DEFAULTCOLOR 216 "AUX10" "AUX10" DEFAULTCOLOR
217 "AUX11" "AUX11" DEFAULTCOLOR 217 "AUX11" "AUX11" DEFAULTCOLOR
218 "AUX12" "AUX12" DEFAULTCOLOR 218 "AUX12" "AUX12" DEFAULTCOLOR
219 "AUX13" "AUX13" DEFAULTCOLOR 219 "AUX13" "AUX13" DEFAULTCOLOR
220 "AUX14" "AUX14" DEFAULTCOLOR 220 "AUX14" "AUX14" DEFAULTCOLOR
221 "AUX15" "AUX15" DEFAULTCOLOR 221 "AUX15" "AUX15" DEFAULTCOLOR
222 "AUX16" "AUX16" DEFAULTCOLOR 222 "AUX16" "AUX16" DEFAULTCOLOR
223 "AUX17" "AUX17" DEFAULTCOLOR 223 "AUX17" "AUX17" DEFAULTCOLOR
224 "AUX18" "AUX18" DEFAULTCOLOR 224 "AUX18" "AUX18" DEFAULTCOLOR
225 "AUX19" "AUX19" DEFAULTCOLOR 225 "AUX19" "AUX19" DEFAULTCOLOR
226 "AUX20" "AUX20" DEFAULTCOLOR 226 "AUX20" "AUX20" DEFAULTCOLOR
227 "AUX21" "AUX21" DEFAULTCOLOR 227 "AUX21" "AUX21" DEFAULTCOLOR
228 "AUX22" "AUX22" DEFAULTCOLOR 228 "AUX22" "AUX22" DEFAULTCOLOR
229 "AUX23" "AUX23" DEFAULTCOLOR 229 "AUX23" "AUX23" DEFAULTCOLOR
230 "AUX24" "AUX24" DEFAULTCOLOR 230 "AUX24" "AUX24" DEFAULTCOLOR
231 "AUX25" "AUX25" DEFAULTCOLOR 231 "AUX25" "AUX25" DEFAULTCOLOR
232 "AUX26" "AUX26" DEFAULTCOLOR 232 "AUX26" "AUX26" DEFAULTCOLOR
233 "AUX27" "AUX27" DEFAULTCOLOR 233 "AUX27" "AUX27" DEFAULTCOLOR
234 "AUX28" "AUX28" DEFAULTCOLOR 234 "AUX28" "AUX28" DEFAULTCOLOR
235 "AUX29" "AUX29" DEFAULTCOLOR 235 "AUX29" "AUX29" DEFAULTCOLOR
236 "AUX30" "AUX30" DEFAULTCOLOR 236 "AUX30" "AUX30" DEFAULTCOLOR
237 "AUX31" "AUX31" DEFAULTCOLOR 237 "AUX31" "AUX31" DEFAULTCOLOR
238 "AUX32" "AUX32" DEFAULTCOLOR 238 "AUX32" "AUX32" DEFAULTCOLOR
239 "MWHEELDOWN" "MWHEELDOWN" DEFAULTCOLOR 239 "MWHEELDOWN" "MWHEELDOWN" DEFAULTCOLOR
240 "MWHEELUP" "MWHEELUP" DEFAULTCOLOR 240 "MWHEELUP" "MWHEELUP" DEFAULTCOLOR
241 "MOUSE1" "MOUSE1" COLOR 0 255 255 241 "MOUSE1" "MOUSE1" COLOR 0 255 255
242 "MOUSE2" "MOUSE2" COLOR 0 255 255 242 "MOUSE2" "MOUSE2" COLOR 0 255 255
243 "MOUSE3" "MOUSE3" COLOR 0 255 255 243 "MOUSE3" "MOUSE3" COLOR 0 255 255
244 "MOUSE4" "MOUSE4" COLOR 0 255 255 244 "MOUSE4" "MOUSE4" COLOR 0 255 255
245 "MOUSE5" "MOUSE5" COLOR 0 255 255 245 "MOUSE5" "MOUSE5" COLOR 0 255 255
246 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 246 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
247 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 247 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
248 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 248 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
249 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 249 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
250 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 250 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
251 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 251 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
252 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 252 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
253 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 253 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
254 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR 254 "<UNKNOWN KEYNUM>" "<UNKNOWN KEYNUM>" DEFAULTCOLOR
255 "PAUSE" "PAUSE" DEFAULTCOLOR 255 "PAUSE" "PAUSE" DEFAULTCOLOR

View File

@ -1,76 +1,76 @@
// keys with $ are to be substituted in the value strings where they occur // keys with $ are to be substituted in the value strings where they occur
// They must occur before any values that reference them since this file is // They must occur before any values that reference them since this file is
// parsed in order // parsed in order
// Substitutions $game is swapped with the text string specified // Substitutions $game is swapped with the text string specified
#include "scripts/game.txt" #include "scripts/game.txt"
"loading" "Loading $game..." "loading" "Loading $game..."
"nummasters" "2" "nummasters" "2"
"master0" "half-life.east.won.net:27010" "master0" "half-life.east.won.net:27010"
"master1" "half-life.west.won.net:27010" "master1" "half-life.west.won.net:27010"
//"master0" "127.0.0.1:27010" //"master0" "127.0.0.1:27010"
//"master1" "127.0.0.1:27010" //"master1" "127.0.0.1:27010"
// Actual text labels ( note that all $key strings in the value field will be // Actual text labels ( note that all $key strings in the value field will be
// substituted as noted above ). // substituted as noted above ).
"label_console" "Go to $game console" "label_console" "Go to $game console"
"label_quit" "Quit playing $game" "label_quit" "Quit playing $game"
"label_newgame" "Start a new game" "label_newgame" "Start a new game"
"label_loadgame" "Load a saved game" "label_loadgame" "Load a saved game"
"label_videomode" "Change video mode" "label_videomode" "Change video mode"
"label_configuration" "Configuration" "label_configuration" "Configuration"
"label_langame" "Connect to games on your LAN" "label_langame" "Connect to games on your LAN"
"label_internetgame" "Connect to internet games" "label_internetgame" "Connect to internet games"
"label_multiplayergame" "Multiplayer games" "label_multiplayergame" "Multiplayer games"
"dialog_main_header" "$game" "dialog_main_header" "$game"
"dialog_videomode_header" "Video Mode" "dialog_videomode_header" "Video Mode"
"dialog_newgame_header" "New Game" "dialog_newgame_header" "New Game"
"dialog_loadgame_header" "Load Game" "dialog_loadgame_header" "Load Game"
"dialog_configuration_header" "Configuration" "dialog_configuration_header" "Configuration"
"dialog_controls_header" "Controls" "dialog_controls_header" "Controls"
"dialog_lan_header" "Lan" "dialog_lan_header" "Lan"
"dialog_internet_header" "Internet Games" "dialog_internet_header" "Internet Games"
"dialog_multiplayer_header" "Multiplayer" "dialog_multiplayer_header" "Multiplayer"
"button_done" "Done" "button_done" "Done"
"button_ok" "OK" "button_ok" "OK"
"button_cancel" "Cancel" "button_cancel" "Cancel"
"button_yes" "Yes" "button_yes" "Yes"
"button_no" "No" "button_no" "No"
"button_newgame" "New Game" "button_newgame" "New Game"
"button_videomode" "Video Mode" "button_videomode" "Video Mode"
"button_console" "Console" "button_console" "Console"
"button_quit" "Quit" "button_quit" "Quit"
"button_loadgame" "Load Game" "button_loadgame" "Load Game"
"button_easy" "Easy" "button_easy" "Easy"
"button_medium" "Medium" "button_medium" "Medium"
"button_hard" "Hard" "button_hard" "Hard"
"button_configuration" "Configuration" "button_configuration" "Configuration"
"button_controls" "Controls" "button_controls" "Controls"
"button_usedefaults" "Use Defaults" "button_usedefaults" "Use Defaults"
"button_advancedcontrols" "Adv Controls" "button_advancedcontrols" "Adv Controls"
"button_delete" "Delete" "button_delete" "Delete"
"button_load" "Load" "button_load" "Load"
"button_langame" "Lan" "button_langame" "Lan"
"button_internetgame" "Internet Game" "button_internetgame" "Internet Game"
"button_connect" "Connect" "button_connect" "Connect"
"button_refresh" "Refresh" "button_refresh" "Refresh"
"button_multiplayergame" "Multiplayer" "button_multiplayergame" "Multiplayer"
"button_update" "Update" "button_update" "Update"
"keybinding_action" "Action" "keybinding_action" "Action"
"keybinding_keybutton" "Key / button" "keybinding_keybutton" "Key / button"
"keybinding_alternate" "Alternate" "keybinding_alternate" "Alternate"
"keybinding_prompt" "Press a button or key" "keybinding_prompt" "Press a button or key"
"loadgame_time" "Time" "loadgame_time" "Time"
"loadgame_game" "Game" "loadgame_game" "Game"
"loadgame_elapsed" "Elapsed Time" "loadgame_elapsed" "Elapsed Time"
"langame_address" "Address" "langame_address" "Address"
"langame_gamedir" "Game" "langame_gamedir" "Game"
"langame_map" "Map" "langame_map" "Map"
"langame_ping" "Ping" "langame_ping" "Ping"

View File

@ -1,228 +1,228 @@
"sprites/640_hud" "sprites/640_hud"
{ {
TextureData TextureData
{ {
"d_crowbar" "d_crowbar"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "0" "y" "0"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_9mmhandgun" "d_9mmhandgun"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "16" "y" "16"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_357" "d_357"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "32" "y" "32"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_9mmAR" "d_9mmAR"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "48" "y" "48"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_shotgun" "d_shotgun"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "64" "y" "64"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_bolt" "d_bolt"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "80" "y" "80"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_crossbow" "d_crossbow"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "80" "y" "80"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_rpg_rocket" "d_rpg_rocket"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "96" "y" "96"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_gauss" "d_gauss"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "112" "y" "112"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_egon" "d_egon"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "128" "y" "128"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_hornet" "d_hornet"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "144" "y" "144"
"width" "48" "width" "48"
"height" "16" "height" "16"
} }
"d_grenade" "d_grenade"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "160" "y" "160"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_satchel" "d_satchel"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "176" "y" "176"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_tripmine" "d_tripmine"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "192" "y" "192"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_snark" "d_snark"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "208" "y" "208"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_skull" "d_skull"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "224" "y" "224"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"d_tracktrain" "d_tracktrain"
{ {
"file" "sprites/640hud1" "file" "sprites/640hud1"
"x" "192" "x" "192"
"y" "240" "y" "240"
"width" "32" "width" "32"
"height" "16" "height" "16"
} }
"death_357" "death_357"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "." "character" "."
} }
"death_ar2" "death_ar2"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "2" "character" "2"
} }
"death_crossbow_bolt" "death_crossbow_bolt"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "1" "character" "1"
} }
"death_smg1" "death_smg1"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "/" "character" "/"
} }
"death_shotgun" "death_shotgun"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "0" "character" "0"
} }
"death_rpg_missile" "death_rpg_missile"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "3" "character" "3"
} }
"death_grenade_frag" "death_grenade_frag"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "4" "character" "4"
} }
"death_pistol" "death_pistol"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "-" "character" "-"
} }
"death_physics" "death_physics"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "9" "character" "9"
} }
"death_combine_ball" "death_combine_ball"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "8" "character" "8"
} }
"death_smg1_grenade" "death_smg1_grenade"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "7" "character" "7"
} }
"death_stunstick" "death_stunstick"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "!" "character" "!"
} }
"death_slam" "death_slam"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "*" "character" "*"
} }
"death_crowbar" "death_crowbar"
{ {
"font" "HL2MPTypeDeath" "font" "HL2MPTypeDeath"
"character" "6" "character" "6"
} }
"voice_player" "voice_player"
{ {
"file" "voice/icntlk_sv" "file" "voice/icntlk_sv"
"x" "0" "x" "0"
"y" "0" "y" "0"
"width" "32" "width" "32"
"height" "32" "height" "32"
} }
"voice_self" "voice_self"
{ {
"file" "voice/icntlk_local" "file" "voice/icntlk_local"
"x" "0" "x" "0"
"y" "0" "y" "0"
"width" "32" "width" "32"
"height" "32" "height" "32"
} }
} }
} }

View File

@ -1,276 +1,276 @@
"labs_mp" "labs_mp"
{ {
"playlooping" "playlooping"
{ {
"volume" ".12" "volume" ".12"
"pitch" "100" "pitch" "100"
"wave" "ambient/machines/lab_loop1.wav" "wave" "ambient/machines/lab_loop1.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".4" "volume" ".4"
"pitch" "100" "pitch" "100"
"wave" "ambient/machines/combine_shield_loop3.wav" "wave" "ambient/machines/combine_shield_loop3.wav"
"position" "0" "position" "0"
// tele snd // tele snd
} }
"playlooping" "playlooping"
{ {
"volume" ".3" "volume" ".3"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/noise2.wav" "wave" "ambient/atmosphere/noise2.wav"
"position" "0" "position" "0"
// tele snd // tele snd
} }
"playrandom" "playrandom"
{ {
"time" "8, 15" "time" "8, 15"
"volume" "0.3,0.5" "volume" "0.3,0.5"
"pitch" "100" "pitch" "100"
"soundlevel" "SNDLVL_NORM" "soundlevel" "SNDLVL_NORM"
"rndwave" "rndwave"
{ {
"wave" "npc/headcrab/alert1.wav" "wave" "npc/headcrab/alert1.wav"
"wave" "npc/headcrab/idle1.wav" "wave" "npc/headcrab/idle1.wav"
"wave" "npc/headcrab/idle2.wav" "wave" "npc/headcrab/idle2.wav"
"wave" "npc/headcrab/idle3.wav" "wave" "npc/headcrab/idle3.wav"
} }
"position" "1" "position" "1"
// lamarr // lamarr
} }
} }
"under_boiler" "under_boiler"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.2" "volume" "0.2"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/ambience5.wav" "wave" "ambient/atmosphere/ambience5.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.07" "volume" "0.07"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/underground.wav" "wave" "ambient/atmosphere/underground.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.06" "volume" "0.06"
"pitch" "100" "pitch" "100"
"wave" "ambient/machines/thumper_amb.wav" "wave" "ambient/machines/thumper_amb.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".08" "volume" ".08"
"pitch" "85" "pitch" "85"
"wave" "ambient/gas/steam_loop1.wav" "wave" "ambient/gas/steam_loop1.wav"
"position" "1" "position" "1"
// Steam pipe // Steam pipe
} }
} }
"under_tunnels" "under_tunnels"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.1" "volume" "0.1"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/cargo_hold2.wav" "wave" "ambient/atmosphere/cargo_hold2.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.2" "volume" "0.2"
"pitch" "80" "pitch" "80"
"wave" "ambient/wind/wind_tunnel1.wav" "wave" "ambient/wind/wind_tunnel1.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".08" "volume" ".08"
"pitch" "85" "pitch" "85"
"wave" "ambient/gas/steam_loop1.wav" "wave" "ambient/gas/steam_loop1.wav"
"position" "0" "position" "0"
// Steam pipe // Steam pipe
} }
} }
"under_basement1" "under_basement1"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.07" "volume" "0.07"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/cargo_hold2.wav" "wave" "ambient/atmosphere/cargo_hold2.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.2" "volume" "0.2"
"pitch" "80" "pitch" "80"
"wave" "ambient/wind/wind_tunnel1.wav" "wave" "ambient/wind/wind_tunnel1.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.15" "volume" "0.15"
"pitch" "100" "pitch" "100"
"wave" "ambient/wind/wasteland_wind.wav" "wave" "ambient/wind/wasteland_wind.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.1" "volume" "0.1"
"pitch" "90" "pitch" "90"
"wave" "ambient/atmosphere/quiet_cellblock_amb.wav" "wave" "ambient/atmosphere/quiet_cellblock_amb.wav"
} }
"playlooping" "playlooping"
{ {
"volume" ".08" "volume" ".08"
"pitch" "85" "pitch" "85"
"wave" "ambient/gas/steam_loop1.wav" "wave" "ambient/gas/steam_loop1.wav"
"position" "0" "position" "0"
// Steam pipe // Steam pipe
} }
} }
"combine_tunnel" "combine_tunnel"
{ {
"dsp" "1" "dsp" "1"
"playlooping" "playlooping"
{ {
"volume" "0.3" "volume" "0.3"
"pitch" "100" "pitch" "100"
"wave" "ambient/levels/citadel/citadel_drone_loop6.wav" "wave" "ambient/levels/citadel/citadel_drone_loop6.wav"
} }
"playrandom" "playrandom"
{ {
"time" "8, 30" "time" "8, 30"
"volume" "0.05,0.1" "volume" "0.05,0.1"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_140dB" "soundlevel" "SNDLVL_140dB"
"rndwave" "rndwave"
{ {
"wave" "ambient/levels/citadel/strange_talk1.wav" "wave" "ambient/levels/citadel/strange_talk1.wav"
"wave" "ambient/levels/citadel/strange_talk3.wav" "wave" "ambient/levels/citadel/strange_talk3.wav"
"wave" "ambient/levels/citadel/strange_talk4.wav" "wave" "ambient/levels/citadel/strange_talk4.wav"
"wave" "ambient/levels/citadel/strange_talk5.wav" "wave" "ambient/levels/citadel/strange_talk5.wav"
"wave" "ambient/levels/citadel/strange_talk6.wav" "wave" "ambient/levels/citadel/strange_talk6.wav"
"wave" "ambient/levels/citadel/strange_talk7.wav" "wave" "ambient/levels/citadel/strange_talk7.wav"
"wave" "ambient/levels/citadel/strange_talk8.wav" "wave" "ambient/levels/citadel/strange_talk8.wav"
"wave" "ambient/levels/citadel/strange_talk9.wav" "wave" "ambient/levels/citadel/strange_talk9.wav"
"wave" "ambient/levels/citadel/strange_talk10.wav" "wave" "ambient/levels/citadel/strange_talk10.wav"
"wave" "ambient/levels/citadel/strange_talk11.wav" "wave" "ambient/levels/citadel/strange_talk11.wav"
} }
} }
"playrandom" "playrandom"
{ {
"time" "20, 35" "time" "20, 35"
"volume" "0.08,0.15" "volume" "0.08,0.15"
"pitch" "90,110" "pitch" "90,110"
"soundlevel" "SNDLVL_140dB" "soundlevel" "SNDLVL_140dB"
"position" "0" "position" "0"
"rndwave" "rndwave"
{ {
"wave" "npc/combine_soldier/vo/weaponsoffsafeprepforcontact.wav" "wave" "npc/combine_soldier/vo/weaponsoffsafeprepforcontact.wav"
"wave" "npc/combine_soldier/vo/teamdeployedandscanning.wav" "wave" "npc/combine_soldier/vo/teamdeployedandscanning.wav"
"wave" "npc/combine_soldier/vo/unitismovingin.wav" "wave" "npc/combine_soldier/vo/unitismovingin.wav"
"wave" "npc/combine_soldier/vo/sweepingin.wav" "wave" "npc/combine_soldier/vo/sweepingin.wav"
"wave" "npc/combine_soldier/vo/targetcompromisedmovein.wav" "wave" "npc/combine_soldier/vo/targetcompromisedmovein.wav"
"wave" "npc/combine_soldier/vo/stabilizationteamhassector.wav" "wave" "npc/combine_soldier/vo/stabilizationteamhassector.wav"
"wave" "npc/combine_soldier/vo/overwatchrequestreinforcement.wav" "wave" "npc/combine_soldier/vo/overwatchrequestreinforcement.wav"
"wave" "npc/combine_soldier/vo/overwatchtarget1sterilized.wav" "wave" "npc/combine_soldier/vo/overwatchtarget1sterilized.wav"
} }
} }
"playrandom" "playrandom"
{ {
"time" "45, 120" "time" "45, 120"
"volume" "0.01,0.1" "volume" "0.01,0.1"
"pitch" "90,115" "pitch" "90,115"
"soundlevel" "SNDLVL_140dB" "soundlevel" "SNDLVL_140dB"
"rndwave" "rndwave"
{ {
"wave" "*ambient/levels/citadel/citadel_ambient_voices1.wav" "wave" "*ambient/levels/citadel/citadel_ambient_voices1.wav"
} }
} }
"playlooping" "playlooping"
{ {
"volume" "0.08" "volume" "0.08"
"pitch" "100" "pitch" "100"
"wave" "ambient/atmosphere/underground.wav" "wave" "ambient/atmosphere/underground.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.25" "volume" "0.25"
"pitch" "80" "pitch" "80"
"wave" "ambient/wind/wind_tunnel1.wav" "wave" "ambient/wind/wind_tunnel1.wav"
} }
} }

View File

@ -1,18 +1,18 @@
soundscaples_manifest soundscaples_manifest
{ {
"file" "scripts/soundscapes.txt" "file" "scripts/soundscapes.txt"
// List additional soundscape files here // List additional soundscape files here
"file" "scripts/soundscapes_canals.txt" "file" "scripts/soundscapes_canals.txt"
"file" "scripts/soundscapes_klab.txt" "file" "scripts/soundscapes_klab.txt"
"file" "scripts/soundscapes_elab.txt" "file" "scripts/soundscapes_elab.txt"
"file" "scripts/soundscapes_streetwar.txt" "file" "scripts/soundscapes_streetwar.txt"
"file" "scripts/soundscapes_citadel.txt" "file" "scripts/soundscapes_citadel.txt"
"file" "scripts/soundscapes_town.txt" "file" "scripts/soundscapes_town.txt"
"file" "scripts/soundscapes_coast.txt" "file" "scripts/soundscapes_coast.txt"
"file" "scripts/soundscapes_prison.txt" "file" "scripts/soundscapes_prison.txt"
"file" "scripts/soundscapes_trainyard.txt" "file" "scripts/soundscapes_trainyard.txt"
"file" "scripts/soundscapes_labs.txt" "file" "scripts/soundscapes_labs.txt"
"file" "scripts/soundscapes_strike.txt" "file" "scripts/soundscapes_strike.txt"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,53 +1,53 @@
"strike_ware" "strike_ware"
{ {
"dsp" "1" "dsp" "1"
// The ambient sounds of the warehouse // The ambient sounds of the warehouse
"playlooping" "playlooping"
{ {
"volume" "0.1" "volume" "0.1"
"pitch" "100" "pitch" "100"
"soundlevel" "SNDLVL_90dB" "soundlevel" "SNDLVL_90dB"
"wave" "ambient/atmosphere/ambience_base.wav" "wave" "ambient/atmosphere/ambience_base.wav"
} }
"playlooping" "playlooping"
{ {
"volume" "0.15" "volume" "0.15"
"wave" "ambient/atmosphere/indoor2.wav" "wave" "ambient/atmosphere/indoor2.wav"
"pitch" "100" "pitch" "100"
} }
} }
"strike_outside" "strike_outside"
{ {
"playlooping" "playlooping"
{ {
"volume" "0.25" "volume" "0.25"
"wave" "ambient/wind/wind1.wav" "wave" "ambient/wind/wind1.wav"
"pitch" "100" "pitch" "100"
} }
"playsoundscape" "playsoundscape"
{ {
"name" "d1_canals.util_tunnel_windgusts" "name" "d1_canals.util_tunnel_windgusts"
"volume" "0.7" "volume" "0.7"
} }
"playsoundscape" "playsoundscape"
{ {
"name" "d1_canals.util_birds" "name" "d1_canals.util_birds"
"volume" "0.25" "volume" "0.25"
} }
} }

View File

@ -1,62 +1,62 @@
// 357 // 357
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_357Handgun" "printname" "#HL2_357Handgun"
"viewmodel" "models/weapons/v_357.mdl" "viewmodel" "models/weapons/v_357.mdl"
"playermodel" "models/weapons/w_357.mdl" "playermodel" "models/weapons/w_357.mdl"
"anim_prefix" "python" "anim_prefix" "python"
"bucket" "1" "bucket" "1"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "6" "clip_size" "6"
"default_clip" "6" "default_clip" "6"
"primary_ammo" "357" "primary_ammo" "357"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "7" "weight" "7"
"item_flags" "0" "item_flags" "0"
"damage" "75" "damage" "75"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"empty" "Weapon_Pistol.Empty" "empty" "Weapon_Pistol.Empty"
"single_shot" "Weapon_357.Single" "single_shot" "Weapon_357.Single"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "e" "character" "e"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "e" "character" "e"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "q" "character" "q"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,78 +1,78 @@
// Assault Rifle 2 // Assault Rifle 2
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Pulse_Rifle" "printname" "#HL2_Pulse_Rifle"
"viewmodel" "models/weapons/v_irifle.mdl" "viewmodel" "models/weapons/v_irifle.mdl"
"playermodel" "models/weapons/w_irifle.mdl" "playermodel" "models/weapons/w_irifle.mdl"
"anim_prefix" "ar2" "anim_prefix" "ar2"
"bucket" "2" "bucket" "2"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "30" "clip_size" "30"
"default_clip" "60" "default_clip" "60"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "AR2" "primary_ammo" "AR2"
"secondary_ammo" "AR2AltFire" "secondary_ammo" "AR2AltFire"
"weight" "5" "weight" "5"
"item_flags" "0" "item_flags" "0"
"damage" "11" "damage" "11"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"special1" "Weapon_CombineGuard.Special1" "special1" "Weapon_CombineGuard.Special1"
"empty" "Weapon_IRifle.Empty" "empty" "Weapon_IRifle.Empty"
"double_shot" "Weapon_IRifle.Single" "double_shot" "Weapon_IRifle.Single"
"reload" "Weapon_AR2.Reload" "reload" "Weapon_AR2.Reload"
"single_shot" "Weapon_AR2.Single" "single_shot" "Weapon_AR2.Single"
// NPC SECTION // NPC SECTION
"single_shot_npc" "Weapon_AR2.NPC_Single" "single_shot_npc" "Weapon_AR2.NPC_Single"
"reload_npc" "Weapon_AR2.NPC_Reload" "reload_npc" "Weapon_AR2.NPC_Reload"
"double_shot_npc" "Weapon_AR2.NPC_Double" "double_shot_npc" "Weapon_AR2.NPC_Double"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "l" "character" "l"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "l" "character" "l"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "u" "character" "u"
} }
"ammo2" "ammo2"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "z" "character" "z"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,77 +1,77 @@
// Crossbow // Crossbow
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Crossbow" "printname" "#HL2_Crossbow"
"viewmodel" "models/weapons/v_crossbow.mdl" "viewmodel" "models/weapons/v_crossbow.mdl"
"playermodel" "models/weapons/w_crossbow.mdl" "playermodel" "models/weapons/w_crossbow.mdl"
"anim_prefix" "bow" "anim_prefix" "bow"
"bucket" "3" "bucket" "3"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "1" "clip_size" "1"
"default_clip" "5" "default_clip" "5"
"primary_ammo" "XBowBolt" "primary_ammo" "XBowBolt"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "6" "weight" "6"
"item_flags" "0" "item_flags" "0"
"damage" "100" "damage" "100"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_Crossbow.Single" "single_shot" "Weapon_Crossbow.Single"
"reload" "Weapon_Crossbow.Reload" "reload" "Weapon_Crossbow.Reload"
"special1" "Weapon_Crossbow.BoltElectrify" "special1" "Weapon_Crossbow.BoltElectrify"
"special2" "Weapon_Crossbow.BoltFly" "special2" "Weapon_Crossbow.BoltFly"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "g" "character" "g"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "g" "character" "g"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "w" "character" "w"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "96" "y" "96"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"zoom" "zoom"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"zoom_autoaim" "zoom_autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "24" "x" "24"
"y" "112" "y" "112"
"width" "104" "width" "104"
"height" "16" "height" "16"
} }
} }
} }

View File

@ -1,68 +1,68 @@
// Crowbar // Crowbar
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Crowbar" "printname" "#HL2_Crowbar"
"viewmodel" "models/weapons/v_crowbar.mdl" "viewmodel" "models/weapons/v_crowbar.mdl"
"playermodel" "models/weapons/w_crowbar.mdl" "playermodel" "models/weapons/w_crowbar.mdl"
"anim_prefix" "crowbar" "anim_prefix" "crowbar"
"bucket" "0" "bucket" "0"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "-1" "clip_size" "-1"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_Crowbar.Single" "single_shot" "Weapon_Crowbar.Single"
"melee_hit" "Weapon_Crowbar.Melee_Hit" "melee_hit" "Weapon_Crowbar.Melee_Hit"
"melee_hit_world" "Weapon_Crowbar.Melee_HitWorld" "melee_hit_world" "Weapon_Crowbar.Melee_HitWorld"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "c" "character" "c"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "c" "character" "c"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "c" "character" "c"
} }
"ammo2" "ammo2"
{ {
"file" "sprites/640hud7" "file" "sprites/640hud7"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,69 +1,69 @@
// Cubemap visualization tool // Cubemap visualization tool
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Cubemap" "printname" "#HL2_Cubemap"
"viewmodel" "models/shadertest/envballs.mdl" "viewmodel" "models/shadertest/envballs.mdl"
"playermodel" "models/shadertest/envballs.mdl" "playermodel" "models/shadertest/envballs.mdl"
"anim_prefix" "envballs" "anim_prefix" "envballs"
"bucket" "2" "bucket" "2"
"bucket_position" "2" "bucket_position" "2"
"clip_size" "-1" "clip_size" "-1"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "-1" "default_clip" "-1"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"file" "sprites/w_icons1" "file" "sprites/w_icons1"
"x" "128" "x" "128"
"y" "128" "y" "128"
"width" "128" "width" "128"
"height" "64" "height" "64"
} }
"weapon_s" "weapon_s"
{ {
"file" "sprites/w_icons1b" "file" "sprites/w_icons1b"
"x" "128" "x" "128"
"y" "128" "y" "128"
"width" "128" "width" "128"
"height" "64" "height" "64"
} }
"ammo" "ammo"
{ {
"file" "sprites/a_icons1" "file" "sprites/a_icons1"
"x" "55" "x" "55"
"y" "60" "y" "60"
"width" "73" "width" "73"
"height" "15" "height" "15"
} }
"crosshair" "crosshair"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,63 +1,63 @@
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Grenade" "printname" "#HL2_Grenade"
"viewmodel" "models/weapons/v_grenade.mdl" "viewmodel" "models/weapons/v_grenade.mdl"
"playermodel" "models/weapons/w_grenade.mdl" "playermodel" "models/weapons/w_grenade.mdl"
"anim_prefix" "Grenade" "anim_prefix" "Grenade"
"bucket" "4" "bucket" "4"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "-1" "clip_size" "-1"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "1" "default_clip" "1"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "grenade" "primary_ammo" "grenade"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "1" "weight" "1"
"item_flags" "18" // ITEM_FLAG_NOAUTORELOAD | ITEM_FLAG_EXHAUSTIBLE "item_flags" "18" // ITEM_FLAG_NOAUTORELOAD | ITEM_FLAG_EXHAUSTIBLE
"damage" "150" "damage" "150"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"special1" "WeaponFrag.Roll" "special1" "WeaponFrag.Roll"
"double_shot" "common/null.wav" "double_shot" "common/null.wav"
"single_shot" "common/null.wav" "single_shot" "common/null.wav"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "k" "character" "k"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "k" "character" "k"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "v" "character" "v"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,78 +1,78 @@
// Physics Gun // Physics Gun
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_GravityGun" "printname" "#HL2_GravityGun"
"viewmodel" "models/weapons/v_physcannon.mdl" "viewmodel" "models/weapons/v_physcannon.mdl"
"playermodel" "models/weapons/w_Physics.mdl" "playermodel" "models/weapons/w_Physics.mdl"
"anim_prefix" "gauss" "anim_prefix" "gauss"
"bucket" "0" "bucket" "0"
"bucket_position" "2" "bucket_position" "2"
"clip_size" "0" "clip_size" "0"
"clip2_size" "0" "clip2_size" "0"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"default_clip" "0" "default_clip" "0"
"default_clip2" "0" "default_clip2" "0"
"weight" "0" "weight" "0"
"autoswitchto" "0" "autoswitchto" "0"
"autoswitchfrom" "0" "autoswitchfrom" "0"
"item_flags" "2" "item_flags" "2"
SoundData SoundData
{ {
// launch held object // launch held object
"single_shot" "Weapon_PhysCannon.Launch" "single_shot" "Weapon_PhysCannon.Launch"
// Ignore? // Ignore?
"reload" "Weapon_PhysCannon.Charge" "reload" "Weapon_PhysCannon.Charge"
// dry fire - no target // dry fire - no target
"empty" "Weapon_PhysCannon.DryFire" "empty" "Weapon_PhysCannon.DryFire"
// pick up object // pick up object
"special1" "Weapon_PhysCannon.Pickup" "special1" "Weapon_PhysCannon.Pickup"
// open claws, target object // open claws, target object
"special2" "Weapon_PhysCannon.OpenClaws" "special2" "Weapon_PhysCannon.OpenClaws"
// close claws, target out of range/invalid // close claws, target out of range/invalid
"melee_hit" "Weapon_PhysCannon.CloseClaws" "melee_hit" "Weapon_PhysCannon.CloseClaws"
// drop object // drop object
"melee_miss" "Weapon_PhysCannon.Drop" "melee_miss" "Weapon_PhysCannon.Drop"
// too heavy // too heavy
"special3" "Weapon_PhysCannon.TooHeavy" "special3" "Weapon_PhysCannon.TooHeavy"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "m" "character" "m"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "m" "character" "m"
} }
"ammo" "ammo"
{ {
"file" "sprites/a_icons1" "file" "sprites/a_icons1"
"x" "0" "x" "0"
"y" "0" "y" "0"
"width" "32" "width" "32"
"height" "32" "height" "32"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,67 +1,67 @@
// Pistol // Pistol
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Pistol" "printname" "#HL2_Pistol"
"viewmodel" "models/weapons/v_pistol.mdl" "viewmodel" "models/weapons/v_pistol.mdl"
"playermodel" "models/weapons/w_pistol.mdl" "playermodel" "models/weapons/w_pistol.mdl"
"anim_prefix" "pistol" "anim_prefix" "pistol"
"bucket" "1" "bucket" "1"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "18" "clip_size" "18"
"primary_ammo" "Pistol" "primary_ammo" "Pistol"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "2" "weight" "2"
"item_flags" "0" "item_flags" "0"
"damage" "8" "damage" "8"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"reload" "Weapon_Pistol.Reload" "reload" "Weapon_Pistol.Reload"
"reload_npc" "Weapon_Pistol.NPC_Reload" "reload_npc" "Weapon_Pistol.NPC_Reload"
"empty" "Weapon_Pistol.Empty" "empty" "Weapon_Pistol.Empty"
"single_shot" "Weapon_Pistol.Single" "single_shot" "Weapon_Pistol.Single"
"single_shot_npc" "Weapon_Pistol.NPC_Single" "single_shot_npc" "Weapon_Pistol.NPC_Single"
"special1" "Weapon_Pistol.Special1" "special1" "Weapon_Pistol.Special1"
"special2" "Weapon_Pistol.Special2" "special2" "Weapon_Pistol.Special2"
"burst" "Weapon_Pistol.Burst" "burst" "Weapon_Pistol.Burst"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "d" "character" "d"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "d" "character" "d"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "p" "character" "p"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,70 +1,70 @@
// Missile Launcher // Missile Launcher
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_RPG" "printname" "#HL2_RPG"
"viewmodel" "models/weapons/v_rpg.mdl" "viewmodel" "models/weapons/v_rpg.mdl"
"playermodel" "models/weapons/w_rocket_launcher.mdl" "playermodel" "models/weapons/w_rocket_launcher.mdl"
"anim_prefix" "missile launcher" "anim_prefix" "missile launcher"
"bucket" "4" "bucket" "4"
"bucket_position" "1" "bucket_position" "1"
"autoswitchfrom" "1" "autoswitchfrom" "1"
"clip_size" "-1" "clip_size" "-1"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "3" "default_clip" "3"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "rpg_round" "primary_ammo" "rpg_round"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
"damage" "150" "damage" "150"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_RPG.Single" "single_shot" "Weapon_RPG.Single"
"single_shot_npc" "Weapon_RPG.NPC_Single" "single_shot_npc" "Weapon_RPG.NPC_Single"
//Laser on //Laser on
"special1" "Weapon_RPG.LaserOn" "special1" "Weapon_RPG.LaserOn"
//Laser off //Laser off
"special2" "Weapon_RPG.LaserOff" "special2" "Weapon_RPG.LaserOff"
"empty" "Weapon_SMG1.Empty" "empty" "Weapon_SMG1.Empty"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "i" "character" "i"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "i" "character" "i"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "x" "character" "x"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,67 +1,67 @@
// Shotgun // Shotgun
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_Shotgun" "printname" "#HL2_Shotgun"
"viewmodel" "models/weapons/v_shotgun.mdl" "viewmodel" "models/weapons/v_shotgun.mdl"
"playermodel" "models/weapons/w_shotgun.mdl" "playermodel" "models/weapons/w_shotgun.mdl"
"anim_prefix" "shotgun" "anim_prefix" "shotgun"
"bucket" "3" "bucket" "3"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "6" "clip_size" "6"
"primary_ammo" "Buckshot" "primary_ammo" "Buckshot"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "4" "weight" "4"
"item_flags" "0" "item_flags" "0"
"damage" "9" "damage" "9"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"empty" "Weapon_Shotgun.Empty" "empty" "Weapon_Shotgun.Empty"
"reload" "Weapon_Shotgun.Reload" "reload" "Weapon_Shotgun.Reload"
"special1" "Weapon_Shotgun.Special1" "special1" "Weapon_Shotgun.Special1"
"single_shot" "Weapon_Shotgun.Single" "single_shot" "Weapon_Shotgun.Single"
"double_shot" "Weapon_Shotgun.Double" "double_shot" "Weapon_Shotgun.Double"
// NPC WEAPON SOUNDS // NPC WEAPON SOUNDS
"reload_npc" "Weapon_Shotgun.NPC_Reload" "reload_npc" "Weapon_Shotgun.NPC_Reload"
"single_shot_npc" "Weapon_Shotgun.NPC_Single" "single_shot_npc" "Weapon_Shotgun.NPC_Single"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "b" "character" "b"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "b" "character" "b"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "s" "character" "s"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,56 +1,56 @@
// Slam // Slam
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_SLAM" "printname" "#HL2_SLAM"
"viewmodel" "models/weapons/v_slam.mdl" "viewmodel" "models/weapons/v_slam.mdl"
"playermodel" "models/weapons/w_slam.mdl" "playermodel" "models/weapons/w_slam.mdl"
"anim_prefix" "slam" "anim_prefix" "slam"
"bucket" "4" "bucket" "4"
"bucket_position" "2" "bucket_position" "2"
"clip_size" "3" "clip_size" "3"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "slam" "secondary_ammo" "slam"
"default_clip2" "3" "default_clip2" "3"
"weight" "1" "weight" "1"
"item_flags" "2" "item_flags" "2"
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "o" "character" "o"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "o" "character" "o"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "o" "character" "o"
} }
"crosshair" "crosshair"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,77 +1,77 @@
// Small Machine Gun 1 // Small Machine Gun 1
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_SMG1" "printname" "#HL2_SMG1"
"viewmodel" "models/weapons/v_smg1.mdl" "viewmodel" "models/weapons/v_smg1.mdl"
"playermodel" "models/weapons/w_smg1.mdl" //FIXME: "playermodel" "models/weapons/w_smg1.mdl" //FIXME:
"anim_prefix" "smg2" "anim_prefix" "smg2"
"bucket" "2" "bucket" "2"
"bucket_position" "0" "bucket_position" "0"
"clip_size" "45" "clip_size" "45"
"clip2_size" "-1" "clip2_size" "-1"
"default_clip" "45" "default_clip" "45"
"default_clip2" "-1" "default_clip2" "-1"
"primary_ammo" "SMG1" "primary_ammo" "SMG1"
"secondary_ammo" "SMG1_Grenade" "secondary_ammo" "SMG1_Grenade"
"weight" "3" "weight" "3"
"item_flags" "0" "item_flags" "0"
"damage" "5" "damage" "5"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"reload" "Weapon_SMG1.Reload" "reload" "Weapon_SMG1.Reload"
"reload_npc" "Weapon_SMG1.NPC_Reload" "reload_npc" "Weapon_SMG1.NPC_Reload"
"empty" "Weapon_SMG1.Empty" "empty" "Weapon_SMG1.Empty"
"single_shot" "Weapon_SMG1.Single" "single_shot" "Weapon_SMG1.Single"
"single_shot_npc" "Weapon_SMG1.NPC_Single" "single_shot_npc" "Weapon_SMG1.NPC_Single"
"special1" "Weapon_SMG1.Special1" "special1" "Weapon_SMG1.Special1"
"special2" "Weapon_SMG1.Special2" "special2" "Weapon_SMG1.Special2"
"double_shot" "Weapon_SMG1.Double" "double_shot" "Weapon_SMG1.Double"
"burst" "Weapon_SMG1.Burst" "burst" "Weapon_SMG1.Burst"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "a" "character" "a"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "a" "character" "a"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "r" "character" "r"
} }
"ammo2" "ammo2"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "t" "character" "t"
} }
"crosshair" "crosshair"
{ {
"font" "Crosshairs" "font" "Crosshairs"
"character" "Q" "character" "Q"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

View File

@ -1,73 +1,73 @@
// stunstick // stunstick
WeaponData WeaponData
{ {
// Weapon data is loaded by both the Game and Client DLLs. // Weapon data is loaded by both the Game and Client DLLs.
"printname" "#HL2_StunBaton" "printname" "#HL2_StunBaton"
"viewmodel" "models/weapons/v_stunstick.mdl" "viewmodel" "models/weapons/v_stunstick.mdl"
"playermodel" "models/weapons/w_stunbaton.mdl" "playermodel" "models/weapons/w_stunbaton.mdl"
"anim_prefix" "stunbaton" "anim_prefix" "stunbaton"
"bucket" "0" "bucket" "0"
"bucket_position" "1" "bucket_position" "1"
"clip_size" "-1" "clip_size" "-1"
"primary_ammo" "None" "primary_ammo" "None"
"secondary_ammo" "None" "secondary_ammo" "None"
"weight" "0" "weight" "0"
"item_flags" "0" "item_flags" "0"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds) // Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData SoundData
{ {
"single_shot" "Weapon_StunStick.Swing" "single_shot" "Weapon_StunStick.Swing"
"melee_miss" "Weapon_StunStick.Melee_Miss" "melee_miss" "Weapon_StunStick.Melee_Miss"
"melee_hit" "Weapon_StunStick.Melee_Hit" "melee_hit" "Weapon_StunStick.Melee_Hit"
"melee_hit_world" "Weapon_StunStick.Melee_HitWorld" "melee_hit_world" "Weapon_StunStick.Melee_HitWorld"
} }
// Weapon Sprite data is loaded by the Client DLL. // Weapon Sprite data is loaded by the Client DLL.
TextureData TextureData
{ {
"weapon" "weapon"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "n" "character" "n"
} }
"weapon_s" "weapon_s"
{ {
"font" "WeaponIconsSelected" "font" "WeaponIconsSelected"
"character" "n" "character" "n"
} }
"ammo" "ammo"
{ {
"font" "WeaponIcons" "font" "WeaponIcons"
"character" "n" "character" "n"
} }
"ammo2" "ammo2"
{ {
"file" "sprites/640hud7" "file" "sprites/640hud7"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"crosshair" "crosshair"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "0" "x" "0"
"y" "48" "y" "48"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
"autoaim" "autoaim"
{ {
"file" "sprites/crosshairs" "file" "sprites/crosshairs"
"x" "48" "x" "48"
"y" "72" "y" "72"
"width" "24" "width" "24"
"height" "24" "height" "24"
} }
} }
} }

2
mp/src/createallprojects.bat Normal file → Executable file
View File

@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln devtools\bin\vpc.exe /hl2mp +everything /mksln everything.sln

2
mp/src/creategameprojects.bat Normal file → Executable file
View File

@ -1 +1 @@
devtools\bin\vpc.exe /hl2mp +game /mksln games.sln devtools\bin\vpc.exe /hl2mp +game /mksln games.sln

0
mp/src/devtools/bin/vpccrccheck.exe Normal file → Executable file
View File

View File

@ -1,3 +1,3 @@
#defines these macros so that we skip VSIGN and P4 steps in the SDK #defines these macros so that we skip VSIGN and P4 steps in the SDK
SOURCE_SDK=1 SOURCE_SDK=1
VALVE_NO_AUTO_P4=1 VALVE_NO_AUTO_P4=1

View File

@ -1,14 +1,14 @@
{ {
global: *; global: *;
local: local:
extern "C++" { extern "C++" {
*std::*; *std::*;
__cxxabi*; __cxxabi*;
__gcc*; __gcc*;
__gxx*; __gxx*;
__gnu_cxx*; __gnu_cxx*;
__cxa*; __cxa*;
operator*; operator*;
__dynamic_cast __dynamic_cast
}; };
}; };

0
mp/src/gcsdk/bin/protoc.exe Normal file → Executable file
View File

0
mp/src/lib/public/linux32/libSDL2-2.0.so.0 Normal file → Executable file
View File

0
mp/src/lib/public/linux32/libsteam_api.so Normal file → Executable file
View File

0
mp/src/lib/public/osx32/libSDL2-2.0.0.dylib Normal file → Executable file
View File

0
mp/src/lib/public/osx32/libsteam_api.dylib Normal file → Executable file
View File

0
mp/src/lib/public/osx32/libtier0.dylib Normal file → Executable file
View File

0
mp/src/lib/public/osx32/libvstdlib.dylib Normal file → Executable file
View File

View File

@ -1,21 +1,21 @@
// STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC] // STATIC: "CONVERT_TO_SRGB" "0..1" [ps20b][= g_pHardwareConfig->NeedsShaderSRGBConversion()] [PC]
// STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX] // STATIC: "CONVERT_TO_SRGB" "0..0" [= 0] [XBOX]
#define HDRTYPE HDR_TYPE_NONE #define HDRTYPE HDR_TYPE_NONE
#include "common_ps_fxc.h" #include "common_ps_fxc.h"
sampler FBSampler : register( s0 ); sampler FBSampler : register( s0 );
sampler BlurSampler : register( s1 ); sampler BlurSampler : register( s1 );
struct PS_INPUT struct PS_INPUT
{ {
float2 texCoord : TEXCOORD0; float2 texCoord : TEXCOORD0;
}; };
float4 main( PS_INPUT i ) : COLOR float4 main( PS_INPUT i ) : COLOR
{ {
float4 fbSample = tex2D( FBSampler, i.texCoord ); float4 fbSample = tex2D( FBSampler, i.texCoord );
float4 blurSample = tex2D( BlurSampler, i.texCoord ); float4 blurSample = tex2D( BlurSampler, i.texCoord );
return FinalOutput( float4( fbSample + blurSample.rgb * blurSample.a * MAX_HDR_OVERBRIGHT, 1.0f ), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE ); return FinalOutput( float4( fbSample + blurSample.rgb * blurSample.a * MAX_HDR_OVERBRIGHT, 1.0f ), 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
} }

View File

@ -1,18 +1,18 @@
//======= Copyright © 1996-2006, Valve Corporation, All rights reserved. ====== //======= Copyright © 1996-2006, Valve Corporation, All rights reserved. ======
#define CONVERT_TO_SRGB 0 #define CONVERT_TO_SRGB 0
#include "common_ps_fxc.h" #include "common_ps_fxc.h"
sampler TexSampler : register( s0 ); sampler TexSampler : register( s0 );
struct PS_INPUT struct PS_INPUT
{ {
HALF2 baseTexCoord : TEXCOORD0; // Base texture coordinate HALF2 baseTexCoord : TEXCOORD0; // Base texture coordinate
}; };
float4 main( PS_INPUT i ) : COLOR float4 main( PS_INPUT i ) : COLOR
{ {
float4 result = tex2D( TexSampler, i.baseTexCoord ); float4 result = tex2D( TexSampler, i.baseTexCoord );
result.a = 1.0f; result.a = 1.0f;
return result; //FinalOutput( result, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE ); return result; //FinalOutput( result, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
} }

View File

@ -1,23 +1,23 @@
//======= Copyright © 1996-2006, Valve Corporation, All rights reserved. ====== //======= Copyright © 1996-2006, Valve Corporation, All rights reserved. ======
#define CONVERT_TO_SRGB 0 #define CONVERT_TO_SRGB 0
#include "common_ps_fxc.h" #include "common_ps_fxc.h"
sampler TexSampler : register( s0 ); sampler TexSampler : register( s0 );
struct PS_INPUT struct PS_INPUT
{ {
HALF2 baseTexCoord : TEXCOORD0; // Base texture coordinate HALF2 baseTexCoord : TEXCOORD0; // Base texture coordinate
#if defined( _X360 ) //matching pixel shader inputs to vertex shader outputs to avoid shader patches #if defined( _X360 ) //matching pixel shader inputs to vertex shader outputs to avoid shader patches
float2 ZeroTexCoord : TEXCOORD1; float2 ZeroTexCoord : TEXCOORD1;
float2 bloomTexCoord : TEXCOORD2; float2 bloomTexCoord : TEXCOORD2;
#endif #endif
}; };
float4 main( PS_INPUT i ) : COLOR float4 main( PS_INPUT i ) : COLOR
{ {
float4 result = tex2D( TexSampler, i.baseTexCoord ); float4 result = tex2D( TexSampler, i.baseTexCoord );
result.a = 1.0f; result.a = 1.0f;
return result; //FinalOutput( result, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE ); return result; //FinalOutput( result, 0, PIXEL_FOG_TYPE_NONE, TONEMAP_SCALE_NONE );
} }

View File

@ -1,47 +1,47 @@
//========= Copyright © 1996-2006, Valve Corporation, All rights reserved. ============// //========= Copyright © 1996-2006, Valve Corporation, All rights reserved. ============//
// STATIC: "X360APPCHOOSER" "0..1" [= 0] // STATIC: "X360APPCHOOSER" "0..1" [= 0]
#include "common_vs_fxc.h" #include "common_vs_fxc.h"
struct VS_INPUT struct VS_INPUT
{ {
float3 vPos : POSITION; float3 vPos : POSITION;
float2 vBaseTexCoord : TEXCOORD0; float2 vBaseTexCoord : TEXCOORD0;
#if X360APPCHOOSER #if X360APPCHOOSER
float4 vColor : COLOR0; float4 vColor : COLOR0;
#endif #endif
}; };
struct VS_OUTPUT struct VS_OUTPUT
{ {
float4 projPos : POSITION; float4 projPos : POSITION;
float2 baseTexCoord : TEXCOORD0; float2 baseTexCoord : TEXCOORD0;
float2 ZeroTexCoord : TEXCOORD1; float2 ZeroTexCoord : TEXCOORD1;
float2 bloomTexCoord : TEXCOORD2; float2 bloomTexCoord : TEXCOORD2;
#if X360APPCHOOSER #if X360APPCHOOSER
float4 vColor : TEXCOORD3; float4 vColor : TEXCOORD3;
#endif #endif
}; };
float4 Texel_Sizes : register (SHADER_SPECIFIC_CONST_0); float4 Texel_Sizes : register (SHADER_SPECIFIC_CONST_0);
VS_OUTPUT main( const VS_INPUT v ) VS_OUTPUT main( const VS_INPUT v )
{ {
VS_OUTPUT o = ( VS_OUTPUT )0; VS_OUTPUT o = ( VS_OUTPUT )0;
o.projPos = float4( v.vPos, 1.0f ); o.projPos = float4( v.vPos, 1.0f );
o.baseTexCoord = v.vBaseTexCoord; o.baseTexCoord = v.vBaseTexCoord;
o.ZeroTexCoord=float2(0,0); o.ZeroTexCoord=float2(0,0);
o.bloomTexCoord.x=v.vBaseTexCoord.x+Texel_Sizes.z; o.bloomTexCoord.x=v.vBaseTexCoord.x+Texel_Sizes.z;
o.bloomTexCoord.y=v.vBaseTexCoord.y+Texel_Sizes.w; o.bloomTexCoord.y=v.vBaseTexCoord.y+Texel_Sizes.w;
#if X360APPCHOOSER #if X360APPCHOOSER
o.vColor.rgba = v.vColor.rgba; o.vColor.rgba = v.vColor.rgba;
o.projPos.xyzw = mul( float4( v.vPos.xyz, 1.0f ), cModelViewProj ); o.projPos.xyzw = mul( float4( v.vPos.xyz, 1.0f ), cModelViewProj );
#endif #endif
return o; return o;
} }

42
mp/src/materialsystem/stdshaders/buildhl2mpshaders.bat Normal file → Executable file
View File

@ -1,21 +1,21 @@
@echo off @echo off
setlocal setlocal
rem ================================ rem ================================
rem ==== MOD PATH CONFIGURATIONS === rem ==== MOD PATH CONFIGURATIONS ===
rem == Set the absolute path to your mod's game directory here == rem == Set the absolute path to your mod's game directory here ==
set GAMEDIR=%cd%\..\..\..\game\mod_hl2mp set GAMEDIR=%cd%\..\..\..\game\mod_hl2mp
rem == Set the relative or absolute path to Source SDK Base 2013 Singleplayer\bin == rem == Set the relative or absolute path to Source SDK Base 2013 Singleplayer\bin ==
set SDKBINDIR=C:\SteamBetaLibrary\SteamApps\common\Source SDK Base 2013 Singleplayer\bin set SDKBINDIR=C:\SteamBetaLibrary\SteamApps\common\Source SDK Base 2013 Singleplayer\bin
rem == Set the Path to your mod's root source code == rem == Set the Path to your mod's root source code ==
rem This should already be correct, accepts relative paths only! rem This should already be correct, accepts relative paths only!
set SOURCEDIR=..\.. set SOURCEDIR=..\..
rem ==== MOD PATH CONFIGURATIONS END === rem ==== MOD PATH CONFIGURATIONS END ===
rem ==================================== rem ====================================
call buildsdkshaders.bat call buildsdkshaders.bat

80
mp/src/materialsystem/stdshaders/buildsdkshaders.bat Normal file → Executable file
View File

@ -1,40 +1,40 @@
@echo off @echo off
setlocal setlocal
rem Use dynamic shaders to build .inc files only rem Use dynamic shaders to build .inc files only
rem set dynamic_shaders=1 rem set dynamic_shaders=1
rem == Setup path to nmake.exe, from vc 2005 common tools directory == rem == Setup path to nmake.exe, from vc 2005 common tools directory ==
call "%VS100COMNTOOLS%vsvars32.bat" call "%VS100COMNTOOLS%vsvars32.bat"
set TTEXE=..\..\devtools\bin\timeprecise.exe set TTEXE=..\..\devtools\bin\timeprecise.exe
if not exist %TTEXE% goto no_ttexe if not exist %TTEXE% goto no_ttexe
goto no_ttexe_end goto no_ttexe_end
:no_ttexe :no_ttexe
set TTEXE=time /t set TTEXE=time /t
:no_ttexe_end :no_ttexe_end
rem echo. rem echo.
rem echo ~~~~~~ buildsdkshaders %* ~~~~~~ rem echo ~~~~~~ buildsdkshaders %* ~~~~~~
%TTEXE% -cur-Q %TTEXE% -cur-Q
set tt_all_start=%ERRORLEVEL% set tt_all_start=%ERRORLEVEL%
set tt_all_chkpt=%tt_start% set tt_all_chkpt=%tt_start%
set BUILD_SHADER=call buildshaders.bat set BUILD_SHADER=call buildshaders.bat
set ARG_EXTRA= set ARG_EXTRA=
%BUILD_SHADER% stdshader_dx9_20b -game %GAMEDIR% -source %SOURCEDIR% %BUILD_SHADER% stdshader_dx9_20b -game %GAMEDIR% -source %SOURCEDIR%
%BUILD_SHADER% stdshader_dx9_30 -game %GAMEDIR% -source %SOURCEDIR% -dx9_30 -force30 %BUILD_SHADER% stdshader_dx9_30 -game %GAMEDIR% -source %SOURCEDIR% -dx9_30 -force30
rem echo. rem echo.
if not "%dynamic_shaders%" == "1" ( if not "%dynamic_shaders%" == "1" (
rem echo Finished full buildallshaders %* rem echo Finished full buildallshaders %*
) else ( ) else (
rem echo Finished dynamic buildallshaders %* rem echo Finished dynamic buildallshaders %*
) )
rem %TTEXE% -diff %tt_all_start% -cur rem %TTEXE% -diff %tt_all_start% -cur
rem echo. rem echo.

418
mp/src/materialsystem/stdshaders/buildshaders.bat Normal file → Executable file
View File

@ -1,209 +1,209 @@
@echo off @echo off
set TTEXE=..\..\devtools\bin\timeprecise.exe set TTEXE=..\..\devtools\bin\timeprecise.exe
if not exist %TTEXE% goto no_ttexe if not exist %TTEXE% goto no_ttexe
goto no_ttexe_end goto no_ttexe_end
:no_ttexe :no_ttexe
set TTEXE=time /t set TTEXE=time /t
:no_ttexe_end :no_ttexe_end
echo. echo.
echo ==================== buildshaders %* ================== echo ==================== buildshaders %* ==================
%TTEXE% -cur-Q %TTEXE% -cur-Q
set tt_start=%ERRORLEVEL% set tt_start=%ERRORLEVEL%
set tt_chkpt=%tt_start% set tt_chkpt=%tt_start%
REM **************** REM ****************
REM usage: buildshaders <shaderProjectName> REM usage: buildshaders <shaderProjectName>
REM **************** REM ****************
setlocal setlocal
set arg_filename=%1 set arg_filename=%1
set shadercompilecommand=shadercompile.exe set shadercompilecommand=shadercompile.exe
set targetdir=shaders set targetdir=shaders
set SrcDirBase=..\.. set SrcDirBase=..\..
set shaderDir=shaders set shaderDir=shaders
set SDKArgs= set SDKArgs=
set SHADERINCPATH=vshtmp9/... fxctmp9/... set SHADERINCPATH=vshtmp9/... fxctmp9/...
if "%1" == "" goto usage if "%1" == "" goto usage
set inputbase=%1 set inputbase=%1
set DIRECTX_SDK_VER=pc09.00 set DIRECTX_SDK_VER=pc09.00
set DIRECTX_SDK_BIN_DIR=dx9sdk\utilities set DIRECTX_SDK_BIN_DIR=dx9sdk\utilities
if /i "%6" == "-dx9_30" goto dx_sdk_dx9_30 if /i "%6" == "-dx9_30" goto dx_sdk_dx9_30
goto dx_sdk_end goto dx_sdk_end
:dx_sdk_dx9_30 :dx_sdk_dx9_30
set DIRECTX_SDK_VER=pc09.30 set DIRECTX_SDK_VER=pc09.30
set DIRECTX_SDK_BIN_DIR=dx10sdk\utilities\dx9_30 set DIRECTX_SDK_BIN_DIR=dx10sdk\utilities\dx9_30
goto dx_sdk_end goto dx_sdk_end
:dx_sdk_end :dx_sdk_end
if /i "%7" == "-force30" goto set_force30_arg if /i "%7" == "-force30" goto set_force30_arg
goto set_force_end goto set_force_end
:set_force30_arg :set_force30_arg
set DIRECTX_FORCE_MODEL=30 set DIRECTX_FORCE_MODEL=30
goto set_force_end goto set_force_end
:set_force_end :set_force_end
if /i "%2" == "-game" goto set_mod_args if /i "%2" == "-game" goto set_mod_args
goto build_shaders goto build_shaders
REM **************** REM ****************
REM USAGE REM USAGE
REM **************** REM ****************
:usage :usage
echo. echo.
echo "usage: buildshaders <shaderProjectName> [-game] [gameDir if -game was specified] [-source sourceDir]" echo "usage: buildshaders <shaderProjectName> [-game] [gameDir if -game was specified] [-source sourceDir]"
echo " gameDir is where gameinfo.txt is (where it will store the compiled shaders)." echo " gameDir is where gameinfo.txt is (where it will store the compiled shaders)."
echo " sourceDir is where the source code is (where it will find scripts and compilers)." echo " sourceDir is where the source code is (where it will find scripts and compilers)."
echo "ex : buildshaders myshaders" echo "ex : buildshaders myshaders"
echo "ex : buildshaders myshaders -game c:\steam\steamapps\sourcemods\mymod -source c:\mymod\src" echo "ex : buildshaders myshaders -game c:\steam\steamapps\sourcemods\mymod -source c:\mymod\src"
goto :end goto :end
REM **************** REM ****************
REM MOD ARGS - look for -game or the vproject environment variable REM MOD ARGS - look for -game or the vproject environment variable
REM **************** REM ****************
:set_mod_args :set_mod_args
if not exist "%SDKBINDIR%\shadercompile.exe" goto NoShaderCompile if not exist "%SDKBINDIR%\shadercompile.exe" goto NoShaderCompile
set ChangeToDir=%SDKBINDIR% set ChangeToDir=%SDKBINDIR%
if /i "%4" NEQ "-source" goto NoSourceDirSpecified if /i "%4" NEQ "-source" goto NoSourceDirSpecified
set SrcDirBase=%~5 set SrcDirBase=%~5
REM ** use the -game parameter to tell us where to put the files REM ** use the -game parameter to tell us where to put the files
set targetdir=%~3\shaders set targetdir=%~3\shaders
set SDKArgs=-nompi -nop4 -game "%~3" set SDKArgs=-nompi -nop4 -game "%~3"
if not exist "%~3\gameinfo.txt" goto InvalidGameDirectory if not exist "%~3\gameinfo.txt" goto InvalidGameDirectory
goto build_shaders goto build_shaders
REM **************** REM ****************
REM ERRORS REM ERRORS
REM **************** REM ****************
:InvalidGameDirectory :InvalidGameDirectory
echo - echo -
echo Error: "%~3" is not a valid game directory. echo Error: "%~3" is not a valid game directory.
echo (The -game directory must have a gameinfo.txt file) echo (The -game directory must have a gameinfo.txt file)
echo - echo -
goto end goto end
:NoSourceDirSpecified :NoSourceDirSpecified
echo ERROR: If you specify -game on the command line, you must specify -source. echo ERROR: If you specify -game on the command line, you must specify -source.
goto usage goto usage
goto end goto end
:NoShaderCompile :NoShaderCompile
echo - echo -
echo - ERROR: shadercompile.exe doesn't exist in %SDKBINDIR% echo - ERROR: shadercompile.exe doesn't exist in %SDKBINDIR%
echo - echo -
goto end goto end
REM **************** REM ****************
REM BUILD SHADERS REM BUILD SHADERS
REM **************** REM ****************
:build_shaders :build_shaders
rem echo -------------------------------- rem echo --------------------------------
rem echo %inputbase% rem echo %inputbase%
rem echo -------------------------------- rem echo --------------------------------
REM make sure that target dirs exist REM make sure that target dirs exist
REM files will be built in these targets and copied to their final destination REM files will be built in these targets and copied to their final destination
if not exist %shaderDir% mkdir %shaderDir% if not exist %shaderDir% mkdir %shaderDir%
if not exist %shaderDir%\fxc mkdir %shaderDir%\fxc if not exist %shaderDir%\fxc mkdir %shaderDir%\fxc
if not exist %shaderDir%\vsh mkdir %shaderDir%\vsh if not exist %shaderDir%\vsh mkdir %shaderDir%\vsh
if not exist %shaderDir%\psh mkdir %shaderDir%\psh if not exist %shaderDir%\psh mkdir %shaderDir%\psh
REM Nuke some files that we will add to later. REM Nuke some files that we will add to later.
if exist filelist.txt del /f /q filelist.txt if exist filelist.txt del /f /q filelist.txt
if exist filestocopy.txt del /f /q filestocopy.txt if exist filestocopy.txt del /f /q filestocopy.txt
if exist filelistgen.txt del /f /q filelistgen.txt if exist filelistgen.txt del /f /q filelistgen.txt
if exist inclist.txt del /f /q inclist.txt if exist inclist.txt del /f /q inclist.txt
if exist vcslist.txt del /f /q vcslist.txt if exist vcslist.txt del /f /q vcslist.txt
REM **************** REM ****************
REM Generate a makefile for the shader project REM Generate a makefile for the shader project
REM **************** REM ****************
perl "%SrcDirBase%\devtools\bin\updateshaders.pl" -source "%SrcDirBase%" %inputbase% perl "%SrcDirBase%\devtools\bin\updateshaders.pl" -source "%SrcDirBase%" %inputbase%
REM **************** REM ****************
REM Run the makefile, generating minimal work/build list for fxc files, go ahead and compile vsh and psh files. REM Run the makefile, generating minimal work/build list for fxc files, go ahead and compile vsh and psh files.
REM **************** REM ****************
rem nmake /S /C -f makefile.%inputbase% clean > clean.txt 2>&1 rem nmake /S /C -f makefile.%inputbase% clean > clean.txt 2>&1
echo Building inc files, asm vcs files, and VMPI worklist for %inputbase%... echo Building inc files, asm vcs files, and VMPI worklist for %inputbase%...
nmake /S /C -f makefile.%inputbase% nmake /S /C -f makefile.%inputbase%
REM **************** REM ****************
REM Copy the inc files to their target REM Copy the inc files to their target
REM **************** REM ****************
if exist "inclist.txt" ( if exist "inclist.txt" (
echo Publishing shader inc files to target... echo Publishing shader inc files to target...
perl %SrcDirBase%\devtools\bin\copyshaderincfiles.pl inclist.txt perl %SrcDirBase%\devtools\bin\copyshaderincfiles.pl inclist.txt
) )
REM **************** REM ****************
REM Add the executables to the worklist. REM Add the executables to the worklist.
REM **************** REM ****************
if /i "%DIRECTX_SDK_VER%" == "pc09.00" ( if /i "%DIRECTX_SDK_VER%" == "pc09.00" (
rem echo "Copy extra files for dx 9 std rem echo "Copy extra files for dx 9 std
) )
if /i "%DIRECTX_SDK_VER%" == "pc09.30" ( if /i "%DIRECTX_SDK_VER%" == "pc09.30" (
echo %SrcDirBase%\devtools\bin\d3dx9_33.dll >> filestocopy.txt echo %SrcDirBase%\devtools\bin\d3dx9_33.dll >> filestocopy.txt
) )
echo %SrcDirBase%\%DIRECTX_SDK_BIN_DIR%\dx_proxy.dll >> filestocopy.txt echo %SrcDirBase%\%DIRECTX_SDK_BIN_DIR%\dx_proxy.dll >> filestocopy.txt
echo %SDKBINDIR%\shadercompile.exe >> filestocopy.txt echo %SDKBINDIR%\shadercompile.exe >> filestocopy.txt
echo %SDKBINDIR%\shadercompile_dll.dll >> filestocopy.txt echo %SDKBINDIR%\shadercompile_dll.dll >> filestocopy.txt
echo %SDKBINDIR%\vstdlib.dll >> filestocopy.txt echo %SDKBINDIR%\vstdlib.dll >> filestocopy.txt
echo %SDKBINDIR%\tier0.dll >> filestocopy.txt echo %SDKBINDIR%\tier0.dll >> filestocopy.txt
REM **************** REM ****************
REM Cull duplicate entries in work/build list REM Cull duplicate entries in work/build list
REM **************** REM ****************
if exist filestocopy.txt type filestocopy.txt | perl "%SrcDirBase%\devtools\bin\uniqifylist.pl" > uniquefilestocopy.txt if exist filestocopy.txt type filestocopy.txt | perl "%SrcDirBase%\devtools\bin\uniqifylist.pl" > uniquefilestocopy.txt
if exist filelistgen.txt if not "%dynamic_shaders%" == "1" ( if exist filelistgen.txt if not "%dynamic_shaders%" == "1" (
echo Generating action list... echo Generating action list...
copy filelistgen.txt filelist.txt >nul copy filelistgen.txt filelist.txt >nul
) )
REM **************** REM ****************
REM Execute distributed process on work/build list REM Execute distributed process on work/build list
REM **************** REM ****************
set shader_path_cd=%cd% set shader_path_cd=%cd%
if exist "filelist.txt" if exist "uniquefilestocopy.txt" if not "%dynamic_shaders%" == "1" ( if exist "filelist.txt" if exist "uniquefilestocopy.txt" if not "%dynamic_shaders%" == "1" (
echo Running distributed shader compilation... echo Running distributed shader compilation...
cd /D %ChangeToDir% cd /D %ChangeToDir%
echo %shadercompilecommand% %SDKArgs% -shaderpath "%shader_path_cd:/=\%" -allowdebug echo %shadercompilecommand% %SDKArgs% -shaderpath "%shader_path_cd:/=\%" -allowdebug
%shadercompilecommand% %SDKArgs% -shaderpath "%shader_path_cd:/=\%" -allowdebug %shadercompilecommand% %SDKArgs% -shaderpath "%shader_path_cd:/=\%" -allowdebug
cd /D %shader_path_cd% cd /D %shader_path_cd%
) )
REM **************** REM ****************
REM PC Shader copy REM PC Shader copy
REM Publish the generated files to the output dir using XCOPY REM Publish the generated files to the output dir using XCOPY
REM This batch file may have been invoked standalone or slaved (master does final smart mirror copy) REM This batch file may have been invoked standalone or slaved (master does final smart mirror copy)
REM **************** REM ****************
:DoXCopy :DoXCopy
if not "%dynamic_shaders%" == "1" ( if not "%dynamic_shaders%" == "1" (
if not exist "%targetdir%" md "%targetdir%" if not exist "%targetdir%" md "%targetdir%"
if not "%targetdir%"=="%shaderDir%" xcopy %shaderDir%\*.* "%targetdir%" /e /y if not "%targetdir%"=="%shaderDir%" xcopy %shaderDir%\*.* "%targetdir%" /e /y
) )
goto end goto end
REM **************** REM ****************
REM END REM END
REM **************** REM ****************
:end :end
%TTEXE% -diff %tt_start% %TTEXE% -diff %tt_start%
echo. echo.

64
mp/src/materialsystem/stdshaders/clean.bat Normal file → Executable file
View File

@ -1,33 +1,33 @@
@echo off @echo off
setlocal setlocal
if /i "%1" == "-game" goto CleanGameDir if /i "%1" == "-game" goto CleanGameDir
rem Clean out hl2 rem Clean out hl2
if exist ..\..\..\game\hl2\shaders rd /s /q ..\..\..\game\hl2\shaders if exist ..\..\..\game\hl2\shaders rd /s /q ..\..\..\game\hl2\shaders
goto CleanOtherStuff goto CleanOtherStuff
:CleanGameDir :CleanGameDir
set __GameDir=%~2 set __GameDir=%~2
if not exist "%__GameDir%\gameinfo.txt" goto MissingGameInfo if not exist "%__GameDir%\gameinfo.txt" goto MissingGameInfo
if exist "%__GameDir%\shaders" rd /s /q "%2\shaders" if exist "%__GameDir%\shaders" rd /s /q "%2\shaders"
goto CleanOtherStuff goto CleanOtherStuff
:CleanOtherStuff :CleanOtherStuff
if exist debug_dx9 rd /s /q debug_dx9 if exist debug_dx9 rd /s /q debug_dx9
if exist fxctmp9 rd /s /q fxctmp9 if exist fxctmp9 rd /s /q fxctmp9
if exist vshtmp9 rd /s /q vshtmp9 if exist vshtmp9 rd /s /q vshtmp9
if exist pshtmp9 rd /s /q pshtmp9 if exist pshtmp9 rd /s /q pshtmp9
if exist fxctmp9_tmp rd /s /q fxctmp9_tmp if exist fxctmp9_tmp rd /s /q fxctmp9_tmp
if exist vshtmp9_tmp rd /s /q vshtmp9_tmp if exist vshtmp9_tmp rd /s /q vshtmp9_tmp
if exist pshtmp9_tmp rd /s /q pshtmp9_tmp if exist pshtmp9_tmp rd /s /q pshtmp9_tmp
if exist shaders rd /s /q shaders if exist shaders rd /s /q shaders
goto end goto end
:MissingGameInfo :MissingGameInfo
echo Invalid -game parameter specified (no "%__GameDir%\gameinfo.txt" exists). echo Invalid -game parameter specified (no "%__GameDir%\gameinfo.txt" exists).
goto end goto end
:end :end

24
mp/src/materialsystem/stdshaders/cleantemps.bat Normal file → Executable file
View File

@ -1,12 +1,12 @@
@echo off @echo off
setlocal setlocal
if exist fxctmp9_tmp rd /s /q fxctmp9_tmp if exist fxctmp9_tmp rd /s /q fxctmp9_tmp
if exist vshtmp9_tmp rd /s /q vshtmp9_tmp if exist vshtmp9_tmp rd /s /q vshtmp9_tmp
if exist pshtmp9_tmp rd /s /q pshtmp9_tmp if exist pshtmp9_tmp rd /s /q pshtmp9_tmp
if exist fxctmp9_360_tmp rd /s /q fxctmp9_360_tmp if exist fxctmp9_360_tmp rd /s /q fxctmp9_360_tmp
if exist vshtmp9_360_tmp rd /s /q vshtmp9_360_tmp if exist vshtmp9_360_tmp rd /s /q vshtmp9_360_tmp
if exist pshtmp9_360_tmp rd /s /q pshtmp9_360_tmp if exist pshtmp9_360_tmp rd /s /q pshtmp9_360_tmp
if exist shaders rd /s /q shaders if exist shaders rd /s /q shaders

View File

@ -1,92 +1,92 @@
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== //===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================
// //
// Example pixel shader that can be applied to models // Example pixel shader that can be applied to models
// //
//================================================================================================== //==================================================================================================
// STATIC: "CONVERT_TO_SRGB" "0..0" // STATIC: "CONVERT_TO_SRGB" "0..0"
// STATIC: "FLASHLIGHT" "0..1" // STATIC: "FLASHLIGHT" "0..1"
// STATIC: "FLASHLIGHTDEPTHFILTERMODE" "0..2" [ps20b] // STATIC: "FLASHLIGHTDEPTHFILTERMODE" "0..2" [ps20b]
// DYNAMIC: "WRITEWATERFOGTODESTALPHA" "0..1" // DYNAMIC: "WRITEWATERFOGTODESTALPHA" "0..1"
// DYNAMIC: "PIXELFOGTYPE" "0..1" // DYNAMIC: "PIXELFOGTYPE" "0..1"
// DYNAMIC: "NUM_LIGHTS" "0..4" // DYNAMIC: "NUM_LIGHTS" "0..4"
// DYNAMIC: "WRITE_DEPTH_TO_DESTALPHA" "0..1" [ps20b] // DYNAMIC: "WRITE_DEPTH_TO_DESTALPHA" "0..1" [ps20b]
// DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps20b] // DYNAMIC: "FLASHLIGHTSHADOWS" "0..1" [ps20b]
// SKIP: ($PIXELFOGTYPE == 0) && ($WRITEWATERFOGTODESTALPHA != 0) // SKIP: ($PIXELFOGTYPE == 0) && ($WRITEWATERFOGTODESTALPHA != 0)
// We don't care about flashlight depth unless the flashlight is on // We don't care about flashlight depth unless the flashlight is on
// SKIP: ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 ) // SKIP: ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTSHADOWS == 1 )
// Flashlight shadow filter mode is irrelevant if there is no flashlight // Flashlight shadow filter mode is irrelevant if there is no flashlight
// SKIP: ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTDEPTHFILTERMODE != 0 ) [ps20b] // SKIP: ( $FLASHLIGHT == 0 ) && ( $FLASHLIGHTDEPTHFILTERMODE != 0 ) [ps20b]
#include "common_flashlight_fxc.h" #include "common_flashlight_fxc.h"
#include "shader_constant_register_map.h" #include "shader_constant_register_map.h"
const float4 g_DiffuseModulation : register( PSREG_DIFFUSE_MODULATION ); const float4 g_DiffuseModulation : register( PSREG_DIFFUSE_MODULATION );
const float4 g_ShadowTweaks : register( PSREG_ENVMAP_TINT__SHADOW_TWEAKS ); const float4 g_ShadowTweaks : register( PSREG_ENVMAP_TINT__SHADOW_TWEAKS );
const float3 cAmbientCube[6] : register( PSREG_AMBIENT_CUBE ); const float3 cAmbientCube[6] : register( PSREG_AMBIENT_CUBE );
const float4 g_EyePos : register( PSREG_EYEPOS_SPEC_EXPONENT ); const float4 g_EyePos : register( PSREG_EYEPOS_SPEC_EXPONENT );
const float4 g_FogParams : register( PSREG_FOG_PARAMS ); const float4 g_FogParams : register( PSREG_FOG_PARAMS );
const float4 g_FlashlightAttenuationFactors : register( PSREG_FLASHLIGHT_ATTENUATION ); // On non-flashlight pass const float4 g_FlashlightAttenuationFactors : register( PSREG_FLASHLIGHT_ATTENUATION ); // On non-flashlight pass
const float4 g_FlashlightPos_RimBoost : register( PSREG_FLASHLIGHT_POSITION_RIM_BOOST ); const float4 g_FlashlightPos_RimBoost : register( PSREG_FLASHLIGHT_POSITION_RIM_BOOST );
const float4x4 g_FlashlightWorldToTexture : register( PSREG_FLASHLIGHT_TO_WORLD_TEXTURE ); const float4x4 g_FlashlightWorldToTexture : register( PSREG_FLASHLIGHT_TO_WORLD_TEXTURE );
PixelShaderLightInfo cLightInfo[3] : register( PSREG_LIGHT_INFO_ARRAY ); // 2 registers each - 6 registers total (4th light spread across w's) PixelShaderLightInfo cLightInfo[3] : register( PSREG_LIGHT_INFO_ARRAY ); // 2 registers each - 6 registers total (4th light spread across w's)
#define g_FlashlightPos g_FlashlightPos_RimBoost.xyz #define g_FlashlightPos g_FlashlightPos_RimBoost.xyz
sampler BaseTextureSampler : register( s0 ); // Base map, selfillum in alpha sampler BaseTextureSampler : register( s0 ); // Base map, selfillum in alpha
sampler ShadowDepthSampler : register( s4 ); // Flashlight shadow depth map sampler sampler ShadowDepthSampler : register( s4 ); // Flashlight shadow depth map sampler
sampler NormalizeRandRotSampler : register( s5 ); // Normalization / RandomRotation samplers sampler NormalizeRandRotSampler : register( s5 ); // Normalization / RandomRotation samplers
sampler FlashlightSampler : register( s6 ); // Flashlight cookie sampler FlashlightSampler : register( s6 ); // Flashlight cookie
struct PS_INPUT struct PS_INPUT
{ {
float2 baseTexCoord : TEXCOORD0; float2 baseTexCoord : TEXCOORD0;
float4 lightAtten : TEXCOORD1; float4 lightAtten : TEXCOORD1;
float3 worldNormal : TEXCOORD2; float3 worldNormal : TEXCOORD2;
float3 worldPos : TEXCOORD3; float3 worldPos : TEXCOORD3;
float3 projPos : TEXCOORD4; float3 projPos : TEXCOORD4;
}; };
float4 main( PS_INPUT i ) : COLOR float4 main( PS_INPUT i ) : COLOR
{ {
float4 baseColor = tex2D( BaseTextureSampler, i.baseTexCoord ); float4 baseColor = tex2D( BaseTextureSampler, i.baseTexCoord );
float3 diffuseLighting; float3 diffuseLighting;
if ( FLASHLIGHT != 0 ) if ( FLASHLIGHT != 0 )
{ {
float4 flashlightSpacePosition = mul( float4( i.worldPos, 1.0f ), g_FlashlightWorldToTexture ); float4 flashlightSpacePosition = mul( float4( i.worldPos, 1.0f ), g_FlashlightWorldToTexture );
diffuseLighting = DoFlashlight( g_FlashlightPos, i.worldPos, flashlightSpacePosition, diffuseLighting = DoFlashlight( g_FlashlightPos, i.worldPos, flashlightSpacePosition,
i.worldNormal, g_FlashlightAttenuationFactors.xyz, i.worldNormal, g_FlashlightAttenuationFactors.xyz,
g_FlashlightAttenuationFactors.w, FlashlightSampler, ShadowDepthSampler, g_FlashlightAttenuationFactors.w, FlashlightSampler, ShadowDepthSampler,
NormalizeRandRotSampler, FLASHLIGHTDEPTHFILTERMODE, FLASHLIGHTSHADOWS, true, i.projPos, false, g_ShadowTweaks ); NormalizeRandRotSampler, FLASHLIGHTDEPTHFILTERMODE, FLASHLIGHTSHADOWS, true, i.projPos, false, g_ShadowTweaks );
} }
else // non-flashlight path else // non-flashlight path
{ {
// Summation of diffuse illumination from all local lights // Summation of diffuse illumination from all local lights
diffuseLighting = PixelShaderDoLighting( i.worldPos, i.worldNormal, diffuseLighting = PixelShaderDoLighting( i.worldPos, i.worldNormal,
float3( 0.0f, 0.0f, 0.0f ), false, true, i.lightAtten, float3( 0.0f, 0.0f, 0.0f ), false, true, i.lightAtten,
cAmbientCube, NormalizeRandRotSampler, NUM_LIGHTS, cLightInfo, true, cAmbientCube, NormalizeRandRotSampler, NUM_LIGHTS, cLightInfo, true,
// These are dummy parameters: // These are dummy parameters:
false, 1.0f, false, 1.0f,
false, BaseTextureSampler ); false, BaseTextureSampler );
} }
float3 result = baseColor.rgb * g_DiffuseModulation.rgb * diffuseLighting; float3 result = baseColor.rgb * g_DiffuseModulation.rgb * diffuseLighting;
float alpha = g_DiffuseModulation.a * baseColor.a; float alpha = g_DiffuseModulation.a * baseColor.a;
float fogFactor = CalcPixelFogFactor( PIXELFOGTYPE, g_FogParams, g_EyePos.z, i.worldPos.z, i.projPos.z ); float fogFactor = CalcPixelFogFactor( PIXELFOGTYPE, g_FogParams, g_EyePos.z, i.worldPos.z, i.projPos.z );
#if WRITEWATERFOGTODESTALPHA && ( PIXELFOGTYPE == PIXEL_FOG_TYPE_HEIGHT ) #if WRITEWATERFOGTODESTALPHA && ( PIXELFOGTYPE == PIXEL_FOG_TYPE_HEIGHT )
alpha = fogFactor; alpha = fogFactor;
#endif #endif
bool bWriteDepthToAlpha = ( WRITE_DEPTH_TO_DESTALPHA != 0 ) && ( WRITEWATERFOGTODESTALPHA == 0 ); bool bWriteDepthToAlpha = ( WRITE_DEPTH_TO_DESTALPHA != 0 ) && ( WRITEWATERFOGTODESTALPHA == 0 );
return FinalOutput( float4( result, alpha ), fogFactor, PIXELFOGTYPE, TONEMAP_SCALE_LINEAR, bWriteDepthToAlpha, i.projPos.z ); return FinalOutput( float4( result, alpha ), fogFactor, PIXELFOGTYPE, TONEMAP_SCALE_LINEAR, bWriteDepthToAlpha, i.projPos.z );
} }

View File

@ -1,91 +1,91 @@
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== //===================== Copyright (c) Valve Corporation. All Rights Reserved. ======================
// //
// Example vertex shader that can be applied to models // Example vertex shader that can be applied to models
// //
//================================================================================================== //==================================================================================================
// DYNAMIC: "COMPRESSED_VERTS" "0..1" // DYNAMIC: "COMPRESSED_VERTS" "0..1"
// DYNAMIC: "DOWATERFOG" "0..1" // DYNAMIC: "DOWATERFOG" "0..1"
// DYNAMIC: "SKINNING" "0..1" // DYNAMIC: "SKINNING" "0..1"
// DYNAMIC: "LIGHTING_PREVIEW" "0..1" // DYNAMIC: "LIGHTING_PREVIEW" "0..1"
// DYNAMIC: "NUM_LIGHTS" "0..4" // DYNAMIC: "NUM_LIGHTS" "0..4"
#include "common_vs_fxc.h" #include "common_vs_fxc.h"
static const bool g_bSkinning = SKINNING ? true : false; static const bool g_bSkinning = SKINNING ? true : false;
static const int g_FogType = DOWATERFOG; static const int g_FogType = DOWATERFOG;
const float4 cBaseTexCoordTransform[2] : register( SHADER_SPECIFIC_CONST_0 ); const float4 cBaseTexCoordTransform[2] : register( SHADER_SPECIFIC_CONST_0 );
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Input vertex format // Input vertex format
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct VS_INPUT struct VS_INPUT
{ {
// This is all of the stuff that we ever use. // This is all of the stuff that we ever use.
float4 vPos : POSITION; float4 vPos : POSITION;
float4 vBoneWeights : BLENDWEIGHT; float4 vBoneWeights : BLENDWEIGHT;
float4 vBoneIndices : BLENDINDICES; float4 vBoneIndices : BLENDINDICES;
float4 vNormal : NORMAL; float4 vNormal : NORMAL;
float2 vTexCoord0 : TEXCOORD0; float2 vTexCoord0 : TEXCOORD0;
}; };
struct VS_OUTPUT struct VS_OUTPUT
{ {
// Stuff that isn't seen by the pixel shader // Stuff that isn't seen by the pixel shader
float4 projPosSetup : POSITION; float4 projPosSetup : POSITION;
float fog : FOG; float fog : FOG;
// Stuff that is seen by the pixel shader // Stuff that is seen by the pixel shader
float2 baseTexCoord : TEXCOORD0; float2 baseTexCoord : TEXCOORD0;
float4 lightAtten : TEXCOORD1; float4 lightAtten : TEXCOORD1;
float3 worldNormal : TEXCOORD2; float3 worldNormal : TEXCOORD2;
float3 worldPos : TEXCOORD3; float3 worldPos : TEXCOORD3;
float3 projPos : TEXCOORD4; float3 projPos : TEXCOORD4;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Main shader entry point // Main shader entry point
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
VS_OUTPUT main( const VS_INPUT v ) VS_OUTPUT main( const VS_INPUT v )
{ {
VS_OUTPUT o = ( VS_OUTPUT )0; VS_OUTPUT o = ( VS_OUTPUT )0;
float3 vNormal; float3 vNormal;
DecompressVertex_Normal( v.vNormal, vNormal ); DecompressVertex_Normal( v.vNormal, vNormal );
float3 worldNormal, worldPos; float3 worldNormal, worldPos;
SkinPositionAndNormal( g_bSkinning, v.vPos, vNormal, v.vBoneWeights, v.vBoneIndices, worldPos, worldNormal ); SkinPositionAndNormal( g_bSkinning, v.vPos, vNormal, v.vBoneWeights, v.vBoneIndices, worldPos, worldNormal );
// Transform into projection space // Transform into projection space
float4 vProjPos = mul( float4( worldPos, 1 ), cViewProj ); float4 vProjPos = mul( float4( worldPos, 1 ), cViewProj );
o.projPosSetup = vProjPos; o.projPosSetup = vProjPos;
vProjPos.z = dot( float4( worldPos, 1 ), cViewProjZ ); vProjPos.z = dot( float4( worldPos, 1 ), cViewProjZ );
o.projPos = vProjPos.xyz; o.projPos = vProjPos.xyz;
o.fog = CalcFog( worldPos, vProjPos.xyz, g_FogType ); o.fog = CalcFog( worldPos, vProjPos.xyz, g_FogType );
// Needed for water fog alpha and diffuse lighting // Needed for water fog alpha and diffuse lighting
o.worldPos = worldPos; o.worldPos = worldPos;
o.worldNormal = normalize( worldNormal ); o.worldNormal = normalize( worldNormal );
// Scalar attenuations for four lights // Scalar attenuations for four lights
o.lightAtten.xyz = float4(0,0,0,0); o.lightAtten.xyz = float4(0,0,0,0);
#if ( NUM_LIGHTS > 0 ) #if ( NUM_LIGHTS > 0 )
o.lightAtten.x = GetVertexAttenForLight( worldPos, 0, false ); o.lightAtten.x = GetVertexAttenForLight( worldPos, 0, false );
#endif #endif
#if ( NUM_LIGHTS > 1 ) #if ( NUM_LIGHTS > 1 )
o.lightAtten.y = GetVertexAttenForLight( worldPos, 1, false ); o.lightAtten.y = GetVertexAttenForLight( worldPos, 1, false );
#endif #endif
#if ( NUM_LIGHTS > 2 ) #if ( NUM_LIGHTS > 2 )
o.lightAtten.z = GetVertexAttenForLight( worldPos, 2, false ); o.lightAtten.z = GetVertexAttenForLight( worldPos, 2, false );
#endif #endif
#if ( NUM_LIGHTS > 3 ) #if ( NUM_LIGHTS > 3 )
o.lightAtten.w = GetVertexAttenForLight( worldPos, 3, false ); o.lightAtten.w = GetVertexAttenForLight( worldPos, 3, false );
#endif #endif
// Base texture coordinate transform // Base texture coordinate transform
o.baseTexCoord.x = dot( v.vTexCoord0, cBaseTexCoordTransform[0] ); o.baseTexCoord.x = dot( v.vTexCoord0, cBaseTexCoordTransform[0] );
o.baseTexCoord.y = dot( v.vTexCoord0, cBaseTexCoordTransform[1] ); o.baseTexCoord.y = dot( v.vTexCoord0, cBaseTexCoordTransform[1] );
return o; return o;
} }

View File

@ -1,33 +1,33 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class sdk_bloom_ps20_Static_Index class sdk_bloom_ps20_Static_Index
{ {
public: public:
sdk_bloom_ps20_Static_Index( ) sdk_bloom_ps20_Static_Index( )
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderStaticTest_sdk_bloom_ps20 0 #define shaderStaticTest_sdk_bloom_ps20 0
class sdk_bloom_ps20_Dynamic_Index class sdk_bloom_ps20_Dynamic_Index
{ {
public: public:
sdk_bloom_ps20_Dynamic_Index() sdk_bloom_ps20_Dynamic_Index()
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderDynamicTest_sdk_bloom_ps20 0 #define shaderDynamicTest_sdk_bloom_ps20 0

View File

@ -1,60 +1,60 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class sdk_bloom_ps20b_Static_Index class sdk_bloom_ps20b_Static_Index
{ {
private: private:
int m_nCONVERT_TO_SRGB; int m_nCONVERT_TO_SRGB;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bCONVERT_TO_SRGB; bool m_bCONVERT_TO_SRGB;
#endif #endif
public: public:
void SetCONVERT_TO_SRGB( int i ) void SetCONVERT_TO_SRGB( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nCONVERT_TO_SRGB = i; m_nCONVERT_TO_SRGB = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bCONVERT_TO_SRGB = true; m_bCONVERT_TO_SRGB = true;
#endif #endif
} }
void SetCONVERT_TO_SRGB( bool i ) void SetCONVERT_TO_SRGB( bool i )
{ {
m_nCONVERT_TO_SRGB = i ? 1 : 0; m_nCONVERT_TO_SRGB = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bCONVERT_TO_SRGB = true; m_bCONVERT_TO_SRGB = true;
#endif #endif
} }
public: public:
sdk_bloom_ps20b_Static_Index( ) sdk_bloom_ps20b_Static_Index( )
{ {
#ifdef _DEBUG #ifdef _DEBUG
m_bCONVERT_TO_SRGB = true; m_bCONVERT_TO_SRGB = true;
#endif // _DEBUG #endif // _DEBUG
m_nCONVERT_TO_SRGB = g_pHardwareConfig->NeedsShaderSRGBConversion(); m_nCONVERT_TO_SRGB = g_pHardwareConfig->NeedsShaderSRGBConversion();
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
bool bAllStaticVarsDefined = m_bCONVERT_TO_SRGB; bool bAllStaticVarsDefined = m_bCONVERT_TO_SRGB;
Assert( bAllStaticVarsDefined ); Assert( bAllStaticVarsDefined );
#endif // _DEBUG #endif // _DEBUG
return ( 1 * m_nCONVERT_TO_SRGB ) + 0; return ( 1 * m_nCONVERT_TO_SRGB ) + 0;
} }
}; };
#define shaderStaticTest_sdk_bloom_ps20b 0 #define shaderStaticTest_sdk_bloom_ps20b 0
class sdk_bloom_ps20b_Dynamic_Index class sdk_bloom_ps20b_Dynamic_Index
{ {
public: public:
sdk_bloom_ps20b_Dynamic_Index() sdk_bloom_ps20b_Dynamic_Index()
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderDynamicTest_sdk_bloom_ps20b 0 #define shaderDynamicTest_sdk_bloom_ps20b 0

View File

@ -1,33 +1,33 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class sdk_bloomadd_ps20_Static_Index class sdk_bloomadd_ps20_Static_Index
{ {
public: public:
sdk_bloomadd_ps20_Static_Index( ) sdk_bloomadd_ps20_Static_Index( )
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderStaticTest_sdk_bloomadd_ps20 0 #define shaderStaticTest_sdk_bloomadd_ps20 0
class sdk_bloomadd_ps20_Dynamic_Index class sdk_bloomadd_ps20_Dynamic_Index
{ {
public: public:
sdk_bloomadd_ps20_Dynamic_Index() sdk_bloomadd_ps20_Dynamic_Index()
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderDynamicTest_sdk_bloomadd_ps20 0 #define shaderDynamicTest_sdk_bloomadd_ps20 0

View File

@ -1,33 +1,33 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class sdk_bloomadd_ps20b_Static_Index class sdk_bloomadd_ps20b_Static_Index
{ {
public: public:
sdk_bloomadd_ps20b_Static_Index( ) sdk_bloomadd_ps20b_Static_Index( )
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderStaticTest_sdk_bloomadd_ps20b 0 #define shaderStaticTest_sdk_bloomadd_ps20b 0
class sdk_bloomadd_ps20b_Dynamic_Index class sdk_bloomadd_ps20b_Dynamic_Index
{ {
public: public:
sdk_bloomadd_ps20b_Dynamic_Index() sdk_bloomadd_ps20b_Dynamic_Index()
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderDynamicTest_sdk_bloomadd_ps20b 0 #define shaderDynamicTest_sdk_bloomadd_ps20b 0

View File

@ -1,60 +1,60 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class sdk_screenspaceeffect_vs20_Static_Index class sdk_screenspaceeffect_vs20_Static_Index
{ {
private: private:
int m_nX360APPCHOOSER; int m_nX360APPCHOOSER;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bX360APPCHOOSER; bool m_bX360APPCHOOSER;
#endif #endif
public: public:
void SetX360APPCHOOSER( int i ) void SetX360APPCHOOSER( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nX360APPCHOOSER = i; m_nX360APPCHOOSER = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bX360APPCHOOSER = true; m_bX360APPCHOOSER = true;
#endif #endif
} }
void SetX360APPCHOOSER( bool i ) void SetX360APPCHOOSER( bool i )
{ {
m_nX360APPCHOOSER = i ? 1 : 0; m_nX360APPCHOOSER = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bX360APPCHOOSER = true; m_bX360APPCHOOSER = true;
#endif #endif
} }
public: public:
sdk_screenspaceeffect_vs20_Static_Index( ) sdk_screenspaceeffect_vs20_Static_Index( )
{ {
#ifdef _DEBUG #ifdef _DEBUG
m_bX360APPCHOOSER = true; m_bX360APPCHOOSER = true;
#endif // _DEBUG #endif // _DEBUG
m_nX360APPCHOOSER = 0; m_nX360APPCHOOSER = 0;
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
bool bAllStaticVarsDefined = m_bX360APPCHOOSER; bool bAllStaticVarsDefined = m_bX360APPCHOOSER;
Assert( bAllStaticVarsDefined ); Assert( bAllStaticVarsDefined );
#endif // _DEBUG #endif // _DEBUG
return ( 1 * m_nX360APPCHOOSER ) + 0; return ( 1 * m_nX360APPCHOOSER ) + 0;
} }
}; };
#define shaderStaticTest_sdk_screenspaceeffect_vs20 0 #define shaderStaticTest_sdk_screenspaceeffect_vs20 0
class sdk_screenspaceeffect_vs20_Dynamic_Index class sdk_screenspaceeffect_vs20_Dynamic_Index
{ {
public: public:
sdk_screenspaceeffect_vs20_Dynamic_Index() sdk_screenspaceeffect_vs20_Dynamic_Index()
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderDynamicTest_sdk_screenspaceeffect_vs20 0 #define shaderDynamicTest_sdk_screenspaceeffect_vs20 0

View File

@ -1,237 +1,237 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class example_model_ps20b_Static_Index class example_model_ps20b_Static_Index
{ {
private: private:
int m_nCONVERT_TO_SRGB; int m_nCONVERT_TO_SRGB;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bCONVERT_TO_SRGB; bool m_bCONVERT_TO_SRGB;
#endif #endif
public: public:
void SetCONVERT_TO_SRGB( int i ) void SetCONVERT_TO_SRGB( int i )
{ {
Assert( i >= 0 && i <= 0 ); Assert( i >= 0 && i <= 0 );
m_nCONVERT_TO_SRGB = i; m_nCONVERT_TO_SRGB = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bCONVERT_TO_SRGB = true; m_bCONVERT_TO_SRGB = true;
#endif #endif
} }
void SetCONVERT_TO_SRGB( bool i ) void SetCONVERT_TO_SRGB( bool i )
{ {
m_nCONVERT_TO_SRGB = i ? 1 : 0; m_nCONVERT_TO_SRGB = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bCONVERT_TO_SRGB = true; m_bCONVERT_TO_SRGB = true;
#endif #endif
} }
private: private:
int m_nFLASHLIGHT; int m_nFLASHLIGHT;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bFLASHLIGHT; bool m_bFLASHLIGHT;
#endif #endif
public: public:
void SetFLASHLIGHT( int i ) void SetFLASHLIGHT( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nFLASHLIGHT = i; m_nFLASHLIGHT = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHT = true; m_bFLASHLIGHT = true;
#endif #endif
} }
void SetFLASHLIGHT( bool i ) void SetFLASHLIGHT( bool i )
{ {
m_nFLASHLIGHT = i ? 1 : 0; m_nFLASHLIGHT = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHT = true; m_bFLASHLIGHT = true;
#endif #endif
} }
private: private:
int m_nFLASHLIGHTDEPTHFILTERMODE; int m_nFLASHLIGHTDEPTHFILTERMODE;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bFLASHLIGHTDEPTHFILTERMODE; bool m_bFLASHLIGHTDEPTHFILTERMODE;
#endif #endif
public: public:
void SetFLASHLIGHTDEPTHFILTERMODE( int i ) void SetFLASHLIGHTDEPTHFILTERMODE( int i )
{ {
Assert( i >= 0 && i <= 2 ); Assert( i >= 0 && i <= 2 );
m_nFLASHLIGHTDEPTHFILTERMODE = i; m_nFLASHLIGHTDEPTHFILTERMODE = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHTDEPTHFILTERMODE = true; m_bFLASHLIGHTDEPTHFILTERMODE = true;
#endif #endif
} }
void SetFLASHLIGHTDEPTHFILTERMODE( bool i ) void SetFLASHLIGHTDEPTHFILTERMODE( bool i )
{ {
m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0; m_nFLASHLIGHTDEPTHFILTERMODE = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHTDEPTHFILTERMODE = true; m_bFLASHLIGHTDEPTHFILTERMODE = true;
#endif #endif
} }
public: public:
example_model_ps20b_Static_Index( ) example_model_ps20b_Static_Index( )
{ {
#ifdef _DEBUG #ifdef _DEBUG
m_bCONVERT_TO_SRGB = false; m_bCONVERT_TO_SRGB = false;
#endif // _DEBUG #endif // _DEBUG
m_nCONVERT_TO_SRGB = 0; m_nCONVERT_TO_SRGB = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHT = false; m_bFLASHLIGHT = false;
#endif // _DEBUG #endif // _DEBUG
m_nFLASHLIGHT = 0; m_nFLASHLIGHT = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHTDEPTHFILTERMODE = false; m_bFLASHLIGHTDEPTHFILTERMODE = false;
#endif // _DEBUG #endif // _DEBUG
m_nFLASHLIGHTDEPTHFILTERMODE = 0; m_nFLASHLIGHTDEPTHFILTERMODE = 0;
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
bool bAllStaticVarsDefined = m_bCONVERT_TO_SRGB && m_bFLASHLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE; bool bAllStaticVarsDefined = m_bCONVERT_TO_SRGB && m_bFLASHLIGHT && m_bFLASHLIGHTDEPTHFILTERMODE;
Assert( bAllStaticVarsDefined ); Assert( bAllStaticVarsDefined );
#endif // _DEBUG #endif // _DEBUG
return ( 80 * m_nCONVERT_TO_SRGB ) + ( 80 * m_nFLASHLIGHT ) + ( 160 * m_nFLASHLIGHTDEPTHFILTERMODE ) + 0; return ( 80 * m_nCONVERT_TO_SRGB ) + ( 80 * m_nFLASHLIGHT ) + ( 160 * m_nFLASHLIGHTDEPTHFILTERMODE ) + 0;
} }
}; };
#define shaderStaticTest_example_model_ps20b psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + 0 #define shaderStaticTest_example_model_ps20b psh_forgot_to_set_static_CONVERT_TO_SRGB + psh_forgot_to_set_static_FLASHLIGHT + psh_forgot_to_set_static_FLASHLIGHTDEPTHFILTERMODE + 0
class example_model_ps20b_Dynamic_Index class example_model_ps20b_Dynamic_Index
{ {
private: private:
int m_nWRITEWATERFOGTODESTALPHA; int m_nWRITEWATERFOGTODESTALPHA;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bWRITEWATERFOGTODESTALPHA; bool m_bWRITEWATERFOGTODESTALPHA;
#endif #endif
public: public:
void SetWRITEWATERFOGTODESTALPHA( int i ) void SetWRITEWATERFOGTODESTALPHA( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nWRITEWATERFOGTODESTALPHA = i; m_nWRITEWATERFOGTODESTALPHA = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = true; m_bWRITEWATERFOGTODESTALPHA = true;
#endif #endif
} }
void SetWRITEWATERFOGTODESTALPHA( bool i ) void SetWRITEWATERFOGTODESTALPHA( bool i )
{ {
m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0; m_nWRITEWATERFOGTODESTALPHA = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = true; m_bWRITEWATERFOGTODESTALPHA = true;
#endif #endif
} }
private: private:
int m_nPIXELFOGTYPE; int m_nPIXELFOGTYPE;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bPIXELFOGTYPE; bool m_bPIXELFOGTYPE;
#endif #endif
public: public:
void SetPIXELFOGTYPE( int i ) void SetPIXELFOGTYPE( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nPIXELFOGTYPE = i; m_nPIXELFOGTYPE = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bPIXELFOGTYPE = true; m_bPIXELFOGTYPE = true;
#endif #endif
} }
void SetPIXELFOGTYPE( bool i ) void SetPIXELFOGTYPE( bool i )
{ {
m_nPIXELFOGTYPE = i ? 1 : 0; m_nPIXELFOGTYPE = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bPIXELFOGTYPE = true; m_bPIXELFOGTYPE = true;
#endif #endif
} }
private: private:
int m_nNUM_LIGHTS; int m_nNUM_LIGHTS;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bNUM_LIGHTS; bool m_bNUM_LIGHTS;
#endif #endif
public: public:
void SetNUM_LIGHTS( int i ) void SetNUM_LIGHTS( int i )
{ {
Assert( i >= 0 && i <= 4 ); Assert( i >= 0 && i <= 4 );
m_nNUM_LIGHTS = i; m_nNUM_LIGHTS = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bNUM_LIGHTS = true; m_bNUM_LIGHTS = true;
#endif #endif
} }
void SetNUM_LIGHTS( bool i ) void SetNUM_LIGHTS( bool i )
{ {
m_nNUM_LIGHTS = i ? 1 : 0; m_nNUM_LIGHTS = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bNUM_LIGHTS = true; m_bNUM_LIGHTS = true;
#endif #endif
} }
private: private:
int m_nWRITE_DEPTH_TO_DESTALPHA; int m_nWRITE_DEPTH_TO_DESTALPHA;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bWRITE_DEPTH_TO_DESTALPHA; bool m_bWRITE_DEPTH_TO_DESTALPHA;
#endif #endif
public: public:
void SetWRITE_DEPTH_TO_DESTALPHA( int i ) void SetWRITE_DEPTH_TO_DESTALPHA( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nWRITE_DEPTH_TO_DESTALPHA = i; m_nWRITE_DEPTH_TO_DESTALPHA = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bWRITE_DEPTH_TO_DESTALPHA = true; m_bWRITE_DEPTH_TO_DESTALPHA = true;
#endif #endif
} }
void SetWRITE_DEPTH_TO_DESTALPHA( bool i ) void SetWRITE_DEPTH_TO_DESTALPHA( bool i )
{ {
m_nWRITE_DEPTH_TO_DESTALPHA = i ? 1 : 0; m_nWRITE_DEPTH_TO_DESTALPHA = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bWRITE_DEPTH_TO_DESTALPHA = true; m_bWRITE_DEPTH_TO_DESTALPHA = true;
#endif #endif
} }
private: private:
int m_nFLASHLIGHTSHADOWS; int m_nFLASHLIGHTSHADOWS;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bFLASHLIGHTSHADOWS; bool m_bFLASHLIGHTSHADOWS;
#endif #endif
public: public:
void SetFLASHLIGHTSHADOWS( int i ) void SetFLASHLIGHTSHADOWS( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nFLASHLIGHTSHADOWS = i; m_nFLASHLIGHTSHADOWS = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHTSHADOWS = true; m_bFLASHLIGHTSHADOWS = true;
#endif #endif
} }
void SetFLASHLIGHTSHADOWS( bool i ) void SetFLASHLIGHTSHADOWS( bool i )
{ {
m_nFLASHLIGHTSHADOWS = i ? 1 : 0; m_nFLASHLIGHTSHADOWS = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHTSHADOWS = true; m_bFLASHLIGHTSHADOWS = true;
#endif #endif
} }
public: public:
example_model_ps20b_Dynamic_Index() example_model_ps20b_Dynamic_Index()
{ {
#ifdef _DEBUG #ifdef _DEBUG
m_bWRITEWATERFOGTODESTALPHA = false; m_bWRITEWATERFOGTODESTALPHA = false;
#endif // _DEBUG #endif // _DEBUG
m_nWRITEWATERFOGTODESTALPHA = 0; m_nWRITEWATERFOGTODESTALPHA = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bPIXELFOGTYPE = false; m_bPIXELFOGTYPE = false;
#endif // _DEBUG #endif // _DEBUG
m_nPIXELFOGTYPE = 0; m_nPIXELFOGTYPE = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bNUM_LIGHTS = false; m_bNUM_LIGHTS = false;
#endif // _DEBUG #endif // _DEBUG
m_nNUM_LIGHTS = 0; m_nNUM_LIGHTS = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bWRITE_DEPTH_TO_DESTALPHA = false; m_bWRITE_DEPTH_TO_DESTALPHA = false;
#endif // _DEBUG #endif // _DEBUG
m_nWRITE_DEPTH_TO_DESTALPHA = 0; m_nWRITE_DEPTH_TO_DESTALPHA = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bFLASHLIGHTSHADOWS = false; m_bFLASHLIGHTSHADOWS = false;
#endif // _DEBUG #endif // _DEBUG
m_nFLASHLIGHTSHADOWS = 0; m_nFLASHLIGHTSHADOWS = 0;
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
bool bAllDynamicVarsDefined = m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS; bool bAllDynamicVarsDefined = m_bWRITEWATERFOGTODESTALPHA && m_bPIXELFOGTYPE && m_bNUM_LIGHTS && m_bWRITE_DEPTH_TO_DESTALPHA && m_bFLASHLIGHTSHADOWS;
Assert( bAllDynamicVarsDefined ); Assert( bAllDynamicVarsDefined );
#endif // _DEBUG #endif // _DEBUG
return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + 0; return ( 1 * m_nWRITEWATERFOGTODESTALPHA ) + ( 2 * m_nPIXELFOGTYPE ) + ( 4 * m_nNUM_LIGHTS ) + ( 20 * m_nWRITE_DEPTH_TO_DESTALPHA ) + ( 40 * m_nFLASHLIGHTSHADOWS ) + 0;
} }
}; };
#define shaderDynamicTest_example_model_ps20b psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + 0 #define shaderDynamicTest_example_model_ps20b psh_forgot_to_set_dynamic_WRITEWATERFOGTODESTALPHA + psh_forgot_to_set_dynamic_PIXELFOGTYPE + psh_forgot_to_set_dynamic_NUM_LIGHTS + psh_forgot_to_set_dynamic_WRITE_DEPTH_TO_DESTALPHA + psh_forgot_to_set_dynamic_FLASHLIGHTSHADOWS + 0

View File

@ -1,160 +1,160 @@
#include "shaderlib/cshader.h" #include "shaderlib/cshader.h"
class example_model_vs20_Static_Index class example_model_vs20_Static_Index
{ {
public: public:
example_model_vs20_Static_Index( ) example_model_vs20_Static_Index( )
{ {
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
#endif // _DEBUG #endif // _DEBUG
return 0; return 0;
} }
}; };
#define shaderStaticTest_example_model_vs20 0 #define shaderStaticTest_example_model_vs20 0
class example_model_vs20_Dynamic_Index class example_model_vs20_Dynamic_Index
{ {
private: private:
int m_nCOMPRESSED_VERTS; int m_nCOMPRESSED_VERTS;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bCOMPRESSED_VERTS; bool m_bCOMPRESSED_VERTS;
#endif #endif
public: public:
void SetCOMPRESSED_VERTS( int i ) void SetCOMPRESSED_VERTS( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nCOMPRESSED_VERTS = i; m_nCOMPRESSED_VERTS = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bCOMPRESSED_VERTS = true; m_bCOMPRESSED_VERTS = true;
#endif #endif
} }
void SetCOMPRESSED_VERTS( bool i ) void SetCOMPRESSED_VERTS( bool i )
{ {
m_nCOMPRESSED_VERTS = i ? 1 : 0; m_nCOMPRESSED_VERTS = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bCOMPRESSED_VERTS = true; m_bCOMPRESSED_VERTS = true;
#endif #endif
} }
private: private:
int m_nDOWATERFOG; int m_nDOWATERFOG;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bDOWATERFOG; bool m_bDOWATERFOG;
#endif #endif
public: public:
void SetDOWATERFOG( int i ) void SetDOWATERFOG( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nDOWATERFOG = i; m_nDOWATERFOG = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bDOWATERFOG = true; m_bDOWATERFOG = true;
#endif #endif
} }
void SetDOWATERFOG( bool i ) void SetDOWATERFOG( bool i )
{ {
m_nDOWATERFOG = i ? 1 : 0; m_nDOWATERFOG = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bDOWATERFOG = true; m_bDOWATERFOG = true;
#endif #endif
} }
private: private:
int m_nSKINNING; int m_nSKINNING;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bSKINNING; bool m_bSKINNING;
#endif #endif
public: public:
void SetSKINNING( int i ) void SetSKINNING( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nSKINNING = i; m_nSKINNING = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bSKINNING = true; m_bSKINNING = true;
#endif #endif
} }
void SetSKINNING( bool i ) void SetSKINNING( bool i )
{ {
m_nSKINNING = i ? 1 : 0; m_nSKINNING = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bSKINNING = true; m_bSKINNING = true;
#endif #endif
} }
private: private:
int m_nLIGHTING_PREVIEW; int m_nLIGHTING_PREVIEW;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bLIGHTING_PREVIEW; bool m_bLIGHTING_PREVIEW;
#endif #endif
public: public:
void SetLIGHTING_PREVIEW( int i ) void SetLIGHTING_PREVIEW( int i )
{ {
Assert( i >= 0 && i <= 1 ); Assert( i >= 0 && i <= 1 );
m_nLIGHTING_PREVIEW = i; m_nLIGHTING_PREVIEW = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bLIGHTING_PREVIEW = true; m_bLIGHTING_PREVIEW = true;
#endif #endif
} }
void SetLIGHTING_PREVIEW( bool i ) void SetLIGHTING_PREVIEW( bool i )
{ {
m_nLIGHTING_PREVIEW = i ? 1 : 0; m_nLIGHTING_PREVIEW = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bLIGHTING_PREVIEW = true; m_bLIGHTING_PREVIEW = true;
#endif #endif
} }
private: private:
int m_nNUM_LIGHTS; int m_nNUM_LIGHTS;
#ifdef _DEBUG #ifdef _DEBUG
bool m_bNUM_LIGHTS; bool m_bNUM_LIGHTS;
#endif #endif
public: public:
void SetNUM_LIGHTS( int i ) void SetNUM_LIGHTS( int i )
{ {
Assert( i >= 0 && i <= 4 ); Assert( i >= 0 && i <= 4 );
m_nNUM_LIGHTS = i; m_nNUM_LIGHTS = i;
#ifdef _DEBUG #ifdef _DEBUG
m_bNUM_LIGHTS = true; m_bNUM_LIGHTS = true;
#endif #endif
} }
void SetNUM_LIGHTS( bool i ) void SetNUM_LIGHTS( bool i )
{ {
m_nNUM_LIGHTS = i ? 1 : 0; m_nNUM_LIGHTS = i ? 1 : 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bNUM_LIGHTS = true; m_bNUM_LIGHTS = true;
#endif #endif
} }
public: public:
example_model_vs20_Dynamic_Index() example_model_vs20_Dynamic_Index()
{ {
#ifdef _DEBUG #ifdef _DEBUG
m_bCOMPRESSED_VERTS = false; m_bCOMPRESSED_VERTS = false;
#endif // _DEBUG #endif // _DEBUG
m_nCOMPRESSED_VERTS = 0; m_nCOMPRESSED_VERTS = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bDOWATERFOG = false; m_bDOWATERFOG = false;
#endif // _DEBUG #endif // _DEBUG
m_nDOWATERFOG = 0; m_nDOWATERFOG = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bSKINNING = false; m_bSKINNING = false;
#endif // _DEBUG #endif // _DEBUG
m_nSKINNING = 0; m_nSKINNING = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bLIGHTING_PREVIEW = false; m_bLIGHTING_PREVIEW = false;
#endif // _DEBUG #endif // _DEBUG
m_nLIGHTING_PREVIEW = 0; m_nLIGHTING_PREVIEW = 0;
#ifdef _DEBUG #ifdef _DEBUG
m_bNUM_LIGHTS = false; m_bNUM_LIGHTS = false;
#endif // _DEBUG #endif // _DEBUG
m_nNUM_LIGHTS = 0; m_nNUM_LIGHTS = 0;
} }
int GetIndex() int GetIndex()
{ {
// Asserts to make sure that we aren't using any skipped combinations. // Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars. // Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG #ifdef _DEBUG
bool bAllDynamicVarsDefined = m_bCOMPRESSED_VERTS && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bNUM_LIGHTS; bool bAllDynamicVarsDefined = m_bCOMPRESSED_VERTS && m_bDOWATERFOG && m_bSKINNING && m_bLIGHTING_PREVIEW && m_bNUM_LIGHTS;
Assert( bAllDynamicVarsDefined ); Assert( bAllDynamicVarsDefined );
#endif // _DEBUG #endif // _DEBUG
return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDOWATERFOG ) + ( 4 * m_nSKINNING ) + ( 8 * m_nLIGHTING_PREVIEW ) + ( 16 * m_nNUM_LIGHTS ) + 0; return ( 1 * m_nCOMPRESSED_VERTS ) + ( 2 * m_nDOWATERFOG ) + ( 4 * m_nSKINNING ) + ( 8 * m_nLIGHTING_PREVIEW ) + ( 16 * m_nNUM_LIGHTS ) + 0;
} }
}; };
#define shaderDynamicTest_example_model_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_NUM_LIGHTS + 0 #define shaderDynamicTest_example_model_vs20 vsh_forgot_to_set_dynamic_COMPRESSED_VERTS + vsh_forgot_to_set_dynamic_DOWATERFOG + vsh_forgot_to_set_dynamic_SKINNING + vsh_forgot_to_set_dynamic_LIGHTING_PREVIEW + vsh_forgot_to_set_dynamic_NUM_LIGHTS + 0

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,16 @@
// //
// Standard shaders collection // Standard shaders collection
// //
// These shaders are compiled as the following shader models: // These shaders are compiled as the following shader models:
// _ps20.vcs // _ps20.vcs
// _ps20b.vcs // _ps20b.vcs
// _vs20.vcs // _vs20.vcs
// //
example_model_ps20b.fxc example_model_ps20b.fxc
example_model_vs20.fxc example_model_vs20.fxc
SDK_Bloom_ps2x.fxc SDK_Bloom_ps2x.fxc
SDK_screenspaceeffect_vs20.fxc SDK_screenspaceeffect_vs20.fxc
SDK_bloomadd_ps2x.fxc SDK_bloomadd_ps2x.fxc

View File

@ -1,10 +1,10 @@
// //
// vs 3.0 ps 3.0 shaders collection // vs 3.0 ps 3.0 shaders collection
// //
// These shaders are forced to compile as shader model 3.0 // These shaders are forced to compile as shader model 3.0
// using the new compiler. // using the new compiler.
// _ps30.vcs // _ps30.vcs
// _vs30.vcs // _vs30.vcs
// //
// There are no examples of such shaders in the SDK, but add yours here. // There are no examples of such shaders in the SDK, but add yours here.

View File

@ -1,17 +1,17 @@
.model flat, C .model flat, C
.data .data
__imp__EncodePointer@4 dd dummy __imp__EncodePointer@4 dd dummy
__imp__DecodePointer@4 dd dummy __imp__DecodePointer@4 dd dummy
EXTERNDEF __imp__EncodePointer@4 : DWORD EXTERNDEF __imp__EncodePointer@4 : DWORD
EXTERNDEF __imp__DecodePointer@4 : DWORD EXTERNDEF __imp__DecodePointer@4 : DWORD
.code .code
dummy proc dummy proc
mov eax, [esp+4] mov eax, [esp+4]
ret 4 ret 4
dummy endp dummy endp
end end

View File

@ -1,7 +1,7 @@
#if defined(LINUX) || defined(_WIN32) #if defined(LINUX) || defined(_WIN32)
#include "togl/linuxwin/glfuncs.h" #include "togl/linuxwin/glfuncs.h"
#endif #endif
#if defined(OSX) #if defined(OSX)
#include "togl/osx/glfuncs.h" #include "togl/osx/glfuncs.h"
#endif #endif

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application> <application>
<!--The ID below indicates application support for Windows Vista --> <!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 --> <!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--The ID below indicates application support for Windows 8 --> <!--The ID below indicates application support for Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!--The ID below indicates application support for Windows 8.1 --> <!--The ID below indicates application support for Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application> </application>
</compatibility> </compatibility>
</assembly> </assembly>

View File

@ -1,388 +1,388 @@
2009-01-08 version 2.3.0: 2009-01-08 version 2.3.0:
General General
* Parsers for repeated numeric fields now always accept both packed and * Parsers for repeated numeric fields now always accept both packed and
unpacked input. The [packed=true] option only affects serializers. unpacked input. The [packed=true] option only affects serializers.
Therefore, it is possible to switch a field to packed format without Therefore, it is possible to switch a field to packed format without
breaking backwards-compatibility -- as long as all parties are using breaking backwards-compatibility -- as long as all parties are using
protobuf 2.3.0 or above, at least. protobuf 2.3.0 or above, at least.
* The generic RPC service code generated by the C++, Java, and Python * The generic RPC service code generated by the C++, Java, and Python
generators can be disabled via file options: generators can be disabled via file options:
option cc_generic_services = false; option cc_generic_services = false;
option java_generic_services = false; option java_generic_services = false;
option py_generic_services = false; option py_generic_services = false;
This allows plugins to generate alternative code, possibly specific to some This allows plugins to generate alternative code, possibly specific to some
particular RPC implementation. particular RPC implementation.
protoc protoc
* Now supports a plugin system for code generators. Plugins can generate * Now supports a plugin system for code generators. Plugins can generate
code for new languages or inject additional code into the output of other code for new languages or inject additional code into the output of other
code generators. Plugins are just binaries which accept a protocol buffer code generators. Plugins are just binaries which accept a protocol buffer
on stdin and write a protocol buffer to stdout, so they may be written in on stdin and write a protocol buffer to stdout, so they may be written in
any language. See src/google/protobuf/compiler/plugin.proto. any language. See src/google/protobuf/compiler/plugin.proto.
**WARNING**: Plugins are experimental. The interface may change in a **WARNING**: Plugins are experimental. The interface may change in a
future version. future version.
* If the output location ends in .zip or .jar, protoc will write its output * If the output location ends in .zip or .jar, protoc will write its output
to a zip/jar archive instead of a directory. For example: to a zip/jar archive instead of a directory. For example:
protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto protoc --java_out=myproto_srcs.jar --python_out=myproto.zip myproto.proto
Currently the archive contents are not compressed, though this could change Currently the archive contents are not compressed, though this could change
in the future. in the future.
* inf, -inf, and nan can now be used as default values for float and double * inf, -inf, and nan can now be used as default values for float and double
fields. fields.
C++ C++
* Various speed and code size optimizations. * Various speed and code size optimizations.
* DynamicMessageFactory is now fully thread-safe. * DynamicMessageFactory is now fully thread-safe.
* Message::Utf8DebugString() method is like DebugString() but avoids escaping * Message::Utf8DebugString() method is like DebugString() but avoids escaping
UTF-8 bytes. UTF-8 bytes.
* Compiled-in message types can now contain dynamic extensions, through use * Compiled-in message types can now contain dynamic extensions, through use
of CodedInputStream::SetExtensionRegistry(). of CodedInputStream::SetExtensionRegistry().
* Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to * Now compiles shared libraries (DLLs) by default on Cygwin and MinGW, to
match other platforms. Use --disable-shared to avoid this. match other platforms. Use --disable-shared to avoid this.
Java Java
* parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return * parseDelimitedFrom() and mergeDelimitedFrom() now detect EOF and return
false/null instead of throwing an exception. false/null instead of throwing an exception.
* Fixed some initialization ordering bugs. * Fixed some initialization ordering bugs.
* Fixes for OpenJDK 7. * Fixes for OpenJDK 7.
Python Python
* 10-25 times faster than 2.2.0, still pure-Python. * 10-25 times faster than 2.2.0, still pure-Python.
* Calling a mutating method on a sub-message always instantiates the message * Calling a mutating method on a sub-message always instantiates the message
in its parent even if the mutating method doesn't actually mutate anything in its parent even if the mutating method doesn't actually mutate anything
(e.g. parsing from an empty string). (e.g. parsing from an empty string).
* Expanded descriptors a bit. * Expanded descriptors a bit.
2009-08-11 version 2.2.0: 2009-08-11 version 2.2.0:
C++ C++
* Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
to generate code which only depends libprotobuf-lite, which is much smaller to generate code which only depends libprotobuf-lite, which is much smaller
than libprotobuf but lacks descriptors, reflection, and some other features. than libprotobuf but lacks descriptors, reflection, and some other features.
* Fixed bug where Message.Swap(Message) was only implemented for * Fixed bug where Message.Swap(Message) was only implemented for
optimize_for_speed. Swap now properly implemented in both modes optimize_for_speed. Swap now properly implemented in both modes
(Issue 91). (Issue 91).
* Added RemoveLast and SwapElements(index1, index2) to Reflection * Added RemoveLast and SwapElements(index1, index2) to Reflection
interface for repeated elements. interface for repeated elements.
* Added Swap(Message) to Reflection interface. * Added Swap(Message) to Reflection interface.
* Floating-point literals in generated code that are intended to be * Floating-point literals in generated code that are intended to be
single-precision now explicitly have 'f' suffix to avoid pedantic warnings single-precision now explicitly have 'f' suffix to avoid pedantic warnings
produced by some compilers. produced by some compilers.
* The [deprecated=true] option now causes the C++ code generator to generate * The [deprecated=true] option now causes the C++ code generator to generate
a GCC-style deprecation annotation (no-op on other compilers). a GCC-style deprecation annotation (no-op on other compilers).
* google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the * google::protobuf::GetEnumDescriptor<SomeGeneratedEnumType>() returns the
EnumDescriptor for that type -- useful for templates which cannot call EnumDescriptor for that type -- useful for templates which cannot call
SomeGeneratedEnumType_descriptor(). SomeGeneratedEnumType_descriptor().
* Various optimizations and obscure bug fixes. * Various optimizations and obscure bug fixes.
Java Java
* Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler * Lite mode: The "optimize_for = LITE_RUNTIME" option causes the compiler
to generate code which only depends libprotobuf-lite, which is much smaller to generate code which only depends libprotobuf-lite, which is much smaller
than libprotobuf but lacks descriptors, reflection, and some other features. than libprotobuf but lacks descriptors, reflection, and some other features.
* Lots of style cleanups. * Lots of style cleanups.
Python Python
* Fixed endianness bug with floats and doubles. * Fixed endianness bug with floats and doubles.
* Text format parsing support. * Text format parsing support.
* Fix bug with parsing packed repeated fields in embedded messages. * Fix bug with parsing packed repeated fields in embedded messages.
* Ability to initialize fields by passing keyword args to constructor. * Ability to initialize fields by passing keyword args to constructor.
* Support iterators in extend and __setslice__ for containers. * Support iterators in extend and __setslice__ for containers.
2009-05-13 version 2.1.0: 2009-05-13 version 2.1.0:
General General
* Repeated fields of primitive types (types other that string, group, and * Repeated fields of primitive types (types other that string, group, and
nested messages) may now use the option [packed = true] to get a more nested messages) may now use the option [packed = true] to get a more
efficient encoding. In the new encoding, the entire list is written efficient encoding. In the new encoding, the entire list is written
as a single byte blob using the "length-delimited" wire type. Within as a single byte blob using the "length-delimited" wire type. Within
this blob, the individual values are encoded the same way they would this blob, the individual values are encoded the same way they would
be normally except without a tag before each value (thus, they are be normally except without a tag before each value (thus, they are
tightly "packed"). tightly "packed").
* For each field, the generated code contains an integer constant assigned * For each field, the generated code contains an integer constant assigned
to the field number. For example, the .proto file: to the field number. For example, the .proto file:
message Foo { optional int bar_baz = 123; } message Foo { optional int bar_baz = 123; }
would generate the following constants, all with the integer value 123: would generate the following constants, all with the integer value 123:
C++: Foo::kBarBazFieldNumber C++: Foo::kBarBazFieldNumber
Java: Foo.BAR_BAZ_FIELD_NUMBER Java: Foo.BAR_BAZ_FIELD_NUMBER
Python: Foo.BAR_BAZ_FIELD_NUMBER Python: Foo.BAR_BAZ_FIELD_NUMBER
Constants are also generated for extensions, with the same naming scheme. Constants are also generated for extensions, with the same naming scheme.
These constants may be used as switch cases. These constants may be used as switch cases.
* Updated bundled Google Test to version 1.3.0. Google Test is now bundled * Updated bundled Google Test to version 1.3.0. Google Test is now bundled
in its verbatim form as a nested autoconf package, so you can drop in any in its verbatim form as a nested autoconf package, so you can drop in any
other version of Google Test if needed. other version of Google Test if needed.
* optimize_for = SPEED is now the default, by popular demand. Use * optimize_for = SPEED is now the default, by popular demand. Use
optimize_for = CODE_SIZE if code size is more important in your app. optimize_for = CODE_SIZE if code size is more important in your app.
* It is now an error to define a default value for a repeated field. * It is now an error to define a default value for a repeated field.
Previously, this was silently ignored (it had no effect on the generated Previously, this was silently ignored (it had no effect on the generated
code). code).
* Fields can now be marked deprecated like: * Fields can now be marked deprecated like:
optional int32 foo = 1 [deprecated = true]; optional int32 foo = 1 [deprecated = true];
Currently this does not have any actual effect, but in the future the code Currently this does not have any actual effect, but in the future the code
generators may generate deprecation annotations in each language. generators may generate deprecation annotations in each language.
* Cross-compiling should now be possible using the --with-protoc option to * Cross-compiling should now be possible using the --with-protoc option to
configure. See README.txt for more info. configure. See README.txt for more info.
protoc protoc
* --error_format=msvs option causes errors to be printed in Visual Studio * --error_format=msvs option causes errors to be printed in Visual Studio
format, which should allow them to be clicked on in the build log to go format, which should allow them to be clicked on in the build log to go
directly to the error location. directly to the error location.
* The type name resolver will no longer resolve type names to fields. For * The type name resolver will no longer resolve type names to fields. For
example, this now works: example, this now works:
message Foo {} message Foo {}
message Bar { message Bar {
optional int32 Foo = 1; optional int32 Foo = 1;
optional Foo baz = 2; optional Foo baz = 2;
} }
Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get Previously, the type of "baz" would resolve to "Bar.Foo", and you'd get
an error because Bar.Foo is a field, not a type. Now the type of "baz" an error because Bar.Foo is a field, not a type. Now the type of "baz"
resolves to the message type Foo. This change is unlikely to make a resolves to the message type Foo. This change is unlikely to make a
difference to anyone who follows the Protocol Buffers style guide. difference to anyone who follows the Protocol Buffers style guide.
C++ C++
* Several optimizations, including but not limited to: * Several optimizations, including but not limited to:
- Serialization, especially to flat arrays, is 10%-50% faster, possibly - Serialization, especially to flat arrays, is 10%-50% faster, possibly
more for small objects. more for small objects.
- Several descriptor operations which previously required locking no longer - Several descriptor operations which previously required locking no longer
do. do.
- Descriptors are now constructed lazily on first use, rather than at - Descriptors are now constructed lazily on first use, rather than at
process startup time. This should save memory in programs which do not process startup time. This should save memory in programs which do not
use descriptors or reflection. use descriptors or reflection.
- UnknownFieldSet completely redesigned to be more efficient (especially in - UnknownFieldSet completely redesigned to be more efficient (especially in
terms of memory usage). terms of memory usage).
- Various optimizations to reduce code size (though the serialization speed - Various optimizations to reduce code size (though the serialization speed
optimizations increased code size). optimizations increased code size).
* Message interface has method ParseFromBoundedZeroCopyStream() which parses * Message interface has method ParseFromBoundedZeroCopyStream() which parses
a limited number of bytes from an input stream rather than parsing until a limited number of bytes from an input stream rather than parsing until
EOF. EOF.
* GzipInputStream and GzipOutputStream support reading/writing gzip- or * GzipInputStream and GzipOutputStream support reading/writing gzip- or
zlib-compressed streams if zlib is available. zlib-compressed streams if zlib is available.
(google/protobuf/io/gzip_stream.h) (google/protobuf/io/gzip_stream.h)
* DescriptorPool::FindAllExtensions() and corresponding * DescriptorPool::FindAllExtensions() and corresponding
DescriptorDatabase::FindAllExtensions() can be used to enumerate all DescriptorDatabase::FindAllExtensions() can be used to enumerate all
extensions of a given type. extensions of a given type.
* For each enum type Foo, protoc will generate functions: * For each enum type Foo, protoc will generate functions:
const string& Foo_Name(Foo value); const string& Foo_Name(Foo value);
bool Foo_Parse(const string& name, Foo* result); bool Foo_Parse(const string& name, Foo* result);
The former returns the name of the enum constant corresponding to the given The former returns the name of the enum constant corresponding to the given
value while the latter finds the value corresponding to a name. value while the latter finds the value corresponding to a name.
* RepeatedField and RepeatedPtrField now have back-insertion iterators. * RepeatedField and RepeatedPtrField now have back-insertion iterators.
* String fields now have setters that take a char* and a size, in addition * String fields now have setters that take a char* and a size, in addition
to the existing ones that took char* or const string&. to the existing ones that took char* or const string&.
* DescriptorPool::AllowUnknownDependencies() may be used to tell * DescriptorPool::AllowUnknownDependencies() may be used to tell
DescriptorPool to create placeholder descriptors for unknown entities DescriptorPool to create placeholder descriptors for unknown entities
referenced in a FileDescriptorProto. This can allow you to parse a .proto referenced in a FileDescriptorProto. This can allow you to parse a .proto
file without having access to other .proto files that it imports, for file without having access to other .proto files that it imports, for
example. example.
* Updated gtest to latest version. The gtest package is now included as a * Updated gtest to latest version. The gtest package is now included as a
nested autoconf package, so it should be able to drop new versions into the nested autoconf package, so it should be able to drop new versions into the
"gtest" subdirectory without modification. "gtest" subdirectory without modification.
Java Java
* Fixed bug where Message.mergeFrom(Message) failed to merge extensions. * Fixed bug where Message.mergeFrom(Message) failed to merge extensions.
* Message interface has new method toBuilder() which is equivalent to * Message interface has new method toBuilder() which is equivalent to
newBuilderForType().mergeFrom(this). newBuilderForType().mergeFrom(this).
* All enums now implement the ProtocolMessageEnum interface. * All enums now implement the ProtocolMessageEnum interface.
* Setting a field to null now throws NullPointerException. * Setting a field to null now throws NullPointerException.
* Fixed tendency for TextFormat's parsing to overflow the stack when * Fixed tendency for TextFormat's parsing to overflow the stack when
parsing large string values. The underlying problem is with Java's parsing large string values. The underlying problem is with Java's
regex implementation (which unfortunately uses recursive backtracking regex implementation (which unfortunately uses recursive backtracking
rather than building an NFA). Worked around by making use of possesive rather than building an NFA). Worked around by making use of possesive
quantifiers. quantifiers.
* Generated service classes now also generate pure interfaces. For a service * Generated service classes now also generate pure interfaces. For a service
Foo, Foo.Interface is a pure interface containing all of the service's Foo, Foo.Interface is a pure interface containing all of the service's
defined methods. Foo.newReflectiveService() can be called to wrap an defined methods. Foo.newReflectiveService() can be called to wrap an
instance of this interface in a class that implements the generic instance of this interface in a class that implements the generic
RpcService interface, which provides reflection support that is usually RpcService interface, which provides reflection support that is usually
needed by RPC server implementations. needed by RPC server implementations.
* RPC interfaces now support blocking operation in addition to non-blocking. * RPC interfaces now support blocking operation in addition to non-blocking.
The protocol compiler generates separate blocking and non-blocking stubs The protocol compiler generates separate blocking and non-blocking stubs
which operate against separate blocking and non-blocking RPC interfaces. which operate against separate blocking and non-blocking RPC interfaces.
RPC implementations will have to implement the new interfaces in order to RPC implementations will have to implement the new interfaces in order to
support blocking mode. support blocking mode.
* New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and * New I/O methods parseDelimitedFrom(), mergeDelimitedFrom(), and
writeDelimitedTo() read and write "delemited" messages from/to a stream, writeDelimitedTo() read and write "delemited" messages from/to a stream,
meaning that the message size precedes the data. This way, you can write meaning that the message size precedes the data. This way, you can write
multiple messages to a stream without having to worry about delimiting multiple messages to a stream without having to worry about delimiting
them yourself. them yourself.
* Throw a more descriptive exception when build() is double-called. * Throw a more descriptive exception when build() is double-called.
* Add a method to query whether CodedInputStream is at the end of the input * Add a method to query whether CodedInputStream is at the end of the input
stream. stream.
* Add a method to reset a CodedInputStream's size counter; useful when * Add a method to reset a CodedInputStream's size counter; useful when
reading many messages with the same stream. reading many messages with the same stream.
* equals() and hashCode() now account for unknown fields. * equals() and hashCode() now account for unknown fields.
Python Python
* Added slicing support for repeated scalar fields. Added slice retrieval and * Added slicing support for repeated scalar fields. Added slice retrieval and
removal of repeated composite fields. removal of repeated composite fields.
* Updated RPC interfaces to allow for blocking operation. A client may * Updated RPC interfaces to allow for blocking operation. A client may
now pass None for a callback when making an RPC, in which case the now pass None for a callback when making an RPC, in which case the
call will block until the response is received, and the response call will block until the response is received, and the response
object will be returned directly to the caller. This interface change object will be returned directly to the caller. This interface change
cannot be used in practice until RPC implementations are updated to cannot be used in practice until RPC implementations are updated to
implement it. implement it.
* Changes to input_stream.py should make protobuf compatible with appengine. * Changes to input_stream.py should make protobuf compatible with appengine.
2008-11-25 version 2.0.3: 2008-11-25 version 2.0.3:
protoc protoc
* Enum values may now have custom options, using syntax similar to field * Enum values may now have custom options, using syntax similar to field
options. options.
* Fixed bug where .proto files which use custom options but don't actually * Fixed bug where .proto files which use custom options but don't actually
define them (i.e. they import another .proto file defining the options) define them (i.e. they import another .proto file defining the options)
had to explicitly import descriptor.proto. had to explicitly import descriptor.proto.
* Adjacent string literals in .proto files will now be concatenated, like in * Adjacent string literals in .proto files will now be concatenated, like in
C. C.
* If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and * If an input file is a Windows absolute path (e.g. "C:\foo\bar.proto") and
the import path only contains "." (or contains "." but does not contain the import path only contains "." (or contains "." but does not contain
the file), protoc incorrectly thought that the file was under ".", because the file), protoc incorrectly thought that the file was under ".", because
it thought that the path was relative (since it didn't start with a slash). it thought that the path was relative (since it didn't start with a slash).
This has been fixed. This has been fixed.
C++ C++
* Generated message classes now have a Swap() method which efficiently swaps * Generated message classes now have a Swap() method which efficiently swaps
the contents of two objects. the contents of two objects.
* All message classes now have a SpaceUsed() method which returns an estimate * All message classes now have a SpaceUsed() method which returns an estimate
of the number of bytes of allocated memory currently owned by the object. of the number of bytes of allocated memory currently owned by the object.
This is particularly useful when you are reusing a single message object This is particularly useful when you are reusing a single message object
to improve performance but want to make sure it doesn't bloat up too large. to improve performance but want to make sure it doesn't bloat up too large.
* New method Message::SerializeAsString() returns a string containing the * New method Message::SerializeAsString() returns a string containing the
serialized data. May be more convenient than calling serialized data. May be more convenient than calling
SerializeToString(string*). SerializeToString(string*).
* In debug mode, log error messages when string-type fields are found to * In debug mode, log error messages when string-type fields are found to
contain bytes that are not valid UTF-8. contain bytes that are not valid UTF-8.
* Fixed bug where a message with multiple extension ranges couldn't parse * Fixed bug where a message with multiple extension ranges couldn't parse
extensions. extensions.
* Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on * Fixed bug where MergeFrom(const Message&) didn't do anything if invoked on
a message that contained no fields (but possibly contained extensions). a message that contained no fields (but possibly contained extensions).
* Fixed ShortDebugString() to not be O(n^2). Durr. * Fixed ShortDebugString() to not be O(n^2). Durr.
* Fixed crash in TextFormat parsing if the first token in the input caused a * Fixed crash in TextFormat parsing if the first token in the input caused a
tokenization error. tokenization error.
* Fixed obscure bugs in zero_copy_stream_impl.cc. * Fixed obscure bugs in zero_copy_stream_impl.cc.
* Added support for HP C++ on Tru64. * Added support for HP C++ on Tru64.
* Only build tests on "make check", not "make". * Only build tests on "make check", not "make".
* Fixed alignment issue that caused crashes when using DynamicMessage on * Fixed alignment issue that caused crashes when using DynamicMessage on
64-bit Sparc machines. 64-bit Sparc machines.
* Simplify template usage to work with MSVC 2003. * Simplify template usage to work with MSVC 2003.
* Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup. * Work around GCC 4.3.x x86_64 compiler bug that caused crashes on startup.
(This affected Fedora 9 in particular.) (This affected Fedora 9 in particular.)
* Now works on "Solaris 10 using recent Sun Studio". * Now works on "Solaris 10 using recent Sun Studio".
Java Java
* New overload of mergeFrom() which parses a slice of a byte array instead * New overload of mergeFrom() which parses a slice of a byte array instead
of the whole thing. of the whole thing.
* New method ByteString.asReadOnlyByteBuffer() does what it sounds like. * New method ByteString.asReadOnlyByteBuffer() does what it sounds like.
* Improved performance of isInitialized() when optimizing for code size. * Improved performance of isInitialized() when optimizing for code size.
Python Python
* Corrected ListFields() signature in Message base class to match what * Corrected ListFields() signature in Message base class to match what
subclasses actually implement. subclasses actually implement.
* Some minor refactoring. * Some minor refactoring.
* Don't pass self as first argument to superclass constructor (no longer * Don't pass self as first argument to superclass constructor (no longer
allowed in Python 2.6). allowed in Python 2.6).
2008-09-29 version 2.0.2: 2008-09-29 version 2.0.2:
General General
* License changed from Apache 2.0 to New BSD. * License changed from Apache 2.0 to New BSD.
* It is now possible to define custom "options", which are basically * It is now possible to define custom "options", which are basically
annotations which may be placed on definitions in a .proto file. annotations which may be placed on definitions in a .proto file.
For example, you might define a field option called "foo" like so: For example, you might define a field option called "foo" like so:
import "google/protobuf/descriptor.proto" import "google/protobuf/descriptor.proto"
extend google.protobuf.FieldOptions { extend google.protobuf.FieldOptions {
optional string foo = 12345; optional string foo = 12345;
} }
Then you annotate a field using the "foo" option: Then you annotate a field using the "foo" option:
message MyMessage { message MyMessage {
optional int32 some_field = 1 [(foo) = "bar"] optional int32 some_field = 1 [(foo) = "bar"]
} }
The value of this option is then visible via the message's The value of this option is then visible via the message's
Descriptor: Descriptor:
const FieldDescriptor* field = const FieldDescriptor* field =
MyMessage::descriptor()->FindFieldByName("some_field"); MyMessage::descriptor()->FindFieldByName("some_field");
assert(field->options().GetExtension(foo) == "bar"); assert(field->options().GetExtension(foo) == "bar");
This feature has been implemented and tested in C++ and Java. This feature has been implemented and tested in C++ and Java.
Other languages may or may not need to do extra work to support Other languages may or may not need to do extra work to support
custom options, depending on how they construct descriptors. custom options, depending on how they construct descriptors.
C++ C++
* Fixed some GCC warnings that only occur when using -pedantic. * Fixed some GCC warnings that only occur when using -pedantic.
* Improved static initialization code, making ordering more * Improved static initialization code, making ordering more
predictable among other things. predictable among other things.
* TextFormat will no longer accept messages which contain multiple * TextFormat will no longer accept messages which contain multiple
instances of a singular field. Previously, the latter instance instances of a singular field. Previously, the latter instance
would overwrite the former. would overwrite the former.
* Now works on systems that don't have hash_map. * Now works on systems that don't have hash_map.
Java Java
* Print @Override annotation in generated code where appropriate. * Print @Override annotation in generated code where appropriate.
Python Python
* Strings now use the "unicode" type rather than the "str" type. * Strings now use the "unicode" type rather than the "str" type.
String fields may still be assigned ASCII "str" values; they will String fields may still be assigned ASCII "str" values; they will
automatically be converted. automatically be converted.
* Adding a property to an object representing a repeated field now * Adding a property to an object representing a repeated field now
raises an exception. For example: raises an exception. For example:
# No longer works (and never should have). # No longer works (and never should have).
message.some_repeated_field.foo = 1 message.some_repeated_field.foo = 1
Windows Windows
* We now build static libraries rather than DLLs by default on MSVC. * We now build static libraries rather than DLLs by default on MSVC.
See vsprojects/readme.txt for more information. See vsprojects/readme.txt for more information.
2008-08-15 version 2.0.1: 2008-08-15 version 2.0.1:
protoc protoc
* New flags --encode and --decode can be used to convert between protobuf text * New flags --encode and --decode can be used to convert between protobuf text
format and binary format from the command-line. format and binary format from the command-line.
* New flag --descriptor_set_out can be used to write FileDescriptorProtos for * New flag --descriptor_set_out can be used to write FileDescriptorProtos for
all parsed files directly into a single output file. This is particularly all parsed files directly into a single output file. This is particularly
useful if you wish to parse .proto files from programs written in languages useful if you wish to parse .proto files from programs written in languages
other than C++: just run protoc as a background process and have it output other than C++: just run protoc as a background process and have it output
a FileDescriptorList, then parse that natively. a FileDescriptorList, then parse that natively.
* Improved error message when an enum value's name conflicts with another * Improved error message when an enum value's name conflicts with another
symbol defined in the enum type's scope, e.g. if two enum types declared symbol defined in the enum type's scope, e.g. if two enum types declared
in the same scope have values with the same name. This is disallowed for in the same scope have values with the same name. This is disallowed for
compatibility with C++, but this wasn't clear from the error. compatibility with C++, but this wasn't clear from the error.
* Fixed absolute output paths on Windows. * Fixed absolute output paths on Windows.
* Allow trailing slashes in --proto_path mappings. * Allow trailing slashes in --proto_path mappings.
C++ C++
* Reflection objects are now per-class rather than per-instance. To make this * Reflection objects are now per-class rather than per-instance. To make this
possible, the Reflection interface had to be changed such that all methods possible, the Reflection interface had to be changed such that all methods
take the Message instance as a parameter. This change improves performance take the Message instance as a parameter. This change improves performance
significantly in memory-bandwidth-limited use cases, since it makes the significantly in memory-bandwidth-limited use cases, since it makes the
message objects smaller. Note that source-incompatible interface changes message objects smaller. Note that source-incompatible interface changes
like this will not be made again after the library leaves beta. like this will not be made again after the library leaves beta.
* Heuristically detect sub-messages when printing unknown fields. * Heuristically detect sub-messages when printing unknown fields.
* Fix static initialization ordering bug that caused crashes at startup when * Fix static initialization ordering bug that caused crashes at startup when
compiling on Mac with static linking. compiling on Mac with static linking.
* Fixed TokenizerTest when compiling with -DNDEBUG on Linux. * Fixed TokenizerTest when compiling with -DNDEBUG on Linux.
* Fixed incorrect definition of kint32min. * Fixed incorrect definition of kint32min.
* Fix bytes type setter to work with byte sequences with embedded NULLs. * Fix bytes type setter to work with byte sequences with embedded NULLs.
* Other irrelevant tweaks. * Other irrelevant tweaks.
Java Java
* Fixed UnknownFieldSet's parsing of varints larger than 32 bits. * Fixed UnknownFieldSet's parsing of varints larger than 32 bits.
* Fixed TextFormat's parsing of "inf" and "nan". * Fixed TextFormat's parsing of "inf" and "nan".
* Fixed TextFormat's parsing of comments. * Fixed TextFormat's parsing of comments.
* Added info to Java POM that will be required when we upload the * Added info to Java POM that will be required when we upload the
package to a Maven repo. package to a Maven repo.
Python Python
* MergeFrom(message) and CopyFrom(message) are now implemented. * MergeFrom(message) and CopyFrom(message) are now implemented.
* SerializeToString() raises an exception if the message is missing required * SerializeToString() raises an exception if the message is missing required
fields. fields.
* Code organization improvements. * Code organization improvements.
* Fixed doc comments for RpcController and RpcChannel, which had somehow been * Fixed doc comments for RpcController and RpcChannel, which had somehow been
swapped. swapped.
* Fixed text_format_test on Windows where floating-point exponents sometimes * Fixed text_format_test on Windows where floating-point exponents sometimes
contain extra zeros. contain extra zeros.
* Fix Python service CallMethod() implementation. * Fix Python service CallMethod() implementation.
Other Other
* Improved readmes. * Improved readmes.
* VIM syntax highlighting improvements. * VIM syntax highlighting improvements.
2008-07-07 version 2.0.0: 2008-07-07 version 2.0.0:
* First public release. * First public release.

View File

@ -1,84 +1,84 @@
This file contains a list of people who have made large contributions This file contains a list of people who have made large contributions
to the public version of Protocol Buffers. to the public version of Protocol Buffers.
Original Protocol Buffers design and implementation: Original Protocol Buffers design and implementation:
Sanjay Ghemawat <sanjay@google.com> Sanjay Ghemawat <sanjay@google.com>
Jeff Dean <jeff@google.com> Jeff Dean <jeff@google.com>
Daniel Dulitz <daniel@google.com> Daniel Dulitz <daniel@google.com>
Craig Silverstein Craig Silverstein
Paul Haahr <haahr@google.com> Paul Haahr <haahr@google.com>
Corey Anderson <corin@google.com> Corey Anderson <corin@google.com>
(and many others) (and many others)
Proto2 C++ and Java primary author: Proto2 C++ and Java primary author:
Kenton Varda <kenton@google.com> Kenton Varda <kenton@google.com>
Proto2 Python primary authors: Proto2 Python primary authors:
Will Robinson <robinson@google.com> Will Robinson <robinson@google.com>
Petar Petrov <petar@google.com> Petar Petrov <petar@google.com>
Large code contributions: Large code contributions:
Jason Hsueh <jasonh@google.com> Jason Hsueh <jasonh@google.com>
Joseph Schorr <jschorr@google.com> Joseph Schorr <jschorr@google.com>
Wenbo Zhu <wenboz@google.com> Wenbo Zhu <wenboz@google.com>
Large quantity of code reviews: Large quantity of code reviews:
Scott Bruce <sbruce@google.com> Scott Bruce <sbruce@google.com>
Frank Yellin Frank Yellin
Neal Norwitz <nnorwitz@google.com> Neal Norwitz <nnorwitz@google.com>
Jeffrey Yasskin <jyasskin@google.com> Jeffrey Yasskin <jyasskin@google.com>
Ambrose Feinstein <ambrose@google.com> Ambrose Feinstein <ambrose@google.com>
Documentation: Documentation:
Lisa Carey <lcarey@google.com> Lisa Carey <lcarey@google.com>
Maven packaging: Maven packaging:
Gregory Kick <gak@google.com> Gregory Kick <gak@google.com>
Patch contributors: Patch contributors:
Kevin Ko <kevin.s.ko@gmail.com> Kevin Ko <kevin.s.ko@gmail.com>
* Small patch to handle trailing slashes in --proto_path flag. * Small patch to handle trailing slashes in --proto_path flag.
Johan Euphrosine <proppy@aminche.com> Johan Euphrosine <proppy@aminche.com>
* Small patch to fix Python CallMethod(). * Small patch to fix Python CallMethod().
Ulrich Kunitz <kune@deine-taler.de> Ulrich Kunitz <kune@deine-taler.de>
* Small optimizations to Python serialization. * Small optimizations to Python serialization.
Leandro Lucarella <llucax@gmail.com> Leandro Lucarella <llucax@gmail.com>
* VI syntax highlighting tweaks. * VI syntax highlighting tweaks.
* Fix compiler to not make output executable. * Fix compiler to not make output executable.
Dilip Joseph <dilip.antony.joseph@gmail.com> Dilip Joseph <dilip.antony.joseph@gmail.com>
* Heuristic detection of sub-messages when printing unknown fields in * Heuristic detection of sub-messages when printing unknown fields in
text format. text format.
Brian Atkinson <nairb774@gmail.com> Brian Atkinson <nairb774@gmail.com>
* Added @Override annotation to generated Java code where appropriate. * Added @Override annotation to generated Java code where appropriate.
Vincent Choinière <Choiniere.Vincent@hydro.qc.ca> Vincent Choinière <Choiniere.Vincent@hydro.qc.ca>
* Tru64 support. * Tru64 support.
Monty Taylor <monty.taylor@gmail.com> Monty Taylor <monty.taylor@gmail.com>
* Solaris 10 + Sun Studio fixes. * Solaris 10 + Sun Studio fixes.
Alek Storm <alek.storm@gmail.com> Alek Storm <alek.storm@gmail.com>
* Slicing support for repeated scalar fields for the Python API. * Slicing support for repeated scalar fields for the Python API.
Oleg Smolsky <oleg.smolsky@gmail.com> Oleg Smolsky <oleg.smolsky@gmail.com>
* MS Visual Studio error format option. * MS Visual Studio error format option.
* Detect unordered_map in stl_hash.m4. * Detect unordered_map in stl_hash.m4.
Brian Olson <brianolson@google.com> Brian Olson <brianolson@google.com>
* gzip/zlib I/O support. * gzip/zlib I/O support.
Michael Poole <mdpoole@troilus.org> Michael Poole <mdpoole@troilus.org>
* Fixed warnings about generated constructors not explicitly initializing * Fixed warnings about generated constructors not explicitly initializing
all fields (only present with certain compiler settings). all fields (only present with certain compiler settings).
* Added generation of field number constants. * Added generation of field number constants.
Wink Saville <wink@google.com> Wink Saville <wink@google.com>
* Fixed initialization ordering problem in logging code. * Fixed initialization ordering problem in logging code.
Will Pierce <willp@nuclei.com> Will Pierce <willp@nuclei.com>
* Small patch improving performance of in Python serialization. * Small patch improving performance of in Python serialization.
Alexandre Vassalotti <alexandre@peadrop.com> Alexandre Vassalotti <alexandre@peadrop.com>
* Emacs mode for Protocol Buffers (editors/protobuf-mode.el). * Emacs mode for Protocol Buffers (editors/protobuf-mode.el).
Scott Stafford <scott.stafford@gmail.com> Scott Stafford <scott.stafford@gmail.com>
* Added Swap(), SwapElements(), and RemoveLast() to Reflection interface. * Added Swap(), SwapElements(), and RemoveLast() to Reflection interface.
Alexander Melnikov <alm@sibmail.ru> Alexander Melnikov <alm@sibmail.ru>
* HPUX support. * HPUX support.
Oliver Jowett <oliver.jowett@gmail.com> Oliver Jowett <oliver.jowett@gmail.com>
* Detect whether zlib is new enough in configure script. * Detect whether zlib is new enough in configure script.
* Fixes for Solaris 10 32/64-bit confusion. * Fixes for Solaris 10 32/64-bit confusion.
Evan Jones <evanj@mit.edu> Evan Jones <evanj@mit.edu>
* Optimize Java serialization code when writing a small message to a stream. * Optimize Java serialization code when writing a small message to a stream.
Michael Kucharski <m.kucharski@gmail.com> Michael Kucharski <m.kucharski@gmail.com>
* Added CodedInputStream.getTotalBytesRead(). * Added CodedInputStream.getTotalBytesRead().

View File

@ -1,33 +1,33 @@
Copyright 2008, Google Inc. Copyright 2008, Google Inc.
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are modification, are permitted provided that the following conditions are
met: met:
* Redistributions of source code must retain the above copyright * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the in the documentation and/or other materials provided with the
distribution. distribution.
* Neither the name of Google Inc. nor the names of its * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from contributors may be used to endorse or promote products derived from
this software without specific prior written permission. this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Code generated by the Protocol Buffer compiler is owned by the owner Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This standalone and requires a support library to be linked with it. This
support library is itself covered by the above license. support library is itself covered by the above license.

View File

@ -1,237 +1,237 @@
This file contains detailed but generic information on building and This file contains detailed but generic information on building and
installing the C++ part of this project. For shorter instructions, installing the C++ part of this project. For shorter instructions,
as well as instructions for compiling and installing the Java or as well as instructions for compiling and installing the Java or
Python parts, see README. Python parts, see README.
====================================================================== ======================================================================
Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc. Foundation, Inc.
This file is free documentation; the Free Software Foundation gives This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it. unlimited permission to copy, distribute and modify it.
Basic Installation Basic Installation
================== ==================
These are generic installation instructions. These are generic installation instructions.
The `configure' shell script attempts to guess correct values for The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package. those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for file `config.log' containing compiler output (useful mainly for
debugging `configure'). debugging `configure').
It can also use an optional file (typically called `config.cache' It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale disabled by default to prevent problems with accidental use of stale
cache files.) cache files.)
If you need to do unusual things to compile the package, please try If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you some point `config.cache' contains results you don't want to keep, you
may remove or edit it. may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need `configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using `configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'. a newer version of `autoconf'.
The simplest way to compile this package is: The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type 1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're `./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute `sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself. `configure' itself.
Running `configure' takes awhile. While running, it prints some Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for. messages telling which features it is checking for.
2. Type `make' to compile the package. 2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with 3. Optionally, type `make check' to run any self-tests that come with
the package. the package.
4. Type `make install' to install the programs and any data files and 4. Type `make install' to install the programs and any data files and
documentation. documentation.
5. You can remove the program binaries and object files from the 5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came all sorts of other programs in order to regenerate files that came
with the distribution. with the distribution.
Compilers and Options Compilers and Options
===================== =====================
Some systems require unusual options for compilation or linking that Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help' the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables. for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here by setting variables in the command line or in the environment. Here
is an example: is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details. *Note Defining Variables::, for more details.
Compiling For Multiple Architectures Compiling For Multiple Architectures
==================================== ====================================
You can compile the package for more than one kind of computer at the You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH' If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring package for one architecture, use `make distclean' before reconfiguring
for another architecture. for another architecture.
Installation Names Installation Names
================== ==================
By default, `make install' will install the package's files in By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an `/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'. option `--prefix=PATH'.
You can specify separate installation prefixes for You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries. PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix. Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features Optional Features
================= =================
Some packages pay attention to `--enable-FEATURE' options to Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package. `configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the `README' should mention any `--enable-' and `--with-' options that the
package recognizes. package recognizes.
For packages that use the X Window System, `configure' can usually For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't, find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations. `--x-libraries=DIR' to specify their locations.
Specifying the System Type Specifying the System Type
========================== ==========================
There may be some features `configure' cannot figure out There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints _same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system `--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form: type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms: where SYSTEM can have one of these forms:
OS KERNEL-OS OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't `config.sub' isn't included in this package, then this package doesn't
need to know the machine type. need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will use the `--target=TYPE' option to select the type of system they will
produce code for. produce code for.
If you want to _use_ a cross compiler, that generates code for a If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will "host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'. eventually be run) with `--host=TYPE'.
Sharing Defaults Sharing Defaults
================ ================
If you want to set default values for `configure' scripts to share, If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'. default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then `configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the `PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script. `CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script. A warning: not all `configure' scripts look for a site script.
Defining Variables Defining Variables
================== ==================
Variables not defined in a site shell script can be set in the Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example: them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc ./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script). overridden in the site shell script).
`configure' Invocation `configure' Invocation
====================== ======================
`configure' recognizes the following options to control how it `configure' recognizes the following options to control how it
operates. operates.
`--help' `--help'
`-h' `-h'
Print a summary of the options to `configure', and exit. Print a summary of the options to `configure', and exit.
`--version' `--version'
`-V' `-V'
Print the version of Autoconf used to generate the `configure' Print the version of Autoconf used to generate the `configure'
script, and exit. script, and exit.
`--cache-file=FILE' `--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE, Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching. disable caching.
`--config-cache' `--config-cache'
`-C' `-C'
Alias for `--cache-file=config.cache'. Alias for `--cache-file=config.cache'.
`--quiet' `--quiet'
`--silent' `--silent'
`-q' `-q'
Do not print messages saying which checks are being made. To Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown). messages will still be shown).
`--srcdir=DIR' `--srcdir=DIR'
Look for the package's source code in directory DIR. Usually Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically. `configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run `configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. `configure --help' for more details.

View File

@ -1,164 +1,164 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
# Build . before src so that our all-local and clean-local hooks kicks in at # Build . before src so that our all-local and clean-local hooks kicks in at
# the right time. # the right time.
SUBDIRS = . src SUBDIRS = . src
# Always include gtest in distributions. # Always include gtest in distributions.
DIST_SUBDIRS = $(subdirs) src DIST_SUBDIRS = $(subdirs) src
# Build gtest before we build protobuf tests. We don't add gtest to SUBDIRS # Build gtest before we build protobuf tests. We don't add gtest to SUBDIRS
# because then "make check" would also build and run all of gtest's own tests, # because then "make check" would also build and run all of gtest's own tests,
# which takes a lot of time and is generally not useful to us. Also, we don't # which takes a lot of time and is generally not useful to us. Also, we don't
# want "make install" to recurse into gtest since we don't want to overwrite # want "make install" to recurse into gtest since we don't want to overwrite
# the installed version of gtest if there is one. # the installed version of gtest if there is one.
check-local: check-local:
@echo "Making lib/libgtest.a lib/libgtest_main.a in gtest" @echo "Making lib/libgtest.a lib/libgtest_main.a in gtest"
@cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la @cd gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
# We would like to clean gtest when "make clean" is invoked. But we have to # We would like to clean gtest when "make clean" is invoked. But we have to
# be careful because clean-local is also invoked during "make distclean", but # be careful because clean-local is also invoked during "make distclean", but
# "make distclean" already recurses into gtest because it's listed among the # "make distclean" already recurses into gtest because it's listed among the
# DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to # DIST_SUBDIRS. distclean will delete gtest/Makefile, so if we then try to
# cd to the directory again and "make clean" it will fail. So, check that the # cd to the directory again and "make clean" it will fail. So, check that the
# Makefile exists before recursing. # Makefile exists before recursing.
clean-local: clean-local:
@if test -e gtest/Makefile; then \ @if test -e gtest/Makefile; then \
echo "Making clean in gtest"; \ echo "Making clean in gtest"; \
cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \ cd gtest && $(MAKE) $(AM_MAKEFLAGS) clean; \
fi fi
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = protobuf.pc protobuf-lite.pc pkgconfig_DATA = protobuf.pc protobuf-lite.pc
EXTRA_DIST = \ EXTRA_DIST = \
autogen.sh \ autogen.sh \
generate_descriptor_proto.sh \ generate_descriptor_proto.sh \
README.txt \ README.txt \
INSTALL.txt \ INSTALL.txt \
COPYING.txt \ COPYING.txt \
CONTRIBUTORS.txt \ CONTRIBUTORS.txt \
CHANGES.txt \ CHANGES.txt \
editors/README.txt \ editors/README.txt \
editors/proto.vim \ editors/proto.vim \
editors/protobuf-mode.el \ editors/protobuf-mode.el \
vsprojects/config.h \ vsprojects/config.h \
vsprojects/extract_includes.bat \ vsprojects/extract_includes.bat \
vsprojects/libprotobuf.vcproj \ vsprojects/libprotobuf.vcproj \
vsprojects/libprotobuf-lite.vcproj \ vsprojects/libprotobuf-lite.vcproj \
vsprojects/libprotoc.vcproj \ vsprojects/libprotoc.vcproj \
vsprojects/protobuf.sln \ vsprojects/protobuf.sln \
vsprojects/protoc.vcproj \ vsprojects/protoc.vcproj \
vsprojects/readme.txt \ vsprojects/readme.txt \
vsprojects/test_plugin.vcproj \ vsprojects/test_plugin.vcproj \
vsprojects/tests.vcproj \ vsprojects/tests.vcproj \
vsprojects/lite-test.vcproj \ vsprojects/lite-test.vcproj \
vsprojects/convert2008to2005.sh \ vsprojects/convert2008to2005.sh \
examples/README.txt \ examples/README.txt \
examples/Makefile \ examples/Makefile \
examples/addressbook.proto \ examples/addressbook.proto \
examples/add_person.cc \ examples/add_person.cc \
examples/list_people.cc \ examples/list_people.cc \
examples/AddPerson.java \ examples/AddPerson.java \
examples/ListPeople.java \ examples/ListPeople.java \
examples/add_person.py \ examples/add_person.py \
examples/list_people.py \ examples/list_people.py \
java/src/main/java/com/google/protobuf/AbstractMessage.java \ java/src/main/java/com/google/protobuf/AbstractMessage.java \
java/src/main/java/com/google/protobuf/AbstractMessageLite.java \ java/src/main/java/com/google/protobuf/AbstractMessageLite.java \
java/src/main/java/com/google/protobuf/BlockingRpcChannel.java \ java/src/main/java/com/google/protobuf/BlockingRpcChannel.java \
java/src/main/java/com/google/protobuf/BlockingService.java \ java/src/main/java/com/google/protobuf/BlockingService.java \
java/src/main/java/com/google/protobuf/ByteString.java \ java/src/main/java/com/google/protobuf/ByteString.java \
java/src/main/java/com/google/protobuf/CodedInputStream.java \ java/src/main/java/com/google/protobuf/CodedInputStream.java \
java/src/main/java/com/google/protobuf/CodedOutputStream.java \ java/src/main/java/com/google/protobuf/CodedOutputStream.java \
java/src/main/java/com/google/protobuf/Descriptors.java \ java/src/main/java/com/google/protobuf/Descriptors.java \
java/src/main/java/com/google/protobuf/DynamicMessage.java \ java/src/main/java/com/google/protobuf/DynamicMessage.java \
java/src/main/java/com/google/protobuf/ExtensionRegistry.java \ java/src/main/java/com/google/protobuf/ExtensionRegistry.java \
java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \ java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java \
java/src/main/java/com/google/protobuf/FieldSet.java \ java/src/main/java/com/google/protobuf/FieldSet.java \
java/src/main/java/com/google/protobuf/GeneratedMessage.java \ java/src/main/java/com/google/protobuf/GeneratedMessage.java \
java/src/main/java/com/google/protobuf/GeneratedMessageLite.java \ java/src/main/java/com/google/protobuf/GeneratedMessageLite.java \
java/src/main/java/com/google/protobuf/Internal.java \ java/src/main/java/com/google/protobuf/Internal.java \
java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \ java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java \
java/src/main/java/com/google/protobuf/Message.java \ java/src/main/java/com/google/protobuf/Message.java \
java/src/main/java/com/google/protobuf/MessageLite.java \ java/src/main/java/com/google/protobuf/MessageLite.java \
java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java \ java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java \
java/src/main/java/com/google/protobuf/RpcCallback.java \ java/src/main/java/com/google/protobuf/RpcCallback.java \
java/src/main/java/com/google/protobuf/RpcChannel.java \ java/src/main/java/com/google/protobuf/RpcChannel.java \
java/src/main/java/com/google/protobuf/RpcController.java \ java/src/main/java/com/google/protobuf/RpcController.java \
java/src/main/java/com/google/protobuf/RpcUtil.java \ java/src/main/java/com/google/protobuf/RpcUtil.java \
java/src/main/java/com/google/protobuf/Service.java \ java/src/main/java/com/google/protobuf/Service.java \
java/src/main/java/com/google/protobuf/ServiceException.java \ java/src/main/java/com/google/protobuf/ServiceException.java \
java/src/main/java/com/google/protobuf/TextFormat.java \ java/src/main/java/com/google/protobuf/TextFormat.java \
java/src/main/java/com/google/protobuf/UninitializedMessageException.java \ java/src/main/java/com/google/protobuf/UninitializedMessageException.java \
java/src/main/java/com/google/protobuf/UnknownFieldSet.java \ java/src/main/java/com/google/protobuf/UnknownFieldSet.java \
java/src/main/java/com/google/protobuf/WireFormat.java \ java/src/main/java/com/google/protobuf/WireFormat.java \
java/src/test/java/com/google/protobuf/AbstractMessageTest.java \ java/src/test/java/com/google/protobuf/AbstractMessageTest.java \
java/src/test/java/com/google/protobuf/CodedInputStreamTest.java \ java/src/test/java/com/google/protobuf/CodedInputStreamTest.java \
java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java \ java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java \
java/src/test/java/com/google/protobuf/DescriptorsTest.java \ java/src/test/java/com/google/protobuf/DescriptorsTest.java \
java/src/test/java/com/google/protobuf/DynamicMessageTest.java \ java/src/test/java/com/google/protobuf/DynamicMessageTest.java \
java/src/test/java/com/google/protobuf/GeneratedMessageTest.java \ java/src/test/java/com/google/protobuf/GeneratedMessageTest.java \
java/src/test/java/com/google/protobuf/LiteTest.java \ java/src/test/java/com/google/protobuf/LiteTest.java \
java/src/test/java/com/google/protobuf/MessageTest.java \ java/src/test/java/com/google/protobuf/MessageTest.java \
java/src/test/java/com/google/protobuf/ServiceTest.java \ java/src/test/java/com/google/protobuf/ServiceTest.java \
java/src/test/java/com/google/protobuf/TestUtil.java \ java/src/test/java/com/google/protobuf/TestUtil.java \
java/src/test/java/com/google/protobuf/TextFormatTest.java \ java/src/test/java/com/google/protobuf/TextFormatTest.java \
java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java \ java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java \
java/src/test/java/com/google/protobuf/WireFormatTest.java \ java/src/test/java/com/google/protobuf/WireFormatTest.java \
java/src/test/java/com/google/protobuf/multiple_files_test.proto \ java/src/test/java/com/google/protobuf/multiple_files_test.proto \
java/pom.xml \ java/pom.xml \
java/README.txt \ java/README.txt \
python/google/protobuf/internal/generator_test.py \ python/google/protobuf/internal/generator_test.py \
python/google/protobuf/internal/containers.py \ python/google/protobuf/internal/containers.py \
python/google/protobuf/internal/decoder.py \ python/google/protobuf/internal/decoder.py \
python/google/protobuf/internal/descriptor_test.py \ python/google/protobuf/internal/descriptor_test.py \
python/google/protobuf/internal/encoder.py \ python/google/protobuf/internal/encoder.py \
python/google/protobuf/internal/message_listener.py \ python/google/protobuf/internal/message_listener.py \
python/google/protobuf/internal/message_test.py \ python/google/protobuf/internal/message_test.py \
python/google/protobuf/internal/more_extensions.proto \ python/google/protobuf/internal/more_extensions.proto \
python/google/protobuf/internal/more_messages.proto \ python/google/protobuf/internal/more_messages.proto \
python/google/protobuf/internal/reflection_test.py \ python/google/protobuf/internal/reflection_test.py \
python/google/protobuf/internal/service_reflection_test.py \ python/google/protobuf/internal/service_reflection_test.py \
python/google/protobuf/internal/test_util.py \ python/google/protobuf/internal/test_util.py \
python/google/protobuf/internal/text_format_test.py \ python/google/protobuf/internal/text_format_test.py \
python/google/protobuf/internal/type_checkers.py \ python/google/protobuf/internal/type_checkers.py \
python/google/protobuf/internal/wire_format.py \ python/google/protobuf/internal/wire_format.py \
python/google/protobuf/internal/wire_format_test.py \ python/google/protobuf/internal/wire_format_test.py \
python/google/protobuf/internal/__init__.py \ python/google/protobuf/internal/__init__.py \
python/google/protobuf/descriptor.py \ python/google/protobuf/descriptor.py \
python/google/protobuf/message.py \ python/google/protobuf/message.py \
python/google/protobuf/reflection.py \ python/google/protobuf/reflection.py \
python/google/protobuf/service.py \ python/google/protobuf/service.py \
python/google/protobuf/service_reflection.py \ python/google/protobuf/service_reflection.py \
python/google/protobuf/text_format.py \ python/google/protobuf/text_format.py \
python/google/protobuf/__init__.py \ python/google/protobuf/__init__.py \
python/google/__init__.py \ python/google/__init__.py \
python/ez_setup.py \ python/ez_setup.py \
python/setup.py \ python/setup.py \
python/mox.py \ python/mox.py \
python/stubout.py \ python/stubout.py \
python/README.txt python/README.txt
# Deletes all the files generated by autogen.sh. # Deletes all the files generated by autogen.sh.
MAINTAINERCLEANFILES = \ MAINTAINERCLEANFILES = \
aclocal.m4 \ aclocal.m4 \
config.guess \ config.guess \
config.sub \ config.sub \
configure \ configure \
depcomp \ depcomp \
install-sh \ install-sh \
ltmain.sh \ ltmain.sh \
Makefile.in \ Makefile.in \
missing \ missing \
mkinstalldirs \ mkinstalldirs \
config.h.in \ config.h.in \
stamp.h.in \ stamp.h.in \
m4/ltsugar.m4 \ m4/ltsugar.m4 \
m4/libtool.m4 \ m4/libtool.m4 \
m4/ltversion.m4 \ m4/ltversion.m4 \
m4/lt~obsolete.m4 \ m4/lt~obsolete.m4 \
m4/ltoptions.m4 m4/ltoptions.m4

File diff suppressed because it is too large Load Diff

View File

@ -1,152 +1,152 @@
Protocol Buffers - Google's data interchange format Protocol Buffers - Google's data interchange format
Copyright 2008 Google Inc. Copyright 2008 Google Inc.
http://code.google.com/apis/protocolbuffers/ http://code.google.com/apis/protocolbuffers/
C++ Installation - Unix C++ Installation - Unix
======================= =======================
To build and install the C++ Protocol Buffer runtime and the Protocol To build and install the C++ Protocol Buffer runtime and the Protocol
Buffer compiler (protoc) execute the following: Buffer compiler (protoc) execute the following:
$ ./configure $ ./configure
$ make $ make
$ make check $ make check
$ make install $ make install
If "make check" fails, you can still install, but it is likely that If "make check" fails, you can still install, but it is likely that
some features of this library will not work correctly on your system. some features of this library will not work correctly on your system.
Proceed at your own risk. Proceed at your own risk.
"make install" may require superuser privileges. "make install" may require superuser privileges.
For advanced usage information on configure and make, see INSTALL.txt. For advanced usage information on configure and make, see INSTALL.txt.
** Hint on install location ** ** Hint on install location **
By default, the package will be installed to /usr/local. However, By default, the package will be installed to /usr/local. However,
on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH. on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH.
You can add it, but it may be easier to just install to /usr You can add it, but it may be easier to just install to /usr
instead. To do this, invoke configure as follows: instead. To do this, invoke configure as follows:
./configure --prefix=/usr ./configure --prefix=/usr
If you already built the package with a different prefix, make sure If you already built the package with a different prefix, make sure
to run "make clean" before building again. to run "make clean" before building again.
** Compiling dependent packages ** ** Compiling dependent packages **
To compile a package that uses Protocol Buffers, you need to pass To compile a package that uses Protocol Buffers, you need to pass
various flags to your compiler and linker. As of version 2.2.0, various flags to your compiler and linker. As of version 2.2.0,
Protocol Buffers integrates with pkg-config to manage this. If you Protocol Buffers integrates with pkg-config to manage this. If you
have pkg-config installed, then you can invoke it to get a list of have pkg-config installed, then you can invoke it to get a list of
flags like so: flags like so:
pkg-config --cflags protobuf # print compiler flags pkg-config --cflags protobuf # print compiler flags
pkg-config --libs protobuf # print linker flags pkg-config --libs protobuf # print linker flags
pkg-config --cflags --libs protobuf # print both pkg-config --cflags --libs protobuf # print both
For example: For example:
c++ my_program.cc my_proto.pb.cc `pkg-config --cflags --libs protobuf` c++ my_program.cc my_proto.pb.cc `pkg-config --cflags --libs protobuf`
Note that packages written prior to the 2.2.0 release of Protocol Note that packages written prior to the 2.2.0 release of Protocol
Buffers may not yet integrate with pkg-config to get flags, and may Buffers may not yet integrate with pkg-config to get flags, and may
not pass the correct set of flags to correctly link against not pass the correct set of flags to correctly link against
libprotobuf. If the package in question uses autoconf, you can libprotobuf. If the package in question uses autoconf, you can
often fix the problem by invoking its configure script like: often fix the problem by invoking its configure script like:
configure CXXFLAGS="$(pkg-config --cflags protobuf)" \ configure CXXFLAGS="$(pkg-config --cflags protobuf)" \
LIBS="$(pkg-config --libs protobuf)" LIBS="$(pkg-config --libs protobuf)"
This will force it to use the correct flags. This will force it to use the correct flags.
If you are writing an autoconf-based package that uses Protocol If you are writing an autoconf-based package that uses Protocol
Buffers, you should probably use the PKG_CHECK_MODULES macro in your Buffers, you should probably use the PKG_CHECK_MODULES macro in your
configure script like: configure script like:
PKG_CHECK_MODULES([protobuf], [protobuf]) PKG_CHECK_MODULES([protobuf], [protobuf])
See the pkg-config man page for more info. See the pkg-config man page for more info.
If you only want protobuf-lite, substitute "protobuf-lite" in place If you only want protobuf-lite, substitute "protobuf-lite" in place
of "protobuf" in these examples. of "protobuf" in these examples.
** Note for cross-compiling ** ** Note for cross-compiling **
The makefiles normally invoke the protoc executable that they just The makefiles normally invoke the protoc executable that they just
built in order to build tests. When cross-compiling, the protoc built in order to build tests. When cross-compiling, the protoc
executable may not be executable on the host machine. In this case, executable may not be executable on the host machine. In this case,
you must build a copy of protoc for the host machine first, then use you must build a copy of protoc for the host machine first, then use
the --with-protoc option to tell configure to use it instead. For the --with-protoc option to tell configure to use it instead. For
example: example:
./configure --with-protoc=protoc ./configure --with-protoc=protoc
This will use the installed protoc (found in your $PATH) instead of This will use the installed protoc (found in your $PATH) instead of
trying to execute the one built during the build process. You can trying to execute the one built during the build process. You can
also use an executable that hasn't been installed. For example, if also use an executable that hasn't been installed. For example, if
you built the protobuf package for your host machine in ../host, you built the protobuf package for your host machine in ../host,
you might do: you might do:
./configure --with-protoc=../host/src/protoc ./configure --with-protoc=../host/src/protoc
Either way, you must make sure that the protoc executable you use Either way, you must make sure that the protoc executable you use
has the same version as the protobuf source code you are trying to has the same version as the protobuf source code you are trying to
use it with. use it with.
** Note for Solaris users ** ** Note for Solaris users **
Solaris 10 x86 has a bug that will make linking fail, complaining Solaris 10 x86 has a bug that will make linking fail, complaining
about libstdc++.la being invalid. We have included a work-around about libstdc++.la being invalid. We have included a work-around
in this package. To use the work-around, run configure as follows: in this package. To use the work-around, run configure as follows:
./configure LDFLAGS=-L$PWD/src/solaris ./configure LDFLAGS=-L$PWD/src/solaris
See src/solaris/libstdc++.la for more info on this bug. See src/solaris/libstdc++.la for more info on this bug.
** Note for HP C++ Tru64 users ** ** Note for HP C++ Tru64 users **
To compile invoke configure as follows: To compile invoke configure as follows:
./configure CXXFLAGS="-O -std ansi -ieee -D__USE_STD_IOSTREAM" ./configure CXXFLAGS="-O -std ansi -ieee -D__USE_STD_IOSTREAM"
Also, you will need to use gmake instead of make. Also, you will need to use gmake instead of make.
C++ Installation - Windows C++ Installation - Windows
========================== ==========================
If you are using Micosoft Visual C++, see vsprojects/readme.txt. If you are using Micosoft Visual C++, see vsprojects/readme.txt.
If you are using Cygwin or MinGW, follow the Unix installation If you are using Cygwin or MinGW, follow the Unix installation
instructions, above. instructions, above.
Binary Compatibility Warning Binary Compatibility Warning
============================ ============================
Due to the nature of C++, it is unlikely that any two versions of the Due to the nature of C++, it is unlikely that any two versions of the
Protocol Buffers C++ runtime libraries will have compatible ABIs. Protocol Buffers C++ runtime libraries will have compatible ABIs.
That is, if you linked an executable against an older version of That is, if you linked an executable against an older version of
libprotobuf, it is unlikely to work with a newer version without libprotobuf, it is unlikely to work with a newer version without
re-compiling. This problem, when it occurs, will normally be detected re-compiling. This problem, when it occurs, will normally be detected
immediately on startup of your app. Still, you may want to consider immediately on startup of your app. Still, you may want to consider
using static linkage. You can configure this package to install using static linkage. You can configure this package to install
static libraries only using: static libraries only using:
./configure --disable-shared ./configure --disable-shared
Java and Python Installation Java and Python Installation
============================ ============================
The Java and Python runtime libraries for Protocol Buffers are located The Java and Python runtime libraries for Protocol Buffers are located
in the java and python directories. See the README file in each in the java and python directories. See the README file in each
directory for more information on how to compile and install them. directory for more information on how to compile and install them.
Note that both of them require you to first install the Protocol Note that both of them require you to first install the Protocol
Buffer compiler (protoc), which is part of the C++ package. Buffer compiler (protoc), which is part of the C++ package.
Usage Usage
===== =====
The complete documentation for Protocol Buffers is available via the The complete documentation for Protocol Buffers is available via the
web at: web at:
http://code.google.com/apis/protocolbuffers/ http://code.google.com/apis/protocolbuffers/

File diff suppressed because it is too large Load Diff

0
mp/src/thirdparty/protobuf-2.3.0/autogen.sh vendored Normal file → Executable file
View File

View File

@ -1,147 +1,147 @@
/* config.h.in. Generated from configure.ac by autoheader. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* the name of <hash_set> */ /* the name of <hash_set> */
#undef HASH_MAP_CLASS #undef HASH_MAP_CLASS
/* the location of <hash_map> */ /* the location of <hash_map> */
#undef HASH_MAP_H #undef HASH_MAP_H
/* the namespace of hash_map/hash_set */ /* the namespace of hash_map/hash_set */
#undef HASH_NAMESPACE #undef HASH_NAMESPACE
/* the name of <hash_set> */ /* the name of <hash_set> */
#undef HASH_SET_CLASS #undef HASH_SET_CLASS
/* the location of <hash_set> */ /* the location of <hash_set> */
#undef HASH_SET_H #undef HASH_SET_H
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define to 1 if you have the `ftruncate' function. */ /* Define to 1 if you have the `ftruncate' function. */
#undef HAVE_FTRUNCATE #undef HAVE_FTRUNCATE
/* define if the compiler has hash_map */ /* define if the compiler has hash_map */
#undef HAVE_HASH_MAP #undef HAVE_HASH_MAP
/* define if the compiler has hash_set */ /* define if the compiler has hash_set */
#undef HAVE_HASH_SET #undef HAVE_HASH_SET
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the <limits.h> header file. */ /* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H #undef HAVE_LIMITS_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */ /* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET #undef HAVE_MEMSET
/* Define to 1 if you have the `mkdir' function. */ /* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR #undef HAVE_MKDIR
/* Define if you have POSIX threads libraries and header files. */ /* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD #undef HAVE_PTHREAD
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchr' function. */ /* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR #undef HAVE_STRCHR
/* Define to 1 if you have the `strerror' function. */ /* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR #undef HAVE_STRERROR
/* Define to 1 if you have the <strings.h> header file. */ /* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H #undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H #undef HAVE_STRING_H
/* Define to 1 if you have the `strtol' function. */ /* Define to 1 if you have the `strtol' function. */
#undef HAVE_STRTOL #undef HAVE_STRTOL
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */ /* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H #undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Enable classes using zlib compression. */ /* Enable classes using zlib compression. */
#undef HAVE_ZLIB #undef HAVE_ZLIB
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/ */
#undef LT_OBJDIR #undef LT_OBJDIR
/* Name of package */ /* Name of package */
#undef PACKAGE #undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */ /* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */ /* Define to the full name of this package. */
#undef PACKAGE_NAME #undef PACKAGE_NAME
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#undef PACKAGE_STRING #undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME #undef PACKAGE_TARNAME
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
/* Define to necessary symbol if this constant uses a non-standard name on /* Define to necessary symbol if this constant uses a non-standard name on
your system. */ your system. */
#undef PTHREAD_CREATE_JOINABLE #undef PTHREAD_CREATE_JOINABLE
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* Define to 1 if on AIX 3. /* Define to 1 if on AIX 3.
System headers sometimes define this. System headers sometimes define this.
We just want to avoid a redefinition error message. */ We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
# undef _ALL_SOURCE # undef _ALL_SOURCE
#endif #endif
/* Enable GNU extensions on systems that have them. */ /* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
# undef _GNU_SOURCE # undef _GNU_SOURCE
#endif #endif
/* Define to 1 if on MINIX. */ /* Define to 1 if on MINIX. */
#undef _MINIX #undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with /* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */ this defined. */
#undef _POSIX_1_SOURCE #undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */ /* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE #undef _POSIX_SOURCE
/* Enable extensions on Solaris. */ /* Enable extensions on Solaris. */
#ifndef __EXTENSIONS__ #ifndef __EXTENSIONS__
# undef __EXTENSIONS__ # undef __EXTENSIONS__
#endif #endif
#ifndef _POSIX_PTHREAD_SEMANTICS #ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS
#endif #endif
#ifndef _TANDEM_SOURCE #ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE # undef _TANDEM_SOURCE
#endif #endif

View File

@ -1,5 +1,5 @@
This directory contains syntax highlighting and configuration files for editors This directory contains syntax highlighting and configuration files for editors
to properly display Protocol Buffer files. to properly display Protocol Buffer files.
See each file's header comment for directions on how to use it with the See each file's header comment for directions on how to use it with the
appropriate editor. appropriate editor.

View File

@ -1,89 +1,89 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
import com.example.tutorial.AddressBookProtos.AddressBook; import com.example.tutorial.AddressBookProtos.AddressBook;
import com.example.tutorial.AddressBookProtos.Person; import com.example.tutorial.AddressBookProtos.Person;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
class AddPerson { class AddPerson {
// This function fills in a Person message based on user input. // This function fills in a Person message based on user input.
static Person PromptForAddress(BufferedReader stdin, static Person PromptForAddress(BufferedReader stdin,
PrintStream stdout) throws IOException { PrintStream stdout) throws IOException {
Person.Builder person = Person.newBuilder(); Person.Builder person = Person.newBuilder();
stdout.print("Enter person ID: "); stdout.print("Enter person ID: ");
person.setId(Integer.valueOf(stdin.readLine())); person.setId(Integer.valueOf(stdin.readLine()));
stdout.print("Enter name: "); stdout.print("Enter name: ");
person.setName(stdin.readLine()); person.setName(stdin.readLine());
stdout.print("Enter email address (blank for none): "); stdout.print("Enter email address (blank for none): ");
String email = stdin.readLine(); String email = stdin.readLine();
if (email.length() > 0) { if (email.length() > 0) {
person.setEmail(email); person.setEmail(email);
} }
while (true) { while (true) {
stdout.print("Enter a phone number (or leave blank to finish): "); stdout.print("Enter a phone number (or leave blank to finish): ");
String number = stdin.readLine(); String number = stdin.readLine();
if (number.length() == 0) { if (number.length() == 0) {
break; break;
} }
Person.PhoneNumber.Builder phoneNumber = Person.PhoneNumber.Builder phoneNumber =
Person.PhoneNumber.newBuilder().setNumber(number); Person.PhoneNumber.newBuilder().setNumber(number);
stdout.print("Is this a mobile, home, or work phone? "); stdout.print("Is this a mobile, home, or work phone? ");
String type = stdin.readLine(); String type = stdin.readLine();
if (type.equals("mobile")) { if (type.equals("mobile")) {
phoneNumber.setType(Person.PhoneType.MOBILE); phoneNumber.setType(Person.PhoneType.MOBILE);
} else if (type.equals("home")) { } else if (type.equals("home")) {
phoneNumber.setType(Person.PhoneType.HOME); phoneNumber.setType(Person.PhoneType.HOME);
} else if (type.equals("work")) { } else if (type.equals("work")) {
phoneNumber.setType(Person.PhoneType.WORK); phoneNumber.setType(Person.PhoneType.WORK);
} else { } else {
stdout.println("Unknown phone type. Using default."); stdout.println("Unknown phone type. Using default.");
} }
person.addPhone(phoneNumber); person.addPhone(phoneNumber);
} }
return person.build(); return person.build();
} }
// Main function: Reads the entire address book from a file, // Main function: Reads the entire address book from a file,
// adds one person based on user input, then writes it back out to the same // adds one person based on user input, then writes it back out to the same
// file. // file.
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
if (args.length != 1) { if (args.length != 1) {
System.err.println("Usage: AddPerson ADDRESS_BOOK_FILE"); System.err.println("Usage: AddPerson ADDRESS_BOOK_FILE");
System.exit(-1); System.exit(-1);
} }
AddressBook.Builder addressBook = AddressBook.newBuilder(); AddressBook.Builder addressBook = AddressBook.newBuilder();
// Read the existing address book. // Read the existing address book.
try { try {
FileInputStream input = new FileInputStream(args[0]); FileInputStream input = new FileInputStream(args[0]);
addressBook.mergeFrom(input); addressBook.mergeFrom(input);
input.close(); input.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
System.out.println(args[0] + ": File not found. Creating a new file."); System.out.println(args[0] + ": File not found. Creating a new file.");
} }
// Add an address. // Add an address.
addressBook.addPerson( addressBook.addPerson(
PromptForAddress(new BufferedReader(new InputStreamReader(System.in)), PromptForAddress(new BufferedReader(new InputStreamReader(System.in)),
System.out)); System.out));
// Write the new address book back to disk. // Write the new address book back to disk.
FileOutputStream output = new FileOutputStream(args[0]); FileOutputStream output = new FileOutputStream(args[0]);
addressBook.build().writeTo(output); addressBook.build().writeTo(output);
output.close(); output.close();
} }
} }

View File

@ -1,50 +1,50 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
import com.example.tutorial.AddressBookProtos.AddressBook; import com.example.tutorial.AddressBookProtos.AddressBook;
import com.example.tutorial.AddressBookProtos.Person; import com.example.tutorial.AddressBookProtos.Person;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
class ListPeople { class ListPeople {
// Iterates though all people in the AddressBook and prints info about them. // Iterates though all people in the AddressBook and prints info about them.
static void Print(AddressBook addressBook) { static void Print(AddressBook addressBook) {
for (Person person: addressBook.getPersonList()) { for (Person person: addressBook.getPersonList()) {
System.out.println("Person ID: " + person.getId()); System.out.println("Person ID: " + person.getId());
System.out.println(" Name: " + person.getName()); System.out.println(" Name: " + person.getName());
if (person.hasEmail()) { if (person.hasEmail()) {
System.out.println(" E-mail address: " + person.getEmail()); System.out.println(" E-mail address: " + person.getEmail());
} }
for (Person.PhoneNumber phoneNumber : person.getPhoneList()) { for (Person.PhoneNumber phoneNumber : person.getPhoneList()) {
switch (phoneNumber.getType()) { switch (phoneNumber.getType()) {
case MOBILE: case MOBILE:
System.out.print(" Mobile phone #: "); System.out.print(" Mobile phone #: ");
break; break;
case HOME: case HOME:
System.out.print(" Home phone #: "); System.out.print(" Home phone #: ");
break; break;
case WORK: case WORK:
System.out.print(" Work phone #: "); System.out.print(" Work phone #: ");
break; break;
} }
System.out.println(phoneNumber.getNumber()); System.out.println(phoneNumber.getNumber());
} }
} }
} }
// Main function: Reads the entire address book from a file and prints all // Main function: Reads the entire address book from a file and prints all
// the information inside. // the information inside.
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
if (args.length != 1) { if (args.length != 1) {
System.err.println("Usage: ListPeople ADDRESS_BOOK_FILE"); System.err.println("Usage: ListPeople ADDRESS_BOOK_FILE");
System.exit(-1); System.exit(-1);
} }
// Read the existing address book. // Read the existing address book.
AddressBook addressBook = AddressBook addressBook =
AddressBook.parseFrom(new FileInputStream(args[0])); AddressBook.parseFrom(new FileInputStream(args[0]));
Print(addressBook); Print(addressBook);
} }
} }

View File

@ -1,29 +1,29 @@
This directory contains example code that uses Protocol Buffers to manage an This directory contains example code that uses Protocol Buffers to manage an
address book. Two programs are provided, each with three different address book. Two programs are provided, each with three different
implementations, one written in each of C++, Java, and Python. The add_person implementations, one written in each of C++, Java, and Python. The add_person
example adds a new person to an address book, prompting the user to input example adds a new person to an address book, prompting the user to input
the person's information. The list_people example lists people already in the the person's information. The list_people example lists people already in the
address book. The examples use the exact same format in all three languages, address book. The examples use the exact same format in all three languages,
so you can, for example, use add_person_java to create an address book and then so you can, for example, use add_person_java to create an address book and then
use list_people_python to read it. use list_people_python to read it.
You must install the protobuf package before you can build these. You must install the protobuf package before you can build these.
To build all the examples (on a unix-like system), simply run "make". This To build all the examples (on a unix-like system), simply run "make". This
creates the following executable files in the current directory: creates the following executable files in the current directory:
add_person_cpp list_people_cpp add_person_cpp list_people_cpp
add_person_java list_people_java add_person_java list_people_java
add_person_python list_people_python add_person_python list_people_python
If you only want to compile examples in one language, use "make cpp"*, If you only want to compile examples in one language, use "make cpp"*,
"make java", or "make python". "make java", or "make python".
All of these programs simply take an address book file as their parameter. All of these programs simply take an address book file as their parameter.
The add_person programs will create the file if it doesn't already exist. The add_person programs will create the file if it doesn't already exist.
These examples are part of the Protocol Buffers tutorial, located at: These examples are part of the Protocol Buffers tutorial, located at:
http://code.google.com/apis/protocolbuffers/docs/tutorials.html http://code.google.com/apis/protocolbuffers/docs/tutorials.html
* Note that on some platforms you may have to edit the Makefile and remove * Note that on some platforms you may have to edit the Makefile and remove
"-lpthread" from the linker commands (perhaps replacing it with something else). "-lpthread" from the linker commands (perhaps replacing it with something else).
We didn't do this automatically because we wanted to keep the example simple. We didn't do this automatically because we wanted to keep the example simple.

View File

@ -1,95 +1,95 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <string> #include <string>
#include "addressbook.pb.h" #include "addressbook.pb.h"
using namespace std; using namespace std;
// This function fills in a Person message based on user input. // This function fills in a Person message based on user input.
void PromptForAddress(tutorial::Person* person) { void PromptForAddress(tutorial::Person* person) {
cout << "Enter person ID number: "; cout << "Enter person ID number: ";
int id; int id;
cin >> id; cin >> id;
person->set_id(id); person->set_id(id);
cin.ignore(256, '\n'); cin.ignore(256, '\n');
cout << "Enter name: "; cout << "Enter name: ";
getline(cin, *person->mutable_name()); getline(cin, *person->mutable_name());
cout << "Enter email address (blank for none): "; cout << "Enter email address (blank for none): ";
string email; string email;
getline(cin, email); getline(cin, email);
if (!email.empty()) { if (!email.empty()) {
person->set_email(email); person->set_email(email);
} }
while (true) { while (true) {
cout << "Enter a phone number (or leave blank to finish): "; cout << "Enter a phone number (or leave blank to finish): ";
string number; string number;
getline(cin, number); getline(cin, number);
if (number.empty()) { if (number.empty()) {
break; break;
} }
tutorial::Person::PhoneNumber* phone_number = person->add_phone(); tutorial::Person::PhoneNumber* phone_number = person->add_phone();
phone_number->set_number(number); phone_number->set_number(number);
cout << "Is this a mobile, home, or work phone? "; cout << "Is this a mobile, home, or work phone? ";
string type; string type;
getline(cin, type); getline(cin, type);
if (type == "mobile") { if (type == "mobile") {
phone_number->set_type(tutorial::Person::MOBILE); phone_number->set_type(tutorial::Person::MOBILE);
} else if (type == "home") { } else if (type == "home") {
phone_number->set_type(tutorial::Person::HOME); phone_number->set_type(tutorial::Person::HOME);
} else if (type == "work") { } else if (type == "work") {
phone_number->set_type(tutorial::Person::WORK); phone_number->set_type(tutorial::Person::WORK);
} else { } else {
cout << "Unknown phone type. Using default." << endl; cout << "Unknown phone type. Using default." << endl;
} }
} }
} }
// Main function: Reads the entire address book from a file, // Main function: Reads the entire address book from a file,
// adds one person based on user input, then writes it back out to the same // adds one person based on user input, then writes it back out to the same
// file. // file.
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
// Verify that the version of the library that we linked against is // Verify that the version of the library that we linked against is
// compatible with the version of the headers we compiled against. // compatible with the version of the headers we compiled against.
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
if (argc != 2) { if (argc != 2) {
cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl; cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl;
return -1; return -1;
} }
tutorial::AddressBook address_book; tutorial::AddressBook address_book;
{ {
// Read the existing address book. // Read the existing address book.
fstream input(argv[1], ios::in | ios::binary); fstream input(argv[1], ios::in | ios::binary);
if (!input) { if (!input) {
cout << argv[1] << ": File not found. Creating a new file." << endl; cout << argv[1] << ": File not found. Creating a new file." << endl;
} else if (!address_book.ParseFromIstream(&input)) { } else if (!address_book.ParseFromIstream(&input)) {
cerr << "Failed to parse address book." << endl; cerr << "Failed to parse address book." << endl;
return -1; return -1;
} }
} }
// Add an address. // Add an address.
PromptForAddress(address_book.add_person()); PromptForAddress(address_book.add_person());
{ {
// Write the new address book back to disk. // Write the new address book back to disk.
fstream output(argv[1], ios::out | ios::trunc | ios::binary); fstream output(argv[1], ios::out | ios::trunc | ios::binary);
if (!address_book.SerializeToOstream(&output)) { if (!address_book.SerializeToOstream(&output)) {
cerr << "Failed to write address book." << endl; cerr << "Failed to write address book." << endl;
return -1; return -1;
} }
} }
// Optional: Delete all global objects allocated by libprotobuf. // Optional: Delete all global objects allocated by libprotobuf.
google::protobuf::ShutdownProtobufLibrary(); google::protobuf::ShutdownProtobufLibrary();
return 0; return 0;
} }

View File

@ -1,30 +1,30 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
package tutorial; package tutorial;
option java_package = "com.example.tutorial"; option java_package = "com.example.tutorial";
option java_outer_classname = "AddressBookProtos"; option java_outer_classname = "AddressBookProtos";
message Person { message Person {
required string name = 1; required string name = 1;
required int32 id = 2; // Unique ID number for this person. required int32 id = 2; // Unique ID number for this person.
optional string email = 3; optional string email = 3;
enum PhoneType { enum PhoneType {
MOBILE = 0; MOBILE = 0;
HOME = 1; HOME = 1;
WORK = 2; WORK = 2;
} }
message PhoneNumber { message PhoneNumber {
required string number = 1; required string number = 1;
optional PhoneType type = 2 [default = HOME]; optional PhoneType type = 2 [default = HOME];
} }
repeated PhoneNumber phone = 4; repeated PhoneNumber phone = 4;
} }
// Our address book file is just one of these. // Our address book file is just one of these.
message AddressBook { message AddressBook {
repeated Person person = 1; repeated Person person = 1;
} }

View File

@ -1,68 +1,68 @@
// See README.txt for information and build instructions. // See README.txt for information and build instructions.
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <string> #include <string>
#include "addressbook.pb.h" #include "addressbook.pb.h"
using namespace std; using namespace std;
// Iterates though all people in the AddressBook and prints info about them. // Iterates though all people in the AddressBook and prints info about them.
void ListPeople(const tutorial::AddressBook& address_book) { void ListPeople(const tutorial::AddressBook& address_book) {
for (int i = 0; i < address_book.person_size(); i++) { for (int i = 0; i < address_book.person_size(); i++) {
const tutorial::Person& person = address_book.person(i); const tutorial::Person& person = address_book.person(i);
cout << "Person ID: " << person.id() << endl; cout << "Person ID: " << person.id() << endl;
cout << " Name: " << person.name() << endl; cout << " Name: " << person.name() << endl;
if (person.has_email()) { if (person.has_email()) {
cout << " E-mail address: " << person.email() << endl; cout << " E-mail address: " << person.email() << endl;
} }
for (int j = 0; j < person.phone_size(); j++) { for (int j = 0; j < person.phone_size(); j++) {
const tutorial::Person::PhoneNumber& phone_number = person.phone(j); const tutorial::Person::PhoneNumber& phone_number = person.phone(j);
switch (phone_number.type()) { switch (phone_number.type()) {
case tutorial::Person::MOBILE: case tutorial::Person::MOBILE:
cout << " Mobile phone #: "; cout << " Mobile phone #: ";
break; break;
case tutorial::Person::HOME: case tutorial::Person::HOME:
cout << " Home phone #: "; cout << " Home phone #: ";
break; break;
case tutorial::Person::WORK: case tutorial::Person::WORK:
cout << " Work phone #: "; cout << " Work phone #: ";
break; break;
} }
cout << phone_number.number() << endl; cout << phone_number.number() << endl;
} }
} }
} }
// Main function: Reads the entire address book from a file and prints all // Main function: Reads the entire address book from a file and prints all
// the information inside. // the information inside.
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
// Verify that the version of the library that we linked against is // Verify that the version of the library that we linked against is
// compatible with the version of the headers we compiled against. // compatible with the version of the headers we compiled against.
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
if (argc != 2) { if (argc != 2) {
cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl; cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl;
return -1; return -1;
} }
tutorial::AddressBook address_book; tutorial::AddressBook address_book;
{ {
// Read the existing address book. // Read the existing address book.
fstream input(argv[1], ios::in | ios::binary); fstream input(argv[1], ios::in | ios::binary);
if (!address_book.ParseFromIstream(&input)) { if (!address_book.ParseFromIstream(&input)) {
cerr << "Failed to parse address book." << endl; cerr << "Failed to parse address book." << endl;
return -1; return -1;
} }
} }
ListPeople(address_book); ListPeople(address_book);
// Optional: Delete all global objects allocated by libprotobuf. // Optional: Delete all global objects allocated by libprotobuf.
google::protobuf::ShutdownProtobufLibrary(); google::protobuf::ShutdownProtobufLibrary();
return 0; return 0;
} }

0
mp/src/thirdparty/protobuf-2.3.0/generate_descriptor_proto.sh vendored Normal file → Executable file
View File

View File

@ -1,441 +1,441 @@
# Automake file # Automake file
# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump. # TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump.
# Nonstandard package files for distribution # Nonstandard package files for distribution
EXTRA_DIST = \ EXTRA_DIST = \
CHANGES \ CHANGES \
CONTRIBUTORS \ CONTRIBUTORS \
include/gtest/gtest-param-test.h.pump \ include/gtest/gtest-param-test.h.pump \
include/gtest/internal/gtest-tuple.h.pump \ include/gtest/internal/gtest-tuple.h.pump \
include/gtest/internal/gtest-type-util.h.pump \ include/gtest/internal/gtest-type-util.h.pump \
include/gtest/internal/gtest-param-util-generated.h.pump \ include/gtest/internal/gtest-param-util-generated.h.pump \
make/Makefile \ make/Makefile \
scons/SConscript \ scons/SConscript \
scons/SConstruct \ scons/SConstruct \
scons/SConstruct.common \ scons/SConstruct.common \
scripts/fuse_gtest_files.py \ scripts/fuse_gtest_files.py \
scripts/gen_gtest_pred_impl.py \ scripts/gen_gtest_pred_impl.py \
scripts/test/Makefile \ scripts/test/Makefile \
test/gtest_all_test.cc test/gtest_all_test.cc
# MSVC project files # MSVC project files
EXTRA_DIST += \ EXTRA_DIST += \
msvc/gtest-md.sln \ msvc/gtest-md.sln \
msvc/gtest.sln \ msvc/gtest.sln \
msvc/gtest-md.vcproj \ msvc/gtest-md.vcproj \
msvc/gtest.vcproj \ msvc/gtest.vcproj \
msvc/gtest_main-md.vcproj \ msvc/gtest_main-md.vcproj \
msvc/gtest_main.vcproj \ msvc/gtest_main.vcproj \
msvc/gtest_prod_test-md.vcproj \ msvc/gtest_prod_test-md.vcproj \
msvc/gtest_prod_test.vcproj \ msvc/gtest_prod_test.vcproj \
msvc/gtest_unittest-md.vcproj \ msvc/gtest_unittest-md.vcproj \
msvc/gtest_unittest.vcproj msvc/gtest_unittest.vcproj
# xcode project files # xcode project files
EXTRA_DIST += \ EXTRA_DIST += \
xcode/Config/DebugProject.xcconfig \ xcode/Config/DebugProject.xcconfig \
xcode/Config/FrameworkTarget.xcconfig \ xcode/Config/FrameworkTarget.xcconfig \
xcode/Config/General.xcconfig \ xcode/Config/General.xcconfig \
xcode/Config/ReleaseProject.xcconfig \ xcode/Config/ReleaseProject.xcconfig \
xcode/Config/StaticLibraryTarget.xcconfig \ xcode/Config/StaticLibraryTarget.xcconfig \
xcode/Config/TestTarget.xcconfig \ xcode/Config/TestTarget.xcconfig \
xcode/Resources/Info.plist \ xcode/Resources/Info.plist \
xcode/Scripts/versiongenerate.py \ xcode/Scripts/versiongenerate.py \
xcode/Scripts/runtests.sh \ xcode/Scripts/runtests.sh \
xcode/gtest.xcodeproj/project.pbxproj xcode/gtest.xcodeproj/project.pbxproj
# xcode sample files # xcode sample files
EXTRA_DIST += \ EXTRA_DIST += \
xcode/Samples/FrameworkSample/Info.plist \ xcode/Samples/FrameworkSample/Info.plist \
xcode/Samples/FrameworkSample/widget_test.cc \ xcode/Samples/FrameworkSample/widget_test.cc \
xcode/Samples/FrameworkSample/widget.cc \ xcode/Samples/FrameworkSample/widget.cc \
xcode/Samples/FrameworkSample/widget.h \ xcode/Samples/FrameworkSample/widget.h \
xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj
# C++Builder project files # C++Builder project files
EXTRA_DIST += \ EXTRA_DIST += \
codegear/gtest_all.cc \ codegear/gtest_all.cc \
codegear/gtest_link.cc \ codegear/gtest_link.cc \
codegear/gtest.cbproj \ codegear/gtest.cbproj \
codegear/gtest_main.cbproj \ codegear/gtest_main.cbproj \
codegear/gtest_unittest.cbproj \ codegear/gtest_unittest.cbproj \
codegear/gtest.groupproj codegear/gtest.groupproj
# TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into # TODO(wan@google.com): integrate scripts/gen_gtest_pred_impl.py into
# the build system such that a user can specify the maximum predicate # the build system such that a user can specify the maximum predicate
# arity here and have the script automatically generate the # arity here and have the script automatically generate the
# corresponding .h and .cc files. # corresponding .h and .cc files.
# Scripts and utilities # Scripts and utilities
bin_SCRIPTS = scripts/gtest-config bin_SCRIPTS = scripts/gtest-config
CLEANFILES = $(bin_SCRIPTS) CLEANFILES = $(bin_SCRIPTS)
# Distribute and install M4 macro # Distribute and install M4 macro
m4datadir = $(datadir)/aclocal m4datadir = $(datadir)/aclocal
m4data_DATA = m4/gtest.m4 m4data_DATA = m4/gtest.m4
EXTRA_DIST += $(m4data_DATA) EXTRA_DIST += $(m4data_DATA)
# We define the global AM_CPPFLAGS as everything we compile includes from these # We define the global AM_CPPFLAGS as everything we compile includes from these
# directories. # directories.
AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/include
# Build rules for libraries. # Build rules for libraries.
lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la
lib_libgtest_la_SOURCES = src/gtest.cc \ lib_libgtest_la_SOURCES = src/gtest.cc \
src/gtest-death-test.cc \ src/gtest-death-test.cc \
src/gtest-filepath.cc \ src/gtest-filepath.cc \
src/gtest-internal-inl.h \ src/gtest-internal-inl.h \
src/gtest-port.cc \ src/gtest-port.cc \
src/gtest-test-part.cc \ src/gtest-test-part.cc \
src/gtest-typed-test.cc src/gtest-typed-test.cc
pkginclude_HEADERS = include/gtest/gtest.h \ pkginclude_HEADERS = include/gtest/gtest.h \
include/gtest/gtest-death-test.h \ include/gtest/gtest-death-test.h \
include/gtest/gtest-message.h \ include/gtest/gtest-message.h \
include/gtest/gtest-param-test.h \ include/gtest/gtest-param-test.h \
include/gtest/gtest_pred_impl.h \ include/gtest/gtest_pred_impl.h \
include/gtest/gtest_prod.h \ include/gtest/gtest_prod.h \
include/gtest/gtest-spi.h \ include/gtest/gtest-spi.h \
include/gtest/gtest-test-part.h \ include/gtest/gtest-test-part.h \
include/gtest/gtest-typed-test.h include/gtest/gtest-typed-test.h
pkginclude_internaldir = $(pkgincludedir)/internal pkginclude_internaldir = $(pkgincludedir)/internal
pkginclude_internal_HEADERS = \ pkginclude_internal_HEADERS = \
include/gtest/internal/gtest-death-test-internal.h \ include/gtest/internal/gtest-death-test-internal.h \
include/gtest/internal/gtest-filepath.h \ include/gtest/internal/gtest-filepath.h \
include/gtest/internal/gtest-internal.h \ include/gtest/internal/gtest-internal.h \
include/gtest/internal/gtest-linked_ptr.h \ include/gtest/internal/gtest-linked_ptr.h \
include/gtest/internal/gtest-param-util-generated.h \ include/gtest/internal/gtest-param-util-generated.h \
include/gtest/internal/gtest-param-util.h \ include/gtest/internal/gtest-param-util.h \
include/gtest/internal/gtest-port.h \ include/gtest/internal/gtest-port.h \
include/gtest/internal/gtest-string.h \ include/gtest/internal/gtest-string.h \
include/gtest/internal/gtest-tuple.h \ include/gtest/internal/gtest-tuple.h \
include/gtest/internal/gtest-type-util.h include/gtest/internal/gtest-type-util.h
lib_libgtest_main_la_SOURCES = src/gtest_main.cc lib_libgtest_main_la_SOURCES = src/gtest_main.cc
lib_libgtest_main_la_LIBADD = lib/libgtest.la lib_libgtest_main_la_LIBADD = lib/libgtest.la
# Bulid rules for samples and tests. Automake's naming for some of # Bulid rules for samples and tests. Automake's naming for some of
# these variables isn't terribly obvious, so this is a brief # these variables isn't terribly obvious, so this is a brief
# reference: # reference:
# #
# TESTS -- Programs run automatically by "make check" # TESTS -- Programs run automatically by "make check"
# check_PROGRAMS -- Programs built by "make check" but not necessarily run # check_PROGRAMS -- Programs built by "make check" but not necessarily run
noinst_LTLIBRARIES = samples/libsamples.la noinst_LTLIBRARIES = samples/libsamples.la
samples_libsamples_la_SOURCES = samples/sample1.cc \ samples_libsamples_la_SOURCES = samples/sample1.cc \
samples/sample1.h \ samples/sample1.h \
samples/sample2.cc \ samples/sample2.cc \
samples/sample2.h \ samples/sample2.h \
samples/sample3-inl.h \ samples/sample3-inl.h \
samples/sample4.cc \ samples/sample4.cc \
samples/sample4.h samples/sample4.h
TESTS= TESTS=
TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \ TESTS_ENVIRONMENT = GTEST_SOURCE_DIR="$(srcdir)/test" \
GTEST_BUILD_DIR="$(top_builddir)/test" GTEST_BUILD_DIR="$(top_builddir)/test"
check_PROGRAMS= check_PROGRAMS=
TESTS += samples/sample1_unittest TESTS += samples/sample1_unittest
check_PROGRAMS += samples/sample1_unittest check_PROGRAMS += samples/sample1_unittest
samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc samples_sample1_unittest_SOURCES = samples/sample1_unittest.cc
samples_sample1_unittest_LDADD = lib/libgtest_main.la \ samples_sample1_unittest_LDADD = lib/libgtest_main.la \
samples/libsamples.la samples/libsamples.la
TESTS += samples/sample2_unittest TESTS += samples/sample2_unittest
check_PROGRAMS += samples/sample2_unittest check_PROGRAMS += samples/sample2_unittest
samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc samples_sample2_unittest_SOURCES = samples/sample2_unittest.cc
samples_sample2_unittest_LDADD = lib/libgtest_main.la \ samples_sample2_unittest_LDADD = lib/libgtest_main.la \
samples/libsamples.la samples/libsamples.la
TESTS += samples/sample3_unittest TESTS += samples/sample3_unittest
check_PROGRAMS += samples/sample3_unittest check_PROGRAMS += samples/sample3_unittest
samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc samples_sample3_unittest_SOURCES = samples/sample3_unittest.cc
samples_sample3_unittest_LDADD = lib/libgtest_main.la \ samples_sample3_unittest_LDADD = lib/libgtest_main.la \
samples/libsamples.la samples/libsamples.la
TESTS += samples/sample4_unittest TESTS += samples/sample4_unittest
check_PROGRAMS += samples/sample4_unittest check_PROGRAMS += samples/sample4_unittest
samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc samples_sample4_unittest_SOURCES = samples/sample4_unittest.cc
samples_sample4_unittest_LDADD = lib/libgtest_main.la \ samples_sample4_unittest_LDADD = lib/libgtest_main.la \
samples/libsamples.la samples/libsamples.la
TESTS += samples/sample5_unittest TESTS += samples/sample5_unittest
check_PROGRAMS += samples/sample5_unittest check_PROGRAMS += samples/sample5_unittest
samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc samples_sample5_unittest_SOURCES = samples/sample5_unittest.cc
samples_sample5_unittest_LDADD = lib/libgtest_main.la \ samples_sample5_unittest_LDADD = lib/libgtest_main.la \
samples/libsamples.la samples/libsamples.la
TESTS += samples/sample6_unittest TESTS += samples/sample6_unittest
check_PROGRAMS += samples/sample6_unittest check_PROGRAMS += samples/sample6_unittest
samples_sample6_unittest_SOURCES = samples/prime_tables.h \ samples_sample6_unittest_SOURCES = samples/prime_tables.h \
samples/sample6_unittest.cc samples/sample6_unittest.cc
samples_sample6_unittest_LDADD = lib/libgtest_main.la samples_sample6_unittest_LDADD = lib/libgtest_main.la
TESTS += samples/sample7_unittest TESTS += samples/sample7_unittest
check_PROGRAMS += samples/sample7_unittest check_PROGRAMS += samples/sample7_unittest
samples_sample7_unittest_SOURCES = samples/prime_tables.h \ samples_sample7_unittest_SOURCES = samples/prime_tables.h \
samples/sample7_unittest.cc samples/sample7_unittest.cc
samples_sample7_unittest_LDADD = lib/libgtest_main.la samples_sample7_unittest_LDADD = lib/libgtest_main.la
TESTS += samples/sample8_unittest TESTS += samples/sample8_unittest
check_PROGRAMS += samples/sample8_unittest check_PROGRAMS += samples/sample8_unittest
samples_sample8_unittest_SOURCES = samples/prime_tables.h \ samples_sample8_unittest_SOURCES = samples/prime_tables.h \
samples/sample8_unittest.cc samples/sample8_unittest.cc
samples_sample8_unittest_LDADD = lib/libgtest_main.la samples_sample8_unittest_LDADD = lib/libgtest_main.la
TESTS += samples/sample9_unittest TESTS += samples/sample9_unittest
check_PROGRAMS += samples/sample9_unittest check_PROGRAMS += samples/sample9_unittest
samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc samples_sample9_unittest_SOURCES = samples/sample9_unittest.cc
samples_sample9_unittest_LDADD = lib/libgtest.la samples_sample9_unittest_LDADD = lib/libgtest.la
TESTS += samples/sample10_unittest TESTS += samples/sample10_unittest
check_PROGRAMS += samples/sample10_unittest check_PROGRAMS += samples/sample10_unittest
samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc samples_sample10_unittest_SOURCES = samples/sample10_unittest.cc
samples_sample10_unittest_LDADD = lib/libgtest.la samples_sample10_unittest_LDADD = lib/libgtest.la
TESTS += test/gtest-death-test_test TESTS += test/gtest-death-test_test
check_PROGRAMS += test/gtest-death-test_test check_PROGRAMS += test/gtest-death-test_test
test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc test_gtest_death_test_test_SOURCES = test/gtest-death-test_test.cc
test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS) test_gtest_death_test_test_CXXFLAGS = $(AM_CXXFLAGS) $(PTHREAD_CFLAGS)
test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \ test_gtest_death_test_test_LDADD = $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) \
lib/libgtest_main.la lib/libgtest_main.la
TESTS += test/gtest_environment_test TESTS += test/gtest_environment_test
check_PROGRAMS += test/gtest_environment_test check_PROGRAMS += test/gtest_environment_test
test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc test_gtest_environment_test_SOURCES = test/gtest_environment_test.cc
test_gtest_environment_test_LDADD = lib/libgtest.la test_gtest_environment_test_LDADD = lib/libgtest.la
TESTS += test/gtest-filepath_test TESTS += test/gtest-filepath_test
check_PROGRAMS += test/gtest-filepath_test check_PROGRAMS += test/gtest-filepath_test
test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc test_gtest_filepath_test_SOURCES = test/gtest-filepath_test.cc
test_gtest_filepath_test_LDADD = lib/libgtest_main.la test_gtest_filepath_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest-linked_ptr_test TESTS += test/gtest-linked_ptr_test
check_PROGRAMS += test/gtest-linked_ptr_test check_PROGRAMS += test/gtest-linked_ptr_test
test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc test_gtest_linked_ptr_test_SOURCES = test/gtest-linked_ptr_test.cc
test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la test_gtest_linked_ptr_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_main_unittest TESTS += test/gtest_main_unittest
check_PROGRAMS += test/gtest_main_unittest check_PROGRAMS += test/gtest_main_unittest
test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc test_gtest_main_unittest_SOURCES = test/gtest_main_unittest.cc
test_gtest_main_unittest_LDADD = lib/libgtest_main.la test_gtest_main_unittest_LDADD = lib/libgtest_main.la
TESTS += test/gtest-message_test TESTS += test/gtest-message_test
check_PROGRAMS += test/gtest-message_test check_PROGRAMS += test/gtest-message_test
test_gtest_message_test_SOURCES = test/gtest-message_test.cc test_gtest_message_test_SOURCES = test/gtest-message_test.cc
test_gtest_message_test_LDADD = lib/libgtest_main.la test_gtest_message_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_no_test_unittest TESTS += test/gtest_no_test_unittest
check_PROGRAMS += test/gtest_no_test_unittest check_PROGRAMS += test/gtest_no_test_unittest
test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc test_gtest_no_test_unittest_SOURCES = test/gtest_no_test_unittest.cc
test_gtest_no_test_unittest_LDADD = lib/libgtest.la test_gtest_no_test_unittest_LDADD = lib/libgtest.la
TESTS += test/gtest-options_test TESTS += test/gtest-options_test
check_PROGRAMS += test/gtest-options_test check_PROGRAMS += test/gtest-options_test
test_gtest_options_test_SOURCES = test/gtest-options_test.cc test_gtest_options_test_SOURCES = test/gtest-options_test.cc
test_gtest_options_test_LDADD = lib/libgtest_main.la test_gtest_options_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest-param-test_test TESTS += test/gtest-param-test_test
check_PROGRAMS += test/gtest-param-test_test check_PROGRAMS += test/gtest-param-test_test
test_gtest_param_test_test_SOURCES = test/gtest-param-test_test.cc \ test_gtest_param_test_test_SOURCES = test/gtest-param-test_test.cc \
test/gtest-param-test2_test.cc \ test/gtest-param-test2_test.cc \
test/gtest-param-test_test.h test/gtest-param-test_test.h
test_gtest_param_test_test_LDADD = lib/libgtest.la test_gtest_param_test_test_LDADD = lib/libgtest.la
TESTS += test/gtest-port_test TESTS += test/gtest-port_test
check_PROGRAMS += test/gtest-port_test check_PROGRAMS += test/gtest-port_test
test_gtest_port_test_SOURCES = test/gtest-port_test.cc test_gtest_port_test_SOURCES = test/gtest-port_test.cc
test_gtest_port_test_LDADD = lib/libgtest_main.la test_gtest_port_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_pred_impl_unittest TESTS += test/gtest_pred_impl_unittest
check_PROGRAMS += test/gtest_pred_impl_unittest check_PROGRAMS += test/gtest_pred_impl_unittest
test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc test_gtest_pred_impl_unittest_SOURCES = test/gtest_pred_impl_unittest.cc
test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la test_gtest_pred_impl_unittest_LDADD = lib/libgtest_main.la
TESTS += test/gtest_prod_test TESTS += test/gtest_prod_test
check_PROGRAMS += test/gtest_prod_test check_PROGRAMS += test/gtest_prod_test
test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \ test_gtest_prod_test_SOURCES = test/gtest_prod_test.cc \
test/production.cc \ test/production.cc \
test/production.h test/production.h
test_gtest_prod_test_LDADD = lib/libgtest_main.la test_gtest_prod_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_repeat_test TESTS += test/gtest_repeat_test
check_PROGRAMS += test/gtest_repeat_test check_PROGRAMS += test/gtest_repeat_test
test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc test_gtest_repeat_test_SOURCES = test/gtest_repeat_test.cc
test_gtest_repeat_test_LDADD = lib/libgtest.la test_gtest_repeat_test_LDADD = lib/libgtest.la
TESTS += test/gtest_sole_header_test TESTS += test/gtest_sole_header_test
check_PROGRAMS += test/gtest_sole_header_test check_PROGRAMS += test/gtest_sole_header_test
test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc test_gtest_sole_header_test_SOURCES = test/gtest_sole_header_test.cc
test_gtest_sole_header_test_LDADD = lib/libgtest_main.la test_gtest_sole_header_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_stress_test TESTS += test/gtest_stress_test
check_PROGRAMS += test/gtest_stress_test check_PROGRAMS += test/gtest_stress_test
test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc test_gtest_stress_test_SOURCES = test/gtest_stress_test.cc
test_gtest_stress_test_LDADD = lib/libgtest.la test_gtest_stress_test_LDADD = lib/libgtest.la
TESTS += test/gtest-test-part_test TESTS += test/gtest-test-part_test
check_PROGRAMS += test/gtest-test-part_test check_PROGRAMS += test/gtest-test-part_test
test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc test_gtest_test_part_test_SOURCES = test/gtest-test-part_test.cc
test_gtest_test_part_test_LDADD = lib/libgtest_main.la test_gtest_test_part_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_throw_on_failure_ex_test TESTS += test/gtest_throw_on_failure_ex_test
check_PROGRAMS += test/gtest_throw_on_failure_ex_test check_PROGRAMS += test/gtest_throw_on_failure_ex_test
test_gtest_throw_on_failure_ex_test_SOURCES = \ test_gtest_throw_on_failure_ex_test_SOURCES = \
test/gtest_throw_on_failure_ex_test.cc \ test/gtest_throw_on_failure_ex_test.cc \
src/gtest-all.cc src/gtest-all.cc
test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions test_gtest_throw_on_failure_ex_test_CXXFLAGS = $(AM_CXXFLAGS) -fexceptions
TESTS += test/gtest-typed-test_test TESTS += test/gtest-typed-test_test
check_PROGRAMS += test/gtest-typed-test_test check_PROGRAMS += test/gtest-typed-test_test
test_gtest_typed_test_test_SOURCES = test/gtest-typed-test_test.cc \ test_gtest_typed_test_test_SOURCES = test/gtest-typed-test_test.cc \
test/gtest-typed-test2_test.cc \ test/gtest-typed-test2_test.cc \
test/gtest-typed-test_test.h test/gtest-typed-test_test.h
test_gtest_typed_test_test_LDADD = lib/libgtest_main.la test_gtest_typed_test_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest_unittest TESTS += test/gtest_unittest
check_PROGRAMS += test/gtest_unittest check_PROGRAMS += test/gtest_unittest
test_gtest_unittest_SOURCES = test/gtest_unittest.cc test_gtest_unittest_SOURCES = test/gtest_unittest.cc
test_gtest_unittest_LDADD = lib/libgtest_main.la test_gtest_unittest_LDADD = lib/libgtest_main.la
TESTS += test/gtest-unittest-api_test TESTS += test/gtest-unittest-api_test
check_PROGRAMS += test/gtest-unittest-api_test check_PROGRAMS += test/gtest-unittest-api_test
test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc test_gtest_unittest_api_test_SOURCES = test/gtest-unittest-api_test.cc
test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la test_gtest_unittest_api_test_LDADD = lib/libgtest_main.la
TESTS += test/gtest-listener_test TESTS += test/gtest-listener_test
check_PROGRAMS += test/gtest-listener_test check_PROGRAMS += test/gtest-listener_test
test_gtest_listener_test_SOURCES = test/gtest-listener_test.cc test_gtest_listener_test_SOURCES = test/gtest-listener_test.cc
test_gtest_listener_test_LDADD = lib/libgtest_main.la test_gtest_listener_test_LDADD = lib/libgtest_main.la
# Verifies that Google Test works when RTTI is disabled. # Verifies that Google Test works when RTTI is disabled.
TESTS += test/gtest_no_rtti_test TESTS += test/gtest_no_rtti_test
check_PROGRAMS += test/gtest_no_rtti_test check_PROGRAMS += test/gtest_no_rtti_test
test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \ test_gtest_no_rtti_test_SOURCES = test/gtest_unittest.cc \
src/gtest-all.cc \ src/gtest-all.cc \
src/gtest_main.cc src/gtest_main.cc
test_gtest_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0 test_gtest_no_rtti_test_CXXFLAGS = $(AM_CXXFLAGS) -fno-rtti -DGTEST_HAS_RTTI=0
# Verifies that Google Test's own TR1 tuple implementation works. # Verifies that Google Test's own TR1 tuple implementation works.
TESTS += test/gtest-tuple_test TESTS += test/gtest-tuple_test
check_PROGRAMS += test/gtest-tuple_test check_PROGRAMS += test/gtest-tuple_test
test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \ test_gtest_tuple_test_SOURCES = test/gtest-tuple_test.cc \
src/gtest-all.cc \ src/gtest-all.cc \
src/gtest_main.cc src/gtest_main.cc
test_gtest_tuple_test_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 test_gtest_tuple_test_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1
# Verifies that Google Test's features that use its own TR1 tuple work. # Verifies that Google Test's features that use its own TR1 tuple work.
TESTS += test/gtest_use_own_tuple_test TESTS += test/gtest_use_own_tuple_test
check_PROGRAMS += test/gtest_use_own_tuple_test check_PROGRAMS += test/gtest_use_own_tuple_test
test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \ test_gtest_use_own_tuple_test_SOURCES = test/gtest-param-test_test.cc \
test/gtest-param-test2_test.cc \ test/gtest-param-test2_test.cc \
src/gtest-all.cc src/gtest-all.cc
test_gtest_use_own_tuple_test_CXXFLAGS = \ test_gtest_use_own_tuple_test_CXXFLAGS = \
$(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1 $(AM_CXXFLAGS) -DGTEST_USE_OWN_TR1_TUPLE=1
# The following tests depend on the presence of a Python installation and are # The following tests depend on the presence of a Python installation and are
# keyed off of it. TODO(chandlerc@google.com): While we currently only attempt # keyed off of it. TODO(chandlerc@google.com): While we currently only attempt
# to build and execute these tests if Autoconf has found Python v2.4 on the # to build and execute these tests if Autoconf has found Python v2.4 on the
# system, we don't use the PYTHON variable it specified as the valid # system, we don't use the PYTHON variable it specified as the valid
# interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and # interpreter. The problem is that TESTS_ENVIRONMENT is a global variable, and
# thus we cannot distinguish between C++ unit tests and Python unit tests. # thus we cannot distinguish between C++ unit tests and Python unit tests.
if HAVE_PYTHON if HAVE_PYTHON
check_SCRIPTS = check_SCRIPTS =
# These two Python modules are used by multiple Python tests below. # These two Python modules are used by multiple Python tests below.
check_SCRIPTS += test/gtest_test_utils.py \ check_SCRIPTS += test/gtest_test_utils.py \
test/gtest_xml_test_utils.py test/gtest_xml_test_utils.py
check_PROGRAMS += test/gtest_break_on_failure_unittest_ check_PROGRAMS += test/gtest_break_on_failure_unittest_
test_gtest_break_on_failure_unittest__SOURCES = \ test_gtest_break_on_failure_unittest__SOURCES = \
test/gtest_break_on_failure_unittest_.cc test/gtest_break_on_failure_unittest_.cc
test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la test_gtest_break_on_failure_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_break_on_failure_unittest.py check_SCRIPTS += test/gtest_break_on_failure_unittest.py
TESTS += test/gtest_break_on_failure_unittest.py TESTS += test/gtest_break_on_failure_unittest.py
check_PROGRAMS += test/gtest_color_test_ check_PROGRAMS += test/gtest_color_test_
test_gtest_color_test__SOURCES = test/gtest_color_test_.cc test_gtest_color_test__SOURCES = test/gtest_color_test_.cc
test_gtest_color_test__LDADD = lib/libgtest.la test_gtest_color_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_color_test.py check_SCRIPTS += test/gtest_color_test.py
TESTS += test/gtest_color_test.py TESTS += test/gtest_color_test.py
check_PROGRAMS += test/gtest_env_var_test_ check_PROGRAMS += test/gtest_env_var_test_
test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc test_gtest_env_var_test__SOURCES = test/gtest_env_var_test_.cc
test_gtest_env_var_test__LDADD = lib/libgtest.la test_gtest_env_var_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_env_var_test.py check_SCRIPTS += test/gtest_env_var_test.py
TESTS += test/gtest_env_var_test.py TESTS += test/gtest_env_var_test.py
check_PROGRAMS += test/gtest_filter_unittest_ check_PROGRAMS += test/gtest_filter_unittest_
test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc test_gtest_filter_unittest__SOURCES = test/gtest_filter_unittest_.cc
test_gtest_filter_unittest__LDADD = lib/libgtest.la test_gtest_filter_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_filter_unittest.py check_SCRIPTS += test/gtest_filter_unittest.py
TESTS += test/gtest_filter_unittest.py TESTS += test/gtest_filter_unittest.py
check_PROGRAMS += test/gtest_help_test_ check_PROGRAMS += test/gtest_help_test_
test_gtest_help_test__SOURCES = test/gtest_help_test_.cc test_gtest_help_test__SOURCES = test/gtest_help_test_.cc
test_gtest_help_test__LDADD = lib/libgtest_main.la test_gtest_help_test__LDADD = lib/libgtest_main.la
check_SCRIPTS += test/gtest_help_test.py check_SCRIPTS += test/gtest_help_test.py
TESTS += test/gtest_help_test.py TESTS += test/gtest_help_test.py
check_PROGRAMS += test/gtest_list_tests_unittest_ check_PROGRAMS += test/gtest_list_tests_unittest_
test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc test_gtest_list_tests_unittest__SOURCES = test/gtest_list_tests_unittest_.cc
test_gtest_list_tests_unittest__LDADD = lib/libgtest.la test_gtest_list_tests_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_list_tests_unittest.py check_SCRIPTS += test/gtest_list_tests_unittest.py
TESTS += test/gtest_list_tests_unittest.py TESTS += test/gtest_list_tests_unittest.py
check_PROGRAMS += test/gtest_output_test_ check_PROGRAMS += test/gtest_output_test_
test_gtest_output_test__SOURCES = test/gtest_output_test_.cc test_gtest_output_test__SOURCES = test/gtest_output_test_.cc
test_gtest_output_test__LDADD = lib/libgtest.la test_gtest_output_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_output_test.py check_SCRIPTS += test/gtest_output_test.py
EXTRA_DIST += test/gtest_output_test_golden_lin.txt \ EXTRA_DIST += test/gtest_output_test_golden_lin.txt \
test/gtest_output_test_golden_win.txt test/gtest_output_test_golden_win.txt
TESTS += test/gtest_output_test.py TESTS += test/gtest_output_test.py
check_PROGRAMS += test/gtest_shuffle_test_ check_PROGRAMS += test/gtest_shuffle_test_
test_gtest_shuffle_test__SOURCES = test/gtest_shuffle_test_.cc test_gtest_shuffle_test__SOURCES = test/gtest_shuffle_test_.cc
test_gtest_shuffle_test__LDADD = lib/libgtest.la test_gtest_shuffle_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_shuffle_test.py check_SCRIPTS += test/gtest_shuffle_test.py
TESTS += test/gtest_shuffle_test.py TESTS += test/gtest_shuffle_test.py
check_PROGRAMS += test/gtest_throw_on_failure_test_ check_PROGRAMS += test/gtest_throw_on_failure_test_
test_gtest_throw_on_failure_test__SOURCES = \ test_gtest_throw_on_failure_test__SOURCES = \
test/gtest_throw_on_failure_test_.cc \ test/gtest_throw_on_failure_test_.cc \
src/gtest-all.cc src/gtest-all.cc
test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions test_gtest_throw_on_failure_test__CXXFLAGS = $(AM_CXXFLAGS) -fno-exceptions
check_SCRIPTS += test/gtest_throw_on_failure_test.py check_SCRIPTS += test/gtest_throw_on_failure_test.py
TESTS += test/gtest_throw_on_failure_test.py TESTS += test/gtest_throw_on_failure_test.py
check_PROGRAMS += test/gtest_uninitialized_test_ check_PROGRAMS += test/gtest_uninitialized_test_
test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc test_gtest_uninitialized_test__SOURCES = test/gtest_uninitialized_test_.cc
test_gtest_uninitialized_test__LDADD = lib/libgtest.la test_gtest_uninitialized_test__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_uninitialized_test.py check_SCRIPTS += test/gtest_uninitialized_test.py
TESTS += test/gtest_uninitialized_test.py TESTS += test/gtest_uninitialized_test.py
check_PROGRAMS += test/gtest_xml_outfile1_test_ check_PROGRAMS += test/gtest_xml_outfile1_test_
test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc test_gtest_xml_outfile1_test__SOURCES = test/gtest_xml_outfile1_test_.cc
test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la test_gtest_xml_outfile1_test__LDADD = lib/libgtest_main.la
check_PROGRAMS += test/gtest_xml_outfile2_test_ check_PROGRAMS += test/gtest_xml_outfile2_test_
test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc test_gtest_xml_outfile2_test__SOURCES = test/gtest_xml_outfile2_test_.cc
test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la test_gtest_xml_outfile2_test__LDADD = lib/libgtest_main.la
check_SCRIPTS += test/gtest_xml_outfiles_test.py check_SCRIPTS += test/gtest_xml_outfiles_test.py
TESTS += test/gtest_xml_outfiles_test.py TESTS += test/gtest_xml_outfiles_test.py
check_PROGRAMS += test/gtest_xml_output_unittest_ check_PROGRAMS += test/gtest_xml_output_unittest_
test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc test_gtest_xml_output_unittest__SOURCES = test/gtest_xml_output_unittest_.cc
test_gtest_xml_output_unittest__LDADD = lib/libgtest.la test_gtest_xml_output_unittest__LDADD = lib/libgtest.la
check_SCRIPTS += test/gtest_xml_output_unittest.py check_SCRIPTS += test/gtest_xml_output_unittest.py
TESTS += test/gtest_xml_output_unittest.py TESTS += test/gtest_xml_output_unittest.py
# TODO(wan@google.com): make the build script compile and run the # TODO(wan@google.com): make the build script compile and run the
# negative-compilation tests. (The test/gtest_nc* files are unfinished # negative-compilation tests. (The test/gtest_nc* files are unfinished
# implementation of tests for verifying that certain kinds of misuse # implementation of tests for verifying that certain kinds of misuse
# of Google Test don't compile.) # of Google Test don't compile.)
EXTRA_DIST += $(check_SCRIPTS) \ EXTRA_DIST += $(check_SCRIPTS) \
test/gtest_nc.cc \ test/gtest_nc.cc \
test/gtest_nc_test.py test/gtest_nc_test.py
endif endif

File diff suppressed because it is too large Load Diff

View File

@ -1,318 +1,318 @@
Google C++ Testing Framework Google C++ Testing Framework
============================ ============================
http://code.google.com/p/googletest/ http://code.google.com/p/googletest/
Overview Overview
-------- --------
Google's framework for writing C++ tests on a variety of platforms (Linux, Mac Google's framework for writing C++ tests on a variety of platforms (Linux, Mac
OS X, Windows, Windows CE, Symbian, and etc). Based on the xUnit architecture. OS X, Windows, Windows CE, Symbian, and etc). Based on the xUnit architecture.
Supports automatic test discovery, a rich set of assertions, user-defined Supports automatic test discovery, a rich set of assertions, user-defined
assertions, death tests, fatal and non-fatal failures, various options for assertions, death tests, fatal and non-fatal failures, various options for
running the tests, and XML test report generation. running the tests, and XML test report generation.
Please see the project page above for more information as well as mailing lists Please see the project page above for more information as well as mailing lists
for questions, discussions, and development. There is also an IRC channel on for questions, discussions, and development. There is also an IRC channel on
OFTC (irc.oftc.net) #gtest available. Please join us! OFTC (irc.oftc.net) #gtest available. Please join us!
Requirements Requirements
------------ ------------
Google Test is designed to have fairly minimal requirements to build Google Test is designed to have fairly minimal requirements to build
and use with your projects, but there are some. Currently, we support and use with your projects, but there are some. Currently, we support
building Google Test on Linux, Windows, Mac OS X, and Cygwin. We will building Google Test on Linux, Windows, Mac OS X, and Cygwin. We will
also make our best effort to support other platforms (e.g. Solaris and also make our best effort to support other platforms (e.g. Solaris and
IBM z/OS). However, since core members of the Google Test project IBM z/OS). However, since core members of the Google Test project
have no access to them, Google Test may have outstanding issues on have no access to them, Google Test may have outstanding issues on
these platforms. If you notice any problems on your platform, please these platforms. If you notice any problems on your platform, please
notify googletestframework@googlegroups.com (patches for fixing them notify googletestframework@googlegroups.com (patches for fixing them
are even more welcome!). are even more welcome!).
### Linux Requirements ### ### Linux Requirements ###
These are the base requirements to build and use Google Test from a source These are the base requirements to build and use Google Test from a source
package (as described below): package (as described below):
* GNU-compatible Make or "gmake" * GNU-compatible Make or "gmake"
* POSIX-standard shell * POSIX-standard shell
* POSIX(-2) Regular Expressions (regex.h) * POSIX(-2) Regular Expressions (regex.h)
* A C++98 standards compliant compiler * A C++98 standards compliant compiler
Furthermore, if you are building Google Test from a VCS Checkout (also Furthermore, if you are building Google Test from a VCS Checkout (also
described below), there are further requirements: described below), there are further requirements:
* Automake version 1.9 or newer * Automake version 1.9 or newer
* Autoconf version 2.59 or newer * Autoconf version 2.59 or newer
* Libtool / Libtoolize * Libtool / Libtoolize
* Python version 2.4 or newer * Python version 2.4 or newer
### Windows Requirements ### ### Windows Requirements ###
* Microsoft Visual Studio 7.1 or newer * Microsoft Visual Studio 7.1 or newer
### Cygwin Requirements ### ### Cygwin Requirements ###
* Cygwin 1.5.25-14 or newer * Cygwin 1.5.25-14 or newer
### Mac OS X Requirements ### ### Mac OS X Requirements ###
* Mac OS X 10.4 Tiger or newer * Mac OS X 10.4 Tiger or newer
* Developer Tools Installed * Developer Tools Installed
* Optional: Xcode 2.5 or later for univeral-binary framework; see note below. * Optional: Xcode 2.5 or later for univeral-binary framework; see note below.
Getting the Source Getting the Source
------------------ ------------------
There are two primary ways of getting Google Test's source code: you can There are two primary ways of getting Google Test's source code: you can
download a source release in your preferred archive format, or directly check download a source release in your preferred archive format, or directly check
out the source from a Version Control System (VCS, we use Google Code's out the source from a Version Control System (VCS, we use Google Code's
Subversion hosting). The VCS checkout requires a few extra steps and some extra Subversion hosting). The VCS checkout requires a few extra steps and some extra
software packages on your system, but lets you track development, and make software packages on your system, but lets you track development, and make
patches to contribute much more easily, so we highly encourage it. patches to contribute much more easily, so we highly encourage it.
### VCS Checkout: ### ### VCS Checkout: ###
The first step is to select whether you want to check out the main line of The first step is to select whether you want to check out the main line of
development on Google Test, or one of the released branches. The former will be development on Google Test, or one of the released branches. The former will be
much more active and have the latest features, but the latter provides much much more active and have the latest features, but the latter provides much
more stability and predictability. Choose whichever fits your needs best, and more stability and predictability. Choose whichever fits your needs best, and
proceed with the following Subversion commands: proceed with the following Subversion commands:
svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
or for a release version X.Y.*'s branch: or for a release version X.Y.*'s branch:
svn checkout http://googletest.googlecode.com/svn/branches/release-X.Y/ \ svn checkout http://googletest.googlecode.com/svn/branches/release-X.Y/ \
gtest-X.Y-svn gtest-X.Y-svn
Next you will need to prepare the GNU Autotools build system, if you Next you will need to prepare the GNU Autotools build system, if you
are using Linux, Mac OS X, or Cygwin. Enter the target directory of are using Linux, Mac OS X, or Cygwin. Enter the target directory of
the checkout command you used ('gtest-svn' or 'gtest-X.Y-svn' above) the checkout command you used ('gtest-svn' or 'gtest-X.Y-svn' above)
and proceed with the following command: and proceed with the following command:
autoreconf -fvi autoreconf -fvi
Once you have completed this step, you are ready to build the library. Note Once you have completed this step, you are ready to build the library. Note
that you should only need to complete this step once. The subsequent `make' that you should only need to complete this step once. The subsequent `make'
invocations will automatically re-generate the bits of the build system that invocations will automatically re-generate the bits of the build system that
need to be changed. need to be changed.
If your system uses older versions of the autotools, the above command will If your system uses older versions of the autotools, the above command will
fail. You may need to explicitly specify a version to use. For instance, if you fail. You may need to explicitly specify a version to use. For instance, if you
have both GNU Automake 1.4 and 1.9 installed and `automake' would invoke the have both GNU Automake 1.4 and 1.9 installed and `automake' would invoke the
1.4, use instead: 1.4, use instead:
AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -fvi
Make sure you're using the same version of automake and aclocal. Make sure you're using the same version of automake and aclocal.
### Source Package: ### ### Source Package: ###
Google Test is also released in source packages which can be downloaded from Google Test is also released in source packages which can be downloaded from
its Google Code download page[1]. Several different archive formats are its Google Code download page[1]. Several different archive formats are
provided, but the only difference is the tools used to manipulate them, and the provided, but the only difference is the tools used to manipulate them, and the
size of the resulting file. Download whichever you are most comfortable with. size of the resulting file. Download whichever you are most comfortable with.
[1] Google Test Downloads: http://code.google.com/p/googletest/downloads/list [1] Google Test Downloads: http://code.google.com/p/googletest/downloads/list
Once downloaded expand the archive using whichever tools you prefer for that Once downloaded expand the archive using whichever tools you prefer for that
type. This will always result in a new directory with the name "gtest-X.Y.Z" type. This will always result in a new directory with the name "gtest-X.Y.Z"
which contains all of the source code. Here are some examples in Linux: which contains all of the source code. Here are some examples in Linux:
tar -xvzf gtest-X.Y.Z.tar.gz tar -xvzf gtest-X.Y.Z.tar.gz
tar -xvjf gtest-X.Y.Z.tar.bz2 tar -xvjf gtest-X.Y.Z.tar.bz2
unzip gtest-X.Y.Z.zip unzip gtest-X.Y.Z.zip
Choosing a TR1 Tuple Library Choosing a TR1 Tuple Library
---------------------------- ----------------------------
Some Google Test features require the C++ Technical Report 1 (TR1) Some Google Test features require the C++ Technical Report 1 (TR1)
tuple library, which is not yet widely available with all compilers. tuple library, which is not yet widely available with all compilers.
The good news is that Google Test implements a subset of TR1 tuple The good news is that Google Test implements a subset of TR1 tuple
that's enough for its own need, and will automatically use this when that's enough for its own need, and will automatically use this when
the compiler doesn't provide TR1 tuple. the compiler doesn't provide TR1 tuple.
Usually you don't need to care about which tuple library Google Test Usually you don't need to care about which tuple library Google Test
uses. However, if your project already uses TR1 tuple, you need to uses. However, if your project already uses TR1 tuple, you need to
tell Google Test to use the same TR1 tuple library the rest of your tell Google Test to use the same TR1 tuple library the rest of your
project uses (this requirement is new in Google Test 1.4.0, so you may project uses (this requirement is new in Google Test 1.4.0, so you may
need to take care of it when upgrading from an earlier version), or need to take care of it when upgrading from an earlier version), or
the two tuple implementations will clash. To do that, add the two tuple implementations will clash. To do that, add
-DGTEST_USE_OWN_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=0
to the compiler flags while compiling Google Test and your tests. to the compiler flags while compiling Google Test and your tests.
If you don't want Google Test to use tuple at all, add If you don't want Google Test to use tuple at all, add
-DGTEST_HAS_TR1_TUPLE=0 -DGTEST_HAS_TR1_TUPLE=0
to the compiler flags. All features using tuple will be disabled in to the compiler flags. All features using tuple will be disabled in
this mode. this mode.
Building the Source Building the Source
------------------- -------------------
### Linux, Mac OS X (without Xcode), and Cygwin ### ### Linux, Mac OS X (without Xcode), and Cygwin ###
There are two primary options for building the source at this point: build it There are two primary options for building the source at this point: build it
inside the source code tree, or in a separate directory. We recommend building inside the source code tree, or in a separate directory. We recommend building
in a separate directory as that tends to produce both more consistent results in a separate directory as that tends to produce both more consistent results
and be easier to clean up should anything go wrong, but both patterns are and be easier to clean up should anything go wrong, but both patterns are
supported. The only hard restriction is that while the build directory can be supported. The only hard restriction is that while the build directory can be
a subdirectory of the source directory, the opposite is not possible and will a subdirectory of the source directory, the opposite is not possible and will
result in errors. Once you have selected where you wish to build Google Test, result in errors. Once you have selected where you wish to build Google Test,
create the directory if necessary, and enter it. The following steps apply for create the directory if necessary, and enter it. The following steps apply for
either approach by simply substituting the shell variable SRCDIR with "." for either approach by simply substituting the shell variable SRCDIR with "." for
building inside the source directory, and the relative path to the source building inside the source directory, and the relative path to the source
directory otherwise. directory otherwise.
${SRCDIR}/configure # Standard GNU configure script, --help for more info ${SRCDIR}/configure # Standard GNU configure script, --help for more info
make # Standard makefile following GNU conventions make # Standard makefile following GNU conventions
make check # Builds and runs all tests - all should pass make check # Builds and runs all tests - all should pass
Other programs will only be able to use Google Test's functionality if you Other programs will only be able to use Google Test's functionality if you
install it in a location which they can access, in Linux this is typically install it in a location which they can access, in Linux this is typically
under '/usr/local'. The following command will install all of the Google Test under '/usr/local'. The following command will install all of the Google Test
libraries, public headers, and utilities necessary for other programs and libraries, public headers, and utilities necessary for other programs and
libraries to leverage it: libraries to leverage it:
sudo make install # Not necessary, but allows use by other programs sudo make install # Not necessary, but allows use by other programs
Should you need to remove Google Test from your system after having installed Should you need to remove Google Test from your system after having installed
it, run the following command, and it will back out its changes. However, note it, run the following command, and it will back out its changes. However, note
carefully that you must run this command on the *same* Google Test build that carefully that you must run this command on the *same* Google Test build that
you ran the install from, or the results are not predictable. If you install you ran the install from, or the results are not predictable. If you install
Google Test on your system, and are working from a VCS checkout, make sure you Google Test on your system, and are working from a VCS checkout, make sure you
run this *before* updating your checkout of the source in order to uninstall run this *before* updating your checkout of the source in order to uninstall
the same version which you installed. the same version which you installed.
sudo make uninstall # Must be run against the exact same build as "install" sudo make uninstall # Must be run against the exact same build as "install"
Your project can build against Google Test simply by leveraging the Your project can build against Google Test simply by leveraging the
'gtest-config' script. This script can be invoked directly out of the 'scripts' 'gtest-config' script. This script can be invoked directly out of the 'scripts'
subdirectory of the build tree, and it will be installed in the binary subdirectory of the build tree, and it will be installed in the binary
directory specified during the 'configure'. Here are some examples of its use, directory specified during the 'configure'. Here are some examples of its use,
see 'gtest-config --help' for more detailed information. see 'gtest-config --help' for more detailed information.
gtest-config --min-version=1.0 || echo "Insufficient Google Test version." gtest-config --min-version=1.0 || echo "Insufficient Google Test version."
g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp
g++ $(gtest-config --ldflags --libs) -o foo foo.o g++ $(gtest-config --ldflags --libs) -o foo foo.o
# When using a built but not installed Google Test: # When using a built but not installed Google Test:
g++ $(../../my_gtest_build/scripts/gtest-config ...) ... g++ $(../../my_gtest_build/scripts/gtest-config ...) ...
### Windows ### ### Windows ###
The msvc\ folder contains two solutions with Visual C++ projects. Open the The msvc\ folder contains two solutions with Visual C++ projects. Open the
gtest.sln or gtest-md.sln file using Visual Studio, and you are ready to gtest.sln or gtest-md.sln file using Visual Studio, and you are ready to
build Google Test the same way you build any Visual Studio project. Files build Google Test the same way you build any Visual Studio project. Files
that have names ending with -md use DLL versions of Microsoft runtime that have names ending with -md use DLL versions of Microsoft runtime
libraries (the /MD or the /MDd compiler option). Files without that suffix libraries (the /MD or the /MDd compiler option). Files without that suffix
use static versions of the runtime libraries (the /MT or the /MTd option). use static versions of the runtime libraries (the /MT or the /MTd option).
Please note that one must use the same option to compile both gtest and his Please note that one must use the same option to compile both gtest and his
test code. If you use Visual Studio 2005 or above, we recommend the -md test code. If you use Visual Studio 2005 or above, we recommend the -md
version as /MD is the default for new projects in these versions of Visual version as /MD is the default for new projects in these versions of Visual
Studio. Studio.
### Mac OS X (universal-binary framework) ### ### Mac OS X (universal-binary framework) ###
Open the gtest.xcodeproj in the xcode/ folder using Xcode. Build the "gtest" Open the gtest.xcodeproj in the xcode/ folder using Xcode. Build the "gtest"
target. The universal binary framework will end up in your selected build target. The universal binary framework will end up in your selected build
directory (selected in the Xcode "Preferences..." -> "Building" pane and directory (selected in the Xcode "Preferences..." -> "Building" pane and
defaults to xcode/build). Alternatively, at the command line, enter: defaults to xcode/build). Alternatively, at the command line, enter:
xcodebuild xcodebuild
This will build the "Release" configuration of gtest.framework in your This will build the "Release" configuration of gtest.framework in your
default build location. See the "xcodebuild" man page for more information about default build location. See the "xcodebuild" man page for more information about
building different configurations and building in different locations. building different configurations and building in different locations.
To test the gtest.framework in Xcode, change the active target to "Check" and To test the gtest.framework in Xcode, change the active target to "Check" and
then build. This target builds all of the tests and then runs them. Don't worry then build. This target builds all of the tests and then runs them. Don't worry
if you see some errors. Xcode reports all test failures (even the intentional if you see some errors. Xcode reports all test failures (even the intentional
ones) as errors. However, you should see a "Build succeeded" message at the end ones) as errors. However, you should see a "Build succeeded" message at the end
of the build log. To run all of the tests from the command line, enter: of the build log. To run all of the tests from the command line, enter:
xcodebuild -target Check xcodebuild -target Check
Installation with xcodebuild requires specifying an installation desitination Installation with xcodebuild requires specifying an installation desitination
directory, known as the DSTROOT. Three items will be installed when using directory, known as the DSTROOT. Three items will be installed when using
xcodebuild: xcodebuild:
$DSTROOT/Library/Frameworks/gtest.framework $DSTROOT/Library/Frameworks/gtest.framework
$DSTROOT/usr/local/lib/libgtest.a $DSTROOT/usr/local/lib/libgtest.a
$DSTROOT/usr/local/lib/libgtest_main.a $DSTROOT/usr/local/lib/libgtest_main.a
You specify the installation directory on the command line with the other You specify the installation directory on the command line with the other
xcodebuild options. Here's how you would install in a user-visible location: xcodebuild options. Here's how you would install in a user-visible location:
xcodebuild install DSTROOT=~ xcodebuild install DSTROOT=~
To perform a system-wide inistall, escalate to an administrator and specify To perform a system-wide inistall, escalate to an administrator and specify
the file system root as the DSTROOT: the file system root as the DSTROOT:
sudo xcodebuild install DSTROOT=/ sudo xcodebuild install DSTROOT=/
To uninstall gtest.framework via the command line, you need to delete the three To uninstall gtest.framework via the command line, you need to delete the three
items listed above. Remember to escalate to an administrator if deleting these items listed above. Remember to escalate to an administrator if deleting these
from the system-wide location using the commands listed below: from the system-wide location using the commands listed below:
sudo rm -r /Library/Frameworks/gtest.framework sudo rm -r /Library/Frameworks/gtest.framework
sudo rm /usr/local/lib/libgtest.a sudo rm /usr/local/lib/libgtest.a
sudo rm /usr/local/lib/libgtest_main.a sudo rm /usr/local/lib/libgtest_main.a
It is also possible to build and execute individual tests within Xcode. Each It is also possible to build and execute individual tests within Xcode. Each
test has its own Xcode "Target" and Xcode "Executable". To build any of the test has its own Xcode "Target" and Xcode "Executable". To build any of the
tests, change the active target and the active executable to the test of tests, change the active target and the active executable to the test of
interest and then build and run. interest and then build and run.
Individual tests can be built from the command line using: Individual tests can be built from the command line using:
xcodebuild -target <test_name> xcodebuild -target <test_name>
These tests can be executed from the command line by moving to the build These tests can be executed from the command line by moving to the build
directory and then (in bash) directory and then (in bash)
export DYLD_FRAMEWORK_PATH=`pwd` export DYLD_FRAMEWORK_PATH=`pwd`
./<test_name> # (e.g. ./gtest_unittest) ./<test_name> # (e.g. ./gtest_unittest)
To use gtest.framework for your own tests, first, install the framework using To use gtest.framework for your own tests, first, install the framework using
the steps described above. Then add it to your Xcode project by selecting the steps described above. Then add it to your Xcode project by selecting
Project->Add to Project... from the main menu. Next, add libgtest_main.a from Project->Add to Project... from the main menu. Next, add libgtest_main.a from
gtest.framework/Resources directory using the same menu command. Finally, gtest.framework/Resources directory using the same menu command. Finally,
create a new executable target and add gtest.framework and libgtest_main.a to create a new executable target and add gtest.framework and libgtest_main.a to
the "Link Binary With Libraries" build phase. the "Link Binary With Libraries" build phase.
### Using GNU Make ### ### Using GNU Make ###
The make/ directory contains a Makefile that you can use to build The make/ directory contains a Makefile that you can use to build
Google Test on systems where GNU make is available (e.g. Linux, Mac OS Google Test on systems where GNU make is available (e.g. Linux, Mac OS
X, and Cygwin). It doesn't try to build Google Test's own tests. X, and Cygwin). It doesn't try to build Google Test's own tests.
Instead, it just builds the Google Test library and a sample test. Instead, it just builds the Google Test library and a sample test.
You can use it as a starting point for your own Makefile. You can use it as a starting point for your own Makefile.
If the default settings are correct for your environment, the If the default settings are correct for your environment, the
following commands should succeed: following commands should succeed:
cd ${SRCDIR}/make cd ${SRCDIR}/make
make make
./sample1_unittest ./sample1_unittest
If you see errors, try to tweak the contents of make/Makefile to make If you see errors, try to tweak the contents of make/Makefile to make
them go away. There are instructions in make/Makefile on how to do them go away. There are instructions in make/Makefile on how to do
it. it.
### Using Your Own Build System ### ### Using Your Own Build System ###
If none of the build solutions we provide works for you, or if you If none of the build solutions we provide works for you, or if you
prefer your own build system, you just need to compile prefer your own build system, you just need to compile
src/gtest-all.cc into a library and link your tests with it. Assuming src/gtest-all.cc into a library and link your tests with it. Assuming
a Linux-like system and gcc, something like the following will do: a Linux-like system and gcc, something like the following will do:
cd ${SRCDIR} cd ${SRCDIR}
g++ -I. -I./include -c src/gtest-all.cc g++ -I. -I./include -c src/gtest-all.cc
ar -rv libgtest.a gtest-all.o ar -rv libgtest.a gtest-all.o
g++ -I. -I./include path/to/your_test.cc libgtest.a -o your_test g++ -I. -I./include path/to/your_test.cc libgtest.a -o your_test
Regenerating Source Files Regenerating Source Files
------------------------- -------------------------
Some of Google Test's source files are generated from templates (not Some of Google Test's source files are generated from templates (not
in the C++ sense) using a script. A template file is named FOO.pump, in the C++ sense) using a script. A template file is named FOO.pump,
where FOO is the name of the file it will generate. For example, the where FOO is the name of the file it will generate. For example, the
file include/gtest/internal/gtest-type-util.h.pump is used to generate file include/gtest/internal/gtest-type-util.h.pump is used to generate
gtest-type-util.h in the same directory. gtest-type-util.h in the same directory.
Normally you don't need to worry about regenerating the source files, Normally you don't need to worry about regenerating the source files,
unless you need to modify them (e.g. if you are working on a patch for unless you need to modify them (e.g. if you are working on a patch for
Google Test). In that case, you should modify the corresponding .pump Google Test). In that case, you should modify the corresponding .pump
files instead and run the 'pump' script (for Pump is Useful for Meta files instead and run the 'pump' script (for Pump is Useful for Meta
Programming) to regenerate them. We are still working on releasing Programming) to regenerate them. We are still working on releasing
the script and its documentation. If you need it now, please email the script and its documentation. If you need it now, please email
googletestframework@googlegroups.com such that we know to make it googletestframework@googlegroups.com such that we know to make it
happen sooner. happen sooner.
Happy testing! Happy testing!

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