This site is no longer active and is available for archival purposes only. Registration and login is disabled.

SetSpriteOrigin / Matrix Questions


SetSpriteOrigin / Matrix Questions

Postby sponge » Oct 23, 2004 @ 8:59am

holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby kornalius » Oct 23, 2004 @ 7:41pm

For origins, you should use:

SetOrigin(X, Y); To move the screen around.

SetSpriteFixed(sprite$, true); The sprite won't move with the virtual screen, it will always stay at the X,Y position on the pda screen. This is very usefull for user interface sprites. They always stay on the screen even though the screen origin is changed.

Matrices in PPL can be used like this:

m$ = [10, 20, [30, 40]];
ShowMessage(m$[2][1]); // 30;
Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby sponge » Oct 24, 2004 @ 12:23am

holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby kornalius » Oct 24, 2004 @ 2:59am

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby sponge » Oct 24, 2004 @ 3:19am

holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby kornalius » Oct 24, 2004 @ 3:48pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby sponge » Oct 25, 2004 @ 3:33am

kornalius: How would foreach handle the matrix like the above? It doesn't seem to even render the first row of tiles correctly.

I may just give up a little flexibility and go with a different array for each row, and hardcode a max height.
holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Return to Pocket Programming Language (PPL)


Sort


Forum Description

Discuss this new development tool.

Moderator:

kornalius

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum