VIEW.H 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #ifndef __VIEW_H
  2. #define __VIEW_H
  3. #include "typedefs.h"
  4. #include "engine.h"
  5. struct QFONT;
  6. /***********************************************************************
  7. * Constants
  8. **********************************************************************/
  9. enum {
  10. kView2D = 2,
  11. kView3D = 3,
  12. kView2DIcon = 4,
  13. }; // used with gViewMode
  14. enum FONT_ID
  15. {
  16. kFontMessage = 0,
  17. kFontMenu,
  18. };
  19. enum
  20. {
  21. TA_LEFT = 0,
  22. TA_CENTER,
  23. TA_RIGHT,
  24. };
  25. enum VIEWPOS {
  26. kViewPosCenter = 0,
  27. kViewPosBack,
  28. kViewPosLeftBack,
  29. kViewPosLeft,
  30. kViewPosLeftFront,
  31. kViewPosFront,
  32. kViewPosRightFront,
  33. kViewPosRight,
  34. kViewPosRightBack,
  35. }; // used with gViewPos
  36. enum {
  37. // rotatesprite compatible flags
  38. kDrawNormal = 0,
  39. kDrawTranslucent = 0x0001,
  40. kDrawScale = 0x0002,
  41. kDrawYFlip = 0x0004,
  42. kDrawUnclipped = 0x0008,
  43. kDrawStatus = 0x000A,
  44. kDrawCorner = 0x0010,
  45. kDrawTranslucentR = 0x0020,
  46. kDrawNonMasked = 0x0040,
  47. kDrawMultiPage = 0x0080,
  48. // viewDrawSprite specific flags
  49. kDrawXFlip = 0x0100,
  50. };
  51. /***********************************************************************
  52. * Variables
  53. **********************************************************************/
  54. extern int gViewIndex;
  55. extern int gViewSize;
  56. extern int gViewMode;
  57. extern VIEWPOS gViewPos;
  58. extern int gViewPages;
  59. extern int gZoom;
  60. extern int gInterpolate;
  61. extern int gViewX0, gViewY0, gViewX1, gViewY1;
  62. extern int gViewXCenter, gViewYCenter;
  63. extern int gShowFrameRate;
  64. extern int gShowFrags;
  65. extern long gScreenTilt;
  66. extern int deliriumTilt;
  67. extern int deliriumTurn;
  68. extern int deliriumPitch;
  69. /***********************************************************************
  70. * Functions
  71. **********************************************************************/
  72. extern void viewInit(void);
  73. extern void viewResizeView(int change);
  74. extern void viewSetMessage( char *s );
  75. extern void viewDisplayMessage( void );
  76. extern void viewDrawChar( QFONT *pFont, BYTE c, int x, int y, BYTE *pPalookup );
  77. extern void viewDrawText( FONT_ID nFontId, char *s, int x, int y, int shade, int nPLU,
  78. int nAlign = TA_LEFT );
  79. extern void viewDrawScreen( void );
  80. extern void viewDrawInterface( void );
  81. extern void viewBackupPlayerLoc( int nPlayer );
  82. extern void viewBackupSpriteLoc( int nSprite, SPRITE *pSprite );
  83. extern void viewBackupAllSpriteLoc( void );
  84. extern void viewProcessSprites( int x, int y, int z );
  85. extern void viewCalcPosition( SPRITE *pSprite, long *px, long *py, long *pz, short *pAngle, short *pSector );
  86. extern void viewSetDetail( int nDetail );
  87. extern void viewDrawSprite( long sx, long sy,
  88. long nZoom, short nAngle, short nTile, schar nShade, char nPLU, ushort nFlags,
  89. long wx1, long wy1, long wx2, long wy2 );
  90. #endif