Skip to content

flip/rotate broken on latest versionsΒ #2016

Closed

Description

@msx80

Hi there, the combination of flip and rotate is broken in 1.0.x. It was working on 0.90.
Affected games that i know of: Warm wheels, Secret Agents.

Test case:

function TIC()
 cls(0)
 for i=0,3 do
   for j=0,3 do
     spr(0,i*10,j*10,14,1,j,i)
   end
 end
end

On 0.9.something:

image

On 1.0.something:

image

Activity

  1. jgengelhardt commented on Oct 4, 2022

    @jgengelhardt

    I've tested this. Flip is fine; rotate 1 and 3 don't work, while 2 does.

  2. borbware commented on Oct 4, 2022

    @borbware
    SponsorContributor

    I noticed the same recently. It's also broken on map()'s remap functions:

    0.90:
    video21

    1.0:
    video20

  3. borbware commented on Nov 8, 2022

    @borbware
    SponsorContributor

    @nesbox any ideas what might have broken this?

  4. Gabby-Paolucci commented on Jan 1, 2023

    @Gabby-Paolucci

    Ah, this is the problem! It will be great to have this bug fixed.

  5. Podepi commented on Jan 3, 2023

    @Podepi
    Contributor

    So the issue appears to be that someone wrote the wrong number when converting from binary to decimal on line 158 in src/core/draw.c
    orientation |= 0b100 became orientation |= 2 instead of orientation |= 4
    It's a simple fix, but I've never contributed to a git repository before so I'm not sure what to do. Do I just make a pull request with that single line changed?

  6. borbware commented on Jan 3, 2023

    @borbware
    SponsorContributor

    So that's the issue! To contribute a fix, make a fork of the repo, change the line (and make a build so you can confirm the change fixes the issue), make a commit (mention "fixes #2016" or something), and then make a pull request where you also mention this issue #2016. That should do the trick!

  7. added a commit that references this issue on Jan 3, 2023
    474dcf8
  8. joshgoebel commented on Jan 3, 2023

    @joshgoebel
    Collaborator

    Yes someone whip up a PR please and I'm happy to approve.

    Was this decimal conversion done for some very old compilers? If so, we really probably should have a file full of just binary constants (or at least the small ones) to cover this instead of doing manual conversions.

  9. added a commit that references this issue on Jan 12, 2023
    116b0a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions