zNPCMessenger work and Misc fixes#596
Conversation
* ported zNPCSupport code, zNPCTypeCommon * build fix * BossSB2 & BossPlankton
* ported zNPCSupport code, zNPCTypeCommon * build fix * BossSB2 & BossPlankton * zTalkbox work and xScrFx * Floating point error handler func
* Progress * zAssetTypes done for now * Mark zAssetTypes equivalent
🆗 ✅+1543 bytes No Regressions 🎉Progress: 28📈 |
🆗 ✅+2744 bytes No Regressions 🎉Progress: 42📈 |
|
SquareMan
left a comment
There was a problem hiding this comment.
Looks pretty good, some cleanup required. A note about all the "register comments": if any of these comments were derived from the actual assembly rather than just being copied from dwarf I'll leave it to your discretion on if they should be left in. Especially if the function they're in aren't matching yet.
src/SB/Core/gc/iModel.cpp
Outdated
| RpClump* clump; // r17 | ||
| RwFrame* frame; // r16 | ||
| RwFrame* root; // r2 |
There was a problem hiding this comment.
Let's remove these register comments. I'm assuming these are taken from the dwarf as they don't seem match the metrowerks pattern and the unused variables shouldn't be given a register in the first place.
src/SB/Core/x/xFX.cpp
Outdated
| if ((atomic->geometry) != 0) | ||
| { | ||
| RpGeometryForAllMaterials((atomic->geometry), MaterialSetEnvMap2, data); |
There was a problem hiding this comment.
nit: remove the redundant parentheses around (atomic->geometry)
src/SB/Core/x/xFX.cpp
Outdated
| S32 fogstate; // r29+0x3C | ||
| _xFXAura* ap; // r17 |
There was a problem hiding this comment.
Remove these register comments as well.
src/SB/Core/x/xFX.cpp
Outdated
| xFXRibbon* prev; // r19 | ||
| U32 i; // r18 | ||
| xFXRibbon* ribbon; // r17 |
src/SB/Game/zNPCTypeDutchman.cpp
Outdated
|
|
||
| static void init_sound() | ||
| { | ||
| U32 total; // r11 |
src/SB/Game/zNPCTypeDutchman.cpp
Outdated
| char* scorch_name[2]; // r29+0x58 | ||
| S32 i; // r18 | ||
| RwTexture* laser_texture; // r2 | ||
| S32 model_index; // r3 | ||
| xModelInstance* m = model; // r4 |
src/SB/Game/zNPCTypeDutchman.cpp
Outdated
| S32 oldzwrite; // r29+0x6C | ||
| S32 oldztest; // r29+0x68 | ||
| U32 oldsrcblend; // r29+0x64 | ||
| U32 olddestblend; // r29+0x60 | ||
| U8 oldcmp; // r17 | ||
| xModelInstance* m; // r16 | ||
| U8 haloing; // r17 |
src/SB/Game/zNPCTypeKingJelly.cpp
Outdated
| S32 zNPCKingJelly::SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam, | ||
| xBase* toParamWidget, S32* handled) | ||
| { | ||
| U32 uVar1; |
There was a problem hiding this comment.
A better name can be inferred.
Example:
| U32 uVar1; | |
| U32 ret; |
src/SB/Game/zNPCTypeKingJelly.cpp
Outdated
| if (toEvent == 0x1b5) | ||
| { | ||
| start_fight(); | ||
| goto LAB_8014808c; |
There was a problem hiding this comment.
I'm pretty sure these goto's are just return 1;. If this function doesn't match yet or this suggestion otherwise doesn't work for some reason we can leave it as is.
|
zNPCMessenger work and Misc fixes