Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #if !defined( HLFACEPOSER_H )
  8. #define HLFACEPOSER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <ctype.h>
  13. #include <float.h>
  14. #include <windows.h>
  15. #include "SoundEmitterSystem/isoundemittersystembase.h"
  16. #include "color.h"
  17. #define CONSOLE_COLOR Color( 82, 173, 216 )
  18. #define ERROR_COLOR Color( 255, 50, 20 )
  19. #define FILE_COLOR Color( 0, 63, 200 )
  20. #define MAX_FP_MODELS 16
  21. #define SCRUBBER_HANDLE_WIDTH 40
  22. #define SCRUBBER_HANDLE_HEIGHT 10
  23. char *va( const char *fmt, ... );
  24. char const *GetGameDirectory(); // e.g. u:\main\game\ep2
  25. char const *GetGameDirectorySimple(); // e.g. ep2
  26. void Con_Printf( const char *fmt, ... );
  27. void Con_ColorPrintf( const Color& clr, const char *fmt, ... );
  28. void Con_ErrorPrintf( const char *fmt, ... );
  29. bool FPFullpathFileExists( const char *filename );
  30. void MakeFileWriteable( const char *filename );
  31. bool MakeFileWriteablePrompt( const char *filename, char const *promptTitle );
  32. bool IsFileWriteable( const char *filename );
  33. void FPCopyFile( const char *source, const char *dest, bool bCheckOut );
  34. class mxWindow;
  35. void FacePoser_MakeToolWindow( mxWindow *w, bool smallcaption );
  36. void FacePoser_LoadWindowPositions( char const *name, bool& visible, int& x, int& y, int& w, int& h, bool& locked, bool& zoomed );
  37. void FacePoser_SaveWindowPositions( char const *name, bool visible, int x, int y, int w, int h, bool locked, bool zoomed );
  38. void FacePoser_AddWindowStyle( mxWindow *w, int addbits );
  39. void FacePoser_AddWindowExStyle( mxWindow *w, int addbits );
  40. void FacePoser_RemoveWindowStyle( mxWindow *w, int removebits );
  41. bool FacePoser_HasWindowStyle( mxWindow *w, int bits );
  42. void FacePoser_EnsurePhonemesLoaded( void );
  43. void FacePoser_SetPhonemeRootDir( char const *pchRootDir );
  44. int ConvertANSIToUnicode(const char *ansi, wchar_t *unicode, int unicodeBufferSize);
  45. int ConvertUnicodeToANSI(const wchar_t *unicode, char *ansi, int ansiBufferSize);
  46. float FacePoser_SnapTime( float t );
  47. char const *FacePoser_DescribeSnappedTime( float t );
  48. int FacePoser_GetSceneFPS( void );
  49. bool FacePoser_IsSnapping( void );
  50. class StudioModel;
  51. char const *FacePoser_TranslateSoundName( char const *soundname, StudioModel *model = NULL );
  52. class CChoreoEvent;
  53. char const *FacePoser_TranslateSoundName( CChoreoEvent *event );
  54. char const *FacePoser_TranslateSoundNameGender( char const *soundname, gender_t gender );
  55. extern class IFileSystem *filesystem;
  56. extern class ISceneTokenProcessor *tokenprocessor;
  57. char *Q_stristr_slash( char const *pStr, char const *pSearch );
  58. void SetCloseCaptionLanguageId( int id, bool force = false ); // from sentence.h enum
  59. int GetCloseCaptionLanguageId();
  60. bool FacePoser_ShowOpenFileNameDialog( char *relative, size_t bufsize, char const *subdir, char const *wildcard );
  61. bool FacePoser_ShowSaveFileNameDialog( char *relative, size_t bufsize, char const *subdir, char const *wildcard );
  62. // Helper for porting from windows to vgui tool framework
  63. inline COLORREF ColorToRGB( const Color &clr )
  64. {
  65. return RGB( clr.r(), clr.g(), clr.b() );
  66. }
  67. inline Color RGBToColor( const COLORREF &clr )
  68. {
  69. return Color( GetRValue( clr ), GetGValue( clr ), GetBValue( clr ) );
  70. }
  71. #endif // HLFACEPOSER_H