TI99 Environment

# CALL_MAGNIFY

Syntax

CALL_MAGNIFY(magnification-factor)

Description

The MAGNIFY function allows you to specify the size of sprites and how many characters make up each sprite. All active sprites on screen are affected by MAGNIFY. Magnification-factors may be 1, 2, 3, or 4. If no CALL MAGNIFY is in a program, the default magnification-factor is 1. If you want to change the size of individual sprites, use the CALL_MAGNIFYSPRITE function. A magnification-factor of 1 causes all sprites to be single size and unmagnified. This means that each sprite is defined only by the character specified when the sprite was created and takes up just one-character position on the screen. This is the default magnification factor. A magnification-factor of 2 causes all sprites to be single size and magnified. This means that each sprite is defined only by the character specified when it was created but takes up four character positions on the screen. Each dot position in the character specified expands to occupy four dot positions on the screen. The expansion from a magnification-factor of 1 is down and to the right. A magnification-factor of 3 causes all sprites to be double-size and unmagnified. This means that each sprite is defined by four-character positions that include the character specified. The first character is the one specified when the sprite was created if its number is evenly divisible by four or the next smallest number that is evenly divisible by four. That character is the upper left quarter of the sprite. The next character is the lower left quarter of the sprite. The next character is the upper right quarter of the sprite. The final character is the lower right quarter of the sprite. The character specified when the sprite was created is one of the four that makes up the sprite. The sprite occupies four-character positions on the screen. A magnification-factor of 4 causes all sprites to be double-size and magnified. As with a magnification factor of 3 each sprite is defined by four-character positions that include the character specified.

Example Code

    `  Magnify() test - Adapted from XB ref manual page 121
    call_clear()
    display_at(8,1,"PRESS A KEY TO CHANGE",0)
    call_char(96, "1898ff3d3c3ce404")
    call_sprite(1,96,5,92,124,0,0)
    tiwaitkey()
    CALL_MAGNIFY(2)
    tiwaitkey()
    call_char(96,"0103c3417f3f07070707077e7c40000080c0c080fcfee2e3e0e0e06060606070")
    tiwaitkey()
    CALL_MAGNIFY(4)
    tiwaitkey()
    CALL_MAGNIFY(3)
    call_clear()
    display_at(24,1,"PRESS A KEY TO END",0)
    tiwaitkey()
    end

    Program Explanation:
    The program sets up a sprite using character 96. By default, the magnification factor is 1. Then it changes the magnification factor to 2 and redefines character 96.
    Because the definition is 64 characters long, it also defines characters 97, 98, and 99. The program then changes the magnification factor to 4, and finally changes it to 3.

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020