Skip to content

Commit

Permalink
Rebase/warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robojumper committed Jul 1, 2024
1 parent 548da27 commit a3a8396
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/SOUE01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24725,7 +24725,7 @@ fn_8044E230 = .text:0x8044E230; // type:function size:0x1C
fn_8044E250 = .text:0x8044E250; // type:function size:0x68
SetRenderModeObj__Q34nw4r3g3d8G3DStateFRC16_GXRenderModeObj = .text:0x8044E2C0; // type:function size:0xD4
fn_8044E3A0 = .text:0x8044E3A0; // type:function size:0xC
fn_8044E3B0 = .text:0x8044E3B0; // type:function size:0x16C
Invalidate__Q34nw4r3g3d8G3DStateFUl = .text:0x8044E3B0; // type:function size:0x16C
fn_8044E520 = .text:0x8044E520; // type:function size:0x15C
fn_8044E680 = .text:0x8044E680; // type:function size:0x50
fn_8044E6D0 = .text:0x8044E6D0; // type:function size:0x16C
Expand Down
4 changes: 2 additions & 2 deletions include/m/m3d/m_anmchrblend.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class anmChrBlend_c : public banm_c {
virtual int getType() const override;

bool create(nw4r::g3d::ResMdl, int, mAllocator_c *, u32 *);
bool attach(int, nw4r::g3d::AnmObjChrRes *, f32);
bool attach(int, anmChr_c *, f32);
void attach(int, nw4r::g3d::AnmObjChrRes *, f32);
void attach(int, anmChr_c *, f32);
void detach(int);
// Not in NSMBW
void setWeight(int, f32);
Expand Down
6 changes: 3 additions & 3 deletions src/m/m3d/m_anmchrblend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ bool anmChrBlend_c::create(nw4r::g3d::ResMdl mdl, int num, mAllocator_c *alloc,
return true;
}

bool anmChrBlend_c::attach(int idx, nw4r::g3d::AnmObjChrRes *anm, f32 weight) {
void anmChrBlend_c::attach(int idx, nw4r::g3d::AnmObjChrRes *anm, f32 weight) {
nw4r::g3d::AnmObjChrBlend *obj = nw4r::g3d::G3dObj::DynamicCast<nw4r::g3d::AnmObjChrBlend>(mpAnmObj);
obj->SetWeight(idx, weight);
obj->Attach(idx, anm);
}

bool anmChrBlend_c::attach(int idx, anmChr_c *anm, f32 weight) {
void anmChrBlend_c::attach(int idx, anmChr_c *anm, f32 weight) {
nw4r::g3d::AnmObjChrRes *res = nw4r::g3d::G3dObj::DynamicCast<nw4r::g3d::AnmObjChrRes>(anm->getAnimObj());
attach(idx, res, weight);
}
Expand All @@ -50,7 +50,7 @@ void anmChrBlend_c::setWeight(int idx, f32 weight) {
}

f32 anmChrBlend_c::getWeight(int idx) const {
nw4r::g3d::G3dObj::DynamicCast<nw4r::g3d::AnmObjChrBlend>(mpAnmObj)->GetWeight(idx);
return nw4r::g3d::G3dObj::DynamicCast<nw4r::g3d::AnmObjChrBlend>(mpAnmObj)->GetWeight(idx);
}

} // namespace m3d
11 changes: 4 additions & 7 deletions src/m/m_fader.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#include <m/m_fader.h>

// nw4r::g3d::G3DState::Invalidate
extern "C" void fn_8044E3B0(u32 flags);
// m3d::resetMaterial according to NSMBW
extern "C" void fn_802E46D0();
#include <m/m3d/m3d.h>
#include <nw4r/g3d/g3d_state.h>

void mFader_c::draw() {
fn_8044E3B0(0x7ff);
fn_802E46D0();
nw4r::g3d::G3DState::Invalidate(0x7ff);
m3d::resetMaterial();
mpFader->draw();
}

Expand Down

0 comments on commit a3a8396

Please sign in to comment.