Skip to content

Commit

Permalink
Adding public directory
Browse files Browse the repository at this point in the history
Adding public directory
  • Loading branch information
shokunin000 committed Jul 12, 2015
1 parent 28eeee7 commit e8d906e
Show file tree
Hide file tree
Showing 757 changed files with 226,241 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
*.obj
*.vcxproj
*.filters
*.tlog
*.dll
*.bat
*.xcconfig
*.pl
*.exe
*.cache
*.vcxproj
*.vpc_crc
*.ilk
*.pch
*.exp
*.lastbuildstate
*.ilk
*.log
*.pdb
*.log
*.lib
*.unsuccessfulbuild
*.idb
*.sln
*.suo
*.sdf
*.user
devtools/bin/linux/ccache
devtools/bin/osx32/ccache
devtools/bin/osx32/protoc
devtools/bin/osx32/xcode_ccache_wrapper
devtools/bin/vpc
devtools/bin/vpc_linux
devtools/bin/vpc_osx
devtools/gendbg.sh
devtools/makefile_base_posix.mak
devtools/sourcesdk_def.mak
devtools/version_script.linux.txt
*.ipch
/materialsystem
/lib
/fgdlib
gcsdk/bin/linux/protoc
/mathlib
/raytrace
/thirdparty
/tier1
/utils
/vgui2
/vpc_scripts
vstdlib/vstdlib_exclude.vpc
tier0/tier0_exclude.vpc
54 changes: 54 additions & 0 deletions public/BitmapFontFile.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Baked Bitmap fonts
//
//===========================================================================

#ifndef _BITMAPFONTFILE_H_
#define _BITMAPFONTFILE_H_

#include "datamap.h"

#define BITMAPFONT_ID (('T'<<24)|('N'<<16)|('F'<<8)|('V'))
#define BITMAPFONT_VERSION 3

// style flags
#define BF_BOLD 0x0001
#define BF_ITALIC 0x0002
#define BF_OUTLINED 0x0004
#define BF_DROPSHADOW 0x0008
#define BF_BLURRED 0x0010
#define BF_SCANLINES 0x0020
#define BF_ANTIALIASED 0x0040
#define BF_CUSTOM 0x0080

#pragma pack(1) //X360TBD
typedef struct BitmapGlyph_s
{
DECLARE_BYTESWAP_DATADESC();
short x;
short y;
short w;
short h;
short a;
short b;
short c;
} BitmapGlyph_t;

typedef struct BitmapFont_s
{
DECLARE_BYTESWAP_DATADESC();
int m_id;
int m_Version;
short m_PageWidth;
short m_PageHeight;
short m_MaxCharWidth;
short m_MaxCharHeight;
short m_Flags;
short m_Ascent;
short m_NumGlyphs;
unsigned char m_TranslateTable[256];
} BitmapFont_t;
#pragma pack()

#endif
103 changes: 103 additions & 0 deletions public/Color.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//

#ifndef COLOR_H
#define COLOR_H

#ifdef _WIN32
#pragma once
#endif

//-----------------------------------------------------------------------------
// Purpose: Basic handler for an rgb set of colors
// This class is fully inline
//-----------------------------------------------------------------------------
class Color
{
public:
// constructors
Color()
{
*((int *)this) = 0;
}
Color(int _r,int _g,int _b)
{
SetColor(_r, _g, _b, 0);
}
Color(int _r,int _g,int _b,int _a)
{
SetColor(_r, _g, _b, _a);
}

// set the color
// r - red component (0-255)
// g - green component (0-255)
// b - blue component (0-255)
// a - alpha component, controls transparency (0 - transparent, 255 - opaque);
void SetColor(int _r, int _g, int _b, int _a = 0)
{
_color[0] = (unsigned char)_r;
_color[1] = (unsigned char)_g;
_color[2] = (unsigned char)_b;
_color[3] = (unsigned char)_a;
}

void GetColor(int &_r, int &_g, int &_b, int &_a) const
{
_r = _color[0];
_g = _color[1];
_b = _color[2];
_a = _color[3];
}

void SetRawColor( int color32 )
{
*((int *)this) = color32;
}

int GetRawColor() const
{
return *((int *)this);
}

inline int r() const { return _color[0]; }
inline int g() const { return _color[1]; }
inline int b() const { return _color[2]; }
inline int a() const { return _color[3]; }

unsigned char &operator[](int index)
{
return _color[index];
}

const unsigned char &operator[](int index) const
{
return _color[index];
}

bool operator == (const Color &rhs) const
{
return ( *((int *)this) == *((int *)&rhs) );
}

bool operator != (const Color &rhs) const
{
return !(operator==(rhs));
}

Color &operator=( const Color &rhs )
{
SetRawColor( rhs.GetRawColor() );
return *this;
}

private:
unsigned char _color[4];
};


#endif // COLOR_H
56 changes: 56 additions & 0 deletions public/Friends/AddOns/AddOnMessages.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//

#ifndef ADDONMESSAGES_H
#define ADDONMESSAGES_H
#pragma once

enum GameMessageIDs
{
GAME_MSG_TEXT = 1, // text chat message
GAME_MSG_DATA, // binary game data

GAME_MSG_INVITE_REQUEST,
GAME_MSG_INVITE_RESPONSE,
GAME_MSG_REJOIN_REQUEST,
GAME_MSG_REJOIN_RESPONSE,

GAME_MSG_INVITE_PERMISSION, // ask permission to invite someone
GAME_MSG_INVITE_NOTIFY, // tell everybody that we're inviting
GAME_MSG_INVITE_DENIED,

GAME_MSG_PLAYER_STATUS_UPDATE,
GAME_MSG_SETUP_INFO, // when user joins a game, host send the setup information of who's in the game
GAME_MSG_INVITE_CANCEL, // host has cancelled an invite
GAME_MSG_GAME_START, // if a game has a setup phase, this tells everybody the game has started

GAME_MSG_PLAYER_KICK, // player kicked from game
GAME_MSG_UPDATING,
GAME_MSG_UP_TO_DATE, // player is up to date and ready to get data

GAME_MSG_STARTING_CARD_HAND = 300,
GAME_MSG_STARTING_PLAYER,
GAME_MSG_CARD_PLAY,

GAME_MSG_CHEAT_POSSIBLE = 400, // when host detects a possible cheat

GAME_MSG_MOVE = 500,
GAME_MSG_COLOR_CHOICE,
GAME_MSG_RECONNECT_DATA,
GAME_MSG_QUIT,
GAME_MSG_PASS,

GAME_MSG_ABORT, // phase these out
GAME_MSG_WAITING_ABORT,

// GAME_MSG_CLOSE_WINDOW,

// special individual game messages should take IDs 1000 and over
};


#endif // ADDONMESSAGES_H

18 changes: 18 additions & 0 deletions public/Friends/AddOns/AddOnTypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//

#ifndef ADDONTYPES_H
#define ADDONTYPES_H
#pragma once

#ifndef WIN32
typedef unsigned long long SessionInt64;
#else
typedef unsigned __int64 SessionInt64;
#endif

#endif // ADDONTYPES_H

69 changes: 69 additions & 0 deletions public/Friends/AddOns/ISteamAddOn.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Interface to a Steam Add On
//
//=============================================================================//

#ifndef ISTEAMADDON_H
#define ISTEAMADDON_H
#pragma once

#include "interface.h"
#include "AddOnTypes.h"
#include <vgui_controls/Panel.h>

class CUtlMsgBuffer;

class ISteamAddOn : public IBaseInterface
{
public:
// allows SteamAddOn to link to the core vgui factories
virtual bool Initialize(CreateInterfaceFn *vguiFactories, int factoryCount) = 0;

// allows SteamAddOns to link to all other modules
virtual bool PostInitialize(CreateInterfaceFn *modules, int factoryCount) = 0;

// when Friends closes down - all SteamAddOns are notified
virtual void Deactivate() = 0;

// notifies the addon who its VGUI parent panel is
virtual void SetParent( vgui::Panel *parent ) = 0;

// notifies the SteamAddOn of the user's ID and username.
// Note: username can be set mulitple times due to changing of name
virtual void SetUserID(unsigned int userID) = 0;
virtual void SetUserName(const char *userName) = 0;

// Query if there are any 'open' sessions - open meaning allowing new users to join the sessions
virtual int QueryOpenSessionCount() = 0;

// will be valid right after a call to QueryOpenInviteCount will set the addOnSessionID and hostname for
// any open sessions for this addOn. Return true if it's a valid index
virtual bool QueryOpenSessionInfo(int nOpenGameIndex, SessionInt64 &addOnSessionID, char *pszHostName) = 0;

// returns true if this userID is involved in an addOnSession with this ID
virtual bool QueryUserInvolved(SessionInt64 addOnSessionID, unsigned int userID) = 0;

// if session doesn't exist, then the SteamAddOn body should deal with it
virtual bool OnReceiveMsg(SessionInt64 addOnSessionID, CUtlMsgBuffer *msgBuffer) = 0;

// Let's the SteamAddOn know when when any friend's status has changed
virtual void OnFriendStatusChanged() = 0;

// A request to start/join this AddOn with this user ID/name. addOnSessionID will be zero if it's a new session request
virtual void OnInviteUser(unsigned int targetUserID, const char *username, SessionInt64 addOnSessionID) = 0;

// user accepted this host's invite request
virtual void OnAcceptInviteRequest(unsigned int hostID, const char *hostUserName, SessionInt64 addOnSessionID, const char *pAppData, int dataLen) = 0;

// user accepted this host's rejoin request
virtual void OnAcceptRejoinRequest(unsigned int hostID, const char *hostUserName, SessionInt64 addOnSessionID, const char *pAppData, int dataLen) = 0;

// user starts this addOn from a menu
virtual void StartAddOn() = 0;
};

#define STEAMADDON_INTERFACE_VERSION "SteamAddOn007"

#endif // ISTEAMADDON_H

Loading

0 comments on commit e8d906e

Please sign in to comment.