Log In  

introduced in 0.2.0d
how to reproduce:

  • call tline with a start point outside of screen boundaries
  • tline starts at 0 without adjusting lookup coordinates

repro cart:

Cart #kuwirapima-0 | 2020-04-24 | Code ▽ | Embed ▽ | No License
9

P#75284 2020-04-24 12:30 ( Edited 2020-04-24 12:33)

:: Felice
1

And, as you mentioned on twitter, it's actually any cliprect, not just the screen boundaries.

P#75331 2020-04-25 09:45
:: zep
2

Fixed for 0.2.0e -- thanks for the heads up.

P#75353 2020-04-25 14:31

@freds72 does this have documentation or another cart?
I would like to understand what's going on here, particularly how to set up the input vectors and what the elements mean.

Does this algorithm have a name or could you recommend any reading that might help?

P#99579 2021-11-03 21:37

@kallanreed what effect are you looking for?
for image rotation, see this post: https://www.lexaloffle.com/bbs/?pid=78451
my version takes edge coordinates and texture coordinates and use something called ‘edge walking’ to draw the polygon.

P#99591 2021-11-04 07:06

I downloaded the cart and was playing with it but I couldn’t understand how to set the uv values. The numbers are like 0,2,15,17 but I couldn’t make out what those values refer to on the map tiles.

The other post’s code just uses map tile coords but requires that the tile not have anything around it on the map.

What I was trying to do was set the texture to use map tile 10,1.

P#99592 2021-11-04 08:40 ( Edited 2021-11-04 08:50)

u/v= tile coordinates (x axis/y axis)
suggest to play with tline to get familiar with these concepts
(and yes, my version doesn’t have that issue - but tbh, not a deal breaker, most games have a lot of map space available)

P#99593 2021-11-04 09:14

I have been playing with tline but those uv values don’t make sense.

local p={
         {x=0,y=0,u=0,v=15,sx=32,sy=8},
         {x=scale,y=0,u=2,v=15,sx=48,sy=8},
         {x=scale,y=scale,u=2,v=17,sx=48,sy=24},
      {x=0,y=scale,u=0,v=17,sx=32,sy=24}}

For example, first vector has u,v=0,15
Your map tiles in the cart are the first 4x4 square starting at 0,0 but the drawn texture is 2x2 starting at 1,1.
Where does 15 come from? That’s not a tile value.

P#99594 2021-11-04 09:54 ( Edited 2021-11-04 09:57)

there is 2 tile maps, scroll down

P#99595 2021-11-04 10:07

Oh, wow. That's embarrassing. Maybe 3AM is a bad time for me to be PICO-ing?
Thanks for the replies.

P#99596 2021-11-04 10:44

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-08-13 05:40:44 | 0.043s | Q:28