quaddefs.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. ===========================================================================
  3. Doom 3 GPL Source Code
  4. Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
  6. Doom 3 Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #ifndef __quaddefs_h__
  21. #define __quaddefs_h__
  22. #pragma once
  23. #define DEP 0
  24. #define FCC 1
  25. #define CCC 2
  26. #define SLD 3
  27. #define PAT 4
  28. #define MOT 5
  29. #define DEAD 6
  30. #define COLA 0
  31. #define COLB 1
  32. #define COLC 2
  33. #define COLS 3
  34. #define COLPATA 4
  35. #define COLPATB 5
  36. #define COLPATS 6
  37. #define GENERATION 7
  38. #define CCCBITMAP 0
  39. #define FCCDOMAIN 1
  40. #define PATNUMBER 2
  41. #define PATNUMBE2 3
  42. #define PATNUMBE3 4
  43. #define PATNUMBE4 5
  44. #define PATNUMBE5 6
  45. #define MAXSIZE 16
  46. #define MINSIZE 4
  47. #define RoQ_ID 0x1084
  48. #define RoQ_QUAD 0x1000
  49. #define RoQ_PUZZLE_QUAD 0x1003
  50. #define RoQ_QUAD_HANG 0x1013
  51. #define RoQ_QUAD_SMALL 0x1010
  52. #define RoQ_QUAD_INFO 0x1001
  53. #define RoQ_QUAD_VQ 0x1011
  54. #define RoQ_QUAD_JPEG 0x1012
  55. #define RoQ_QUAD_CODEBOOK 0x1002
  56. typedef struct {
  57. byte size; // 32, 16, 8, or 4
  58. word xat; // where is it at on the screen
  59. word yat; //
  60. } shortQuadCel;
  61. typedef struct {
  62. byte size; // 32, 16, 8, or 4
  63. word xat; // where is it at on the screen
  64. word yat; //
  65. float cccsnr; // ccc bitmap snr to actual image
  66. float fccsnr; // fcc bitmap snr to actual image
  67. float motsnr; // delta snr to previous image
  68. float sldsnr; // solid color snr
  69. float patsnr;
  70. float dctsnr;
  71. float rsnr; // what's the current snr
  72. unsigned int cola; // color a for ccc
  73. unsigned int colb; // color b for ccc
  74. unsigned int colc; // color b for ccc
  75. unsigned int sldcol; // sold color
  76. unsigned int colpata;
  77. unsigned int colpatb;
  78. unsigned int colpats;
  79. unsigned int bitmap; // ccc bitmap
  80. word domain; // where to copy from for fcc
  81. word patten[5]; // which pattern
  82. int status;
  83. bool mark;
  84. float snr[DEAD+1]; // snrssss
  85. } quadcel;
  86. typedef struct {
  87. float snr[DEAD+1]; // snrssss
  88. unsigned int cols[8];
  89. unsigned int bitmaps[7]; // ccc bitmap
  90. } dataQuadCel;
  91. typedef struct {
  92. float normal;
  93. unsigned short int index;
  94. } norm;
  95. typedef struct {
  96. unsigned char dtlMap[256];
  97. int r[4];
  98. int g[4];
  99. int b[4];
  100. int a[4];
  101. float ymean;
  102. } dtlCel;
  103. typedef struct {
  104. byte r,g,b,a;
  105. } pPixel;
  106. #endif // quaddef