Skip to content

Commit 678c714

Browse files
committed
Update/add function ldoc comments
1 parent 6ba341c commit 678c714

34 files changed

+3177
-1601
lines changed

doc/examples/snippets.p8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ <h2>snippets.p8</h2>
8989
</div> <!-- id="main" -->
9090
<div id="about">
9191
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
92-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
92+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
9393
</div> <!-- id="about" -->
9494
</div> <!-- id="container" -->
9595
</body>

doc/examples/test_class.p8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ <h2>test_class.p8</h2>
129129
</div> <!-- id="main" -->
130130
<div id="about">
131131
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
132-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
132+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
133133
</div> <!-- id="about" -->
134134
</div> <!-- id="container" -->
135135
</body>

doc/examples/test_functions.p8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ <h2>test_functions.p8</h2>
198198
</div> <!-- id="main" -->
199199
<div id="about">
200200
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
201-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
201+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
202202
</div> <!-- id="about" -->
203203
</div> <!-- id="container" -->
204204
</body>

doc/examples/test_json.p8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h2>test_json.p8</h2>
150150
</div> <!-- id="main" -->
151151
<div id="about">
152152
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
153-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
153+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
154154
</div> <!-- id="about" -->
155155
</div> <!-- id="container" -->
156156
</body>

doc/examples/test_test.p8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ <h2>test_test.p8</h2>
218218
</div> <!-- id="main" -->
219219
<div id="about">
220220
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
221-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
221+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
222222
</div> <!-- id="about" -->
223223
</div> <!-- id="container" -->
224224
</body>

doc/index.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ <h2>Modules</h2>
8080
</tr>
8181
<tr>
8282
<td class="name" nowrap><a href="modules/pico8lib.graphics.html">pico8lib.graphics</a></td>
83-
<td class="summary">Drawing and sprite manipulation</td>
83+
<td class="summary">Drawing and sprite manipulation</p>
84+
85+
<p> Any function with a color parameter can add the following line
86+
to make the color optional and use the pen color by default:
87+
<code>c = c or peek(24357) &amp; 15</code></td>
8488
</tr>
8589
<tr>
8690
<td class="name" nowrap><a href="modules/pico8lib.json.html">pico8lib.json</a></td>
@@ -104,7 +108,7 @@ <h2>Modules</h2>
104108
</tr>
105109
<tr>
106110
<td class="name" nowrap><a href="modules/pico8lib.physics.html">pico8lib.physics</a></td>
107-
<td class="summary">check for collision/overlap of a point and a circle
111+
<td class="summary">Check for collision/overlap of a point and a circle
108112
44 tokens</td>
109113
</tr>
110114
<tr>
@@ -120,7 +124,7 @@ <h2>Modules</h2>
120124
</tr>
121125
<tr>
122126
<td class="name" nowrap><a href="modules/pico8lib.tables.html">pico8lib.tables</a></td>
123-
<td class="summary">Get value from table by key, with default</td>
127+
<td class="summary">_</td>
124128
</tr>
125129
<tr>
126130
<td class="name" nowrap><a href="modules/pico8lib.test.html">pico8lib.test</a></td>
@@ -135,11 +139,9 @@ <h2>Modules</h2>
135139
<tr>
136140
<td class="name" nowrap><a href="modules/pico8lib.vector.html">pico8lib.vector</a></td>
137141
<td class="summary">pico8lib vector library
138-
a vector is a point or direction in 2d space
142+
A vector is a point or direction in 2d space
139143
represented by an x and y coordinate
140-
vectors arithmetic represents operations on these points/directions
141-
some code from https://github.com/codekitchen/pico-8-circuits
142-
MIT license, details in LICENSE file</td>
144+
vectors arithmetic represents operations on these points/directions</td>
143145
</tr>
144146
</table>
145147
<h2>Topics</h2>
@@ -177,7 +179,7 @@ <h2>Examples</h2>
177179
</div> <!-- id="main" -->
178180
<div id="about">
179181
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
180-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
182+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
181183
</div> <!-- id="about" -->
182184
</div> <!-- id="container" -->
183185
</body>

doc/modules/pico8lib.class.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ <h3>Returns:</h3>
133133
</div> <!-- id="main" -->
134134
<div id="about">
135135
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
136-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
136+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
137137
</div> <!-- id="about" -->
138138
</div> <!-- id="container" -->
139139
</body>

doc/modules/pico8lib.functions.html

Lines changed: 7 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,15 @@ <h2><a href="#Local_Functions">Local Functions</a></h2>
8787
</tr>
8888
<tr>
8989
<td class="name" nowrap><a href="#error">error ([m])</a></td>
90-
<td class="summary">Raises an error with the given message</td>
90+
<td class="summary">Raise an error with the given message</td>
9191
</tr>
9292
<tr>
9393
<td class="name" nowrap><a href="#memoize">memoize (f)</a></td>
94-
<td class="summary">create a memoized version of a single parameter function
95-
originally from https://www.lua.org/gems/</td>
94+
<td class="summary">Create a memoized version of a single parameter function</td>
9695
</tr>
9796
<tr>
9897
<td class="name" nowrap><a href="#try">try (t, c[, f])</a></td>
99-
<td class="summary">
100-
<p>try/catch/finally implemented with coroutine return codes
101-
from https://www.lexaloffle.com/bbs/?pid=72820
102-
"enjoy, and if you like it feel free to kick a buck to my patreon."
103-
https://www.patreon.com/sharkhugseniko
104-
example:
105-
try(
106-
function()</p>
107-
<pre><code>print("good")
108-
print("bad" ..
109-
</code></pre>
110-
</td>
98+
<td class="summary">try/catch/finally implemented using coroutine return codes</td>
11199
</tr>
112100
</table>
113101

@@ -127,11 +115,6 @@ <h2 class="section-header "><a name="Local_Functions"></a>Local Functions</h2>
127115

128116

129117

130-
<h3>Returns:</h3>
131-
<ol>
132-
133-
null
134-
</ol>
135118

136119

137120

@@ -142,7 +125,7 @@ <h3>Returns:</h3>
142125
<strong>error ([m])</strong>
143126
</dt>
144127
<dd>
145-
Raises an error with the given message
128+
Raise an error with the given message
146129

147130

148131
<h3>Parameters:</h3>
@@ -154,11 +137,6 @@ <h3>Parameters:</h3>
154137
</li>
155138
</ul>
156139

157-
<h3>Returns:</h3>
158-
<ol>
159-
160-
null
161-
</ol>
162140

163141

164142

@@ -169,8 +147,7 @@ <h3>Returns:</h3>
169147
<strong>memoize (f)</strong>
170148
</dt>
171149
<dd>
172-
create a memoized version of a single parameter function
173-
originally from https://www.lua.org/gems/
150+
Create a memoized version of a single parameter function
174151

175152

176153
<h3>Parameters:</h3>
@@ -197,26 +174,7 @@ <h3>Returns:</h3>
197174
<strong>try (t, c[, f])</strong>
198175
</dt>
199176
<dd>
200-
try/catch/finally implemented with coroutine return codes
201-
from https://www.lexaloffle.com/bbs/?pid=72820
202-
"enjoy, and if you like it feel free to kick a buck to my patreon."
203-
https://www.patreon.com/sharkhugseniko
204-
example:
205-
try(
206-
function()</p>
207-
<pre><code>print("good")
208-
print("bad" .. nil)
209-
</code></pre>
210-
<p> end,
211-
function(e)</p>
212-
<pre><code>print("an error occurred:\n" .. e)
213-
</code></pre>
214-
<p> end,
215-
function()</p>
216-
<pre><code>print("finally")
217-
</code></pre>
218-
<p> end
219-
)
177+
try/catch/finally implemented using coroutine return codes
220178

221179

222180
<h3>Parameters:</h3>
@@ -248,7 +206,7 @@ <h3>Parameters:</h3>
248206
</div> <!-- id="main" -->
249207
<div id="about">
250208
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
251-
<i style="float:right;">Last updated 2024-09-08 00:27:21 </i>
209+
<i style="float:right;">Last updated 2024-09-08 02:54:25 </i>
252210
</div> <!-- id="about" -->
253211
</div> <!-- id="container" -->
254212
</body>

0 commit comments

Comments
 (0)