Skip to content

Commit f430b9c

Browse files
Update documentation for RC 1.0
Co-Authored-By: RoccoLox Programs <roccoloxprograms2018@gmail.com>
1 parent 046c0fc commit f430b9c

15 files changed

Lines changed: 366 additions & 27 deletions

CelticCE.pdf

143 KB
Binary file not shown.

docs/celticiiifunctions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ Documentation
284284

285285
------------
286286

287-
.. function:: ErrorHandle: det(45); Ans = program to run
287+
.. function:: ErrorHandle: det(45, get_offset); Ans = program to run
288288

289289
Executes BASIC code with an error handler installed. That means the code you execute can do anything it wants including divide by zero, and it will simply end the execution but an obvious system error will not trigger. Instead, this command will return with a value that indicates the error condition. This command has two different modes. If ``Ans`` contains a program name (beginning with the ``prgm`` token), it will run that program. If ``Ans`` contains program code, it will execute that code instead. This will also work with programs beginning with the ``Asm84CEPrgm`` token.
290290

@@ -294,9 +294,11 @@ Documentation
294294

295295
Parameters:
296296
* ``Ans``: The name of the program to run, or TI-BASIC code to be executed
297+
* ``get_offset``: If ``get_offset`` is 1, ErrorHandle will return the byte offset the error occured at in ``Ans``. If it is 0, it will not. This only works with running programs, not strings.
297298

298299
Returns:
299300
* ``Theta``: Contains the error code returned by the program, or 0 if no error occured.
301+
* ``Ans``: Contains the byte offset the error occured at, if ``get_offset`` 1 and an error occured. Otherwise ``Ans`` is not modified.
300302

301303
Errors:
302304
* ``..NULLVAR`` if the program is empty.

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
author = 'RoccoLox Programs, TIny_Hacker'
2525

2626
# The short X.Y version
27-
version = 'b1.3'
27+
version = '1.0-rc.1'
2828
# The full version, including alpha/beta/rc tags
29-
release = 'Beta 1.3'
29+
release = 'Release Candidate 1.0'
3030

3131

3232
# -- General configuration ---------------------------------------------------

docs/errorcodes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,10 @@ Value Error
9494
49 ArchFull
9595
50 Variable
9696
51 Duplicate
97+
52 Date
98+
53 UnknownCmd
99+
54 OverLimit
100+
55 Disabled
101+
56 Xmit
102+
57 MemFull
97103
===== ===========

docs/gensyntax.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ If your program uses Celtic, it is recommended that it makes sure Celtic is inst
3535

3636
``det([[20]])`` will equal 90 if Celtic CE is installed. If the program aims to be compatible with Celtic 2 CSE, you may wish to refer to the `list of version codes <https://dcs.cemetech.net/index.php?title=Third-Party_BASIC_Libraries_(Color)>`__ on the DCS Wiki as well.
3737

38+
prgmAINSTALL
39+
~~~~~~~~~~~~
40+
41+
You'll notice that along with the CelticCE installer binary, Celtic also comes with a program called **AINSTALL**. This program can be used to install CelticCE's hooks (The part of the installation done after the app has been installed) by running it instead of needing to open the app. Like the **AINSTALL** program in Celtic III, this can be used if you wish to install CelticCE from a TI-BASIC program, by simply running **prgmAINSTALL** in it. Keep in mind that **prgmAINSTALL** will only work if the CelticCE app is present and installed on your calculator.
42+
3843
Argument Types
3944
~~~~~~~~~~~~~~
4045

@@ -51,6 +56,8 @@ When using ``Str0`` as a program name, simply store the name of the program into
5156
:"rowSwap(FOO" -> Str0 //AppVar FOO
5257
:"*row(FOO" -> //group FOO
5358

59+
The system programs ``prgm#`` and ``prgm!`` are not supported, so if you attempt to use a Celtic command on them, the command will simply exit.
60+
5461
If a string is used, it must be in the RAM when the function is called.
5562

5663
.. warning:: In almost all cases, Celtic will detect if you passed invalid arguments and return an error instead. However, in the (extremely) rare case that you tried to pass a string with the length of 0, it will not handle this. Don't worry, there shouldn't be any reason this would happen without you trying to make it happen.

docs/graphicsfunctions.rst

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ Documentation
239239

240240
------------
241241

242-
.. function:: ScrollScreen: det(58, direction, amount)
242+
.. function:: ShiftScreen: det(58, direction, amount, x, y, width, height)
243243

244-
Moves the screen a specified amount of pixels in a specified direction. The following directions and corresponding values are below:
244+
Shifts the pixels within a user-specified region of the screen a specified amount of pixels in a specified direction. The following directions and corresponding values are below:
245245

246246
===== =========
247247
Value Direction
@@ -255,6 +255,13 @@ Documentation
255255
Parameters:
256256
* ``direction``: Direction to move the screen in, as seen in the table above.
257257
* ``amount``: The amount of pixels to move the screen.
258+
* ``x``: Starting X position of the region of the screen to shift.
259+
* ``y``: Starting Y position of the region of the screen to shift.
260+
* ``width``: Width of the region of the screen to shift.
261+
* ``height``: Height of the region of the screen to shift.
262+
263+
Alternative method: ``det(58, direction, amount)``
264+
This alternative method acts as a shorthand way to shift the entire screen, rather than a specified region.
258265

259266
Returns:
260267
* Moves the screen in the specified direction.
@@ -409,3 +416,108 @@ Documentation
409416

410417
Returns:
411418
* ``Ans``: 0 if the rectangles do not intersect, and 1 if they do.
419+
420+
------------
421+
422+
.. function:: PutChar: det(66, font, fg_low, fg_high, bg_low, bg_high, x, y, char)
423+
424+
Displays a character specified by the user at ``x``, ``y``, with a user-specified background color as well. ``char`` can range from 0 - 255. In order to figure out the ``char`` value for your preferred character, you can use the handy images below. Simply take the X and Y values on the chart and add them together.
425+
426+
.. figure:: images/fontMapSmall.png
427+
:alt: Chart for determining the code of a specific character (Small font)
428+
:align: center
429+
430+
Small Font
431+
432+
.. figure:: images/fontMapLarge.png
433+
:alt: Chart for determining the code of a specific character (Large font)
434+
:align: center
435+
436+
Large Font
437+
438+
Parameters:
439+
* ``font``: Whether to use the OS large or small font. 0 for the small font and 1 for the large font.
440+
* ``fg_low``: Low byte of the foreground color.
441+
* ``fg_high``: High byte of the foreground color.
442+
* ``bg_low``: Low byte of the background color.
443+
* ``bg_high``: High byte of the background color.
444+
* ``x``: X coordinate to display the character at.
445+
* ``y``: Y coordinate to display the character at.
446+
* ``char``: The numeric code associated with the character to display. See images above for more info.
447+
448+
Alternative method: ``det(66, font, fg_os, bg_os, x, y, char)``
449+
* ``fg_os``: Foreground color from TI-OS Colors menu, like RED or BLUE or NAVY.
450+
* ``bg_os``: Background color from TI-OS Colors menu, like RED or BLUE or NAVY.
451+
452+
Colors:
453+
* A list of colors can be found `here <colors.html>`__.
454+
455+
Returns:
456+
* Displays the specified character.
457+
458+
------------
459+
460+
.. function:: PutTransChar: det(67, font, low, high, x, y, char)
461+
462+
Displays a character specified by the user at ``x``, ``y``, with a transparent background. See the above command for information on character codes.
463+
464+
Parameters:
465+
* ``font``: Whether to use the OS large or small font. 0 for the small font and 1 for the large font.
466+
* ``low``: Low byte of the color.
467+
* ``high``: High byte of the color.
468+
* ``x``: X coordinate to display the character at.
469+
* ``y``: Y coordinate to display the character at.
470+
* ``char``: The numeric code associated with the character to display. See images above for more info.
471+
472+
Alternative method: ``det(67, font, os_color, x, y, char)``
473+
* ``os_color``: Color from TI-OS Colors menu, like RED or BLUE or NAVY.
474+
475+
Colors:
476+
* A list of colors can be found `here <colors.html>`__.
477+
478+
Returns:
479+
* Displays the specified character.
480+
481+
------------
482+
483+
.. function:: HorizLine: det(68, low, high, x, y, length)
484+
485+
Draws a horizontal line beginning at ``x``, ``y``, with a length of ``length``.
486+
487+
Parameters:
488+
* ``low``: Low byte of the color.
489+
* ``high``: High byte of the color.
490+
* ``x``: X coordinate to begin drawing the line at.
491+
* ``y``: Y coordinate to begin drawing the line at.
492+
* ``length``: The length of the horizontal line.
493+
494+
Alternative method: ``det(68, os_color, x, y, length)``
495+
* ``os_color``: Color from TI-OS Colors menu, like RED or BLUE or NAVY.
496+
497+
Colors:
498+
* A list of colors can be found `here <colors.html>`__.
499+
500+
Returns:
501+
* Draws a horizontal line ``length`` pixels long, beginning at ``x``, ``y``.
502+
503+
------------
504+
505+
.. function:: VertLine: det(69, low, high, x, y, length)
506+
507+
Draws a vertical line beginning at ``x``, ``y``, with a length of ``length``.
508+
509+
Parameters:
510+
* ``low``: Low byte of the color.
511+
* ``high``: High byte of the color.
512+
* ``x``: X coordinate to begin drawing the line at.
513+
* ``y``: Y coordinate to begin drawing the line at.
514+
* ``length``: The length of the vertical line.
515+
516+
Alternative method: ``det(69, os_color, x, y, length)``
517+
* ``os_color``: Color from TI-OS Colors menu, like RED or BLUE or NAVY.
518+
519+
Colors:
520+
* A list of colors can be found `here <colors.html>`__.
521+
522+
Returns:
523+
* Draws a vertical line ``length`` pixels long, beginning at ``x``, ``y``.

docs/images/app.png

-10 Bytes
Loading

docs/images/fontMapLarge.png

58.1 KB
Loading

docs/images/fontMapSmall.png

58.2 KB
Loading

docs/images/functionPreview.png

-25 Bytes
Loading

0 commit comments

Comments
 (0)