Amulets & Armor  v1.02
Open Source Game
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
3D_IO.H
Go to the documentation of this file.
1 /****************************************************************************/
2 /* FILE: 3D_IO.H */
3 /****************************************************************************/
4 
5 #ifndef _3D_IO_H_
6 #define _3D_IO_H_
7 
8 #include "GENERAL.H"
9 #include "VIEWFILE.H"
10 
11 typedef T_void *T_mapGroup ;
12 #define MAP_GROUP_BAD NULL
13 
14 #define VIEW3D_MAX_OBJECTS 1000
15 
16 #define OBJ_COLLISION_GROUP_NONE 0xFFFF
17 
18 /* Map information telling how many of each item is available. */
19 extern T_word16 G_Num3dThings;
20 extern T_word16 G_Num3dSegs;
21 extern T_word16 G_Num3dSides;
22 extern T_word16 G_Num3dLines;
23 extern T_word16 G_Num3dNodes;
28 extern T_word16 G_Num3dObjects ;
29 
33 
34 /* Arrays to store the map information. */
36 extern T_3dSide *G_3dSideArray;
37 extern T_3dLine *G_3dLineArray;
38 extern T_3dNode *G_3dNodeArray;
39 extern T_3dNode **G_3dPNodeArray;
46 extern T_3dObject *G_Last3dObject ;
48 extern T_byte8 *G_3dReject ;
50 
51 /* Player's location. */
52 extern T_sword16 G_3dPlayerX ;
53 extern T_sword16 G_3dPlayerY ;
55 
56 /* Direction player is facing. */
58 
59 /* Left angle of view (calculated from player's viewing angle). */
62 
63 /* Precomputed sine and cosine of the player's angle. */
66 
67 /* Temporary variables to record the current height of the floor */
68 /* and ceiling. */
71 
77 
78 /* Keep track of information about a sector */
80 
81 #define OBJECT_TYPE_PLAYER_1_START 1
82 #define OBJECT_TYPE_PLAYER_4_START 4
83 
84 T_void View3dLoadMap(T_byte8 *MapName) ;
86 
88  T_word16 num,
89  T_sword16 *p_x,
90  T_sword16 *p_y,
91  T_word16 *p_angle) ;
92 
93 #ifdef MIP_MAPPING_ON
94 T_byte8 *MipMap(T_byte8 *p_texture) ;
95 T_void ReleaseMipMap(T_byte8 *p_mipmap) ;
96 #else
97 #define MipMap(p_texture) (p_texture)
98 #define ReleaseMipMap(p_mipmap)
99 #endif
100 
102 
104 
106 
107 #endif
108 
109 /* Context switching between maps is provided below: */
111 
113 
114 T_void View3dSetMapGroup(T_mapGroup p_mapGroup) ;
115 
116 T_void View3dGetMapGroup(T_mapGroup p_mapGroup) ;
117 
118 
119 /****************************************************************************/
120 /* END OF FILE: 3D_IO.H */
121 /****************************************************************************/