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.

157 lines
4.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. //
  9. // Half-Life Model Viewer (c) 1999 by Mete Ciragan
  10. //
  11. // file: mdlviewer.h
  12. // last modified: Apr 28 1999, Mete Ciragan
  13. // copyright: The programs and associated files contained in this
  14. // distribution were developed by Mete Ciragan. The programs
  15. // are not in the public domain, but they are freely
  16. // distributable without licensing fees. These programs are
  17. // provided without guarantee or warrantee expressed or
  18. // implied.
  19. //
  20. // version: 1.2
  21. //
  22. // email: [email protected]
  23. // web: http://www.swissquake.ch/chumbalum-soft/
  24. //
  25. #ifndef INCLUDED_MDLVIEWER
  26. #define INCLUDED_MDLVIEWER
  27. #ifndef INCLUDED_MXWINDOW
  28. #include "mxWindow.h"
  29. #endif
  30. #define IDC_FILE_LOADMODEL 1001
  31. #define IDC_FILE_LOADBACKGROUNDTEX 1002
  32. #define IDC_FILE_LOADGROUNDTEX 1003
  33. #define IDC_FILE_UNLOADGROUNDTEX 1004
  34. #define IDC_FILE_CLOSEPAKFILE 1007
  35. #define IDC_FILE_RECENTMODELS1 1008
  36. #define IDC_FILE_RECENTMODELS2 1009
  37. #define IDC_FILE_RECENTMODELS3 1010
  38. #define IDC_FILE_RECENTMODELS4 1011
  39. #define IDC_FILE_RECENTMODELS5 1012
  40. #define IDC_FILE_RECENTMODELS6 1013
  41. #define IDC_FILE_RECENTMODELS7 1014
  42. #define IDC_FILE_RECENTMODELS8 1015
  43. #define IDC_FILE_EXIT 1016
  44. #define IDC_FILE_REFRESH 1017
  45. #define IDC_FILE_LOADMODEL_STEAM 1020
  46. #define IDC_OPTIONS_COLORBACKGROUND 1101
  47. #define IDC_OPTIONS_COLORGROUND 1102
  48. #define IDC_OPTIONS_COLORLIGHT 1103
  49. #define IDC_OPTIONS_COLORAMBIENT 1104
  50. #define IDC_OPTIONS_CENTERVIEW 1105
  51. #define IDC_OPTIONS_CENTERVERTS 1106
  52. #define IDC_OPTIONS_MAKESCREENSHOT 1107
  53. #define IDC_OPTIONS_DUMP 1108
  54. #define IDC_OPTIONS_VIEWMODEL 1109
  55. #define IDC_OPTIONS_SYNCHLMVCAMERA 1110
  56. #define IDC_OPTIONS_LINKHLMV 1111
  57. #define IDC_OPTIONS_UNLINKHLMV 1112
  58. #define IDC_OPTIONS_SECONDARYLIGHTS 1113
  59. #define IDC_OPTIONS_RUNMVSCRIPT 1114
  60. #define IDC_OPTIONS_SAVEMVSCRIPT 1115
  61. #define IDC_VIEW_FILEASSOCIATIONS 1201
  62. #define IDC_VIEW_ACTIVITIES 1202
  63. #define IDC_VIEW_HIDDEN 1203
  64. #define IDC_VIEW_SEQUENCE_INDICES 1204
  65. #define IDC_VIEW_SORT_SEQUENCES 1205
  66. #define IDC_VIEW_DOTA 1206
  67. #define IDC_VIEW_ORBIT_CIRCLE 1207
  68. #define IDC_VIEW_ORBIT_YAW 1208
  69. #define IDC_HELP_GOTOHOMEPAGE 1301
  70. #define IDC_HELP_ABOUT 1302
  71. // Keyboard accelerators (not items on any menu...checkboxes on Render tab)
  72. #define IDC_ACCEL_WIREFRAME 1401
  73. #define IDC_ACCEL_ATTACHMENTS 1402
  74. #define IDC_ACCEL_GROUND 1403
  75. #define IDC_ACCEL_HITBOXES 1404
  76. #define IDC_ACCEL_BONES 1405
  77. #define IDC_ACCEL_BACKGROUND 1406
  78. #define IDC_ACCEL_MOVEMENT 1407
  79. #define IDC_ACCEL_NORMALS 1408
  80. #define IDC_ACCEL_TANGENTS 1409
  81. #define IDC_ACCEL_SHADOW 1410
  82. #define IDC_ACCEL_DISPLACEMENT 1411
  83. #define IDC_ACCEL_TESSELLATION_INC 1412
  84. #define IDC_ACCEL_TESSELLATION_DEC 1413
  85. #define IDC_FILE_RECOMPILE 1427
  86. class mxMenuBar;
  87. class MatSysWindow;
  88. class ControlPanel;
  89. class mxMenu;
  90. enum { Action, Size, Timer, Idle, Show, Hide,
  91. MouseUp, MouseDown, MouseMove, MouseDrag,
  92. KeyUp, KeyDown
  93. };
  94. class MDLViewer : public mxWindow
  95. {
  96. mxMenuBar *mb;
  97. MatSysWindow *d_MatSysWindow;
  98. ControlPanel *d_cpl;
  99. mxMenu *menuOptions;
  100. mxMenu *menuView;
  101. void loadRecentFiles ();
  102. void saveRecentFiles ();
  103. void initRecentFiles ();
  104. public:
  105. // CREATORS
  106. MDLViewer ();
  107. ~MDLViewer ();
  108. // MANIPULATORS
  109. virtual int handleEvent (mxEvent *event);
  110. void SendModelTransformToLinkedHlmv();
  111. void redraw ();
  112. void handleIpcCommand( char *szCommand );
  113. void Refresh( void );
  114. void LoadModelFile( const char *pszFile, int slot = -1 );
  115. void SaveScreenShot( const char *pszFile );
  116. void DumpText( const char *pszFile );
  117. // ACCESSORS
  118. mxMenuBar *getMenuBar () const { return mb; }
  119. MatSysWindow *getMatSysWindow () const { return d_MatSysWindow; }
  120. int GetCurrentHitboxSet( void );
  121. void ExecuteMVScript( const char* p_szScriptPath );
  122. const char* SteamGetOpenFilename();
  123. };
  124. extern MDLViewer *g_MDLViewer;
  125. extern char g_appTitle[];
  126. #endif // INCLUDED_MDLVIEWER