mirror of https://github.com/zeldaret/tp.git
Fix type signatures of cLib_*Bit functions (#2024)
This commit is contained in:
parent
2e15998e7a
commit
dea6243c35
16
Progress.md
16
Progress.md
|
|
@ -7,22 +7,22 @@ Section | Percentage | Decompiled (bytes) | Total (bytes)
|
|||
.init | 97.972973% | 9280 | 9472
|
||||
.extab | 100.000000% | 96 | 96
|
||||
.extabindex | 100.000000% | 96 | 96
|
||||
.text | 37.121526% | 1335092 | 3596544
|
||||
.text | 38.943497% | 1400620 | 3596544
|
||||
.ctors | 100.000000% | 448 | 448
|
||||
.dtors | 100.000000% | 32 | 32
|
||||
.rodata | 100.000000% | 193856 | 193856
|
||||
.data | 100.000000% | 197632 | 197632
|
||||
.sdata | 100.000000% | 1408 | 1408
|
||||
.sdata2 | 100.000000% | 20832 | 20832
|
||||
Total | 43.749602% | 1759028 | 4020672
|
||||
Total | 45.379379% | 1824556 | 4020672
|
||||
|
||||
## Total
|
||||
|
||||
Section | Percentage | Decompiled (bytes) | Total (bytes)
|
||||
---|---|---|---
|
||||
main.dol | 43.749602% | 1759028 | 4020672
|
||||
RELs | 35.305336% | 4060228 | 11500324
|
||||
Total | 37.492800% | 5819256 | 15520996
|
||||
main.dol | 45.379379% | 1824556 | 4020672
|
||||
RELs | 35.420985% | 4073528 | 11500324
|
||||
Total | 38.000680% | 5898084 | 15520996
|
||||
|
||||
## RELs
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ d_a_obj_heavySw | 41.214623% | 2796 | 6784
|
|||
d_a_obj_hfuta | 39.073970% | 2768 | 7084
|
||||
d_a_obj_hhashi | 33.138856% | 3408 | 10284
|
||||
d_a_obj_hsTarget | 100.000000% | 2624 | 2624
|
||||
d_a_obj_ice_l | 34.815373% | 1848 | 5308
|
||||
d_a_obj_ice_l | 49.736247% | 2640 | 5308
|
||||
d_a_obj_ice_s | 35.446009% | 2416 | 6816
|
||||
d_a_obj_iceblock | 32.744340% | 4744 | 14488
|
||||
d_a_obj_iceleaf | 37.604212% | 3428 | 9116
|
||||
|
|
@ -461,7 +461,7 @@ d_a_obj_kbacket | 33.053127% | 3932 | 11896
|
|||
d_a_obj_kbox | 35.736196% | 3728 | 10432
|
||||
d_a_obj_key | 33.145009% | 3520 | 10620
|
||||
d_a_obj_keyhole | 33.394883% | 5064 | 15164
|
||||
d_a_obj_kgate | 35.192216% | 5932 | 16856
|
||||
d_a_obj_kgate | 100.000000% | 16856 | 16856
|
||||
d_a_obj_ki | 41.573034% | 2220 | 5340
|
||||
d_a_obj_kiPot | 53.782895% | 1308 | 2432
|
||||
d_a_obj_kita | 40.112090% | 2004 | 4996
|
||||
|
|
@ -785,4 +785,4 @@ d_a_vrbox2 | 44.907111% | 2804 | 6244
|
|||
d_a_warp_bug | 100.000000% | 2024 | 2024
|
||||
d_a_ykgr | 44.400631% | 2252 | 5072
|
||||
f_pc_profile_lst | 100.000000% | 28156 | 28156
|
||||
Total | 35.305336% | 4060228 | 11500324
|
||||
Total | 35.420985% | 4073528 | 11500324
|
||||
|
|
|
|||
|
|
@ -36,18 +36,18 @@ void cLib_offsetPos(cXyz* pDest, cXyz const* pSrc, s16 angle, cXyz const* vec);
|
|||
s32 cLib_distanceAngleS(s16 x, s16 y);
|
||||
|
||||
template <typename T>
|
||||
inline void cLib_offBit(T& value, u8 bit) {
|
||||
inline void cLib_offBit(T& value, T bit) {
|
||||
value &= ~bit;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void cLib_onBit(T& value, u8 bit) {
|
||||
inline void cLib_onBit(T& value, T bit) {
|
||||
value |= bit;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline u8 cLib_checkBit(T& value, u8 bit) {
|
||||
return value & bit;
|
||||
inline T cLib_checkBit(T& value, T bit) {
|
||||
return (T)(value & bit);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
|
|||
|
|
@ -2696,13 +2696,13 @@ static void action(do_class* i_this) {
|
|||
}
|
||||
|
||||
if (tmp2 != 0 && player->mSpeedF < FLOAT_LABEL(lit_3665)) {
|
||||
cLib_onBit(i_this->mAttentionInfo.mFlags, 0x10);
|
||||
cLib_onBit<u32>(i_this->mAttentionInfo.mFlags, 0x10);
|
||||
|
||||
if (do_carry_check(i_this)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
cLib_offBit(i_this->mAttentionInfo.mFlags, 0x10);
|
||||
cLib_offBit<u32>(i_this->mAttentionInfo.mFlags, 0x10);
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.x, 0, 1, 0x400);
|
||||
|
|
@ -3001,11 +3001,11 @@ static void message(do_class* i_this) {
|
|||
|
||||
if (i_this->field_0xc05 == 2 && i_this->field_0xc08 != -1 && daPy_py_c::i_checkNowWolf()) {
|
||||
fopAcM_OnStatus(i_this, 0);
|
||||
cLib_onBit(i_this->mAttentionInfo.mFlags, 10);
|
||||
cLib_onBit<u32>(i_this->mAttentionInfo.mFlags, 0xa);
|
||||
i_this->mEvtInfo.i_onCondition(dEvtCnd_CANTALK_e);
|
||||
} else {
|
||||
fopAcM_OffStatus(i_this, 0);
|
||||
cLib_offBit(i_this->mAttentionInfo.mFlags, 10);
|
||||
cLib_offBit<u32>(i_this->mAttentionInfo.mFlags, 0xa);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ void dFlower_packet_c::setData(dFlower_data_c* i_data, int param_1, s8 param_2,
|
|||
}
|
||||
|
||||
if (param_2 == 2) {
|
||||
cLib_onBit(i_data->m_state, 0x40);
|
||||
cLib_onBit<u8>(i_data->m_state, 0x40);
|
||||
}
|
||||
|
||||
i_data->field_0x01 = cM_rndF(FLOAT_LABEL(lit_6262));
|
||||
|
|
@ -190,7 +190,7 @@ dFlower_data_c* dFlower_packet_c::newData(s8 param_0, cXyz& i_pos, int i_roomNo,
|
|||
dFlower_data_c* data_p = m_data + field_0x10;
|
||||
|
||||
for (int i = field_0x10; i < 1000; i++) {
|
||||
if (!cLib_checkBit(data_p->m_state, 2)) {
|
||||
if (!cLib_checkBit<u8>(data_p->m_state, 2)) {
|
||||
setData(data_p, i, param_0, i_pos, i_roomNo, i_tableNo, i_addCol);
|
||||
return data_p;
|
||||
}
|
||||
|
|
@ -199,7 +199,7 @@ dFlower_data_c* dFlower_packet_c::newData(s8 param_0, cXyz& i_pos, int i_roomNo,
|
|||
|
||||
data_p = m_data;
|
||||
for (int i = 0; i < field_0x10; i++) {
|
||||
if (!cLib_checkBit(data_p->m_state, 2)) {
|
||||
if (!cLib_checkBit<u8>(data_p->m_state, 2)) {
|
||||
setData(data_p, i, param_0, i_pos, i_roomNo, i_tableNo, i_addCol);
|
||||
return data_p;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,9 +321,9 @@ void dGrass_packet_c::update() {
|
|||
|
||||
sp1C.set(data_p->m_pos.x, data_p->m_pos.y + 260.0f, data_p->m_pos.z);
|
||||
if (mDoLib_clipper::clip(j3dSys.getViewMtx(), sp1C, 260.0f)) {
|
||||
cLib_onBit(data_p->field_0x01, 2);
|
||||
cLib_onBit<u8>(data_p->field_0x01, 2);
|
||||
} else {
|
||||
cLib_offBit(data_p->field_0x01, 2);
|
||||
cLib_offBit<u8>(data_p->field_0x01, 2);
|
||||
|
||||
if (data_p->field_0x02 >= 0) {
|
||||
MtxP mtx = anm_p[data_p->field_0x02].m_animMtx;
|
||||
|
|
|
|||
|
|
@ -1428,12 +1428,12 @@ int daMyna_c::draw() {
|
|||
J3DModelData* modelData = model->getModelData();
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &mTevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model->getModelData(), &mTevStr);
|
||||
if (cLib_checkBit(field_0x914, 0x40)) {
|
||||
if (cLib_checkBit<u16>(field_0x914, 0x40)) {
|
||||
mBtpAnm.entry(modelData);
|
||||
}
|
||||
fopAcM_setEffectMtx(this, modelData);
|
||||
mpMorf->entryDL();
|
||||
if (cLib_checkBit(field_0x914, 0x40)) {
|
||||
if (cLib_checkBit<u16>(field_0x914, 0x40)) {
|
||||
mBtpAnm.remove(modelData);
|
||||
}
|
||||
return 1;
|
||||
|
|
@ -1544,7 +1544,7 @@ int daMyna_c::createHeap() {
|
|||
J3DAnmTexPattern* anmTexPattern = getTexPtrnAnm(l_btpFileNameTBL[field_0x936]);
|
||||
if (anmTexPattern != NULL) {
|
||||
setBtpAnm(anmTexPattern, mpMorf->getModel()->getModelData(), 1.0f, 2);
|
||||
cLib_onBit(field_0x914, 0x44);
|
||||
cLib_onBit<u16>(field_0x914, 0x44);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -3091,7 +3091,7 @@ void daMyna_c::animePlay() {
|
|||
field_0x91E += 1;
|
||||
}
|
||||
|
||||
if (cLib_checkBit(field_0x914, 0x40) != 0 && cLib_checkBit(field_0x914, 4) == 0) {
|
||||
if (cLib_checkBit<u16>(field_0x914, 0x40) != 0 && cLib_checkBit<u16>(field_0x914, 4) == 0) {
|
||||
mBtpAnm.play();
|
||||
if (mBtpAnm.getFrameCtrl()->getAttribute() == 2) {
|
||||
if (checkEndAnm(mBtpAnm.getFrameCtrl()) != 0) {
|
||||
|
|
@ -3105,7 +3105,7 @@ void daMyna_c::animePlay() {
|
|||
mBtpAnm.setPlaySpeed(1.0f);
|
||||
}
|
||||
}
|
||||
cLib_offBit(field_0x914, 0xF);
|
||||
cLib_offBit<u16>(field_0x914, 0xF);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
|
|
@ -3435,11 +3435,11 @@ void daMyna_c::animeControl() {
|
|||
}
|
||||
|
||||
setMcaMorfAnm(getTrnsfrmKeyAnm(l_bckFileNameTBL[field_0x935]), fVar1, fVar2, iVar5, 0, -1);
|
||||
if (cLib_checkBit(field_0x914, 0x40) == 0) {
|
||||
if (cLib_checkBit<u16>(field_0x914, 0x40) == 0) {
|
||||
J3DAnmTexPattern* btk = getTexPtrnAnm(l_btpFileNameTBL[field_0x936]);
|
||||
if (btk != NULL) {
|
||||
setBtpAnm(btk, mpMorf->getModel()->getModelData(), 1.0f, 2);
|
||||
cLib_onBit(field_0x914, 0x44);
|
||||
cLib_onBit<u16>(field_0x914, 0x44);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -700,7 +700,7 @@ asm int daItemKantera_c::actionInit() {
|
|||
int daItemKantera_c::actionWaitInit() {
|
||||
mCollider.OffTgSPrmBit(1);
|
||||
mCollider.OffCoSPrmBit(1);
|
||||
cLib_offBit(mAttentionInfo.mFlags, 16);
|
||||
cLib_offBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
mAttentionInfo.field_0x0[4] = 16;
|
||||
mAttentionInfo.mPosition = current.pos;
|
||||
show();
|
||||
|
|
@ -740,7 +740,7 @@ asm int daItemKantera_c::actionWait() {
|
|||
*/
|
||||
#ifdef NONMATCHING
|
||||
int daItemKantera_c::initActionOrderGetDemo() {
|
||||
cLib_offBit(mAttentionInfo.mFlags, 16);
|
||||
cLib_offBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
mCollider.OffTgSPrmBit(1);
|
||||
mCollider.OffCoSPrmBit(1);
|
||||
hide();
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ extern "C" extern u8 data_80C91AD0[4];
|
|||
|
||||
/* 80C90AF8-80C90B50 000078 0058+00 1/0 0/0 0/0 .text initWait__18daObjMasterSword_cFv */
|
||||
void daObjMasterSword_c::initWait() {
|
||||
cLib_onBit(mAttentionInfo.mFlags, 0x10);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
current.pos = orig.pos;
|
||||
current.angle = orig.angle;
|
||||
shape_angle = orig.angle;
|
||||
|
|
@ -504,7 +504,7 @@ void daObjMasterSword_c::create_init() {
|
|||
initBaseMtx();
|
||||
|
||||
fopAcM_OnCarryType(this, fopAcM_CARRY_UNK_30);
|
||||
cLib_onBit(mAttentionInfo.mFlags, 0x10);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
mAttentionInfo.field_0x0[4] = 74;
|
||||
mAttentionInfo.mPosition = current.pos;
|
||||
mAttentionInfo.mPosition.y += 100.0f;
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ int daObj_SSItem_c::setProcess(ProcessFunc i_process) {
|
|||
/* 80CE7BB4-80CE7C24 001014 0070+00 1/1 0/0 0/0 .text setParam__14daObj_SSItem_cFv */
|
||||
void daObj_SSItem_c::setParam() {
|
||||
mScale.set(1.4f, 1.4f, 1.4f);
|
||||
cLib_onBit(mAttentionInfo.mFlags, 0x10);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
mAcchCir.SetWallR(24.0f);
|
||||
mAcchCir.SetWallH(12.0f);
|
||||
mGravity = -5.0f;
|
||||
|
|
|
|||
|
|
@ -759,7 +759,7 @@ int daObjStone_c::Create() {
|
|||
}
|
||||
|
||||
fopAcM_setCullSizeSphere(this,0.0f,0.0f,0.0f,l_r[mStoneType]*1.2f);
|
||||
cLib_onBit(mAttentionInfo.mFlags,16);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags,0x10);
|
||||
mAttentionInfo.field_0x0[4] = 0x2A;
|
||||
fopAcM_OnCarryType(this,fopAcM_CARRY_LIGHT);
|
||||
|
||||
|
|
@ -1058,7 +1058,7 @@ extern "C" asm void __dt__14dBgS_ObjGndChkFv() {
|
|||
void daObjStone_c::init_modePutWait() {
|
||||
mCollider.OffAtSPrmBit(1);
|
||||
mCollider.OnCoSPrmBit(1);
|
||||
cLib_onBit(mAttentionInfo.mFlags,16);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags,0x10);
|
||||
mInitialOffsetY = l_initial_offsetY[mStoneType];
|
||||
mMode = 0;
|
||||
field_0x0907 = 3;
|
||||
|
|
@ -1073,7 +1073,7 @@ void daObjStone_c::modePutWait() {
|
|||
void daObjStone_c::init_modeWait() {
|
||||
mCollider.OffAtSPrmBit(1);
|
||||
mCollider.OnCoSPrmBit(1);
|
||||
cLib_onBit(mAttentionInfo.mFlags,16);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags,0x10);
|
||||
mMode = 0;
|
||||
field_0x0907 = 0;
|
||||
}
|
||||
|
|
@ -1110,7 +1110,7 @@ void daObjStone_c::modeWait() {
|
|||
void daObjStone_c::init_modeDrop() {
|
||||
mCollider.OnAtSPrmBit(1);
|
||||
mCollider.OnCoSPrmBit(1);
|
||||
cLib_offBit(mAttentionInfo.mFlags,16);
|
||||
cLib_offBit<u32>(mAttentionInfo.mFlags,0x10);
|
||||
mMode = 0;
|
||||
mLastPosY = current.pos.y;
|
||||
field_0x0907 = 1;
|
||||
|
|
@ -1126,7 +1126,7 @@ void daObjStone_c::modeDrop() {
|
|||
|
||||
if (mIsInWater != 0) {
|
||||
mCollider.OffAtSPrmBit(1);
|
||||
mChkObj.ChkGroundHit() ? cLib_onBit(mAttentionInfo.mFlags,16) : cLib_offBit(mAttentionInfo.mFlags,16);
|
||||
mChkObj.ChkGroundHit() ? cLib_onBit<u32>(mAttentionInfo.mFlags,0x10) : cLib_offBit<u32>(mAttentionInfo.mFlags,0x10);
|
||||
|
||||
pos2.x = speedF * cM_ssin(current.angle.y);
|
||||
pos2.y = speed.y;
|
||||
|
|
@ -1278,7 +1278,7 @@ asm void daObjStone_c::modeCarry() {
|
|||
void daObjStone_c::init_modeWalk() {
|
||||
mCollider.OffAtSPrmBit(1);
|
||||
mCollider.OnCoSPrmBit(1);
|
||||
cLib_onBit(mAttentionInfo.mFlags,16);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags,0x10);
|
||||
mMode = 0;
|
||||
field_0x0907 = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ u8 daItemBase_c::getItemNo() {
|
|||
}
|
||||
|
||||
void daItemBase_c::hide() {
|
||||
cLib_offBit(field_0x92b, 1);
|
||||
cLib_offBit<u8>(field_0x92b, 1);
|
||||
}
|
||||
|
||||
void daItemBase_c::show() {
|
||||
cLib_onBit(field_0x92b, 1);
|
||||
cLib_onBit<u8>(field_0x92b, 1);
|
||||
}
|
||||
|
||||
void daItemBase_c::changeDraw() {
|
||||
|
|
@ -30,15 +30,15 @@ void daItemBase_c::changeDraw() {
|
|||
}
|
||||
|
||||
u8 daItemBase_c::chkDraw() {
|
||||
return cLib_checkBit(field_0x92b, 1) != 0;
|
||||
return cLib_checkBit<u8>(field_0x92b, 1) != 0;
|
||||
}
|
||||
|
||||
void daItemBase_c::dead() {
|
||||
cLib_onBit(field_0x92b, 2);
|
||||
cLib_onBit<u8>(field_0x92b, 2);
|
||||
}
|
||||
|
||||
u8 daItemBase_c::chkDead() {
|
||||
return cLib_checkBit(field_0x92b, 2) != 0;
|
||||
return cLib_checkBit<u8>(field_0x92b, 2) != 0;
|
||||
}
|
||||
|
||||
/* 80037B0C-80037B78 03244C 006C+00 0/0 0/0 1/1 .text CheckItemCreateHeap__FP10fopAc_ac_c
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ void dInsect_c::Insect_GetDemoMain() {
|
|||
switch (m_mode) {
|
||||
case 0:
|
||||
if (fopAcM_checkCarryNow(this)) {
|
||||
cLib_offBit(mAttentionInfo.mFlags, 0x10);
|
||||
cLib_offBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
fopAcM_cancelCarryNow(this);
|
||||
fopAcM_orderItemEvent(this, 0, 0);
|
||||
mEvtInfo.i_onCondition(dEvtCnd_CANGETITEM_e);
|
||||
|
|
@ -39,7 +39,7 @@ void dInsect_c::Insect_GetDemoMain() {
|
|||
field_0x585 = 1;
|
||||
}
|
||||
} else {
|
||||
cLib_onBit(mAttentionInfo.mFlags, 0x10);
|
||||
cLib_onBit<u32>(mAttentionInfo.mFlags, 0x10);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ void dTres_c::onStatus(u8 listIdx, int param_1, int flag) {
|
|||
if (param_1 == groupData->getNo()) {
|
||||
u8 status = groupData->getStatus();
|
||||
|
||||
cLib_onBit(status, flag);
|
||||
cLib_onBit<u8>(status, flag);
|
||||
groupData->setStatus(status);
|
||||
}
|
||||
groupData = getNextData(groupData);
|
||||
|
|
@ -176,7 +176,7 @@ void dTres_c::offStatus(u8 listIdx, int param_1, int flag) {
|
|||
if (param_1 == groupData->getNo()) {
|
||||
u8 status = groupData->getStatus();
|
||||
|
||||
cLib_offBit(status, flag);
|
||||
cLib_offBit<u8>(status, flag);
|
||||
groupData->setStatus(status);
|
||||
}
|
||||
groupData = getNextData(groupData);
|
||||
|
|
|
|||
Loading…
Reference in New Issue