-
Notifications
You must be signed in to change notification settings - Fork 38
Matched 10 small functions #713
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
Conversation
|
| Section | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | .text |
12.58% | 13.00% | +59 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | @unnamed@zTalkBox_cpp@::wait_context::reset_type() |
0.00% | 100.00% | +12 |
| ✅ | @unnamed@zTalkBox_cpp@::parse_tag_pause(xtextbox::jot&, const xtextbox&, const xtextbox&, const xtextbox::split_tag&) |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::reset_tag_pause(xtextbox::jot&, const xtextbox&, const xtextbox&, const xtextbox::split_tag&) |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::trigger_pause(const xtextbox::jot&) |
0.00% | 100.00% | +8 |
| ✅ | @unnamed@zTalkBox_cpp@::start_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::start_state_type::update(xScene&, float) |
0.00% | 100.00% | +8 |
| ✅ | @unnamed@zTalkBox_cpp@::next_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::start() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::update(xScene&, float) |
0.00% | 100.00% | +8 |
|
| Section | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | .data |
0.00% | 6.58% | +18 |
| 📈 | .text |
12.58% | 13.36% | +111 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | @unnamed@zTalkBox_cpp@::wait_context::reset_type() |
0.00% | 100.00% | +12 |
| ✅ | @unnamed@zTalkBox_cpp@::parse_tag_pause(xtextbox::jot&, const xtextbox&, const xtextbox&, const xtextbox::split_tag&) |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::reset_tag_pause(xtextbox::jot&, const xtextbox&, const xtextbox&, const xtextbox::split_tag&) |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::trigger_pause(const xtextbox::jot&) |
0.00% | 100.00% | +8 |
| ✅ | @unnamed@zTalkBox_cpp@::state_type::state_type(@unnamed@zTalkBox_cpp@::state_enum) |
0.00% | 100.00% | +20 |
| ✅ | ztalkbox::load(xBase&, xDynAsset&, unsigned long) |
0.00% | 100.00% | +32 |
| ✅ | @unnamed@zTalkBox_cpp@::start_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::start_state_type::update(xScene&, float) |
0.00% | 100.00% | +8 |
| ✅ | @unnamed@zTalkBox_cpp@::next_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::start() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::update(xScene&, float) |
0.00% | 100.00% | +8 |
JoshSanch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work :)
Just some clean-up feedback - we have a types.h file which contains custom type definitions for primitive C/C++ types like unsigned char and signed long, etc. Please go through all of the functions and variables here and replace the primitive types with the shorter names from the types.h file. We use those so that it's easy to modify the types for different platforms as needed.
Thanks for contributing!
src/SB/Game/zTalkBox.h
Outdated
| struct start_state_type | ||
| { | ||
| void stop(); | ||
| signed char update(xScene&, float); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although these arguments aren't used and thus don't need to have parameter names for referencing inside the function, for these update functions I would like us to explicitly include parameter names, as they are the most likely to be updated by modders in the future and we've already seen what these arguments are named even if they were stripped from the DWARF data.
Please update the signature to this:
| signed char update(xScene&, float); | |
| S8 update(xScene& scn, F32 dt); |
…o used code formmatting tool
|
| Section | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | .data |
0.00% | 6.58% | +18 |
| 📈 | .text |
12.58% | 13.36% | +111 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | @unnamed@zTalkBox_cpp@::wait_context::reset_type() |
0.00% | 100.00% | +12 |
| ✅ | @unnamed@zTalkBox_cpp@::parse_tag_pause(xtextbox::jot&, const xtextbox&, const xtextbox&, const xtextbox::split_tag&) |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::reset_tag_pause(xtextbox::jot&, const xtextbox&, const xtextbox&, const xtextbox::split_tag&) |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::trigger_pause(const xtextbox::jot&) |
0.00% | 100.00% | +8 |
| ✅ | @unnamed@zTalkBox_cpp@::state_type::state_type(@unnamed@zTalkBox_cpp@::state_enum) |
0.00% | 100.00% | +20 |
| ✅ | ztalkbox::load(xBase&, xDynAsset&, unsigned long) |
0.00% | 100.00% | +32 |
| ✅ | @unnamed@zTalkBox_cpp@::start_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::start_state_type::update(xScene&, float) |
0.00% | 100.00% | +8 |
| ✅ | @unnamed@zTalkBox_cpp@::next_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::start() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::stop() |
0.00% | 100.00% | +4 |
| ✅ | @unnamed@zTalkBox_cpp@::stop_state_type::update(xScene&, float) |
0.00% | 100.00% | +8 |
Created namespace for parse_tag_pause, reset_tag_pause, and trigger_pause and matched them all
Also matched start_state_type::stop, start_state_type::update, next_state_type::stop, stop_state_type::start, stop_state_type::stop, stop_state_type::update, wait_context::reset_type
Defined the following structs
next_state_type
start_state_type
stop_state_type
Add variable reset_type to wait_context struct