Skip to content

Conversation

@NicoleFaye
Copy link
Contributor

Convert Incorrect integer interpretation to correct 8.8 fixed point decimal interpretation.

Originally misunderstood the way the coordinates are represented causing invalid coordinates to be displayed.

Added helper util method to convert from fixed point to float.

Reviewed all other ram accessed var value interpretations and all others seem to be correct.

@NicoleFaye
Copy link
Contributor Author

NicoleFaye commented Apr 16, 2025

for some reason this includes other commits from the other day's PR, not sure why (1150d0e , 453646d)

@Baekalfen
Copy link
Owner

for some reason this includes another commit from the other day's PR, not sure why (1150d0e)

I think it includes both commits from the other day. And then you have a merge commit. Might be because you're basing it off of your existing branch.

A quick way to fix it, is to take note of the sha (6ca35f0) and do:

git reset --hard origin master # or whatever the remote for my repo is called
git cherry-pick 6ca35f0
git push -f # to overwrite this PRs history

@NicoleFaye
Copy link
Contributor Author

NicoleFaye commented Apr 16, 2025

Okay i think its good now, lmk what you think of the param defaults, wasnt sure if it should have them or not

pyboy/utils.py Outdated
"""
value = int.from_bytes(raw_bytes, "little")

total_bits = num_bytes * 8
Copy link
Owner

Choose a reason for hiding this comment

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

Can't you deduce the num_bytes from the length of raw_bytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes you absolutely can, i think ive been writing too much c lately. ill fix it in the morning, i thnk i still have 1 other small edit i wanna work in this pr, going to make it a draft for now i think

@NicoleFaye NicoleFaye marked this pull request as draft April 17, 2025 07:13
@NicoleFaye
Copy link
Contributor Author

NicoleFaye commented Apr 17, 2025

i think making this a draft ran some of the github actions? you might want to check if thats intended behavior

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