TI99 Environment

# CALL_PATTERN

Syntax

CALL_PATTERN(sprite-number,ascii-code)

Description

This function changes the character pattern (shape) of sprite sprite-number without affecting any other characteristics such as size, location and velocity. Parameter sprite-number specifies the sprite being modified (1- maxsprites). Parameter ascii-code may be any integer from 32 to endchar. The sprite will take the shape of the ASCII character in ascii-code. Only active sprites are affected.

Example Code

    `Rotating earth - animation using call_pattern()
    call_clear() : restore _earthdata : for z=1 to 10 : read a$ : call_char((z-1)*4 + 40,a$) : next z
    call_screen(2) : call_magnify(4) : call_sprite(28,40,8,72,16,0,0): call_sprite(1,48,3,72,16,0,0)
    call_char(84,"01") : call_color(7,16,2) : for z=1 to 100 : call_hchar(rnd(23)+1,rnd(27)+3,84,1) : next z
    call_motion(1,0,2) : call_motion(28,0,2)
    do : for z=76 to 48 step -4 : CALL_PATTERN(1,z) : tiwait(250) : next z : loop
    _earthdata:
    data "030f1f3f7f7fffffffff7f7f3f1f0f03c0f0f8fcfefefffffffffefefcf8f0c0"
    data "00060f070707030000000101000000000000e8e8c0c0808040e0f0f0e06010"
    data "00081f3f3e3c1c02070f0f07030000000040400606030203071612000080"
    data "0000003a7a70f0e0e010387c3c1808000000081c3e3e1f111e3f3e1e0c08"
    data "00000010510180000081416020000000003078fcfefeff8ff0fcf878707020"
    data "000103070f0f0704070f0f030303010000f0f8f8fcfcf87880e0c2c28080"
    data "000f1f3f7f7f3f233c7f7e1e1c1c08000090c0c0e0e0c0c000001c14"
    data "000c1e3e7f7ffe1ee0f870702000000000f01804060603000000e0a0"
    data "000710307878f0f000c007050000000000f0f83c3e3e1c0402070e0e04"
    data "000f07014141808000003828000000000080f8f8f0f0e02010387c7c3818"

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020