TRSE : pointer not function.

You need an actual VIC.

Moderator: Moderators

Post Reply
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

TRSE : pointer not function.

Post by funkheld »

hello, good day.

the pointer so not funktion???

zpscr : pointer ;
zpcol : pointer;
........
..........
if peek(^197,0)= 17 then
begin
warte(10);
x:=x-1;
if (x=255) then x:=0;
zpscr:=4096+(y*22+x);
zpcol:=4096+(y*22+x);
zpscr[0]:=0;
zpcol[0]:=f;
end;
.........
........


thanks
greeting
User avatar
AndyH
Vic 20 Afficionado
Posts: 364
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: TRSE : pointer not function.

Post by AndyH »

Shouldn't x be in range from 0 to 21 from your calculation?

For example, this works for me:

Code: Select all

	p1:= 4096+(y*22+x);
	x:=x+1;
	if (x>21) then x:=0;
	p1[0] := 1;
--
AndyH
HEWCO | Vic 20 blog
User avatar
AndyH
Vic 20 Afficionado
Posts: 364
Joined: Thu Jun 17, 2004 5:51 am
Website: https://www.hewco.uk
Location: UK
Occupation: Developer

Re: TRSE : pointer not function.

Post by AndyH »

Although I should add, I use AddressTable to get the Y address to avoid heavy calculations such as multiplication and then can do:

p1[ x ] := 1;
--
AndyH
HEWCO | Vic 20 blog
funkheld
Vic 20 Devotee
Posts: 241
Joined: Tue Sep 10, 2019 4:23 am

Re: TRSE : pointer not function.

Post by funkheld »

hello thanks.

greeting
Post Reply