Team Fortress 2 Source Code as on 22/4/2020
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.

98 lines
1.9 KiB

  1. //========= Copyright 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: pakviewer.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_PAKVIEWER
  26. #define INCLUDED_PAKVIEWER
  27. #ifndef INCLUDED_MXWINDOW
  28. #include "mxWindow.h"
  29. #endif
  30. #define IDC_PAKVIEWER 1001
  31. typedef struct
  32. {
  33. char name[56];
  34. int filepos;
  35. int filelen;
  36. } lump_t;
  37. #ifdef __cpluspus
  38. extern "C" {
  39. #endif
  40. int pak_ExtractFile (const char *pakFile, const char *lumpName, char *outFile);
  41. #ifdef __cpluspus
  42. }
  43. #endif
  44. class mxTreeView;
  45. class mxButton;
  46. class mxPopupMenu;
  47. // class GlWindow;
  48. class PAKViewer : public mxWindow
  49. {
  50. char d_pakFile[256];
  51. char d_currLumpName[256];
  52. bool d_loadEntirePAK;
  53. mxTreeView *tvPAK;
  54. mxPopupMenu *pmMenu;
  55. public:
  56. // CREATORS
  57. PAKViewer (mxWindow *window);
  58. ~PAKViewer ();
  59. // MANIPULATORS
  60. virtual int handleEvent (mxEvent *event);
  61. int OnPAKViewer ();
  62. int OnLoadModel ();
  63. int OnLoadTexture (int pos);
  64. int OnPlaySound ();
  65. int OnExtract ();
  66. bool openPAKFile (const char *pakFile);
  67. void closePAKFile ();
  68. void setLoadEntirePAK (bool b) { d_loadEntirePAK = b; }
  69. // ACCESSORS
  70. bool getLoadEntirePAK () const { return d_loadEntirePAK; }
  71. };
  72. #endif // INCLUDED_PAKVIEWER