-
-
Notifications
You must be signed in to change notification settings - Fork 1
Setup
ICE gives you the ability to use most of the C libraries, in your programs, and one of these libraries is GraphX
. GraphX
gives you full control of the calculator's screen, allowing you to draw sprites, lines, rectangles, triangles, text, and more. As you can likely guess, this library is incredibly useful for creating games or any program that includes a GUI.
Before you can use any of the fancy commands that let you draw cookies, you need to setup the graphics canvas for use with GraphX
. Luckily, that's incredibly easy to do. Near the beginning of you program, before any of the graphics functions are used, place a single det(0)
command. When your program is executing and it hits det(0)
, the LCD is setup for use with the GraphX
commands, and it clears the screen (sets every pixel to 0xFF (white by default)).
Because TI-OS uses a different LCD mode, you can't use the GraphX
functions without having setup the graphics canvar with det(0)
at some point. Before your program ends (or before it runs a TI-BASIC program that does anything graphically) you need to setup the graphics canvas for TI-OS, which is also simple. Just use det(1)
before your program ends or before you run the graphical TI-BASIC program. If you don't end the GraphX canvas and setup for TI-OS before your program ends, TI-OS will look like this:
ICE will give you a warning if you forgot the det(0)
or det(1)
, which makes it even harder to forget. If this happens to you by accident, just turn your calculator off and back on, no need for a reset.
ICE Compiler | Peter Tillema
- Introduction
- Building your first program
- Math and numbers
- Variables
- Standard system commands
- Program flow control
- Pointers
- Graphics
- Sprites
- Tilemaps
- Useful routines