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

line clipping to avoid screen overflow #9

Open
RodrigoDornelles opened this issue Dec 18, 2024 · 0 comments
Open

line clipping to avoid screen overflow #9

RodrigoDornelles opened this issue Dec 18, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@RodrigoDornelles
Copy link
Member

RodrigoDornelles commented Dec 18, 2024

loops and float points are expensive, and I don't have enough geometry knowledge to do this without copying and pasting something ready, it would be interesting to have a method that wasn't so precise but was as fast as possible for the GBA's CPU.

  • function geoclip_line in src/geoclip.c

/**
* @todo use cohen, liang-barsky, clipping de retA, cos, ou another method do clip drop line.
* @brief adjusts a line within the screen
* @param [in,out] x1
* @param [in,out] y1
* @param [in,out] x2
* @param [in,out] y2
* @return fits on the screen
*/
uint8_t geoclip_line(int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2)
{
return 1;
}

@RodrigoDornelles RodrigoDornelles added the help wanted Extra attention is needed label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant