Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdpq_sprite_blit crop doesn't work with flipping #562

Open
kannoneer opened this issue May 28, 2024 · 0 comments
Open

rdpq_sprite_blit crop doesn't work with flipping #562

kannoneer opened this issue May 28, 2024 · 0 comments
Labels
fixed-in-preview Fixed in the preview branch

Comments

@kannoneer
Copy link

I apologize for not having a minimal repro for this but see the example in https://github.com/kannoneer/libdragon/blob/4521ce1bbee1328ba7022a203e33b3de0c85956b/examples/gameloop/gameloop.c#L111

  rdpq_sprite_blit(player_sprite, player.pos.x, player.pos.y, &(rdpq_blitparms_t){
      .s0 = player.frame * PLAYER_SPRITE_SIZE,
      .width = PLAYER_SPRITE_SIZE,
      .flip_x = player.facing == FACING_LEFT
  });

when .flip_x=true the sprite is rendered at a wrong location on x axis.

This is the spritesheet I was trying to display:
ninjafrog

rasky added a commit to rasky/libdragon that referenced this issue Jun 10, 2024
Also fix a bug that cause the texture loader to miscalculate the strip
heights when a source rect was activated, causing far more chunks to
be generated.

Updates DragonMinded#562
rasky added a commit to rasky/libdragon that referenced this issue Jun 10, 2024
Also fix a bug that cause the texture loader to miscalculate the strip
heights when a source rect was activated, causing far more chunks to
be generated.

Updates DragonMinded#562
@rasky rasky added the fixed-in-preview Fixed in the preview branch label Jun 10, 2024
thekovic pushed a commit to thekovic/libdragon-kovic that referenced this issue Jun 11, 2024
Also fix a bug that cause the texture loader to miscalculate the strip
heights when a source rect was activated, causing far more chunks to
be generated.

Updates DragonMinded#562
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-preview Fixed in the preview branch
Projects
None yet
Development

No branches or pull requests

2 participants