Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 12, 2024
1 parent a597a19 commit 33c6922
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions include/JSystem/J3DGraphBase/J3DMatBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -593,14 +593,15 @@ struct J3DZMode {
struct J3DBlend : public J3DBlendInfo {
J3DBlend() { *(J3DBlendInfo*)this = j3dDefaultBlendInfo; }
explicit J3DBlend(const J3DBlendInfo& info) { *(J3DBlendInfo*)this = info; }
void setBlendInfo(const J3DBlendInfo& info) { *(J3DBlendInfo*)this = info; }

GXBlendMode getType() const { return (GXBlendMode)mBlendMode; }
GXBlendFactor getSrcFactor() const { return (GXBlendFactor)mSrcFactor; }
GXBlendFactor getDstFactor() const { return (GXBlendFactor)mDstFactor; }
GXLogicOp getLogicOp() const { return (GXLogicOp)mLogicOp; }
GXLogicOp getOp() const { return (GXLogicOp)mLogicOp; }

void load(u8 ditherEnable) {
J3DGDSetBlendMode(getType(), getSrcFactor(), getDstFactor(), getLogicOp(), ditherEnable);
J3DGDSetBlendMode(getType(), getSrcFactor(), getDstFactor(), getOp(), ditherEnable);
}

void setType(u8 i_type) {
Expand All @@ -615,10 +616,8 @@ struct J3DBlend : public J3DBlendInfo {
mDstFactor = i_dst;
}

void getOp() const {}
// void operator=(const J3DBlend&) {}
// void operator==(J3DBlend&) {}
void setBlendInfo(const J3DBlendInfo&) {}
};

extern const J3DFogInfo j3dDefaultFogInfo;
Expand Down
2 changes: 1 addition & 1 deletion src/d/d_com_inf_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void dComIfG_play_c::itemInit() {

field_0x4944 = 7;
mScopeType = 0;
field_0x4946 = 0;
mOperateWind = 0;
field_0x4947 = 0;
mMesgSendButton = 0;
mMesgCancelButton = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/m_Do/m_Do_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
#include "dolphin/gx/GX.h"

/* 80017530-800176BC .text mDoLib_setResTimgObj__FP7ResTIMGP9_GXTexObjUlP10_GXTlutObj */
u8 mDoLib_setResTimgObj(ResTIMG* i_img, GXTexObj* o_texObj, u32 i_tlut_name, GXTlutObj * o_tlutObj) {
u8 mDoLib_setResTimgObj(ResTIMG* i_img, GXTexObj* r4, u32 i_tlut_name, GXTlutObj * o_tlutObj) {
/* Nonmatching - regalloc */
GXTexObj* o_texObj = (GXTexObj*)r4; // fixes regalloc for r31, but the other 3 are incorrect in a different way
if (i_img->indexTexture) {
JUT_ASSERT(0x2b, o_tlutObj != NULL);
GXInitTlutObj(o_tlutObj, ((char*)i_img) + i_img->paletteOffset, (GXTlutFmt)i_img->colorFormat, i_img->numColors);
Expand Down

0 comments on commit 33c6922

Please sign in to comment.