 |
cmd_cyclepic |
Function (ROM Call 0x339) |
Executes TI-Basic 'CyclePic' command.
cmd_cyclepic implements the TI-Basic CyclePic command, which displays the
Graph Screen and then displays a series of pictures (a slide show) on it in a
cycle. The PicNamePrefix parameter should point to a string item on
the expression stack (more precise, to its STR_TAG),
and n should point to an integer item which determines the total
number of pictures.
The names of the TI-Basic PIC variables which contain the
picture data will be derived from PicNamePrefix and n. For
example, if PicNamePrefix points to "pic" and n points to 5,
the picture data will be picked from TI-Basic PIC variables
called "pic1", "pic2", "pic3", "pic4" and "pic5".
The wait parameter should point to an integer or floating point item which
determines the time between pictures. cycles should point to an
integer item which determines the number of times to cycle through the
pictures. direction should point to an integer item containing 1 or -1.
If it is 1, the pictures will be displayed in a normal loop, and if it is -1,
the loop will run in both directions.
Note: The TI-Basic command CyclePic is implemented to allow making
simple animations in the TI-Basic. Although this function principally may be
used in C to accomplish the same task, the usage of it is tedious and there
are much better ways for doing this in C which are also independent of the
Graph Screen. Take a look at the functions from
graph.h,
wingraph.h, and
sprites.h.
Uses: GetValue, HToESI, next_expression_index, gr_active, memset, sprintf, strlen, idle, OSCheckBreak, OSFreeTimer, OSRegisterTimer, OSTimerExpired, ForceFloat, GraphActivate, DerefSym, FindSymInFolder, TempFolderName, ValidateSymName, VarRecall, WinBitmapPut, _bcd_math