Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add oval and ovalfill functions; update rnd function#89

Open
troyjfarrell wants to merge 3 commits intopicolove:masterpicolove/picolove:masterfrom
troyjfarrell:mastertroyjfarrell/picolove:masterCopy head branch name to clipboard
Open

Add oval and ovalfill functions; update rnd function#89
troyjfarrell wants to merge 3 commits intopicolove:masterpicolove/picolove:masterfrom
troyjfarrell:mastertroyjfarrell/picolove:masterCopy head branch name to clipboard

Conversation

@troyjfarrell
Copy link
Copy Markdown

These commits update the API. The oval and ovalfill functions were added in PICO-8 0.2.1. The rnd(table) addition happened in PICO-8 0.2.0.

Copy link
Copy Markdown
Member

@Shoozza Shoozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello and thanks for the pull request! 😄
However there are some issues/suggestions with the new api calls:

  1. 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

  2. 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.

  3. 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-8
    

    Maybe convert col to 0 if boolean.

  4. _ellipse could be a local function

@troyjfarrell
Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.