Amulets & Armor
v1.02
Open Source Game
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Include
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
;
24
extern
T_word16
G_Num3dSectors
;
25
extern
T_word16
G_Num3dSSectors
;
26
extern
T_word16
G_Num3dVertexes
;
27
extern
T_word16
G_BlockmapSize
;
28
extern
T_word16
G_Num3dObjects
;
29
30
extern
T_word16
G_objCollisionNumX
;
31
extern
T_word16
G_objCollisionNumY
;
32
extern
T_word16
G_lastCollisionList
;
33
34
/* Arrays to store the map information. */
35
extern
T_3dSegment
*
G_3dSegArray
;
36
extern
T_3dSide
*
G_3dSideArray
;
37
extern
T_3dLine
*
G_3dLineArray
;
38
extern
T_3dNode
*
G_3dNodeArray
;
39
extern
T_3dNode
**
G_3dPNodeArray
;
40
extern
T_3dSector
*
G_3dSectorArray
;
41
extern
T_3dVertex
*
G_3dVertexArray
;
42
extern
T_3dSegmentSector
*
G_3dSegmentSectorArray
;
43
extern
T_3dBlockMap
*
G_3dBlockMapArray
;
44
extern
T_3dBlockMapHeader
*
G_3dBlockMapHeader
;
45
extern
T_3dObject
*
G_First3dObject
;
46
extern
T_3dObject
*
G_Last3dObject
;
47
extern
T_sword16
G_3dRootBSPNode
;
48
extern
T_byte8
*
G_3dReject
;
49
extern
T_doubleLinkList
*
G_3dObjCollisionLists
;
50
51
/* Player's location. */
52
extern
T_sword16
G_3dPlayerX
;
53
extern
T_sword16
G_3dPlayerY
;
54
extern
T_sword32
G_3dPlayerHeight
;
55
56
/* Direction player is facing. */
57
extern
T_word16
G_3dPlayerAngle
;
58
59
/* Left angle of view (calculated from player's viewing angle). */
60
extern
T_word16
G_3dPlayerLeftAngle
;
61
extern
T_word16
G_3dPlayerRightAngle
;
62
63
/* Precomputed sine and cosine of the player's angle. */
64
extern
T_sword32
G_3dCosPlayerAngle
;
65
extern
T_sword32
G_3dSinPlayerAngle
;
66
67
/* Temporary variables to record the current height of the floor */
68
/* and ceiling. */
69
extern
T_sword16
G_3dFloorHeight
;
70
extern
T_sword16
G_3dCeilingHeight
;
71
72
extern
T_resource
*
G_3dUpperResourceArray
;
73
extern
T_resource
*
G_3dLowerResourceArray
;
74
extern
T_resource
*
G_3dMainResourceArray
;
75
extern
T_resource
*
G_3dFloorResourceArray
;
76
extern
T_resource
*
G_3dCeilingResourceArray
;
77
78
/* Keep track of information about a sector */
79
extern
T_3dSectorInfo
*
G_3dSectorInfoArray
;
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) ;
85
T_void
View3dUnloadMap
(
T_void
) ;
86
87
T_void
View3dGetStartLocation
(
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
101
T_void
View3dResolveSpecialObjects
(
T_void
) ;
102
103
T_sword16
View3dCalculateLowestCeiling
(
T_word16
sector) ;
104
105
T_void
View3dSetSectorType
(
T_word16
sector,
T_word16
type) ;
106
107
#endif
108
109
/* Context switching between maps is provided below: */
110
T_mapGroup
View3dCreateMapGroup
(
T_void
) ;
111
112
T_void
View3dDestroyMapGroup
(
T_mapGroup
p_mapGroup) ;
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
/****************************************************************************/
Generated on Sun Aug 4 2013 15:35:47 for Amulets & Armor by
1.8.4