Thank you Mech for figuring out what the stack management stuff was
about.
And yes, apparently the best way to match those functions is to have
an `if` statement that uses an unset local variable as its condition
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* Update header files for main, memory and math_util
* Required updating func_802A82E4 to keep the match
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* import random_u16 to sm64
* rand math decomp
* Match func_80298AC0
* Match some actor funcs
* Renames
* update gitignore for .bin textures
* update player struct member 34 to Vec3f
* Named and documented actor destroy funcs
I misunderstood how unions worked. In order to accomplish the
original goal, the 3 named s16's need to be in a struct instead
of just floating around.
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* Identify some Actor count variables
* Match place_all_item_boxes
Also more accurately define the UknownRock struct. Some of the
track specific data is spawning points for the "permanent"
actors (stuff like falling rocks, shrubbery, item boxes, etc.)
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
Add a define for the size of the actor list, and add a comment
cautioning people about how to appropriately interact with
the specialized types.
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* More actor decomp
* memory.c decomp plus bss import into actor code
* Match actors and segment D match
* Match common_textures.inc.c
* Add tool bin2c.py
* Added more actor types and some defines
Also adjusted the generic Actor struct to have some of its members
have names that are generally reasonable for all types of actors
Added a union to the BananActor struct, makes accessing the `rot`
member and the overlapping id/index members more sensible
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* Add some more actor types, match a function
* Identify the boundBox member of the Player struct
Note that while the `flag` members are signed, they should be understood as just a group of bits.
Based on some googling around (see https://stackoverflow.com/a/11644749) the operation `thing.flag |= 0x8000`
is NOT undefined behaviour, even though that is setting the sign bit.
The numerical interpretation of the result as a signed number is implementation defined, while the
actual operation acts on the bit representation of the number.
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* Match func_8002AB70
* Added a header for another file, which required adjusting
a couple other files
* Matched a couple more functions
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
There's a function that appears to use continued fractions
to approximate the value of tanh(x/2), which is super weird.
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
* Name functions that search for 8018D9E0 entries
The one with "_dupe" in its name is the one that has the potential hard lock
laying around
* Add comment for bug in find_8018D9E0_entry_dupe
Signed-off-by: Taggerung <tyler.taggerung@gmail.com>