ID_HEADS.H 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /* Catacomb Armageddon Source Code
  2. * Copyright (C) 1993-2014 Flat Rock Software
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  17. */
  18. // ID_GLOB.H
  19. #include <ALLOC.H>
  20. #include <CTYPE.H>
  21. #include <DOS.H>
  22. #include <ERRNO.H>
  23. #include <FCNTL.H>
  24. #include <IO.H>
  25. #include <MEM.H>
  26. #include <PROCESS.H>
  27. #include <STDIO.H>
  28. #include <STDLIB.H>
  29. #include <STRING.H>
  30. #include <SYS\STAT.H>
  31. #define __ID_GLOB__
  32. //--------------------------------------------------------------------------
  33. #define EXT "ARM"
  34. extern char far introscn;
  35. #include "GFXE_ARM.H"
  36. #include "AUDIOARM.H"
  37. #include "MAPSARM.H"
  38. //--------------------------------------------------------------------------
  39. //
  40. // DEFINES THE TILE ATTRIBUTE CHECKING CONVENTION (macros).
  41. //
  42. // DEFINE CUSTOM BIT-FLAG NAMES...
  43. //
  44. #define tf_SOLID 0x01
  45. #define tf_SPECIAL 0x02
  46. #define tf_EMBEDDED_KEY_COLOR 0x04
  47. #define tf_INVISIBLE_WALL 0x09
  48. #define tf_MARKED 0x80
  49. #define ANIM_FLAGS(tile) (tinf[ANIM+(tile)])
  50. #define TILE_FLAGS(tile) (tinf[FLAGS+(tile)])
  51. #define GATE_KEY_COLOR(tile) ((unsigned char)(TILE_FLAGS(tile)>>4))
  52. #define CAT3D
  53. #define TEXTGR 0
  54. #define CGAGR 1
  55. #define EGAGR 2
  56. #define VGAGR 3
  57. #define EGA320GR 10 // MDM (GAMERS EDGE)
  58. #define EGA640GR 11 // MDM (GAMERS EDGE)
  59. #define GRMODE EGAGR
  60. #if GRMODE == EGAGR
  61. #define GREXT "EGA"
  62. #endif
  63. #if GRMODE == CGAGR
  64. #define GREXT "CGA"
  65. #endif
  66. //#define PROFILE
  67. //
  68. // ID Engine
  69. // Types.h - Generic types, #defines, etc.
  70. // v1.0d1
  71. //
  72. #ifndef __TYPES__
  73. #define __TYPES__
  74. typedef enum {false,true} boolean;
  75. typedef unsigned char byte;
  76. typedef unsigned int word;
  77. typedef unsigned long longword;
  78. typedef byte * Ptr;
  79. typedef struct
  80. {
  81. int x,y;
  82. } Point;
  83. typedef struct
  84. {
  85. Point ul,lr;
  86. } Rect;
  87. #define nil ((void *)0)
  88. #endif
  89. #include "ID_MM.H"
  90. #include "ID_CA.H"
  91. #include "ID_VW.H"
  92. #include "ID_IN.H"
  93. #include "ID_SD.H"
  94. #include "ID_US.H"
  95. void Quit (char *error, ...); // defined in user program
  96. //
  97. // replacing refresh manager with custom routines
  98. //
  99. #define PORTTILESWIDE 21 // all drawing takes place inside a
  100. #define PORTTILESHIGH 14 // non displayed port of this size
  101. #define UPDATEWIDE (PORTTILESWIDE+1)
  102. #define UPDATEHIGH PORTTILESHIGH
  103. #define MAXTICS 6
  104. #define DEMOTICS 3
  105. #define UPDATETERMINATE 0x0301
  106. extern unsigned mapwidth,mapheight,tics,realtics;
  107. extern boolean compatability;
  108. extern byte *updateptr;
  109. extern unsigned uwidthtable[UPDATEHIGH];
  110. extern unsigned blockstarts[UPDATEWIDE*UPDATEHIGH];