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

Add a way to print a list of sprite #85

Merged
merged 5 commits into from
Dec 16, 2024
Merged

Conversation

fjtrujy
Copy link
Member

@fjtrujy fjtrujy commented Dec 9, 2024

Description

This PR does:

  • Fix wrong forced alignment, I think they aren't needed as the first value in the union defines the alignement
  • Create some other inline functions to deal more easily with the colors
  • Add gsKit_prim_list_sprite_gouraud_3d for allowing to draw a list of sprites
  • Update gsKit_clear for using gsKit_prim_list_sprite_gouraud_3d better.

Cheers


typedef union {
u128 stq;
struct {
gs_stq_t st;
u64 tag;
};
} __attribute__((packed, aligned(8))) gs_stq;
Copy link
Member Author

@fjtrujy fjtrujy Dec 10, 2024

Choose a reason for hiding this comment

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

It had wrong alignment it should be 16 instead, but let the compiler to take it based on u128


typedef union {
u128 uv;
struct {
u64 coord;
u64 tag;
};
} __attribute__((packed,aligned(8))) gs_uv;
} __attribute__((packed)) gs_uv;
Copy link
Member Author

Choose a reason for hiding this comment

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

It had wrong alignment it should be 16 instead, but let the compiler to take it based on u128


typedef union {
u128 rgbaq;
struct {
gs_rgbaq_t color;
u64 tag;
};
} __attribute__((packed,aligned(8))) gs_rgbaq;
} __attribute__((packed)) gs_rgbaq;
Copy link
Member Author

Choose a reason for hiding this comment

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

It had wrong alignment it should be 16 instead, but let the compiler to take it based on u128

@fjtrujy fjtrujy marked this pull request as ready for review December 10, 2024 23:26
Copy link
Member

@uyjulian uyjulian left a comment

Choose a reason for hiding this comment

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

Lgtm

@fjtrujy fjtrujy force-pushed the sprite_list branch 2 times, most recently from d62f47a to 9dbd3b0 Compare December 11, 2024 20:56
@fjtrujy fjtrujy merged commit 5e784b1 into ps2dev:master Dec 16, 2024
2 checks passed
@fjtrujy fjtrujy deleted the sprite_list branch December 16, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants