Conversation
|
make sure you pull in changes from main and fix conflicts. in this case let main overwrite your local changes since its dtk-template stuff |
TakaRikka
left a comment
There was a problem hiding this comment.
since most of the functions are still nonmatching anyway i mostly just have cleanup comments or just some tips to remember in the future. i'll probably end up cleaning more when i do a pass over the TU anyway
| // /* 806029D0-806029DC 000000 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */ | ||
| // SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { | ||
| // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| // }; | ||
|
|
||
| // /* 806029DC-806029F0 00000C 0004+10 0/0 0/0 0/0 .data @1787 */ | ||
| // #pragma push | ||
| // #pragma force_active on | ||
| // SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { | ||
| // 0x02000201, | ||
| // /* padding */ | ||
| // 0x40080000, | ||
| // 0x00000000, | ||
| // 0x3FE00000, | ||
| // 0x00000000, | ||
| // }; | ||
| // #pragma pop |
There was a problem hiding this comment.
for all data and such that you've set up, it'd be better to just remove the commented out parts. it just kinda bloats everything
There was a problem hiding this comment.
I usually leave it only because the data sections are still nonmatching. It makes it easier to search for specific data sections at least for me. Is there an easier way to do so that makes it unnecessary to have them in comments?
There was a problem hiding this comment.
For me, I open up the unmodified file in Github if I need to recover one of the placeholder thingy-mabobs.
| /* 806029F0-806029F4 000020 0004+00 1/1 0/0 0/0 .data l_color$3983 */ | ||
| SECTION_DATA static u8 l_color[4] = { | ||
| 0x14, | ||
| 0x0F, | ||
| 0x00, | ||
| 0xFF, | ||
| static _GXColor l_color = { | ||
| 20, 15, 0, -1 |
There was a problem hiding this comment.
for any data that ends in $XXXX, this means that its an "in-function static" and so can be moved into the body of the function that it's used in. also since color values are all unsigned, it'd be better to use 255 (0xFF) rather than -1
| if (i_this->field_0x2738) { | ||
| return 1; | ||
| } else { |
There was a problem hiding this comment.
in cases where there's an early return like this with the rest of the block in one scope, i like to remove the else statement since it functionally does nothing anyway. helps clean it up a little
There was a problem hiding this comment.
I 1000% agree with Taka here
| if (i_this->mpModelMorf->checkFrame(17.0f)) { | ||
| i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_ATTACK_G1, -1); | ||
| i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_G1, -1); | ||
| } else { | ||
| if (i_this->mpModelMorf->checkFrame(32.0f)) { | ||
| i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_ATTACK_G2, -1); | ||
| i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_V_ATTACK_G2, -1); | ||
| } else { | ||
| if (i_this->mpModelMorf->checkFrame(26.0f)) { | ||
| i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_MANTEAU, -1); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
just gonna use here as an example, but in many patterns like this you can clean these up with just else if's instead of continually nested if's. the less nests the better
There was a problem hiding this comment.
I 1000% agree with Taka here as well
| // i_this->mZ2Creature.startCreatureVoice(Z2SE_EN_GND_LAND, -1); | ||
| // } | ||
| // } | ||
| // b |
There was a problem hiding this comment.
remember that isDelete methods always return int
* Remade fresh fork with clean main branch * d_a_b_gnd functions are 40% matching * Some data work * daB_GND_Execute 26% matching * daB_GND_Execute 59% matching * Create and useHeapInit work * Cleanup work and demo_camera at 50% matching * h_damage_check 91% matching * eff_set_h 76% matching * b_gnd_g_down 82% matching * general work * a little bit of improvement on himo_control1 * General work * Draw at 96% * Small gake_check work * Small data cleanup * NodeCallBack matching and data cleanup
No description provided.