Log In  

Cart #rceach-0 | 2022-03-30 | Code ▽ | Embed ▽ | No License

Feature Overview

RCEACH() performs a two-dimensional loop in a single function.

  • The rectangle value arguments correspond to [table] {x,y,w,h} and [string] "x y w h".
  • You can refer to the current x and y values in the specified function.
  • This function consumes 50 Token.
 local c=(x+y)%8+8

One of KNUTIL's functions, the object generated by EXRECT(), has a rectangle value format to be used for the RCEACH() argument.
may want to Use DMP() if check the converted table.
This function is included in the KNUTIL library.

P#72450 2022-03-30 10:32 ( Edited 2022-06-30 04:10)

interesting construct but per-pixel operations are super costly on Pico.
usually better to find ‘block’ alternative.

P#109406 2022-03-30 11:57

Ah, yes! You are right.
My post is simple in the look of the code and something that can be tried quickly. (I'm not considering cpu cost)

BTW, what does the 'block' you are referring to indicate?

P#109415 2022-03-30 14:02

block = operation on many pixels at once (spr, map, memcpy…)

P#109428 2022-03-30 16:28

I understand!

P#109464 2022-03-31 13:15

[Please log in to post a comment]