@@ -3227,7 +3227,6 @@ static int useHeapInit(fopAc_ac_c* i_this) {
32273227
32283228/* 80813EA4-808143A0 00BE64 04FC+00 2/2 0/0 0/0 .text checkBeforeBg__8daE_YM_cFs */
32293229u8 daE_YM_c::checkBeforeBg (s16 i_rot_val) {
3230- // NONMATCHING - regalloc
32313230 dBgS_LinChk lin_chk;
32323231 cXyz my_vec_0;
32333232 cXyz my_vec_1;
@@ -3275,16 +3274,15 @@ u8 daE_YM_c::checkBeforeBg(s16 i_rot_val) {
32753274 mDoMtx_stack_c::multVec (&my_vec_0, &my_vec_1);
32763275 my_vec_3 = current.pos + my_vec_1;
32773276 cXyz inside_vec (0 .0f , 0 .0f , 80 .0f );
3278- cLib_offsetPos (&my_vec_2, &my_vec_3, field_0x668.z , &inside_vec);
3277+ cLib_offsetPos (&my_vec_2, &my_vec_3, (s16) field_0x668.z , &inside_vec);
32793278 lin_chk.Set (&my_vec_3, &my_vec_2, NULL );
32803279 if (dComIfG_Bgsp ().LineCross (&lin_chk) == 0 ) {
32813280 return 1 ;
32823281 }
32833282 cM3dGPla plane;
32843283 dComIfG_Bgsp ().GetTriPla (lin_chk, &plane);
32853284 cXyz* p_vec = plane.GetNP ();
3286- f32 absxz_val = p_vec->absXZ ();
3287- s16 tan_val = cM_atan2s (absxz_val, p_vec->y ) + -0x8000 ;
3285+ s16 tan_val = cM_atan2s (p_vec->absXZ (), p_vec->y ) + -0x8000 ;
32883286 if (abs (tan_val + 0x4000 ) <= 0x1555 ) {
32893287 if (field_0x668.z != (s16)(cM_atan2s (p_vec->x , p_vec->z ) + 0x8000 )) {
32903288 return 1 ;
@@ -3395,25 +3393,24 @@ void daE_YM_c::setHideType() {
33953393
33963394/* 80814BA4-80815224 00CB64 0680+00 2/1 0/0 0/0 .text create__8daE_YM_cFv */
33973395int daE_YM_c::create () {
3398- // NONMATCHING - regalloc
33993396 fopAcM_SetupActor (this , daE_YM_c);
34003397
34013398 mType = fopAcM_GetParam (this );
34023399 if (mType == 0xFF ) {
34033400 mType = 0 ;
34043401 }
34053402
3406- mSwitchBit = fopAcM_GetParam (this ) >> 0x18 ;
3403+ mSwitchBit = ( fopAcM_GetParam (this ) & 0xff000000 ) >> 24 ;
34073404
3408- u8 prm2 = fopAcM_GetParam (this ) >> 0x10 ;
3405+ u8 prm2 = ( fopAcM_GetParam (this ) & 0xff0000 ) >> 16 ;
34093406 if (prm2 == 0xFF ) {
34103407 prm2 = 0 ;
34113408 }
34123409
34133410 field_0x6e0 = prm2 * 100 .0f ;
34143411
3415- u8 prm1 = fopAcM_GetParam (this ) >> 0x8 ;
3416- u8 tmp0 = (current.angle .z >> 8 ) & 0xff ;
3412+ u8 prm1 = ( fopAcM_GetParam (this ) & 0xff00 ) >> 8 ;
3413+ u8 tmp0 = (current.angle .z & 0xff00 ) >> 8 ;
34173414 mTagNo = current.angle .z ;
34183415 field_0x6a1 = 1 ;
34193416 if ((current.angle .x & 3 ) != 0 ) {
@@ -3424,7 +3421,7 @@ int daE_YM_c::create() {
34243421 field_0x6cb = 1 ;
34253422 }
34263423
3427- field_0x6a3 = (current.angle .x >> 8 ) & 0xff ;
3424+ field_0x6a3 = (current.angle .x & 0xff00 ) >> 8 ;
34283425
34293426 if (mSwitchBit != 0xFF && dComIfGs_isSwitch (mSwitchBit , fopAcM_GetRoomNo (this ))) {
34303427#ifdef DEBUG
@@ -3448,10 +3445,9 @@ int daE_YM_c::create() {
34483445 }
34493446
34503447 if (phase == cPhs_COMPLEATE_e) {
3451- current.angle .z = 0 ;
3452- current.angle .x = 0 ;
3453- shape_angle.z = 0 ;
3454- shape_angle.x = 0 ;
3448+ OS_REPORT (" E_YM PARAM %x %x %x \n " , fopAcM_GetParam (this ), current.angle .z , current.angle .x );
3449+ current.angle .x = current.angle .z = 0 ;
3450+ shape_angle.x = shape_angle.z = 0 ;
34553451
34563452 if (!fopAcM_entrySolidHeap (this , useHeapInit, 0x28B0 )) {
34573453 return cPhs_ERROR_e;
@@ -3469,12 +3465,11 @@ int daE_YM_c::create() {
34693465 fopAcM_SetMin (this , -200 .0f , -100 .0f , -200 .0f );
34703466 fopAcM_SetMax (this , 200 .0f , 100 .0f , 200 .0f );
34713467
3472- mAcch .Set (¤t.pos , &old.pos , this , 1 , &mAcchCir , &speed, NULL , NULL );
3468+ mAcch .Set (fopAcM_GetPosition_p (this ), fopAcM_GetOldPosition_p (this ), this , 1 , &mAcchCir ,
3469+ fopAcM_GetSpeed_p (this ), NULL , NULL );
34733470 mAcch .OnLineCheck ();
34743471 mAcchCir .SetWall (30 .0f , 60 .0f );
3475-
3476- health = 10 ;
3477- field_0x560 = 10 ;
3472+ field_0x560 = health = 10 ;
34783473
34793474 mStts .Init (100 , 0 , this );
34803475 mSphCc .Set (E_YM_n::cc_sph_src);
0 commit comments