Add oval and ovalfill functions; update rnd function#89
Add oval and ovalfill functions; update rnd function#89troyjfarrell wants to merge 3 commits intopicolove:masterpicolove/picolove:masterfrom
Conversation
Bouncing DVD Tweetcart[1]_ shows that the x1 can be greater than x2 and/or y1 can be greater than y2. _[1]: https://www.lexaloffle.com/bbs/?pid=dvd#p
Shoozza
left a comment
There was a problem hiding this comment.
Hello and thanks for the pull request! 😄
However there are some issues/suggestions with the new api calls:
-
Resulting ellipse is different from resulting circ call:
circ(5,5,5,2) -- vs oval(0,0,10,10,3)Maybe use a similar approach as in in api.circ
-
Swapping x1,y1 and x1,y1 will result in a different oval
ovalfill(0,0,10,10,2) -- vs ovalfill(10,10,0,0,3)Probably solvable with fixing the previous issue.
-
Calling with true as a color will work in pico-8 but not with picolove, also calling with false will not use black but the last color:
rectfill(0,0,128,128,3) -- we want to see black lines color(2) oval(0,0,10,10) oval(0,0,10,10,true) -- color is 0 afterwards in pico-8 color(2) oval(0,0,10,10,false) -- color is 0 afterwards in pico-8Maybe convert col to 0 if boolean.
-
_ellipse could be a local function
|
It seems to me that we have a larger problem. There are problems with the current implementation of circ and with my implementation of ellipse. Let's leave this PR open while I work out how to write some tests for this. |
These commits update the API. The
ovalandovalfillfunctions were added in PICO-8 0.2.1. Thernd(table)addition happened in PICO-8 0.2.0.