aboutsummaryrefslogtreecommitdiffstats
path: root/doc/World.htm
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-09-10 11:31:30 -0400
committerClyne Sullivan <tullivan99@gmail.com>2015-09-10 11:31:30 -0400
commita3db993224c994fdff6f50fedcc266c5e0b94aa8 (patch)
tree74d24408ecd5479b2d9cb57d7d904f0336556abe /doc/World.htm
parent3fde0e7edf310245e5658b767840e742c9341597 (diff)
added entities
Diffstat (limited to 'doc/World.htm')
-rw-r--r--doc/World.htm40
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/World.htm b/doc/World.htm
new file mode 100644
index 0000000..d17c551
--- /dev/null
+++ b/doc/World.htm
@@ -0,0 +1,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>