ROTHREND.H 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. #ifndef ROTHREND_H_INCLUDE
  2. /*
  3. ÉÍÍÍÍÍÍÍÍÍÍÍÍ»
  4. º AUTOHEADER º
  5. ÌÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  6. º Filename ROTHREND.H º
  7. ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ
  8. º Creation 12/8/1995 º
  9. ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
  10. º º
  11. º Updated: Sat 12/8/1995 03:34 º
  12. º º
  13. º Version: 1.025 º
  14. º º
  15. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  16. */
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #pragma PACK(1) ;
  21. typedef struct DrawMap_Table {
  22. signed long center_x; // Player X << 16 (as in view pos struc)
  23. signed long center_y; // Player Y << 16 (as in view pos struc)
  24. signed long rot; // Player rotation (as in view pos struc)
  25. unsigned short size_x; // pixels across
  26. unsigned short size_y; // pixels down
  27. unsigned short scale; // 4096 = 1:1 4096/2 =1/2 size
  28. char ratio_x; // ratio of screen use GetScreenRatio(char *rationx, char*rationY)
  29. char ratio_y; // ratio of screen
  30. unsigned char edge; // colour for edge of map (BOLD)
  31. unsigned char faint; // colour used for steps etc.
  32. unsigned char doors; // doors are in this colour
  33. unsigned char player; // colour of player
  34. } DrawMap_Table;
  35. typedef struct RGB256_Pen {
  36. unsigned char red; // values 0-255
  37. unsigned char green;
  38. unsigned char blue;
  39. } RGB256_Pen;
  40. typedef struct _LookSee { // Used by LookXY() / valid for types
  41. unsigned char Filler; //
  42. unsigned char Type; // see below /
  43. unsigned short int Image; // image number or colour / 1-,2-,3-,4+
  44. unsigned short int ImageX; // xpos in image / 1,2,3,4*
  45. unsigned short int ImageY; // ypos in image / 1,2,3,4*
  46. unsigned short int WallOffset; // use _ROOM_AddressBase / 3
  47. unsigned short int SegOffset; // use _ROOM_AddressBase / 1,2,3,4
  48. unsigned short int Flags; // see below / 1,2,3,4
  49. unsigned short int ObjOffset; // use _OBJ_AddressBase / 4
  50. unsigned short int WallID; // ID if wall selected / 3
  51. unsigned short int SegID; // valid if not sky / 1,2,3,4
  52. unsigned short int ObjImage; // image number of Object / 4
  53. unsigned char ObjDir; // direction of object / 4
  54. unsigned char ObjFlags; // object flags see below / 4
  55. unsigned char FaceInfo; // Top Middle or bottom see below
  56. unsigned char Filler00; // even up to word size
  57. unsigned short int Filler01; // even up to word size
  58. } _LookSee;
  59. typedef struct _DoorStruct { // Used by LookXY() / valid for types
  60. unsigned short int Seg_Offset; // door segment
  61. unsigned char Flags; //
  62. signed char Dir; // rotation
  63. unsigned long int Function; // function address
  64. unsigned short int Timer; // none manual door time
  65. signed short int HVtxX; // X pos of hindge
  66. signed short int HVtxY; // Y pos
  67. unsigned short int Bleed_Seg; // segment door bleeds into
  68. unsigned short int View_Seg; // segment towards player
  69. unsigned long int Poly; // Poly struct
  70. unsigned long int Verts; // Vertices struct
  71. unsigned short int pad;
  72. unsigned short int ManyVerts;
  73. } _DoorStruct;
  74. // flags for _LookSee-->FaceInfo
  75. #define face_middle 0
  76. #define face_top 1
  77. #define face_bottom 2
  78. // - If image is an Janim etc.. then will = then anim frame image.
  79. // if Mono then image = colour
  80. //
  81. //
  82. // + Image of object +512, if ObjFlags = 3dobject then
  83. // image = image of the face
  84. // also, objects may show current anim frame
  85. // Use ObjImage for better result, as this is the
  86. // object number in rothed.
  87. //
  88. // * If image is a 3dobject then will = X,Y of a single face.
  89. //
  90. // Type
  91. #define LST_Nill 0 // image not found...
  92. #define LST_Roof 1 // image is a segment roof
  93. #define LST_Floor 2 // image is a segment floor
  94. #define LST_Wall 3 // image is a wall part
  95. #define LST_Object 4 // image is an object
  96. #define LST_Sky 5 // image is the sky
  97. // Flags (use bit test not compare)
  98. #define LSF_NotMono 8 // Image Num = colour
  99. // ObjFlags (use bit test not compare)
  100. #define LSOF_3DObj 1 // Image is a 3dObject
  101. typedef struct _ROOM_Block { // offset in ROOM_AddressBase_
  102. unsigned short int FileSize; // block size
  103. unsigned short int OffsetVert;// Vertex list
  104. unsigned short int OffsetSeg; // Segments (_SEG_Block)
  105. unsigned short int OffsetWall;// Walls
  106. unsigned short int OffsetFace;// Faces
  107. unsigned short int OffsetInfo;// Info
  108. unsigned short int OffsetLink;// Link (Map warp info)
  109. } _ROOM_Block;
  110. typedef struct _OBJ_Block { // offset in _OBJ_AddressBase_
  111. signed short int X; //left right
  112. signed short int Y; //near far
  113. unsigned char ImageNo;
  114. unsigned char Dir;
  115. unsigned char Flags;
  116. unsigned char ID;
  117. signed short int Z; //up down
  118. unsigned short int ExtSeg;// Segment offset unknown
  119. } _OBJ_Block;
  120. // see Snd_Item in sounds.h for sound structs // offset in _SND_AddressBase_
  121. // many segs = (_ROOM_Block.OffsetSeg)-2
  122. typedef struct _SEG_Block { // offset in ROOM_AddressBase_
  123. signed short int RoofHight; //
  124. signed short int FloorHight; //
  125. unsigned short int Internal; // Internal work space
  126. unsigned char RoofGfx; // \ gfx stuff
  127. unsigned char FloorGfx; // /
  128. unsigned char Flags; // see below
  129. unsigned char Glow; //
  130. unsigned char SuperLink; // Map number or Transparence drop
  131. unsigned char Sides; // number of walls
  132. unsigned short int WallOffset; // offset (_WALL_Block)
  133. unsigned short int XYDispRoof; // byte each for x and y
  134. unsigned short int XYDispFloor;// "" ""
  135. unsigned short int ID; //
  136. } _SEG_Block;
  137. // Flags
  138. #define SGF_SuperLinked 0x01 // map warp...
  139. #define SGF_Candle 0x02 // candle lit segment
  140. #define SGF_RoofScale 0x0c // 0-3 roof scale
  141. #define SGF_FloorScale 0x30 // 0-3 floor scale
  142. // many walls = (_ROOM_Block.OffsetWall)-2
  143. typedef struct _WALL_Block { // offset in _ROOM_AddressBase
  144. unsigned short int Vert1Offset;// offset16 (_VERT_Block)
  145. unsigned short int Vert2Offset;// offset16 (_VERT_Block)
  146. unsigned short int FaceOffset; // offset16 (_FACE_Block)
  147. unsigned short int TSeg; // offset16 (_SEG_Block) (Inside(link back to seg))
  148. unsigned short int TSegBack; // offset16 (_SEG_Block) (behind wall)
  149. unsigned char Flags; // offset16 (_SEG_Block) (behind wall)
  150. unsigned char TriggerID; // offset16 (_SEG_Block) (behind wall)
  151. } _WALL_Block;
  152. #define WBF_StopPlayer 0x01
  153. // many faces = (_ROOM_Block.OffsetFace)-2
  154. typedef struct _FACE_Block { // offset in _ROOM_AddressBase
  155. unsigned short int XSize; // BIT 15 = extended struc
  156. unsigned char UpperGfx; // \
  157. unsigned char LowerGfx; // Þ Gfx stuff
  158. unsigned char WallGfx; // /
  159. unsigned char Flags; // see below
  160. // extended struc only
  161. unsigned char XShift; // image shift info
  162. unsigned char YShift; //
  163. unsigned short int ID; //
  164. } _FACE_Block;
  165. // flags
  166. #define FCF_Transparent 0x01 //
  167. #define FCF_XFlip 0x02 //
  168. #define FCF_ImageFit 0x04 //
  169. #define FCF_TranFlag 0x08 // mono colour
  170. #define FCF_NoReflect 0x10 //
  171. #define FCF_HalfSize 0x20 //
  172. #define FCF_EdgeMap 0x40 //
  173. #define FCF_YEdge 0x80 //
  174. // notes for face struct...
  175. // to save memory all duplicate FACE structs popint to the same address
  176. // so if you know you are going to edit it, give it a unique ID, that way
  177. // it cannot be packed.
  178. // many verts = (_ROOM_Block.OffsetVert)-2
  179. typedef struct _VERT_Block { // offset in _ROOM_AddressBase
  180. signed long int X; // \after rotation
  181. signed long int Z; // /
  182. signed short int StartX; //
  183. signed short int StartZ; //
  184. } _VERT_Block;
  185. typedef struct _LINK_Block { // offset in _LINK_AddressBase
  186. unsigned short int FileSize; // block size
  187. unsigned short int OffsetVert;// Vertex list
  188. unsigned short int ManyVert; // many vertices
  189. unsigned short int InitVert; // Where i start
  190. // this will get longer...
  191. } _LINK_Block;
  192. #pragma aux UserBreak="int 3";
  193. typedef struct _MOUSE { // offset in ROOM_AddressBase_
  194. unsigned long int AddressPtrLo; // Lores pointer \if same will dbl
  195. unsigned long int AddressPtrHi; // Hires pointer /hires version
  196. unsigned long int HotSpotX; // coods into pointer
  197. unsigned long int HotSpotY; // "" ""
  198. unsigned long int Speed; // mouse speed 32=normal 16=*2 64=/2
  199. } _MOUSE;
  200. #pragma PACK ;
  201. #ifdef __cplusplus
  202. };
  203. #endif
  204. #define ROTHREND_H_INCLUDE
  205. #endif
  206.