blob: d17c5512596ac5d057777f6bf6f0cc7b3917f03b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<!DOCTYPE html>
<html>
<head>
<title>World</title>
<style>
.code{
background:#555;
color:white;
font-family:Consolas;
font-size:12px;
margin:auto 20px;
padding:20px;
}
</style>
</head>
<body>
<h1>World</h1>
<hr>
<h2>Description</h2>
<p>World.h contains functions to create and draw worlds, and provide basic object detection.</p>
<br>
<p>The standard form of world generation in World.h is an array of randomly sized vertical lines.
The width of each line is defined as a single HLINE, a macro defined in common.h. ...</p>
<h3>class World</h3>
<div class="code"><b>private:</b><br>
struct line_t {<br>
float start;<br>
} *line;<br>
unsigned int lineCount;<br>
<b>public:</b><br>
World(float width);<br>
void draw(void);<br>
void detect(vec2 *v,const float width);<br>
</div>
<ul>
<li>struct line_t: float <b>start</b>: Where the top of the line is located.</li>
<li>unsigned int <b>lineCount</b>: Contains the size of the array <i>line</i>.</li>
</ul>
</body>
</html>
|