mirror of
https://github.com/zeldaret/tp
synced 2026-09-10 04:02:20 -04:00
big d_a_alink pass (#214)
* d_a_alink pass1 wip * more d_a_alink work * remove asm * more daalink work * 20% dol code decompiled * fixed some nonmatchings for building * a few daalink functions and labeling some HIO data
This commit is contained in:
+2
-2
@@ -448,7 +448,7 @@ void dBgS::Move() {
|
||||
cBgS_ChkElm* elm = m_chk_element;
|
||||
for (int i = 0; i < 0x100; i++) {
|
||||
if (elm->ChkUsed()) {
|
||||
elm->m_bgw_base_ptr->CalcDiffShapeAngleY(elm->m_actor_ptr->mCollisionRot.y);
|
||||
elm->m_bgw_base_ptr->CalcDiffShapeAngleY(elm->m_actor_ptr->shape_angle.y);
|
||||
}
|
||||
elm++;
|
||||
}
|
||||
@@ -462,7 +462,7 @@ bool dBgS::Regist(dBgW_Base* pbgw, fopAc_ac_c* p_actor) {
|
||||
}
|
||||
|
||||
if (p_actor != NULL && pbgw->ChkMoveBg()) {
|
||||
pbgw->SetOldShapeAngleY(p_actor->mCollisionRot.y);
|
||||
pbgw->SetOldShapeAngleY(p_actor->shape_angle.y);
|
||||
pbgw->SetRoomId(fopAcM_GetRoomNo(p_actor));
|
||||
}
|
||||
|
||||
|
||||
+12
-10
@@ -213,8 +213,8 @@ SECTION_SDATA2 static f32 lit_4092 = 1000.0f;
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
dBgS_Acch::dBgS_Acch() {
|
||||
SetPolyPassChk(&GetPolyPassChkInfo());
|
||||
SetGrpPassChk(&GetGrpPassChkInfo());
|
||||
SetPolyPassChk(GetPolyPassChkInfo());
|
||||
SetGrpPassChk(GetGrpPassChkInfo());
|
||||
|
||||
m_flags = 0;
|
||||
SetRoofNone();
|
||||
@@ -309,17 +309,12 @@ void dBgS_Acch::GroundCheckInit(dBgS& param_0) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80424B20-80424B2C 051840 000C+00 1/1 0/0 0/0 .bss @4166 */
|
||||
static u8 lit_4166[12];
|
||||
|
||||
/* 80424B2C-80424B80 05184C 0050+04 1/1 0/0 0/0 .bss tmpRoofChk$4165 */
|
||||
static u8 tmpRoofChk[80 + 4 /* padding */];
|
||||
// static dBgS_RoofChk tmpRoofChk;
|
||||
|
||||
/* 80076350-8007654C 070C90 01FC+00 2/2 0/0 0/0 .text GroundCheck__9dBgS_AcchFR4dBgS */
|
||||
// issues with tmpRoofChk
|
||||
#ifdef NONMATCHING
|
||||
/* 80424B2C-80424B80 05184C 0050+04 1/1 0/0 0/0 .bss tmpRoofChk$4165 */
|
||||
static dBgS_RoofChk tmpRoofChk;
|
||||
|
||||
void dBgS_Acch::GroundCheck(dBgS& param_0) {
|
||||
if (!(m_flags & GRND_NONE)) {
|
||||
cXyz grnd_pos;
|
||||
@@ -369,6 +364,13 @@ void dBgS_Acch::GroundCheck(dBgS& param_0) {
|
||||
}
|
||||
}
|
||||
#else
|
||||
/* ############################################################################################## */
|
||||
/* 80424B20-80424B2C 051840 000C+00 1/1 0/0 0/0 .bss @4166 */
|
||||
static u8 lit_4166[12];
|
||||
|
||||
/* 80424B2C-80424B80 05184C 0050+04 1/1 0/0 0/0 .bss tmpRoofChk$4165 */
|
||||
static u8 tmpRoofChk[80 + 4 /* padding */];
|
||||
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
|
||||
@@ -170,7 +170,7 @@ int dBgS_MoveBgActor::MoveBGCreate(char const* p_name, int dzb_id, MoveBGActor_S
|
||||
u32 param_3, Mtx* param_4) {
|
||||
if (param_4 == NULL) {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(mCollisionRot.y);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(mScale.x, mScale.y, mScale.z);
|
||||
PSMTXCopy(mDoMtx_stack_c::get(), field_0x56c);
|
||||
} else {
|
||||
@@ -220,7 +220,7 @@ bool dBgS_MoveBgActor::MoveBGExecute() {
|
||||
bool ret = Execute(&tmp);
|
||||
if (tmp == NULL) {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(mCollisionRot.y);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(mScale.x, mScale.y, mScale.z);
|
||||
PSMTXCopy(mDoMtx_stack_c::get(), field_0x56c);
|
||||
} else {
|
||||
|
||||
+3
-2
@@ -9,6 +9,7 @@
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/mtx/mtxvec.h"
|
||||
#include "rel/d/a/d_a_horse/d_a_horse.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
@@ -476,7 +477,7 @@ void cBgW::GlobalVtx() {
|
||||
/* 80079484-80079564 073DC4 00E0+00 1/1 0/0 0/0 .text SetVtx__4cBgWFv */
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
int cBgW::SetVtx() {
|
||||
bool cBgW::SetVtx() {
|
||||
if (field_0x88 & 0x10) {
|
||||
pm_vtx_tbl = NULL;
|
||||
} else if (field_0x88 & 0x1) {
|
||||
@@ -1136,7 +1137,7 @@ s32 cBgW::GetGrpRoomIndex(cBgS_PolyInfo const& poly) const {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
int room_index = pm_bgd->m_g_tbl[tmp].field_0x2a;
|
||||
room_index = pm_bgd->m_g_tbl[tmp].field_0x2a;
|
||||
if (room_index >= 0xFF) {
|
||||
room_index = 0xFF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user