1 |
Attribute VB_Name = "Module_Defs" |
2 |
Option Explicit |
3 |
|
4 |
' --- function declarations: --------------------------------------------------------------------------- |
5 |
|
6 |
Public Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long |
7 |
'Public Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long |
8 |
|
9 |
Public Declare Function GetTickCount Lib "kernel32" () As Long |
10 |
|
11 |
' --- type declarations: ------------------------------------------------------------------------------- |
12 |
|
13 |
Public Type POINTAPI |
14 |
|
15 |
X As Long |
16 |
Y As Long |
17 |
|
18 |
End Type |
19 |
|
20 |
Public Type TLVERTEX |
21 |
|
22 |
X As Single |
23 |
Y As Single |
24 |
Z As Single |
25 |
rhw As Single |
26 |
Color As Long |
27 |
Specular As Long |
28 |
tU As Single |
29 |
tV As Single |
30 |
|
31 |
End Type |
32 |
|
33 |
Public Type LITVERTEX |
34 |
|
35 |
X As Single |
36 |
Y As Single |
37 |
Z As Single |
38 |
Color As Long |
39 |
Specular As Long |
40 |
tU As Single |
41 |
tV As Single |
42 |
|
43 |
End Type |
44 |
|
45 |
Public Type VERTEX |
46 |
|
47 |
X As Single |
48 |
Y As Single |
49 |
Z As Single |
50 |
nX As Single |
51 |
nY As Single |
52 |
nZ As Single |
53 |
tU As Single |
54 |
tV As Single |
55 |
|
56 |
End Type |
57 |
|
58 |
Public Type VERTEX2 |
59 |
|
60 |
p As D3DVECTOR |
61 |
n As D3DVECTOR |
62 |
T As D3DVECTOR2 |
63 |
|
64 |
End Type |
65 |
|
66 |
' --- constants: ---------------------------------------------------------------------------------------- |
67 |
|
68 |
Public Const Const_lFVF_TLVertex = (D3DFVF_XYZRHW Or D3DFVF_TEX1 Or D3DFVF_DIFFUSE Or D3DFVF_SPECULAR) |
69 |
Public Const Const_lFVF_LVertex = (D3DFVF_XYZ Or D3DFVF_DIFFUSE Or D3DFVF_SPECULAR Or D3DFVF_TEX1) |
70 |
Public Const Const_lFVF_Vertex = (D3DFVF_XYZ Or D3DFVF_NORMAL Or D3DFVF_TEX1) |
71 |
|
72 |
Public Const Const_sgPi As Single = 3.14159265358979 |
73 |
Public Const Const_sgDeg2Rad As Single = Const_sgPi / 180 |
74 |
Public Const Const_sgRad2Deg As Single = 180 / Const_sgPi |
75 |
|
76 |
Public Const Const_strApplicationCompany As String = "NetFrag" |
77 |
Public Const Const_strApplicationCreators As String = "raBit" |
78 |
Public Const Const_strApplicationFirstDate As String = "11.02.2002" |
79 |
Public Const Const_strApplicationLastDate As String = "11.03.2002" |
80 |
Public Const Const_strApplicationLongName As String = "RaBit's Rapid Racers" |
81 |
Public Const Const_strApplicationShortName As String = "RRR" |
82 |
Public Const Const_strApplicationVersion As String = "0.34a" |
83 |
|
84 |
' --- variables: ----------------------------------------------------------------------------------------- |
85 |
|
86 |
Global bRunning As Boolean |
87 |
Global bShowPlayer As Boolean |
88 |
|
89 |
Global lplKeyControlFlags(255) As Long |
90 |
|
91 |
Global lCamMode As Long |
92 |
Global lFramesCount As Long |
93 |
Global lLocalPlayerHandle As Long |
94 |
|
95 |
Global strCurrentFPS As String |
96 |
|
97 |
' --- type definitions: --------------------------------------------------------------------------------- |
98 |
|
99 |
Global tpMatIdentity As D3DMATRIX |
100 |
Global tpD3DPresentParameters As D3DPRESENT_PARAMETERS |
101 |
Global tpDummyVertex As VERTEX ' Empty dummy vertex type |
102 |
Global tpUsedDispMode As D3DDISPLAYMODE |
103 |
|
104 |
Global lptpMatSceneMaterials() As D3DMATERIAL8 |
105 |
'Global lptpEmptyD3DMaterialList() As D3DMATERIAL8 |
106 |
|
107 |
' --- objects: ------------------------------------------------------------------------------------------- |
108 |
|
109 |
Global clD3DDevice As Direct3DDevice8 |
110 |
|
111 |
Global clGame As New Class_Game |
112 |
'Global clPlayer As New Class_Player |
113 |
Global clScene As New Class_Scene |
114 |
Global clSystem As New Class_System |
115 |
|
116 |
' --- collections: ---------------------------------------------------------------------------------------- |
117 |
|
118 |
Global gCol_Geo_TexDiffuseTextures As New Collection |