Skip to content

Commit 86b16b7

Browse files
remve deprecated functions, add MAKESPRITE
1 parent 94e8e60 commit 86b16b7

274 files changed

Lines changed: 1697 additions & 1612 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docpages/basic-language-reference/functions/integer/02_INDEX.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ The following functions operate on or return **integer values** in Retro Rocket
4444
* \subpage INSTR
4545
* \subpage INT
4646
* \subpage ISPROGRAM
47-
* \subpage LCPUID
4847
* \subpage LEN
49-
* \subpage LGETLASTCPUID
48+
* \subpage MAKESPRITE
5049
* \subpage MAP
5150
* \subpage MAPGET
5251
* \subpage MAPHAS

docpages/basic-language-reference/functions/integer/LCPUID.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

docpages/basic-language-reference/functions/integer/LGETLASTCPUID.md

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
\page MAKESPRITE MAKESPRITE Function
2+
3+
```basic
4+
handle = MAKESPRITE(buffer, length)
5+
```
6+
7+
Allocate and initialise a new sprite from image data loaded into a memory buffer
8+
9+
---
10+
11+
### Examples
12+
13+
```basic
14+
sm = MEMALLOC(4096)
15+
f = OPENIN("/images/owl.png")
16+
BINREAD f, sm, 4096
17+
spr = MAKESPRITE(sm, 4096)
18+
MEMRELEASE sm
19+
PLOT spr, 600, 400
20+
```
21+
22+
---
23+
24+
### Notes
25+
26+
* An error will be raised if the memory does not contain valid image data, or is unable to be read
27+
28+
---
29+
30+
**See also:**
31+
\ref SPRITELOAD "SPRITELOAD" · \ref PLOT "PLOT" · \ref PLOTQUAD "PLOTQUAD" · \ref MEMALLOC "MEMALLOC"

docpages/basic-language-reference/functions/integer/MEMFREE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ ENDIF
5151
---
5252

5353
**See also:**
54-
\ref MEMUSED "MEMUSED" · \ref MEMORY "MEMORY" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"
54+
\ref MEMUSED "MEMUSED" · \ref MEMORY "MEMTOTAL" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"

docpages/basic-language-reference/functions/integer/MEMORY.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
\page MEMORY MEMORY Function
1+
\page MEMORY MEMTOTAL Function
22

33
```basic
4-
MEMORY
4+
MEMTOTAL
55
```
66

77
Returns the total **system memory** in bytes, including both **used** and **free** portions, for BASIC programs and the operating system.
@@ -12,7 +12,7 @@ Returns the total **system memory** in bytes, including both **used** and **free
1212

1313
```basic
1414
REM Print total system memory
15-
PRINT MEMORY
15+
PRINT MEMTOTAL
1616
```
1717

1818
On a 4 GB machine this will typically print:
@@ -23,7 +23,7 @@ On a 4 GB machine this will typically print:
2323

2424
```basic
2525
REM Derive free percentage
26-
PRINT "Free % = "; (MEMFREE * 100) / MEMORY
26+
PRINT "Free % = "; (MEMFREE * 100) / MEMTOTAL
2727
```
2828

2929
If `MEMFREE` reports `3758096384` on a 4 GB machine, this prints:
@@ -43,9 +43,5 @@ Free % = 87
4343

4444
---
4545

46-
\image html memory.png
47-
48-
---
49-
5046
**See also:**
5147
\ref MEMFREE "MEMFREE" · \ref MEMUSED "MEMUSED" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"

docpages/basic-language-reference/functions/integer/MEMPEAK.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ PRINT "Peak usage = "; MEMPEAK; " bytes"
5151
---
5252

5353
**See also:**
54-
\ref MEMUSED "MEMUSED" · \ref MEMFREE "MEMFREE" · \ref MEMORY "MEMORY" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"
54+
\ref MEMUSED "MEMUSED" · \ref MEMFREE "MEMFREE" · \ref MEMORY "MEMTOTAL" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"

docpages/basic-language-reference/functions/integer/MEMPROGRAM.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ Program heap = 392 KB
5151
---
5252

5353
**See also:**
54-
\ref MEMPEAK "MEMPEAK" · \ref MEMUSED "MEMUSED" · \ref MEMFREE "MEMFREE" · \ref MEMORY "MEMORY" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"
54+
\ref MEMPEAK "MEMPEAK" · \ref MEMUSED "MEMUSED" · \ref MEMFREE "MEMFREE" · \ref MEMORY "MEMTOTAL" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"

docpages/basic-language-reference/functions/integer/MEMUSED.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ MEMUSED
66

77
Returns the total **memory in use** (bytes) by **all BASIC programs and the OS**.
88

9-
\image html memory.png
10-
119
### Examples
1210

1311
```basic
1412
PRINT MEMUSED
1513
PRINT "Used = "; MEMUSED / (1024 * 1024); " MB"
16-
PRINT "Free = "; (MEMORY - MEMUSED) / (1024 * 1024); " MB"
14+
PRINT "Free = "; (MEMTOTAL - MEMUSED) / (1024 * 1024); " MB"
1715
PRINT "Used % = "; (MEMUSED * 100) / MEMORY
1816
```
1917

@@ -32,4 +30,4 @@ Used % = 4
3230
* Identity: `MEMFREE + MEMUSED = MEMORY`.
3331

3432
**See also:**
35-
\ref MEMORY "MEMORY" · \ref MEMFREE "MEMFREE" · \ref MEMPEAK "MEMPEAK" · \ref MEMPROGRAM "MEMPROGRAM" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"
33+
\ref MEMORY "MEMTOTAL" · \ref MEMFREE "MEMFREE" · \ref MEMPEAK "MEMPEAK" · \ref MEMPROGRAM "MEMPROGRAM" · \ref MEMORY "MEMRELEASE" · \ref MEMORY "MEMALLOC"

docs/ACS.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<div class="textblock"><div class="fragment"><div class="line">ACS(real-expression)</div>
127127
</div><!-- fragment --><p>Returns the <b>arc cosine</b> (inverse cosine) of the given expression, in <b>radians</b>. The input must be between <span class="tt">-1</span> and <span class="tt">1</span>.</p>
128128
<hr />
129-
<h3 class="doxsection"><a class="anchor" id="examples-91"></a>
129+
<h3 class="doxsection"><a class="anchor" id="examples-90"></a>
130130
Examples</h3>
131131
<div class="fragment"><div class="line">PRINT ACS(1)</div>
132132
</div><!-- fragment --><p>Produces <span class="tt">0</span>.</p>
@@ -139,7 +139,7 @@ <h3 class="doxsection"><a class="anchor" id="examples-91"></a>
139139
<div class="line">PRINT ACS(COS(angle#))</div>
140140
</div><!-- fragment --><p>Produces the original angle (within floating point accuracy).</p>
141141
<hr />
142-
<h3 class="doxsection"><a class="anchor" id="notes-87"></a>
142+
<h3 class="doxsection"><a class="anchor" id="notes-86"></a>
143143
Notes</h3>
144144
<ul>
145145
<li>Argument range: <span class="tt">-1 ≤ x ≤ 1</span>. Values outside this range cause an error.</li>

0 commit comments

Comments
 (0)