Beispiel #1
0
    private static void GmBoss4UtilInitTurnGently(
        AppMain.GMS_BOSS4_DIRECTION _work,
        short dest_angle,
        int frame,
        bool is_positive)
    {
        AppMain.MTM_ASSERT(frame > 0);
        _work.orig_angle = _work.cur_angle;
        _work.turn_angle = 0;
        _work.turn_spd   = 0;
        if (is_positive)
        {
            ushort num = (ushort)((uint)dest_angle - (uint)_work.cur_angle);
            _work.turn_amount = (int)num;
        }
        else
        {
            ushort num = (ushort)((int)dest_angle - AppMain.AKM_DEGtoA32(360) - ((int)_work.cur_angle - AppMain.AKM_DEGtoA32(360)));
            _work.turn_amount = (int)num - AppMain.AKM_DEGtoA32(360);
        }
        _work.turn_gen_var = 0;
        float num1 = 180f / (float)frame;

        AppMain.MTM_ASSERT((double)AppMain.MTM_MATH_ABS(num1) <= 2147483648.0);
        _work.turn_gen_factor = AppMain.AKM_DEGtoA32(num1);
        AppMain.GmBoss4UtilSetDirection(_work, (short)((int)_work.orig_angle + _work.turn_angle));
    }
Beispiel #2
0
    private static void gmEneUniuniNeedleWaitMain(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_UNIUNI_WORK gmsEneUniuniWork = (AppMain.GMS_ENE_UNIUNI_WORK)obj_work;
        AppMain.GMS_ENE_UNIUNI_WORK parentObj        = (AppMain.GMS_ENE_UNIUNI_WORK)obj_work.parent_obj;
        int   rotY = parentObj.rot_y;
        int   rotX = parentObj.rot_x;
        int   rotZ = parentObj.rot_z;
        float len  = parentObj.len;
        int   ay   = (rotY + AppMain.AKM_DEGtoA32(360) / 4 * gmsEneUniuniWork.num) % AppMain.AKM_DEGtoA32(360);

        AppMain.SNNS_MATRIX dst1;
        AppMain.nnMakeRotateXMatrix(out dst1, rotX);
        AppMain.nnRotateZMatrix(ref dst1, ref dst1, rotZ);
        AppMain.nnRotateYMatrix(ref dst1, ref dst1, ay);
        AppMain.SNNS_MATRIX dst2;
        AppMain.nnMakeTranslateMatrix(out dst2, len, 0.0f, 0.0f);
        AppMain.SNNS_MATRIX dst3;
        AppMain.nnMultiplyMatrix(out dst3, ref dst1, ref dst2);
        AppMain.SNNS_VECTOR dst4;
        AppMain.nnCopyMatrixTranslationVector(out dst4, ref dst3);
        obj_work.pos.x = AppMain.FX_F32_TO_FX32(dst4.x) + parentObj.ene_3d_work.ene_com.obj_work.pos.x;
        obj_work.pos.y = AppMain.FX_F32_TO_FX32(dst4.y) + parentObj.ene_3d_work.ene_com.obj_work.pos.y;
        obj_work.pos.z = 655360;
        if (parentObj.attack == 0 || (double)dst4.y < (double)len * 0.98)
        {
            return;
        }
        obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUniuniNeedleAttackInit);
    }
Beispiel #3
0
 private static AppMain.OBS_OBJECT_WORK GmEneUnidesInit(
     AppMain.GMS_EVE_RECORD_EVENT eve_rec,
     int pos_x,
     int pos_y,
     byte type)
 {
     AppMain.UNREFERENCED_PARAMETER((object)type);
     AppMain.OBS_OBJECT_WORK     work             = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_ENE_UNIDES_WORK()), "ENE_UNIDES");
     AppMain.GMS_ENEMY_3D_WORK   gmsEnemy3DWork   = (AppMain.GMS_ENEMY_3D_WORK)work;
     AppMain.GMS_ENE_UNIDES_WORK gmsEneUnidesWork = (AppMain.GMS_ENE_UNIDES_WORK)work;
     AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_ene_unides_obj_3d_list[0], gmsEnemy3DWork.obj_3d);
     AppMain.ObjObjectAction3dNNMotionLoad(work, 0, true, AppMain.ObjDataGet(692), (string)null, 0, (AppMain.AMS_AMB_HEADER)null);
     AppMain.ObjDrawObjectSetToon(work);
     work.pos.z = 655360;
     AppMain.OBS_RECT_WORK pRec1 = gmsEnemy3DWork.ene_com.rect_work[1];
     AppMain.ObjRectWorkSet(pRec1, (short)-8, (short)0, (short)8, (short)16);
     pRec1.flag |= 4U;
     AppMain.OBS_RECT_WORK pRec2 = gmsEnemy3DWork.ene_com.rect_work[0];
     AppMain.ObjRectWorkSet(pRec2, (short)-16, (short)-8, (short)16, (short)16);
     pRec2.flag |= 4U;
     gmsEnemy3DWork.ene_com.rect_work[2].flag &= 4294967291U;
     AppMain.OBS_RECT_WORK pRec3 = gmsEnemy3DWork.ene_com.rect_work[2];
     AppMain.ObjRectWorkSet(pRec3, (short)-19, (short)-16, (short)19, (short)16);
     pRec3.flag     &= 4294967291U;
     work.move_flag &= 4294967167U;
     work.move_flag |= 256U;
     if (((int)eve_rec.flag & 1) == 0)
     {
         work.disp_flag |= 1U;
         work.dir.y      = (ushort)AppMain.AKM_DEGtoA16(45);
     }
     else
     {
         work.dir.y = (ushort)AppMain.AKM_DEGtoA16(-45);
     }
     work.user_work                = (uint)(work.pos.x + ((int)eve_rec.left << 12));
     work.user_flag                = (uint)(work.pos.x + ((int)eve_rec.left + (int)eve_rec.width << 12));
     gmsEneUnidesWork.spd_dec      = 76;
     gmsEneUnidesWork.spd_dec_dist = 15360;
     gmsEneUnidesWork.len          = 17.5f;
     gmsEneUnidesWork.rot_x        = AppMain.AKM_DEGtoA32(90f);
     gmsEneUnidesWork.rot_y        = AppMain.AKM_DEGtoA32(0.0f);
     gmsEneUnidesWork.rot_z        = AppMain.AKM_DEGtoA32(0.0f);
     gmsEneUnidesWork.num          = 0;
     AppMain.gmEneUnidesWaitInit(work);
     for (int index = 0; index < 4; ++index)
     {
         AppMain.OBS_OBJECT_WORK obsObjectWork = AppMain.GmEventMgrLocalEventBirth((ushort)309, pos_x, pos_y, (ushort)0, (sbyte)0, (sbyte)0, (byte)0, (byte)0, (byte)0);
         obsObjectWork.parent_obj = work;
         ((AppMain.GMS_ENE_UNIDES_WORK)obsObjectWork).num = index;
         ++gmsEneUnidesWork.num;
     }
     gmsEneUnidesWork.attack       = 0;
     gmsEneUnidesWork.attack_first = 0;
     gmsEneUnidesWork.zoom_now     = 0;
     gmsEneUnidesWork.zoom         = 1f;
     work.obj_3d.use_light_flag   &= 4294967294U;
     work.obj_3d.use_light_flag   |= 64U;
     return(work);
 }
Beispiel #4
0
 // Token: 0x06000705 RID: 1797 RVA: 0x0003E8D0 File Offset: 0x0003CAD0
 private static bool GmBoss4UtilUpdateFlicker(AppMain.OBS_OBJECT_WORK obj_work, AppMain.GMS_BOSS4_FLICKER_WORK flk_work)
 {
     AppMain.MTM_ASSERT(obj_work);
     AppMain.MTM_ASSERT(obj_work.obj_3d);
     AppMain.MTM_ASSERT(flk_work);
     if (!flk_work.is_active)
     {
         return(true);
     }
     if (flk_work.cycles != 0U)
     {
         if (flk_work.interval_timer != 0U)
         {
             flk_work.interval_timer -= 1U;
         }
         else
         {
             flk_work.cur_angle += flk_work.add_timer;
             if (flk_work.cur_angle >= AppMain.AKM_DEGtoA32(360f))
             {
                 flk_work.cur_angle      = 0;
                 flk_work.cycles        -= 1U;
                 flk_work.interval_timer = flk_work.interval_flk;
             }
         }
         AppMain.GmBsCmnSetObject3DNNFadedColor(obj_work, flk_work.color, (1f - AppMain.nnCos(flk_work.cur_angle)) / 2f);
         return(false);
     }
     if (flk_work.is_active)
     {
         AppMain.GmBoss4UtilEndFlicker(obj_work, flk_work);
     }
     return(true);
 }
Beispiel #5
0
 // Token: 0x06000955 RID: 2389 RVA: 0x00054294 File Offset: 0x00052494
 private static void gmEneKamaHandAttackInit(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENE_KAMA_WORK gms_ENE_KAMA_WORK  = (AppMain.GMS_ENE_KAMA_WORK)obj_work;
     AppMain.GMS_ENE_KAMA_WORK gms_ENE_KAMA_WORK2 = (AppMain.GMS_ENE_KAMA_WORK)obj_work.parent_obj;
     AppMain.VecFx32           vecFx = AppMain.gmEneKamaGetPlayerVectorFx(obj_work);
     obj_work.spd.x          = ( int )(( float )vecFx.x * 1.75f);
     obj_work.spd.y          = ( int )(( float )vecFx.y * 1.75f);
     obj_work.ppFunc         = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneKamaHandAttackMain);
     gms_ENE_KAMA_WORK.timer = 120;
     if ((gms_ENE_KAMA_WORK2.ene_3d_work.ene_com.obj_work.disp_flag & 2U) != 0U)
     {
         obj_work.disp_flag |= 2U;
     }
     if ((gms_ENE_KAMA_WORK2.ene_3d_work.ene_com.obj_work.disp_flag & 1U) != 0U)
     {
         gms_ENE_KAMA_WORK.rot_z_add = -AppMain.AKM_DEGtoA32(15);
     }
     else
     {
         gms_ENE_KAMA_WORK.rot_z_add = AppMain.AKM_DEGtoA32(15);
     }
     AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENE_KAMA_WORK.ene_3d_work.ene_com.rect_work[1];
     AppMain.ObjRectWorkSet(obs_RECT_WORK, -8, -8, 8, 8);
     obs_RECT_WORK.flag |= 4U;
     obj_work.flag      |= 512U;
     obj_work.pos.z      = 655360;
     AppMain.GmSoundPlaySE("Kama");
 }
Beispiel #6
0
 private static float gmBoss3BodyUpdateMoveNormal(AppMain.GMS_BOSS3_BODY_WORK body_work)
 {
     AppMain.VecFx32 vecFx32_1 = new AppMain.VecFx32();
     ++body_work.move_counter;
     if ((double)body_work.move_counter >= (double)body_work.move_frame)
     {
         vecFx32_1.x = body_work.end_pos.x;
         vecFx32_1.y = body_work.end_pos.y;
         vecFx32_1.z = body_work.end_pos.z;
     }
     else
     {
         float           num       = (float)(0.5 * (1.0 - (double)AppMain.nnCos(AppMain.AKM_DEGtoA32(180f * (body_work.move_counter / body_work.move_frame)))));
         AppMain.VecFx32 vecFx32_2 = new AppMain.VecFx32();
         vecFx32_2.x = (int)((double)(body_work.end_pos.x - body_work.start_pos.x) * (double)num);
         vecFx32_2.y = (int)((double)(body_work.end_pos.y - body_work.start_pos.y) * (double)num);
         vecFx32_2.z = (int)((double)(body_work.end_pos.z - body_work.start_pos.z) * (double)num);
         vecFx32_1.x = body_work.start_pos.x + vecFx32_2.x;
         vecFx32_1.y = body_work.start_pos.y + vecFx32_2.y;
         vecFx32_1.z = body_work.start_pos.z + vecFx32_2.z;
     }
     AppMain.OBS_OBJECT_WORK obsObjectWork = AppMain.GMM_BS_OBJ((object)body_work);
     obsObjectWork.pos.x = vecFx32_1.x;
     obsObjectWork.pos.y = vecFx32_1.y;
     obsObjectWork.pos.z = vecFx32_1.z;
     return(body_work.move_frame - body_work.move_counter);
 }
Beispiel #7
0
 private static int GmBsCmnUpdateObject3DNNDamageFlicker(
     AppMain.OBS_OBJECT_WORK obj_work,
     AppMain.GMS_BS_CMN_DMG_FLICKER_WORK flk_work)
 {
     if (flk_work.is_active == 0)
     {
         return(1);
     }
     if (flk_work.cycles != 0U)
     {
         if (flk_work.interval_timer != 0U)
         {
             --flk_work.interval_timer;
         }
         else
         {
             flk_work.cur_angle += AppMain.AKM_DEGtoA32(45f);
             if (flk_work.cur_angle >= AppMain.AKM_DEGtoA32(360f))
             {
                 flk_work.cur_angle = 0;
                 --flk_work.cycles;
             }
         }
         AppMain.GmBsCmnSetObject3DNNFadedColor(obj_work, AppMain.gm_bs_cmn_dmg_flicker_default_color, (float)((1.0 - (double)AppMain.nnCos(flk_work.cur_angle)) / 2.0));
         return(0);
     }
     if (flk_work.is_active != 0)
     {
         AppMain.GmBsCmnEndObject3DNNDamageFlicker(obj_work, flk_work);
     }
     return(1);
 }
    // Token: 0x06001030 RID: 4144 RVA: 0x0008CD04 File Offset: 0x0008AF04
    private static void gmEneUniuniNeedleWaitMain(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_UNIUNI_WORK gms_ENE_UNIUNI_WORK  = (AppMain.GMS_ENE_UNIUNI_WORK)obj_work;
        AppMain.GMS_ENE_UNIUNI_WORK gms_ENE_UNIUNI_WORK2 = (AppMain.GMS_ENE_UNIUNI_WORK)obj_work.parent_obj;
        int   num   = gms_ENE_UNIUNI_WORK2.rot_y;
        int   rot_x = gms_ENE_UNIUNI_WORK2.rot_x;
        int   rot_z = gms_ENE_UNIUNI_WORK2.rot_z;
        float len   = gms_ENE_UNIUNI_WORK2.len;

        num += AppMain.AKM_DEGtoA32(360) / 4 * gms_ENE_UNIUNI_WORK.num;
        num %= AppMain.AKM_DEGtoA32(360);
        AppMain.SNNS_MATRIX snns_MATRIX;
        AppMain.nnMakeRotateXMatrix(out snns_MATRIX, rot_x);
        AppMain.nnRotateZMatrix(ref snns_MATRIX, ref snns_MATRIX, rot_z);
        AppMain.nnRotateYMatrix(ref snns_MATRIX, ref snns_MATRIX, num);
        AppMain.SNNS_MATRIX snns_MATRIX2;
        AppMain.nnMakeTranslateMatrix(out snns_MATRIX2, len, 0f, 0f);
        AppMain.SNNS_MATRIX snns_MATRIX3;
        AppMain.nnMultiplyMatrix(out snns_MATRIX3, ref snns_MATRIX, ref snns_MATRIX2);
        AppMain.SNNS_VECTOR snns_VECTOR;
        AppMain.nnCopyMatrixTranslationVector(out snns_VECTOR, ref snns_MATRIX3);
        obj_work.pos.x = AppMain.FX_F32_TO_FX32(snns_VECTOR.x) + gms_ENE_UNIUNI_WORK2.ene_3d_work.ene_com.obj_work.pos.x;
        obj_work.pos.y = AppMain.FX_F32_TO_FX32(snns_VECTOR.y) + gms_ENE_UNIUNI_WORK2.ene_3d_work.ene_com.obj_work.pos.y;
        obj_work.pos.z = 655360;
        if (gms_ENE_UNIUNI_WORK2.attack != 0 && ( double )snns_VECTOR.y >= ( double )len * 0.98)
        {
            obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUniuniNeedleAttackInit);
        }
    }
Beispiel #9
0
    private static void GmBoss4UtilInitFlicker(
        AppMain.OBS_OBJECT_WORK obj_work,
        AppMain.GMS_BOSS4_FLICKER_WORK flk_work,
        int times,
        int start,
        int spd,
        int interval,
        AppMain.NNS_RGB rgb)
    {
        int num = AppMain.AKM_DEGtoA32(360f / (float)(spd + 1));

        AppMain.MTM_ASSERT((object)obj_work);
        AppMain.MTM_ASSERT((object)obj_work.obj_3d);
        AppMain.MTM_ASSERT((object)flk_work);
        flk_work.is_active      = true;
        flk_work.cycles         = (uint)times;
        flk_work.interval_timer = (uint)start;
        flk_work.cur_angle      = 0;
        flk_work.add_timer      = num;
        flk_work.interval_flk   = (uint)interval;
        flk_work.color.r        = rgb.r;
        flk_work.color.g        = rgb.g;
        flk_work.color.b        = rgb.b;
        AppMain.GmBsCmnClearObject3DNNFadedColor(obj_work);
    }
    // Token: 0x06000E70 RID: 3696 RVA: 0x0008125C File Offset: 0x0007F45C
    public static void gmBoss5TurretSetRoundFaceRot(AppMain.GMS_BOSS5_TURRET_WORK trt_work, int dir_z_angle, int tilt_near_angle)
    {
        int rz = (int)(65535L & (long)(-(long)dir_z_angle));

        AppMain.nnMakeRotateXZYQuaternion(out trt_work.disp_quat, AppMain.AKM_DEGtoA32(90), -tilt_near_angle, AppMain.AKM_DEGtoA32(90));
        AppMain.NNS_QUATERNION nns_QUATERNION;
        AppMain.nnMakeRotateXYZQuaternion(out nns_QUATERNION, 0, 0, rz);
        AppMain.nnMultiplyQuaternion(ref trt_work.disp_quat, ref nns_QUATERNION, ref trt_work.disp_quat);
    }
 // Token: 0x06000DEF RID: 3567 RVA: 0x0007AAF4 File Offset: 0x00078CF4
 private static AppMain.OBS_OBJECT_WORK GmEneUnidesInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type)
 {
     AppMain.UNREFERENCED_PARAMETER(type);
     AppMain.OBS_OBJECT_WORK     obs_OBJECT_WORK     = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_ENE_UNIDES_WORK(), "ENE_UNIDES");
     AppMain.GMS_ENEMY_3D_WORK   gms_ENEMY_3D_WORK   = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
     AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK = (AppMain.GMS_ENE_UNIDES_WORK)obs_OBJECT_WORK;
     AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_ene_unides_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d);
     AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, true, AppMain.ObjDataGet(692), null, 0, null);
     AppMain.ObjDrawObjectSetToon(obs_OBJECT_WORK);
     obs_OBJECT_WORK.pos.z = 655360;
     AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[1];
     AppMain.ObjRectWorkSet(obs_RECT_WORK, -8, 0, 8, 16);
     obs_RECT_WORK.flag |= 4U;
     obs_RECT_WORK       = gms_ENEMY_3D_WORK.ene_com.rect_work[0];
     AppMain.ObjRectWorkSet(obs_RECT_WORK, -16, -8, 16, 16);
     obs_RECT_WORK.flag |= 4U;
     gms_ENEMY_3D_WORK.ene_com.rect_work[2].flag &= 4294967291U;
     obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[2];
     AppMain.ObjRectWorkSet(obs_RECT_WORK, -19, -16, 19, 16);
     obs_RECT_WORK.flag        &= 4294967291U;
     obs_OBJECT_WORK.move_flag &= 4294967167U;
     obs_OBJECT_WORK.move_flag |= 256U;
     if ((eve_rec.flag & 1) == 0)
     {
         obs_OBJECT_WORK.disp_flag |= 1U;
         obs_OBJECT_WORK.dir.y      = ( ushort )AppMain.AKM_DEGtoA16(45);
     }
     else
     {
         obs_OBJECT_WORK.dir.y = ( ushort )AppMain.AKM_DEGtoA16(-45);
     }
     obs_OBJECT_WORK.user_work        = ( uint )(obs_OBJECT_WORK.pos.x + (( int )eve_rec.left << 12));
     obs_OBJECT_WORK.user_flag        = ( uint )(obs_OBJECT_WORK.pos.x + (( int )(eve_rec.left + ( sbyte )eve_rec.width) << 12));
     gms_ENE_UNIDES_WORK.spd_dec      = 76;
     gms_ENE_UNIDES_WORK.spd_dec_dist = 15360;
     gms_ENE_UNIDES_WORK.len          = 17.5f;
     gms_ENE_UNIDES_WORK.rot_x        = AppMain.AKM_DEGtoA32(90f);
     gms_ENE_UNIDES_WORK.rot_y        = AppMain.AKM_DEGtoA32(0f);
     gms_ENE_UNIDES_WORK.rot_z        = AppMain.AKM_DEGtoA32(0f);
     gms_ENE_UNIDES_WORK.num          = 0;
     AppMain.gmEneUnidesWaitInit(obs_OBJECT_WORK);
     for (int i = 0; i < 4; i++)
     {
         AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK2 = AppMain.GmEventMgrLocalEventBirth(309, pos_x, pos_y, 0, 0, 0, 0, 0, 0);
         obs_OBJECT_WORK2.parent_obj = obs_OBJECT_WORK;
         AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK2 = (AppMain.GMS_ENE_UNIDES_WORK)obs_OBJECT_WORK2;
         gms_ENE_UNIDES_WORK2.num = i;
         gms_ENE_UNIDES_WORK.num++;
     }
     gms_ENE_UNIDES_WORK.attack             = 0;
     gms_ENE_UNIDES_WORK.attack_first       = 0;
     gms_ENE_UNIDES_WORK.zoom_now           = 0;
     gms_ENE_UNIDES_WORK.zoom               = 1f;
     obs_OBJECT_WORK.obj_3d.use_light_flag &= 4294967294U;
     obs_OBJECT_WORK.obj_3d.use_light_flag |= 64U;
     return(obs_OBJECT_WORK);
 }
Beispiel #12
0
 private static void gmBoss2EffCreateRollModelLost(AppMain.GMS_BOSS2_BODY_WORK body_work)
 {
     if (((int)AppMain.GMM_BS_OBJ((object)body_work).disp_flag & 1) != 0)
     {
         AppMain.AKM_DEGtoA32(-90f);
     }
     else
     {
         AppMain.AKM_DEGtoA32(90f);
     }
 }
Beispiel #13
0
 private static void gmEneKamaHandAttackMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENE_KAMA_WORK gmsEneKamaWork = (AppMain.GMS_ENE_KAMA_WORK)obj_work;
     gmsEneKamaWork.rot_z += gmsEneKamaWork.rot_z_add;
     AppMain.NNS_MATRIX handAttackMainRmat = AppMain.gmEneKamaHandAttackMain_rmat;
     AppMain.NNS_MATRIX handAttackMainTmat = AppMain.gmEneKamaHandAttackMain_tmat;
     AppMain.NNS_MATRIX handAttackMainMat  = AppMain.gmEneKamaHandAttackMain_mat;
     AppMain.nnMakeRotateZMatrix(handAttackMainRmat, gmsEneKamaWork.rot_z);
     if (((int)obj_work.disp_flag & 2) != 0)
     {
         AppMain.nnMakeTranslateMatrix(handAttackMainTmat, 10f, 10f, 0.0f);
     }
     else
     {
         AppMain.nnMakeTranslateMatrix(handAttackMainTmat, 10f, -10f, 0.0f);
     }
     AppMain.nnMultiplyMatrix(handAttackMainMat, handAttackMainRmat, handAttackMainTmat);
     obj_work.ofst.x = AppMain.FX_F32_TO_FX32(handAttackMainMat.M03);
     obj_work.ofst.y = AppMain.FX_F32_TO_FX32(handAttackMainMat.M13);
     obj_work.dir.z  = (ushort)gmsEneKamaWork.rot_z;
     if (gmsEneKamaWork.timer > 0)
     {
         AppMain.VecFx32 playerVectorFx = AppMain.gmEneKamaGetPlayerVectorFx(obj_work);
         int             v2_1           = (int)((double)obj_work.spd.x / 1.75);
         int             v2_2           = (int)((double)obj_work.spd.y / 1.75);
         int             v2_3;
         int             num;
         if (AppMain.FX_Mul(playerVectorFx.x, v2_2) - AppMain.FX_Mul(playerVectorFx.y, v2_1) < 0)
         {
             v2_3 = AppMain.FX_Mul(AppMain.FX_Cos((int)(short)AppMain.AKM_DEGtoA32(1f)), v2_1) - AppMain.FX_Mul(AppMain.FX_Sin((int)(short)AppMain.AKM_DEGtoA32(1f)), v2_2);
             num  = AppMain.FX_Mul(AppMain.FX_Sin((int)(short)AppMain.AKM_DEGtoA32(1f)), v2_3) + AppMain.FX_Mul(AppMain.FX_Cos((int)(short)AppMain.AKM_DEGtoA32(1f)), v2_2);
         }
         else
         {
             v2_3 = AppMain.FX_Mul(AppMain.FX_Cos((int)(short)AppMain.AKM_DEGtoA32(-1f)), v2_1) - AppMain.FX_Mul(AppMain.FX_Sin((int)(short)AppMain.AKM_DEGtoA32(-1f)), v2_2);
             num  = AppMain.FX_Mul(AppMain.FX_Sin((int)(short)AppMain.AKM_DEGtoA32(-1f)), v2_3) + AppMain.FX_Mul(AppMain.FX_Cos((int)(short)AppMain.AKM_DEGtoA32(-1f)), v2_2);
         }
         obj_work.spd.x = (int)((double)v2_3 * 1.75);
         obj_work.spd.y = (int)((double)num * 1.75);
         --gmsEneKamaWork.timer;
     }
     else
     {
         obj_work.spd.x      = 0;
         obj_work.spd_fall   = AppMain.FX_F32_TO_FX32(0.2f);
         obj_work.move_flag |= 128U;
         AppMain.GMS_ENE_KAMA_WORK parentObj = (AppMain.GMS_ENE_KAMA_WORK)obj_work.parent_obj;
         if (parentObj == null)
         {
             return;
         }
         parentObj.ata_futa = 1;
     }
 }
Beispiel #14
0
    private static void gmBoss5LdPartInitFall(AppMain.GMS_BOSS5_LDPART_WORK ldpart_work)
    {
        AppMain.OBS_OBJECT_WORK obsObjectWork = AppMain.GMM_BS_OBJ((object)ldpart_work);
        int ang = AppMain.AKM_DEGtoA32((int)AppMain.mtMathRand() % AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_DIR_RANGE_DEG + (270 - AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_DIR_RANGE_DEG / 2));
        int num = AppMain.FX_Mul(AppMain.AkMathRandFx(), AppMain.GMD_BOSS5_LAND_LDPART_FALL_Z_SPD_MAX * 2) - AppMain.GMD_BOSS5_LAND_LDPART_FALL_Z_SPD_MAX;

        obsObjectWork.spd.y      = (int)(4096.0 * (double)AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_SPD_FL * (double)AppMain.nnSin(ang));
        obsObjectWork.spd.x      = (int)(4096.0 * (double)AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_SPD_FL * (double)AppMain.nnCos(ang));
        obsObjectWork.spd.z      = num;
        obsObjectWork.flag      &= 4294966271U;
        obsObjectWork.move_flag |= 128U;
    }
Beispiel #15
0
    private static void gmBoss1EffScatterSetFlyParam(
        AppMain.GMS_BOSS1_EFF_SCT_PART_NDC_WORK sct_part_ndc)
    {
        AppMain.OBS_OBJECT_WORK obsObjectWork = AppMain.GMM_BS_OBJ((object)sct_part_ndc);
        int   num1 = (int)AppMain.mtMathRand() % 180;
        int   ang  = AppMain.AKM_DEGtoA32(num1 + (num1 > 90 ? 45 : -45));
        float num2 = !sct_part_ndc.is_ironball ? 5f : 3f;

        obsObjectWork.spd.y      = (int)(4096.0 * (double)num2 * (double)AppMain.nnSin(ang));
        obsObjectWork.spd.x      = (int)(4096.0 * (double)num2 * (double)AppMain.nnCos(ang));
        obsObjectWork.move_flag |= 128U;
    }
Beispiel #16
0
    private static void GmBoss4UtilInitTurn(
        AppMain.GMS_BOSS4_DIRECTION _work,
        short dest_angle,
        int frame,
        bool is_positive)
    {
        AppMain.MTM_ASSERT(frame > 0);
        int turn_amount = !is_positive ? (int)(ushort)((int)dest_angle - AppMain.AKM_DEGtoA32(360) - ((int)_work.cur_angle - AppMain.AKM_DEGtoA32(360))) - AppMain.AKM_DEGtoA32(360) : (int)(ushort)((uint)dest_angle - (uint)_work.cur_angle);
        int turn_spd    = turn_amount / frame;

        AppMain.GmBoss4UtilInitTurn(_work, turn_amount, turn_spd);
    }
Beispiel #17
0
    public static void gmBoss5TurretSetRoundFaceRot(
        AppMain.GMS_BOSS5_TURRET_WORK trt_work,
        int dir_z_angle,
        int tilt_near_angle)
    {
        int rz = (int)((long)ushort.MaxValue & (long)-dir_z_angle);

        AppMain.nnMakeRotateXZYQuaternion(out trt_work.disp_quat, AppMain.AKM_DEGtoA32(90), -tilt_near_angle, AppMain.AKM_DEGtoA32(90));
        AppMain.NNS_QUATERNION dst;
        AppMain.nnMakeRotateXYZQuaternion(out dst, 0, 0, rz);
        AppMain.nnMultiplyQuaternion(ref trt_work.disp_quat, ref dst, ref trt_work.disp_quat);
    }
    // Token: 0x06000791 RID: 1937 RVA: 0x00043198 File Offset: 0x00041398
    public static void gmEneTStarAttackInit(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_T_STAR_WORK gms_ENE_T_STAR_WORK = (AppMain.GMS_ENE_T_STAR_WORK)obj_work;
        AppMain.NNS_MATRIX          nns_MATRIX          = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nns_MATRIX2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.nnMakeUnitMatrix(nns_MATRIX);
        AppMain.nnMakeUnitMatrix(nns_MATRIX2);
        AppMain.nnMakeRotateZMatrix(nns_MATRIX2, AppMain.AKM_DEGtoA32(72));
        AppMain.NNS_VECTOR nns_VECTOR = AppMain.GlobalPool <AppMain.NNS_VECTOR> .Alloc();

        for (int i = 0; i < 5; i++)
        {
            AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GmEventMgrLocalEventBirth(308, obj_work.pos.x, obj_work.pos.y, 0, 0, 0, 0, 0, 0);
            obs_OBJECT_WORK.parent_obj = obj_work;
            obs_OBJECT_WORK.dir.y      = 49152;
            obs_OBJECT_WORK.dir.z      = ( ushort )AppMain.AKM_DEGtoA16(-72 * i);
            nns_VECTOR.x          = nns_MATRIX.M01;
            nns_VECTOR.y          = nns_MATRIX.M11;
            nns_VECTOR.z          = 0f;
            obs_OBJECT_WORK.spd.x = AppMain.FX_F32_TO_FX32(nns_VECTOR.x * 4f);
            obs_OBJECT_WORK.spd.y = -AppMain.FX_F32_TO_FX32(nns_VECTOR.y * 4f);
            AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK2 = obs_OBJECT_WORK;
            obs_OBJECT_WORK2.pos.x = obs_OBJECT_WORK2.pos.x + AppMain.FX_F32_TO_FX32(nns_VECTOR.x * 10f);
            AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK3 = obs_OBJECT_WORK;
            obs_OBJECT_WORK3.pos.y = obs_OBJECT_WORK3.pos.y + -AppMain.FX_F32_TO_FX32(nns_VECTOR.y * 10f);
            AppMain.nnMultiplyMatrix(nns_MATRIX, nns_MATRIX, nns_MATRIX2);
            AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
            gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 32768U;
            AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctEneEsCreate(obs_OBJECT_WORK, 10);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.dir.z = ( ushort )AppMain.AKM_DEGtoA16(-72 * i);
        }
        AppMain.GlobalPool <AppMain.NNS_VECTOR> .Release(nns_VECTOR);

        obj_work.disp_flag       |= 32U;
        obj_work.disp_flag       |= 4U;
        obj_work.ppFunc           = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneTStarAttackMain);
        obj_work.move_flag       &= 4294967291U;
        obj_work.spd.x            = 0;
        obj_work.spd.y            = 0;
        gms_ENE_T_STAR_WORK.timer = 300;
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK2 = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        gms_ENEMY_3D_WORK2.ene_com.rect_work[1].flag &= 4294967291U;
        gms_ENEMY_3D_WORK2.ene_com.rect_work[0].flag &= 4294967291U;
        gms_ENEMY_3D_WORK2.ene_com.rect_work[2].flag &= 4294967291U;
        AppMain.GmSoundPlaySE("Boss2_03");
        gms_ENEMY_3D_WORK2.ene_com.enemy_flag |= 65536U;
        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX2);
    }
Beispiel #19
0
 private static void gmEneUnidesAttackMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENE_UNIDES_WORK gmsEneUnidesWork = (AppMain.GMS_ENE_UNIDES_WORK)obj_work;
     if (gmsEneUnidesWork.stop == 0)
     {
         if (((int)obj_work.disp_flag & 1) != 0)
         {
             gmsEneUnidesWork.rot_y += AppMain.AKM_DEGtoA32(1);
         }
         else
         {
             gmsEneUnidesWork.rot_y += AppMain.AKM_DEGtoA32(-1);
         }
     }
     gmsEneUnidesWork.attack = 1;
     if (gmsEneUnidesWork.zoom_now == 1)
     {
         gmsEneUnidesWork.zoom += 0.07f;
         if ((double)gmsEneUnidesWork.zoom > 1.39999997615814)
         {
             gmsEneUnidesWork.zoom_now = 2;
         }
     }
     else if (gmsEneUnidesWork.zoom_now >= 2 && gmsEneUnidesWork.zoom_now <= 12)
     {
         ++gmsEneUnidesWork.zoom_now;
         gmsEneUnidesWork.zoom -= 0.07f;
     }
     else if (gmsEneUnidesWork.zoom_now >= 13 && gmsEneUnidesWork.zoom_now <= 23)
     {
         ++gmsEneUnidesWork.zoom_now;
         gmsEneUnidesWork.zoom += 0.07f;
     }
     else if ((double)gmsEneUnidesWork.zoom > 1.0)
     {
         gmsEneUnidesWork.zoom -= 0.07f;
         if ((double)gmsEneUnidesWork.zoom <= 1.0)
         {
             gmsEneUnidesWork.zoom     = 1f;
             gmsEneUnidesWork.stop     = 0;
             gmsEneUnidesWork.zoom_now = 0;
         }
     }
     obj_work.scale.x = AppMain.FX_F32_TO_FX32(gmsEneUnidesWork.zoom);
     obj_work.scale.y = AppMain.FX_F32_TO_FX32(gmsEneUnidesWork.zoom);
     obj_work.scale.z = AppMain.FX_F32_TO_FX32(gmsEneUnidesWork.zoom);
     if (gmsEneUnidesWork.num != 0 || (double)gmsEneUnidesWork.zoom != 1.0)
     {
         return;
     }
     obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUnidesWalkInit);
 }
Beispiel #20
0
    // Token: 0x06000503 RID: 1283 RVA: 0x0002B160 File Offset: 0x00029360
    private static void gmBoss5LdPartInitFall(AppMain.GMS_BOSS5_LDPART_WORK ldpart_work)
    {
        AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_BS_OBJ(ldpart_work);
        int num = (int)AppMain.mtMathRand() % AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_DIR_RANGE_DEG;
        int ang = AppMain.AKM_DEGtoA32(num + (270 - AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_DIR_RANGE_DEG / 2));
        int z   = AppMain.FX_Mul(AppMain.AkMathRandFx(), AppMain.GMD_BOSS5_LAND_LDPART_FALL_Z_SPD_MAX * 2) - AppMain.GMD_BOSS5_LAND_LDPART_FALL_Z_SPD_MAX;

        obs_OBJECT_WORK.spd.y      = ( int )(4096f * AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_SPD_FL * AppMain.nnSin(ang));
        obs_OBJECT_WORK.spd.x      = ( int )(4096f * AppMain.GMD_BOSS5_LAND_LDPART_FALL_XY_SPD_FL * AppMain.nnCos(ang));
        obs_OBJECT_WORK.spd.z      = z;
        obs_OBJECT_WORK.flag      &= 4294966271U;
        obs_OBJECT_WORK.move_flag |= 128U;
    }
 // Token: 0x06000DFA RID: 3578 RVA: 0x0007B1A4 File Offset: 0x000793A4
 private static void gmEneUnidesAttackMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK = (AppMain.GMS_ENE_UNIDES_WORK)obj_work;
     if (gms_ENE_UNIDES_WORK.stop == 0)
     {
         if ((obj_work.disp_flag & 1U) != 0U)
         {
             gms_ENE_UNIDES_WORK.rot_y += AppMain.AKM_DEGtoA32(1);
         }
         else
         {
             gms_ENE_UNIDES_WORK.rot_y += AppMain.AKM_DEGtoA32(-1);
         }
     }
     gms_ENE_UNIDES_WORK.attack = 1;
     if (gms_ENE_UNIDES_WORK.zoom_now == 1)
     {
         gms_ENE_UNIDES_WORK.zoom += 0.07f;
         if (gms_ENE_UNIDES_WORK.zoom > 1.4f)
         {
             gms_ENE_UNIDES_WORK.zoom_now = 2;
         }
     }
     else if (gms_ENE_UNIDES_WORK.zoom_now >= 2 && gms_ENE_UNIDES_WORK.zoom_now <= 12)
     {
         gms_ENE_UNIDES_WORK.zoom_now++;
         gms_ENE_UNIDES_WORK.zoom -= 0.07f;
     }
     else if (gms_ENE_UNIDES_WORK.zoom_now >= 13 && gms_ENE_UNIDES_WORK.zoom_now <= 23)
     {
         gms_ENE_UNIDES_WORK.zoom_now++;
         gms_ENE_UNIDES_WORK.zoom += 0.07f;
     }
     else if (gms_ENE_UNIDES_WORK.zoom > 1f)
     {
         gms_ENE_UNIDES_WORK.zoom -= 0.07f;
         if (gms_ENE_UNIDES_WORK.zoom <= 1f)
         {
             gms_ENE_UNIDES_WORK.zoom     = 1f;
             gms_ENE_UNIDES_WORK.stop     = 0;
             gms_ENE_UNIDES_WORK.zoom_now = 0;
         }
     }
     obj_work.scale.x = AppMain.FX_F32_TO_FX32(gms_ENE_UNIDES_WORK.zoom);
     obj_work.scale.y = AppMain.FX_F32_TO_FX32(gms_ENE_UNIDES_WORK.zoom);
     obj_work.scale.z = AppMain.FX_F32_TO_FX32(gms_ENE_UNIDES_WORK.zoom);
     if (gms_ENE_UNIDES_WORK.num == 0 && gms_ENE_UNIDES_WORK.zoom == 1f)
     {
         obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUnidesWalkInit);
     }
 }
Beispiel #22
0
 // Token: 0x06000956 RID: 2390 RVA: 0x000543C0 File Offset: 0x000525C0
 private static void gmEneKamaHandAttackMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENE_KAMA_WORK gms_ENE_KAMA_WORK = (AppMain.GMS_ENE_KAMA_WORK)obj_work;
     gms_ENE_KAMA_WORK.rot_z += gms_ENE_KAMA_WORK.rot_z_add;
     AppMain.NNS_MATRIX nns_MATRIX  = AppMain.gmEneKamaHandAttackMain_rmat;
     AppMain.NNS_MATRIX nns_MATRIX2 = AppMain.gmEneKamaHandAttackMain_tmat;
     AppMain.NNS_MATRIX nns_MATRIX3 = AppMain.gmEneKamaHandAttackMain_mat;
     AppMain.nnMakeRotateZMatrix(nns_MATRIX, gms_ENE_KAMA_WORK.rot_z);
     if ((obj_work.disp_flag & 2U) != 0U)
     {
         AppMain.nnMakeTranslateMatrix(nns_MATRIX2, 10f, 10f, 0f);
     }
     else
     {
         AppMain.nnMakeTranslateMatrix(nns_MATRIX2, 10f, -10f, 0f);
     }
     AppMain.nnMultiplyMatrix(nns_MATRIX3, nns_MATRIX, nns_MATRIX2);
     obj_work.ofst.x = AppMain.FX_F32_TO_FX32(nns_MATRIX3.M03);
     obj_work.ofst.y = AppMain.FX_F32_TO_FX32(nns_MATRIX3.M13);
     obj_work.dir.z  = ( ushort )gms_ENE_KAMA_WORK.rot_z;
     if (gms_ENE_KAMA_WORK.timer > 0)
     {
         AppMain.VecFx32 vecFx = AppMain.gmEneKamaGetPlayerVectorFx(obj_work);
         int             num   = (int)((float)obj_work.spd.x / 1.75f);
         int             num2  = (int)((float)obj_work.spd.y / 1.75f);
         int             num3  = AppMain.FX_Mul(vecFx.x, num2) - AppMain.FX_Mul(vecFx.y, num);
         if (num3 < 0)
         {
             num  = AppMain.FX_Mul(AppMain.FX_Cos(( int )(( short )AppMain.AKM_DEGtoA32(1f))), num) - AppMain.FX_Mul(AppMain.FX_Sin(( int )(( short )AppMain.AKM_DEGtoA32(1f))), num2);
             num2 = AppMain.FX_Mul(AppMain.FX_Sin(( int )(( short )AppMain.AKM_DEGtoA32(1f))), num) + AppMain.FX_Mul(AppMain.FX_Cos(( int )(( short )AppMain.AKM_DEGtoA32(1f))), num2);
         }
         else
         {
             num  = AppMain.FX_Mul(AppMain.FX_Cos(( int )(( short )AppMain.AKM_DEGtoA32(-1f))), num) - AppMain.FX_Mul(AppMain.FX_Sin(( int )(( short )AppMain.AKM_DEGtoA32(-1f))), num2);
             num2 = AppMain.FX_Mul(AppMain.FX_Sin(( int )(( short )AppMain.AKM_DEGtoA32(-1f))), num) + AppMain.FX_Mul(AppMain.FX_Cos(( int )(( short )AppMain.AKM_DEGtoA32(-1f))), num2);
         }
         obj_work.spd.x = ( int )(( float )num * 1.75f);
         obj_work.spd.y = ( int )(( float )num2 * 1.75f);
         gms_ENE_KAMA_WORK.timer--;
         return;
     }
     obj_work.spd.x      = 0;
     obj_work.spd_fall   = AppMain.FX_F32_TO_FX32(0.2f);
     obj_work.move_flag |= 128U;
     AppMain.GMS_ENE_KAMA_WORK gms_ENE_KAMA_WORK2 = (AppMain.GMS_ENE_KAMA_WORK)obj_work.parent_obj;
     if (gms_ENE_KAMA_WORK2 != null)
     {
         gms_ENE_KAMA_WORK2.ata_futa = 1;
     }
 }
 // Token: 0x06000DF3 RID: 3571 RVA: 0x0007AFF4 File Offset: 0x000791F4
 private static void gmEneUnidesWaitMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK = (AppMain.GMS_ENE_UNIDES_WORK)obj_work;
     if (AppMain.gmEneUnidesGetLength2N(obj_work) < 9216)
     {
         obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUnidesAttackInit);
     }
     if ((obj_work.disp_flag & 1U) != 0U)
     {
         gms_ENE_UNIDES_WORK.rot_y += AppMain.AKM_DEGtoA32(1);
         return;
     }
     gms_ENE_UNIDES_WORK.rot_y += AppMain.AKM_DEGtoA32(-1);
 }
Beispiel #24
0
    private static void gmBoss2EffScatterSetParamMove(
        AppMain.OBS_OBJECT_WORK obj_work,
        int right_flag)
    {
        int num = (int)AppMain.mtMathRand() % 30 + 45;

        if (right_flag != 0)
        {
            num = -num;
        }
        int ang = AppMain.AKM_DEGtoA32(num + 90);

        obj_work.spd.y = -(int)(4096.0 * (double)AppMain.nnSin(ang));
        obj_work.spd.x = (int)(4096.0 * (double)AppMain.nnCos(ang));
    }
Beispiel #25
0
 // Token: 0x060006F3 RID: 1779 RVA: 0x0003DFC8 File Offset: 0x0003C1C8
 private static bool GmBoss4UtilUpdateMove(AppMain.GMS_BOSS4_MOVE _work, out AppMain.VecFx32 pos)
 {
     AppMain.VecFx32 vecFx = default(AppMain.VecFx32);
     vecFx.x = _work.end.x - _work.start.x;
     vecFx.y = _work.end.y - _work.start.y;
     vecFx.z = _work.end.z - _work.start.z;
     if (_work.now_count < _work.max_count)
     {
         _work.now_count++;
     }
     if (_work.now_count >= _work.max_count)
     {
         _work.now_count = _work.max_count;
         _work.pos.x     = _work.end.x;
         _work.pos.y     = _work.end.y;
         _work.pos.z     = _work.end.z;
         pos.x           = _work.end.x;
         pos.y           = _work.end.y;
         pos.z           = _work.end.z;
         return(true);
     }
     if (_work.type == 0)
     {
         _work.pos.x = ( int )(( float )_work.start.x + ( float )vecFx.x * (( float )_work.now_count / ( float )_work.max_count));
         _work.pos.y = ( int )(( float )_work.start.y + ( float )vecFx.y * (( float )_work.now_count / ( float )_work.max_count));
         _work.pos.z = ( int )(( float )_work.start.z + ( float )vecFx.z * (( float )_work.now_count / ( float )_work.max_count));
     }
     else if (( double )(( float )_work.now_count / ( float )_work.max_count) <= 0.5)
     {
         int   num  = AppMain.FX_Cos(AppMain.AKM_DEGtoA32(180f * ((float)_work.now_count / (float)_work.max_count)));
         float num2 = 0.5f - (float)num * 0.00024414062f * 0.5f;
         _work.pos.x = _work.start.x + ( int )(( float )vecFx.x * num2);
         _work.pos.y = _work.start.y + ( int )(( float )vecFx.y * num2);
         _work.pos.z = _work.start.z + ( int )(( float )vecFx.z * num2);
     }
     else
     {
         int   num3 = AppMain.FX_Cos(AppMain.AKM_DEGtoA32(180f * ((float)_work.now_count / (float)_work.max_count)));
         float num4 = (float)num3 * 0.00024414062f * 0.5f;
         _work.pos.x = _work.start.x + ( int )(( float )vecFx.x * (0.5f - num4));
         _work.pos.y = _work.start.y + ( int )(( float )vecFx.y * (0.5f - num4));
         _work.pos.z = _work.start.z + ( int )(( float )vecFx.z * (0.5f - num4));
     }
     pos.x = _work.pos.x;
     pos.y = _work.pos.y;
     pos.z = _work.pos.z;
     return(false);
 }
    // Token: 0x06000DFD RID: 3581 RVA: 0x0007B3B8 File Offset: 0x000795B8
    private static void gmEneUnidesNeedleWaitMain(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK  = (AppMain.GMS_ENE_UNIDES_WORK)obj_work;
        AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK2 = (AppMain.GMS_ENE_UNIDES_WORK)obj_work.parent_obj;
        AppMain.NNS_MATRIX          nns_MATRIX           = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nns_MATRIX2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nns_MATRIX3 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        int   num   = gms_ENE_UNIDES_WORK2.rot_y;
        int   rot_x = gms_ENE_UNIDES_WORK2.rot_x;
        int   rot_z = gms_ENE_UNIDES_WORK2.rot_z;
        float len   = gms_ENE_UNIDES_WORK2.len;

        num += AppMain.AKM_DEGtoA32(360) / 4 * gms_ENE_UNIDES_WORK.num;
        num %= AppMain.AKM_DEGtoA32(360);
        AppMain.nnMakeRotateXMatrix(nns_MATRIX, rot_x);
        AppMain.nnRotateZMatrix(nns_MATRIX, nns_MATRIX, rot_z);
        AppMain.nnRotateYMatrix(nns_MATRIX, nns_MATRIX, num);
        AppMain.nnMakeTranslateMatrix(nns_MATRIX2, len, 0f, 0f);
        AppMain.nnMultiplyMatrix(nns_MATRIX3, nns_MATRIX, nns_MATRIX2);
        AppMain.SNNS_VECTOR snns_VECTOR;
        AppMain.nnCopyMatrixTranslationVector(out snns_VECTOR, nns_MATRIX3);
        obj_work.pos.x = AppMain.FX_F32_TO_FX32(snns_VECTOR.x) + gms_ENE_UNIDES_WORK2.ene_3d_work.ene_com.obj_work.pos.x;
        obj_work.pos.y = AppMain.FX_F32_TO_FX32(snns_VECTOR.y) + gms_ENE_UNIDES_WORK2.ene_3d_work.ene_com.obj_work.pos.y;
        obj_work.pos.z = 655360;
        if (gms_ENE_UNIDES_WORK2.attack != 0 && ( double )snns_VECTOR.y >= ( double )len * 0.98 && gms_ENE_UNIDES_WORK2.stop == 0)
        {
            if (gms_ENE_UNIDES_WORK2.attack_first != 0)
            {
                obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUnidesNeedleAttackInit);
            }
            else
            {
                gms_ENE_UNIDES_WORK2.zoom_now     = 1;
                gms_ENE_UNIDES_WORK2.attack_first = 1;
                gms_ENE_UNIDES_WORK2.stop         = 1;
            }
        }
        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX2);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX3);
    }
Beispiel #27
0
 private static bool GmBoss4UtilUpdateMove(AppMain.GMS_BOSS4_MOVE _work, out AppMain.VecFx32 pos)
 {
     AppMain.VecFx32 vecFx32 = new AppMain.VecFx32();
     vecFx32.x = _work.end.x - _work.start.x;
     vecFx32.y = _work.end.y - _work.start.y;
     vecFx32.z = _work.end.z - _work.start.z;
     if (_work.now_count < _work.max_count)
     {
         ++_work.now_count;
     }
     if (_work.now_count >= _work.max_count)
     {
         _work.now_count = _work.max_count;
         _work.pos.x     = _work.end.x;
         _work.pos.y     = _work.end.y;
         _work.pos.z     = _work.end.z;
         pos.x           = _work.end.x;
         pos.y           = _work.end.y;
         pos.z           = _work.end.z;
         return(true);
     }
     if (_work.type == 0)
     {
         _work.pos.x = (int)((double)_work.start.x + (double)vecFx32.x * ((double)_work.now_count / (double)_work.max_count));
         _work.pos.y = (int)((double)_work.start.y + (double)vecFx32.y * ((double)_work.now_count / (double)_work.max_count));
         _work.pos.z = (int)((double)_work.start.z + (double)vecFx32.z * ((double)_work.now_count / (double)_work.max_count));
     }
     else if ((double)_work.now_count / (double)_work.max_count <= 0.5)
     {
         float num = (float)(0.5 - (double)AppMain.FX_Cos(AppMain.AKM_DEGtoA32((float)(180.0 * ((double)_work.now_count / (double)_work.max_count)))) * 0.000244140625 * 0.5);
         _work.pos.x = _work.start.x + (int)((double)vecFx32.x * (double)num);
         _work.pos.y = _work.start.y + (int)((double)vecFx32.y * (double)num);
         _work.pos.z = _work.start.z + (int)((double)vecFx32.z * (double)num);
     }
     else
     {
         float num = (float)((double)AppMain.FX_Cos(AppMain.AKM_DEGtoA32((float)(180.0 * ((double)_work.now_count / (double)_work.max_count)))) * 0.000244140625 * 0.5);
         _work.pos.x = _work.start.x + (int)((double)vecFx32.x * (0.5 - (double)num));
         _work.pos.y = _work.start.y + (int)((double)vecFx32.y * (0.5 - (double)num));
         _work.pos.z = _work.start.z + (int)((double)vecFx32.z * (0.5 - (double)num));
     }
     pos.x = _work.pos.x;
     pos.y = _work.pos.y;
     pos.z = _work.pos.z;
     return(false);
 }
Beispiel #28
0
    public static void gmEneTStarAttackInit(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_T_STAR_WORK gmsEneTStarWork = (AppMain.GMS_ENE_T_STAR_WORK)obj_work;
        AppMain.NNS_MATRIX          nnsMatrix1      = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nnsMatrix2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.nnMakeUnitMatrix(nnsMatrix1);
        AppMain.nnMakeUnitMatrix(nnsMatrix2);
        AppMain.nnMakeRotateZMatrix(nnsMatrix2, AppMain.AKM_DEGtoA32(72));
        AppMain.NNS_VECTOR nnsVector = new AppMain.NNS_VECTOR();
        for (int index = 0; index < 5; ++index)
        {
            AppMain.OBS_OBJECT_WORK parent_obj = AppMain.GmEventMgrLocalEventBirth((ushort)308, obj_work.pos.x, obj_work.pos.y, (ushort)0, (sbyte)0, (sbyte)0, (byte)0, (byte)0, (byte)0);
            parent_obj.parent_obj = obj_work;
            parent_obj.dir.y      = (ushort)49152;
            parent_obj.dir.z      = (ushort)AppMain.AKM_DEGtoA16(-72 * index);
            nnsVector.x           = nnsMatrix1.M01;
            nnsVector.y           = nnsMatrix1.M11;
            nnsVector.z           = 0.0f;
            parent_obj.spd.x      = AppMain.FX_F32_TO_FX32(nnsVector.x * 4f);
            parent_obj.spd.y      = -AppMain.FX_F32_TO_FX32(nnsVector.y * 4f);
            parent_obj.pos.x     += AppMain.FX_F32_TO_FX32(nnsVector.x * 10f);
            parent_obj.pos.y     += -AppMain.FX_F32_TO_FX32(nnsVector.y * 10f);
            AppMain.nnMultiplyMatrix(nnsMatrix1, nnsMatrix1, nnsMatrix2);
            ((AppMain.GMS_ENEMY_3D_WORK)parent_obj).ene_com.enemy_flag       |= 32768U;
            AppMain.GmEfctEneEsCreate(parent_obj, 10).efct_com.obj_work.dir.z = (ushort)AppMain.AKM_DEGtoA16(-72 * index);
        }
        //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector);
        obj_work.disp_flag   |= 32U;
        obj_work.disp_flag   |= 4U;
        obj_work.ppFunc       = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneTStarAttackMain);
        obj_work.move_flag   &= 4294967291U;
        obj_work.spd.x        = 0;
        obj_work.spd.y        = 0;
        gmsEneTStarWork.timer = 300;
        AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        gmsEnemy3DWork.ene_com.rect_work[1].flag &= 4294967291U;
        gmsEnemy3DWork.ene_com.rect_work[0].flag &= 4294967291U;
        gmsEnemy3DWork.ene_com.rect_work[2].flag &= 4294967291U;
        AppMain.GmSoundPlaySE(AppMain.GMD_ENE_KAMA_SE_BOMB);
        gmsEnemy3DWork.ene_com.enemy_flag |= 65536U;
        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix1);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix2);
    }
Beispiel #29
0
    private static void gmEneUnidesNeedleWaitMain(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_UNIDES_WORK gmsEneUnidesWork = (AppMain.GMS_ENE_UNIDES_WORK)obj_work;
        AppMain.GMS_ENE_UNIDES_WORK parentObj        = (AppMain.GMS_ENE_UNIDES_WORK)obj_work.parent_obj;
        AppMain.NNS_MATRIX          nnsMatrix1       = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nnsMatrix2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nnsMatrix3 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        int   rotY = parentObj.rot_y;
        int   rotX = parentObj.rot_x;
        int   rotZ = parentObj.rot_z;
        float len  = parentObj.len;
        int   ay   = (rotY + AppMain.AKM_DEGtoA32(360) / 4 * gmsEneUnidesWork.num) % AppMain.AKM_DEGtoA32(360);

        AppMain.nnMakeRotateXMatrix(nnsMatrix1, rotX);
        AppMain.nnRotateZMatrix(nnsMatrix1, nnsMatrix1, rotZ);
        AppMain.nnRotateYMatrix(nnsMatrix1, nnsMatrix1, ay);
        AppMain.nnMakeTranslateMatrix(nnsMatrix2, len, 0.0f, 0.0f);
        AppMain.nnMultiplyMatrix(nnsMatrix3, nnsMatrix1, nnsMatrix2);
        AppMain.SNNS_VECTOR dst;
        AppMain.nnCopyMatrixTranslationVector(out dst, nnsMatrix3);
        obj_work.pos.x = AppMain.FX_F32_TO_FX32(dst.x) + parentObj.ene_3d_work.ene_com.obj_work.pos.x;
        obj_work.pos.y = AppMain.FX_F32_TO_FX32(dst.y) + parentObj.ene_3d_work.ene_com.obj_work.pos.y;
        obj_work.pos.z = 655360;
        if (parentObj.attack != 0 && (double)dst.y >= (double)len * 0.98 && parentObj.stop == 0)
        {
            if (parentObj.attack_first != 0)
            {
                obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneUnidesNeedleAttackInit);
            }
            else
            {
                parentObj.zoom_now     = 1;
                parentObj.attack_first = 1;
                parentObj.stop         = 1;
            }
        }
        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix1);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix2);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix3);
    }
Beispiel #30
0
    // Token: 0x060006FB RID: 1787 RVA: 0x0003E480 File Offset: 0x0003C680
    private static void GmBoss4UtilInitTurn(AppMain.GMS_BOSS4_DIRECTION _work, short dest_angle, int frame, bool is_positive)
    {
        AppMain.MTM_ASSERT(frame > 0);
        int num2;

        if (is_positive)
        {
            ushort num = (ushort)(dest_angle - _work.cur_angle);
            num2 = ( int )num;
        }
        else
        {
            ushort num = (ushort)((int)dest_angle - AppMain.AKM_DEGtoA32(360) - ((int)_work.cur_angle - AppMain.AKM_DEGtoA32(360)));
            num2 = ( int )num - AppMain.AKM_DEGtoA32(360);
        }
        int turn_spd = num2 / frame;

        AppMain.GmBoss4UtilInitTurn(_work, num2, turn_spd);
    }