Skip to content

Commit

Permalink
kytag work
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Sep 2, 2024
1 parent 6a6d70f commit 6e54afb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/d/actor/d_a_kytag02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ dPath* set_next_path_info(kytag02_class* i_this, dPath* path) {
/* 000000F0-0000017C .text get_railwind_vec__FP5dPathi */
cXyz get_railwind_vec(dPath* path, int i_no) {
/* Nonmatching */
dPath__Point* pnt = path->mpPnt;
cXyz p0 = pnt[i_no].mPos;
cXyz p1 = pnt[i_no + 1].mPos;
cXyz ret;
cXyz p0 = path->mpPnt[i_no + 0].mPos;
cXyz p1 = path->mpPnt[i_no + 1].mPos;
dKyr_get_vectle_calc(&p0, &p1, &ret);
return ret;
}
Expand Down
11 changes: 5 additions & 6 deletions src/d/actor/d_a_kytag03.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ void draw_SUB(kytag03_class* i_this) {
/* 00000280-0000050C .text daKytag03_Execute__FP13kytag03_class */
static BOOL daKytag03_Execute(kytag03_class* i_this) {
/* Nonmatching */
fopAc_ac_c* player = dComIfGp_getPlayer(0);
if (!dComIfGp_event_runCheck() || !dComIfGp_event_chkEventFlag(dEvtFlag_STAFF_ALL_e)) {
if (i_this->tevStr.mRoomNo == dStage_roomControl_c::getStayNo()) {
i_this->mbRoomActive = true;
if (i_this->mSwitchID != 0xFF) {
if (dComIfGs_isSwitch(i_this->mSwitchID, i_this->tevStr.mRoomNo)) {
if (dComIfGs_isSwitch(i_this->mSwitchID, dStage_roomControl_c::getStayNo())) {
if (!dKy_contrast_flg_get()) {
dKy_contrast_flg_set(true);
dKy_change_colpat(4);
Expand Down Expand Up @@ -90,13 +89,13 @@ static BOOL daKytag03_Execute(kytag03_class* i_this) {
}
}
} else if (i_this->tevStr.mRoomNo != dStage_roomControl_c::getStayNo()) {
fopAc_ac_c* player = dComIfGp_getPlayer(0);
if (!i_this->mbIsActive && dKy_contrast_flg_get()) {
if (!i_this->mbVisible) {
s16 angleY = 0;
cXyz pos;
pos.x = cM_scos(angleY) * cM_ssin(player->shape_angle.y);
pos.y = cM_ssin(angleY);
pos.z = cM_scos(angleY) * cM_scos(player->shape_angle.y);
pos.x = cM_scos(0) * cM_ssin(player->shape_angle.y);
pos.y = cM_ssin(0);
pos.z = cM_scos(0) * cM_scos(player->shape_angle.y);
i_this->current.pos = player->current.pos + pos * -100.0f;
i_this->current.angle.y = player->current.angle.y;
i_this->shape_angle.y = player->shape_angle.y;
Expand Down

0 comments on commit 6e54afb

Please sign in to comment.