CALL CELLO
This page was last modified 23:37, 17 May 2020 by Mars2000you. Based on work by Gdx.

Contents

Effect

SCREEN 5, 6, 7: Replace one color with another in specified rectangular area.
SCREEN 8: Modify the colors according to the RGB in specified rectangular area.
SCREEN 10, 11, 12: Modify the Y values of colors in specified rectangular area.

Note: This instruction is not available in SCREEN 0 to 4. It is available in SCREEN 9 but requires advanced knowledge of this mode to use.

Syntax

CALL CELLO (<X0>,<Y0>)-STEP(<X1>,<Y1>),<N0>,<N1>,<N2>]

According the used SCREEN, some of the three last parameters are optional. Parameters can not end with a comma alone.

Parameters

<X0> and <Y0> are coordinates of first corner of the area (X0=0~255/511, Y0=0~511/1023).

<X1> and <Y1> are coordinates of the opposite corner of the area (X1=0~255/511, Y1=0~511/1023).

STEP parameter changes X2 and Y2 coordinates to relative coordinates (and therefore allows the use of negative values).

<N0> Color to replace in SCREEN 5~7 (0~15), value to add to red in SCREEN 8 (-7~+7) or value to add to Y in SCREEN 10~12 (-31~+31)

<N1> New color in SCREEN 5~7 (0~15) or value to add to green in SCREEN 8 (-7~+7)

<N2> Value to add to blue in SCREEN 8 (-7~+7)

Example

10 CLEAR300,&HA800:BLOAD"diskinst.bin",R:_SYSON
20 SCREEN8: COLOR,0,0: CLS
30 FORI=1 TO 10: CIRCLE(50,50),I*5,I*20: NEXT
40 COPY (0,0)-(100,100) TO (128,0): COPY (0,0)-(255,106) TO (0,106)
50 FORI=1 TO 7: CALL CELLO (0,0)-(100,100),-I,-I,-I: NEXT
60 FORI=1 TO 7: CALL CELLO (128,106)-(228,206),-I,0,-I: NEXT
70 IF NOT STRIG(0) THEN 70

Related to

CALL HMMM, CALL HMMV, CALL LMMM, CALL LMMV, CALL YMMM, CALL VCOPY

Compatibility

DM-System2 BASIC