Skip to content

Conversation

anistarafdar
Copy link

im trying to help make this code a little better but since im still new to coding im not sure if im causing more issues than im solving 😆 hopefully this helps though, thank you for the tutorial series

i wrote a reusable function to setup GameCharacters rather than having a setupbug and setupship routine and removed some useless variables that i thought were taking up unnesscary space in memory

an easier way to refer to a structure that doesn't require copious use of the struct keyword in functions is to typedef it using the syntax
"typedef struct {content} name;"

also the width and heigth variables are useless for a structure thats only going to make 16x16 meta sprites so i got rid of it
… code

updated syntax for portions of code using the old version of the struct

there was two functions that did the same thing so i condensed it into a reusable function that can be used for any 16x16 meta sprite GameCharacter
the resulting code is no different and the compiler didnt send a warning but i felt it was necessary to fix a conflict where a function calling playerlocation asked for a UINT16 but was given a signed INT16
im trying to help make this code a little more readable by using constants and good variable names but im not sure if im causing more issues than im solving with readability 😆
attempted to fix readability
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.

1 participant