Exemplo n.º 1
0
    // Token: 0x06000548 RID: 1352 RVA: 0x0002CEB0 File Offset: 0x0002B0B0
    private static int gmGmkTarzanRopeGetGimmickRotZ(GMS_PLAYER_WORK ply_work)
    {
        int num = GmPlayer.KeyGetGimmickRotZ(ply_work);

        if ((AppMain.g_gs_main_sys_info.game_flag & 1U) == 0U)
        {
            num = num;
        }
        return(num);
    }
Exemplo n.º 2
0
    // Token: 0x060017AE RID: 6062 RVA: 0x000D1DDC File Offset: 0x000CFFDC
    private static void gmGmkSeesaw_PlayerHold_100(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SEESAW_WORK gms_GMK_SEESAW_WORK = (AppMain.GMS_GMK_SEESAW_WORK)obj_work;
        GMS_PLAYER_WORK             ply_work            = gms_GMK_SEESAW_WORK.ply_work;

        AppMain.lock_seesaw_id = 0;
        if (ply_work.seq_state != 44 || AppMain.control_right != gms_GMK_SEESAW_WORK || (ply_work.obj_work.move_flag & 256U) != 0U)
        {
            gms_GMK_SEESAW_WORK.tilt_d        = 0;
            gms_GMK_SEESAW_WORK.tilt_se_timer = 0;
            if (AppMain.control_right == gms_GMK_SEESAW_WORK)
            {
                AppMain.control_right = null;
            }
            obj_work.ppFunc = AppMain.gmGmkSeesawStay;
            AppMain.gmGmkSeesawStay(obj_work);
            return;
        }
        AppMain.lock_seesaw_id         = gms_GMK_SEESAW_WORK.seesaw_id;
        gms_GMK_SEESAW_WORK.tilt_timer = 60;
        AppMain.control_right          = gms_GMK_SEESAW_WORK;
        int num = GmPlayer.KeyGetGimmickRotZ(gms_GMK_SEESAW_WORK.ply_work);

        if (num > 256)
        {
            num = 256;
        }
        if (num < -256)
        {
            num = -256;
        }
        gms_GMK_SEESAW_WORK.tilt_d = ( short )num;
        if (gms_GMK_SEESAW_WORK.tilt_d != 0)
        {
            AppMain.GMS_GMK_SEESAW_WORK gms_GMK_SEESAW_WORK2 = gms_GMK_SEESAW_WORK;
            gms_GMK_SEESAW_WORK2.tilt += gms_GMK_SEESAW_WORK.tilt_d;
            if (gms_GMK_SEESAW_WORK.tilt_se_timer == 0)
            {
                GmSound.PlaySE("Seesaw");
                gms_GMK_SEESAW_WORK.tilt_se_timer = 8;
            }
            AppMain.GMS_GMK_SEESAW_WORK gms_GMK_SEESAW_WORK3 = gms_GMK_SEESAW_WORK;
            gms_GMK_SEESAW_WORK3.tilt_se_timer -= 1;
            if (gms_GMK_SEESAW_WORK.tilt >= 4608)
            {
                gms_GMK_SEESAW_WORK.tilt   = 4608;
                gms_GMK_SEESAW_WORK.tilt_d = 0;
            }
            if (gms_GMK_SEESAW_WORK.tilt <= -4608)
            {
                gms_GMK_SEESAW_WORK.tilt   = -4608;
                gms_GMK_SEESAW_WORK.tilt_d = 0;
            }
        }
        obj_work.dir.z = ( ushort )gms_GMK_SEESAW_WORK.tilt;
        AppMain.seesaw_tilt[( int )gms_GMK_SEESAW_WORK.seesaw_id] = ( short )obj_work.dir.z;
        if ((ply_work.obj_work.move_flag & 4U) != 0U)
        {
            int num2 = AppMain.mtMathSin((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) * 29;
            num2 = obj_work.pos.x + num2;
            num2 = ply_work.obj_work.pos.x - num2;
            long num3 = (long)((long)num2 << 12);
            num3 /= ( long )AppMain.mtMathCos(( int )gms_GMK_SEESAW_WORK.tilt);
            gms_GMK_SEESAW_WORK.player_distance = num3;
            if (((ply_work.obj_work.disp_flag & 1U) == 0U && gms_GMK_SEESAW_WORK.player_speed > 0) || ((ply_work.obj_work.disp_flag & 1U) != 0U && gms_GMK_SEESAW_WORK.player_speed < 0))
            {
                gms_GMK_SEESAW_WORK.player_speed = 0;
            }
        }
        long num4 = gms_GMK_SEESAW_WORK.player_distance;

        gms_GMK_SEESAW_WORK.player_distance += ( long )gms_GMK_SEESAW_WORK.player_speed;
        num4 = gms_GMK_SEESAW_WORK.player_distance - num4;
        gms_GMK_SEESAW_WORK.player_speed += 256 * AppMain.mtMathSin(( int )(( ushort )gms_GMK_SEESAW_WORK.tilt)) >> 12;
        int num5 = AppMain.mtMathSin((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) * 29;

        num5 = obj_work.pos.x + num5;
        int num6 = AppMain.mtMathCos((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) * 29;

        num6 = obj_work.pos.y - num6;
        int num7 = (int)(gms_GMK_SEESAW_WORK.player_distance * (long)AppMain.mtMathCos((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) >> 12);

        num7 = num5 + num7;
        int num8 = (int)(gms_GMK_SEESAW_WORK.player_distance * (long)AppMain.mtMathSin((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) >> 12);

        num8 = num6 + num8;
        if (gms_GMK_SEESAW_WORK.player_speed < 0 && (ply_work.obj_work.disp_flag & 1U) == 0U)
        {
            ply_work.obj_work.disp_flag |= 1U;
        }
        else if (gms_GMK_SEESAW_WORK.player_speed > 0 && (ply_work.obj_work.disp_flag & 1U) != 0U)
        {
            ply_work.obj_work.disp_flag &= 4294967294U;
        }
        if (gms_GMK_SEESAW_WORK.player_distance <= 231424L && gms_GMK_SEESAW_WORK.player_distance >= -231424L)
        {
            ply_work.obj_work.spd.x = num7 - ply_work.obj_work.pos.x;
            ply_work.obj_work.spd.y = num8 - ply_work.obj_work.pos.y;
            return;
        }
        int num9 = (int)(num4 * (long)AppMain.mtMathCos((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) >> 12);
        int spdy = (int)(num4 * (long)AppMain.mtMathSin((int)((ushort)gms_GMK_SEESAW_WORK.tilt)) >> 12);

        if (AppMain.MTM_MATH_ABS(num9) < 256)
        {
            if (num9 < 0)
            {
                num9 = -1024;
            }
            else
            {
                num9 = 1024;
            }
        }
        AppMain.GmPlySeqGmkInitSeesawEnd(ply_work, num9, spdy);
        gms_GMK_SEESAW_WORK.tilt_d = 0;
        AppMain.control_right      = null;
        AppMain.lock_seesaw_id     = 0;
        obj_work.ppFunc            = AppMain.gmGmkSeesawStay;
    }
Exemplo n.º 3
0
    // Token: 0x06001B0B RID: 6923 RVA: 0x000F62C4 File Offset: 0x000F44C4
    private static void gmGmkPulleyMove(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        GMS_PLAYER_WORK           gms_PLAYER_WORK   = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];

        if (gms_PLAYER_WORK.gmk_obj != obj_work)
        {
            AppMain.gmGmkPulleySecedeSet(obj_work, 0);
            obj_work.flag      |= 2U;
            obj_work.user_timer = 36;
            return;
        }
        if (obj_work.spd.x > 0)
        {
            obj_work.spd.x = obj_work.spd.x - 64;
            if (obj_work.spd.x < 0)
            {
                obj_work.spd.x = 0;
            }
        }
        else
        {
            obj_work.spd.x = obj_work.spd.x + 64;
            if (obj_work.spd.x > 0)
            {
                obj_work.spd.x = 0;
            }
        }
        if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 2) != 0)
        {
            if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 1) != 0)
            {
                obj_work.spd.x = obj_work.spd.x - 128;
            }
            else
            {
                obj_work.spd.x = obj_work.spd.x + 128;
            }
        }
        if ((AppMain.g_gs_main_sys_info.game_flag & 1U) != 0U)
        {
            int num = AppMain.MTM_MATH_CLIP(GmPlayer.KeyGetGimmickRotZ(gms_PLAYER_WORK), -24576, 24576);
            num            = num * 160 / 24576;
            obj_work.spd.x = obj_work.spd.x + num;
        }
        else
        {
            int num2 = AppMain.MTM_MATH_CLIP(gms_PLAYER_WORK.key_rot_z, -24576, 24576);
            num2           = num2 * 160 / 24576;
            obj_work.spd.x = obj_work.spd.x + num2;
        }
        if (gms_PLAYER_WORK.act_state != 59 && obj_work.spd.x > -256 && obj_work.spd.x < 256)
        {
            obj_work.user_flag |= 32768U;
        }
        if ((gms_PLAYER_WORK.act_state != 59 && gms_PLAYER_WORK.act_state != 66) || (gms_PLAYER_WORK.obj_work.disp_flag & 8U) != 0U)
        {
            int num3;
            int id;
            if ((gms_PLAYER_WORK.obj_work.disp_flag & 1U) != 0U)
            {
                num3 = 56;
                id   = 0;
            }
            else
            {
                num3 = 56;
                id   = 0;
            }
            if ((obj_work.spd.x < -256 || obj_work.spd.x > 256) && (obj_work.user_flag & 32768U) != 0U)
            {
                GmPlayer.ActionChange(gms_PLAYER_WORK, 59);
                AppMain.ObjDrawObjectActionSet3DNN(obj_work, 4, 0);
                obj_work.user_flag = ( uint )(( ulong )obj_work.user_flag & 18446744073709518847UL);
            }
            else if (gms_PLAYER_WORK.act_state != num3)
            {
                GmPlayer.ActionChange(gms_PLAYER_WORK, num3);
                gms_PLAYER_WORK.obj_work.disp_flag |= 4U;
                AppMain.ObjDrawObjectActionSet3DNN(obj_work, id, 0);
                obj_work.disp_flag |= 4U;
            }
        }
        obj_work.dir.z = ( ushort )AppMain.MTM_MATH_CLIP(( int )(( short )(obj_work.spd.x / 4)), -10240, 10240);
        gms_ENEMY_3D_WORK.ene_com.target_dp_dir.z = obj_work.dir.z;
        int num4;
        int num5;

        if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 1) != 0)
        {
            num4 = gms_ENEMY_3D_WORK.ene_com.born_pos_x - ( int )(gms_ENEMY_3D_WORK.ene_com.eve_rec.left * 64) * 4096;
            num5 = gms_ENEMY_3D_WORK.ene_com.born_pos_x;
        }
        else
        {
            num4 = gms_ENEMY_3D_WORK.ene_com.born_pos_x;
            num5 = gms_ENEMY_3D_WORK.ene_com.born_pos_x + ( int )(gms_ENEMY_3D_WORK.ene_com.eve_rec.left * 64) * 4096;
        }
        if (obj_work.pos.x < num4)
        {
            if (gms_PLAYER_WORK.obj_work.pos.x > num4 + 32768)
            {
                gms_PLAYER_WORK.obj_work.pos.x = num4 + 32768;
            }
            AppMain.gmGmkPulleySonicTakeOffSet(gms_PLAYER_WORK, obj_work.spd.x);
            AppMain.gmGmkPulleySecedeSet(obj_work, num4);
            obj_work.user_timer = 0;
        }
        else if (obj_work.pos.x > num5)
        {
            if (gms_PLAYER_WORK.obj_work.pos.x < num5 - 32768)
            {
                gms_PLAYER_WORK.obj_work.pos.x = num5 - 32768;
            }
            AppMain.gmGmkPulleySonicTakeOffSet(gms_PLAYER_WORK, obj_work.spd.x);
            AppMain.gmGmkPulleySecedeSet(obj_work, num5);
            obj_work.user_timer = 0;
        }
        if (obj_work.ppFunc == AppMain.gmGmkPulleyMove && AppMain.MTM_MATH_ABS(obj_work.spd.x) > 4096)
        {
            AppMain.gmGmkPulleySparkInit(obj_work);
        }
        else
        {
            AppMain.gmGmkPulleySparkKill(obj_work);
        }
        AppMain.ObjObjectMove(obj_work);
        if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 2) != 0)
        {
            int num6 = AppMain.MTM_MATH_ABS(gms_ENEMY_3D_WORK.ene_com.born_pos_x - obj_work.pos.x);
            num6          /= 2;
            obj_work.pos.y = gms_ENEMY_3D_WORK.ene_com.born_pos_y + num6;
        }
    }
Exemplo n.º 4
0
    // Token: 0x06001236 RID: 4662 RVA: 0x0009F37C File Offset: 0x0009D57C
    private static void gmGmkDrainTankOutMainWait(OBS_OBJECT_WORK obj_work)
    {
        GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];

        if ((gms_PLAYER_WORK.player_flag & 1024U) != 0U)
        {
            AppMain.gmGmkDrainTankOutUpdateDie(obj_work);
            obj_work.spd.x = 0;
            obj_work.spd.y = 0;
            return;
        }
        if (AppMain.gmGmkDrainTankOutCheckDeleteTask(obj_work, 1843200, 1228800))
        {
            AppMain.gmGmkDrainTankOutRequestDeleteTask(obj_work);
            return;
        }
        OBS_OBJECT_WORK obj_work2 = gms_PLAYER_WORK.obj_work;

        if (gms_PLAYER_WORK.seq_state == 22)
        {
            AppMain.gmGmkDrainTankOutChangeModeDamage(obj_work);
            return;
        }
        if ((obj_work.move_flag & 1U) == 0U)
        {
            AppMain.gmGmkDrainTankOutChangeModeSplash(obj_work);
            return;
        }
        AppMain.GMS_GMK_DRAIN_TANK_OUT_WORK gms_GMK_DRAIN_TANK_OUT_WORK = (AppMain.GMS_GMK_DRAIN_TANK_OUT_WORK)obj_work;
        int num = GmPlayer.KeyGetGimmickRotZ(gms_PLAYER_WORK);

        if (AppMain.MTM_MATH_ABS(num) > 8192)
        {
            gms_GMK_DRAIN_TANK_OUT_WORK.counter_roll_key++;
        }
        else
        {
            gms_GMK_DRAIN_TANK_OUT_WORK.counter_roll_key = 0;
        }
        if (gms_GMK_DRAIN_TANK_OUT_WORK.counter_roll_key >= 0)
        {
            AppMain.gmGmkDrainTankOutUpdateCameraRoll(gms_GMK_DRAIN_TANK_OUT_WORK, num);
            if (19 == gms_GMK_DRAIN_TANK_OUT_WORK.counter_roll_key % 20 && AppMain.MTM_MATH_ABS(gms_GMK_DRAIN_TANK_OUT_WORK.camera_roll) < AppMain.GMD_GMK_DRAIN_TANK_ROLL_ANGLE_MAX)
            {
                GmSound.PlaySE("Fluid1");
            }
        }
        if (AppMain.gmGmkDrainTankOutCheckKeyDir(obj_work, gms_GMK_DRAIN_TANK_OUT_WORK.camera_roll))
        {
            int x = gms_GMK_DRAIN_TANK_OUT_WORK.camera_roll >> 3;
            obj_work.spd.x = x;
            float a = AppMain.FX_FX32_TO_F32(gms_GMK_DRAIN_TANK_OUT_WORK.camera_roll >> 4);
            a = AppMain.MTM_MATH_ABS(a);
            AppMain.GmWaterSurfaceRequestAddWatarLevel(AppMain.MTM_MATH_ABS(a), 0, true);
        }
        AppMain.gmGmkDrainTankOutAdjustPlayerOffsetBuoyancy(gms_GMK_DRAIN_TANK_OUT_WORK);
        AppMain.gmGmkDrainTankOutAdjustPlayerOffsetWave(gms_GMK_DRAIN_TANK_OUT_WORK, obj_work2);
        AppMain.gmGmkDrainTankOutApplyPlayerOffset(obj_work2, gms_GMK_DRAIN_TANK_OUT_WORK);
        OBS_CAMERA obs_CAMERA = ObjCamera.Get(0);

        obs_CAMERA.roll = gms_GMK_DRAIN_TANK_OUT_WORK.camera_roll;
        AppMain.gmGmkDrainTankOutUpdateCameraOffset(gms_PLAYER_WORK, gms_GMK_DRAIN_TANK_OUT_WORK);
    }