Exemplo n.º 1
0
    // Token: 0x06001233 RID: 4659 RVA: 0x0009F0E8 File Offset: 0x0009D2E8
    private static void gmGmkDrainTankOutChangeModeSplash(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENEMY_3D_WORK           gms_ENEMY_3D_WORK           = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        AppMain.GMS_GMK_DRAIN_TANK_OUT_WORK gms_GMK_DRAIN_TANK_OUT_WORK = (AppMain.GMS_GMK_DRAIN_TANK_OUT_WORK)gms_ENEMY_3D_WORK;
        GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];
        OBS_OBJECT_WORK obj_work2       = gms_PLAYER_WORK.obj_work;

        if (gms_GMK_DRAIN_TANK_OUT_WORK.flag_dir_left)
        {
            obj_work2.spd.x = -65536;
        }
        else
        {
            obj_work2.spd.x = 65536;
        }
        obj_work2.pos.y      = obj_work.pos.y;
        obj_work2.move_flag |= 256U;
        GmPlayer.BreathingSet(gms_PLAYER_WORK);
        obj_work.move_flag |= 256U;
        AppMain.g_gm_main_system.game_flag |= 8192U;
        AppMain.GmEventMgrLocalEventBirth(305, obj_work.pos.x, obj_work.pos.y + 65536, gms_ENEMY_3D_WORK.ene_com.eve_rec.flag, gms_ENEMY_3D_WORK.ene_com.eve_rec.left, gms_ENEMY_3D_WORK.ene_com.eve_rec.top, gms_ENEMY_3D_WORK.ene_com.eve_rec.width, gms_ENEMY_3D_WORK.ene_com.eve_rec.height, 0);
        GmSound.PlaySE("Fluid2");
        AppMain.GMM_PAD_VIB_SMALL();
        GmPlayer.CameraOffsetSet(gms_PLAYER_WORK, 0, 0);
        GmCamera.AllowReset();
        obj_work.ppFunc = AppMain.gmGmkDrainTankOutMainSplash;
    }
Exemplo n.º 2
0
    // Token: 0x06001238 RID: 4664 RVA: 0x0009F600 File Offset: 0x0009D800
    private static void gmGmkDrainTankOutMainSplash(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);
            return;
        }
        if (AppMain.gmGmkDrainTankOutCheckDeleteTask(obj_work, 1638400, 1228800))
        {
            AppMain.gmGmkDrainTankOutRequestDeleteTask(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;
        OBS_OBJECT_WORK obj_work2 = gms_PLAYER_WORK.obj_work;

        AppMain.GmWaterSurfaceRequestAddWatarLevel(0.001f, 0, true);
        OBS_CAMERA obs_CAMERA = ObjCamera.Get(0);

        obs_CAMERA.roll = gms_GMK_DRAIN_TANK_OUT_WORK.camera_roll;
        if (gms_GMK_DRAIN_TANK_OUT_WORK.base_pos_x < obj_work2.pos.x)
        {
            obj_work2.move_flag |= 128U;
            obj_work2.move_flag &= 4294967039U;
            obj_work2.spd.x      = 65536;
            obj_work2.spd_add.x  = -896;
            GmPlayer.CameraOffsetSet(gms_PLAYER_WORK, 0, 0);
            GmCamera.AllowReset();
            AppMain.gmGmkDrainTankOutChangeModeEnd(obj_work);
        }
    }
Exemplo n.º 3
0
    // Token: 0x06000B2B RID: 2859 RVA: 0x00064C88 File Offset: 0x00062E88
    private static void gmGmkSplRingDefFunc(AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect)
    {
        AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK = (AppMain.GMS_ENEMY_COM_WORK)mine_rect.parent_obj;
        GMS_PLAYER_WORK            gms_PLAYER_WORK    = (GMS_PLAYER_WORK)match_rect.parent_obj;

        if (gms_ENEMY_COM_WORK == null)
        {
            return;
        }
        if (gms_PLAYER_WORK == null || gms_PLAYER_WORK.obj_work.obj_type != 1)
        {
            return;
        }
        if ((gms_PLAYER_WORK.player_flag & 262144U) != 0U)
        {
            GmPlayer.SetEndTruckRide(gms_PLAYER_WORK);
        }
        AppMain.GmPlySeqInitSplIn(gms_PLAYER_WORK, gms_ENEMY_COM_WORK.obj_work.pos);
        gms_PLAYER_WORK.gmk_flag2 |= 6U;
        (( OBS_OBJECT_WORK )gms_ENEMY_COM_WORK).ppFunc = AppMain.gmGmkSplRingVanishReady;
        gms_ENEMY_COM_WORK.obj_work.dir.y = ( ushort )((gms_ENEMY_COM_WORK.obj_work.dir.y & 57344));
        gms_ENEMY_COM_WORK.obj_work.flag |= 2U;
        AppMain.GMM_PAD_VIB_SMALL();
        GmSound.PlaySE("Special1");
    }
Exemplo n.º 4
0
    // Token: 0x06000B2F RID: 2863 RVA: 0x00064E8C File Offset: 0x0006308C
    private static void gmGmkPointMarkerHit(AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect)
    {
        GMS_GMK_PMARKER_WORK gms_GMK_PMARKER_WORK = (GMS_GMK_PMARKER_WORK)mine_rect.parent_obj;
        GMS_PLAYER_WORK      gms_PLAYER_WORK      = (GMS_PLAYER_WORK)match_rect.parent_obj;

        gms_GMK_PMARKER_WORK.markerdist = gms_GMK_PMARKER_WORK.OBJWORK.pos.x - gms_PLAYER_WORK.obj_work.pos.x;
        if ((gms_GMK_PMARKER_WORK.markerdist <= 16384 && gms_GMK_PMARKER_WORK.markerdist >= -16384) ||
            (gms_GMK_PMARKER_WORK.markerdist < 16384 && gms_GMK_PMARKER_WORK.markerdistlast >= 16384) ||
            (gms_GMK_PMARKER_WORK.markerdist > -16384 && gms_GMK_PMARKER_WORK.markerdistlast <= -16384))
        {
            if (AppMain.g_gm_main_system.marker_pri < (uint)gms_GMK_PMARKER_WORK.marker_prty)
            {
                GmPlayer.SetMarkerPoint(gms_PLAYER_WORK, gms_GMK_PMARKER_WORK.OBJWORK.pos.x,
                                        gms_GMK_PMARKER_WORK.OBJWORK.pos.y);
                AppMain.g_gm_main_system.marker_pri = (uint)gms_GMK_PMARKER_WORK.marker_prty;
                gms_GMK_PMARKER_WORK.marker_prty    = 0;
                gms_GMK_PMARKER_WORK.hitcounter     = 2;
                SaveState.saveCurrentState(1);
            }

            gms_GMK_PMARKER_WORK.OBJWORK.flag |= 2U;
            return;
        }

        mine_rect.flag &= 4294573823U;
    }
Exemplo n.º 5
0
    // Token: 0x06001243 RID: 4675 RVA: 0x0009FA08 File Offset: 0x0009DC08
    private static void gmGmkDrainTankOutUpdateCameraOffset(GMS_PLAYER_WORK player_work, AppMain.GMS_GMK_DRAIN_TANK_OUT_WORK out_work)
    {
        OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)player_work;
        float           num             = AppMain.FX_FX32_TO_F32(out_work.base_pos_x - 737280 - obs_OBJECT_WORK.pos.x);

        GmPlayer.CameraOffsetSet(player_work, ( short )num, 0);
    }
Exemplo n.º 6
0
    // Token: 0x0600009B RID: 155 RVA: 0x00008620 File Offset: 0x00006820
    private static void GmEnemyDefaultDefFunc(AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect)
    {
        AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK = (AppMain.GMS_ENEMY_COM_WORK)mine_rect.parent_obj;
        GMS_PLAYER_WORK            gms_PLAYER_WORK    = null;

        if (match_rect.parent_obj != null && match_rect.parent_obj.obj_type == 1)
        {
            gms_PLAYER_WORK = (GMS_PLAYER_WORK)match_rect.parent_obj;
        }

        if (gms_ENEMY_COM_WORK.vit == 0)
        {
            if ((gms_ENEMY_COM_WORK.obj_work.move_flag & 4096U) == 0U || gms_ENEMY_COM_WORK.obj_work.obj_type == 3)
            {
                gms_ENEMY_COM_WORK.enemy_flag |= 65536U;
            }

            gms_ENEMY_COM_WORK.obj_work.flag     |= 2U;
            gms_ENEMY_COM_WORK.rect_work[0].flag |= 2048U;
            gms_ENEMY_COM_WORK.rect_work[1].flag |= 2048U;
            gms_ENEMY_COM_WORK.rect_work[2].flag |= 2048U;
            if (gms_ENEMY_COM_WORK.obj_work.obj_type == 2)
            {
                GmSound.PlaySE("Enemy");
                AppMain.GmComEfctCreateHitPlayer(gms_ENEMY_COM_WORK.obj_work,
                                                 (int)((mine_rect.rect.left + mine_rect.rect.right) * 4096 / 2),
                                                 (int)((mine_rect.rect.top + mine_rect.rect.bottom) * 4096 / 2));
                AppMain.GmComEfctCreateEneDeadSmoke(gms_ENEMY_COM_WORK.obj_work,
                                                    (int)((mine_rect.rect.left + mine_rect.rect.right) * 4096 / 2),
                                                    (int)((mine_rect.rect.top + mine_rect.rect.bottom) * 4096 / 2));
                AppMain.GmGmkAnimalInit(gms_ENEMY_COM_WORK.obj_work, 0, 0, 0, 0, 0, 0);
                AppMain.GMM_PAD_VIB_SMALL();
                if (gms_PLAYER_WORK != null)
                {
                    GmPlayer.ComboScore(gms_PLAYER_WORK, gms_ENEMY_COM_WORK.obj_work.pos.x,
                                        gms_ENEMY_COM_WORK.obj_work.pos.y + -65536);
                }

                AppMain.HgTrophyIncEnemyKillCount(gms_ENEMY_COM_WORK.obj_work);
            }

            gms_ENEMY_COM_WORK.obj_work.flag |= 8U;
        }
        else
        {
            AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK2 = gms_ENEMY_COM_WORK;
            gms_ENEMY_COM_WORK2.vit -= 1;
            byte[] byte_param = gms_ENEMY_COM_WORK.eve_rec.byte_param;
            int    num        = 1;
            byte_param[num] += 1;
            gms_ENEMY_COM_WORK.invincible_timer       = 245760;
            gms_ENEMY_COM_WORK.rect_work[1].hit_power = 0;
        }

        if (gms_PLAYER_WORK != null && gms_PLAYER_WORK.obj_work.obj_type == 1)
        {
            AppMain.GmPlySeqAtkReactionInit(gms_PLAYER_WORK);
        }
    }
Exemplo n.º 7
0
 // Token: 0x06001580 RID: 5504 RVA: 0x000BAD6F File Offset: 0x000B8F6F
 private static int gmGmkFlipperCheckKeyHit(OBS_OBJECT_WORK gimmick_obj_work, GMS_PLAYER_WORK player_work)
 {
     if (GmPlayer.KeyCheckJumpKeyPush(player_work))
     {
         return(1);
     }
     return(0);
 }
Exemplo n.º 8
0
    // Token: 0x0600122F RID: 4655 RVA: 0x0009EFE0 File Offset: 0x0009D1E0
    private static void gmGmkDrainTankOutRequestDeleteTask(OBS_OBJECT_WORK obj_work)
    {
        GMS_PLAYER_WORK ply_work = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];

        GmPlayer.CameraOffsetSet(ply_work, 0, 0);
        GmCamera.AllowReset();
        AppMain.GmWaterSurfaceRequestChangeWaterLevel(ushort.MaxValue, 0, false);
        obj_work.ppFunc = AppMain.gmGmkDrainTankOutMainWaitDelete;
    }
Exemplo n.º 9
0
    // Token: 0x0600053F RID: 1343 RVA: 0x0002C71C File Offset: 0x0002A91C
    private static void gmGmkTarzanRopeUpdatePlayerMotion(OBS_OBJECT_WORK obj_work, int angle_target, int angle_current)
    {
        AppMain.UNREFERENCED_PARAMETER(obj_work);
        GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];
        OBS_OBJECT_WORK obj_work2       = gms_PLAYER_WORK.obj_work;

        AppMain.OBS_ACTION3D_NN_WORK obj_3d = obj_work2.obj_3d;
        float num  = 34f;
        int   num2 = AppMain.MTM_MATH_ABS(angle_target);
        int   num3 = AppMain.MTM_MATH_ABS(angle_current);

        if (num2 < 1792 && num3 < 1792)
        {
            int a = AppMain.gmGmkTarzanRopeGetGimmickRotZ(gms_PLAYER_WORK);
            if (gms_PLAYER_WORK.act_state != 64 && AppMain.MTM_MATH_ABS(a) < 208)
            {
                GmPlayer.ActionChange(gms_PLAYER_WORK, 64);
                obj_work2.disp_flag |= 4U;
            }
            return;
        }
        if (gms_PLAYER_WORK.act_state == 64)
        {
            GmPlayer.ActionChange(gms_PLAYER_WORK, 63);
            obj_work2.disp_flag |= 4U;
            return;
        }
        if ((obj_work2.disp_flag & 1U) != 0U)
        {
            if (angle_target > 0 && angle_current > 0)
            {
                if (obj_3d.frame[0] > num)
                {
                    obj_work2.disp_flag |= 16U;
                    return;
                }
            }
            else if (angle_target < 0 && angle_current < 0 && obj_3d.frame[0] < num)
            {
                obj_work2.disp_flag |= 16U;
                return;
            }
        }
        else if (angle_target > 0 && angle_current > 0)
        {
            if (obj_3d.frame[0] < num)
            {
                obj_work2.disp_flag |= 16U;
                return;
            }
        }
        else if (angle_target < 0 && angle_current < 0 && obj_3d.frame[0] > num)
        {
            obj_work2.disp_flag |= 16U;
        }
    }
Exemplo n.º 10
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.º 11
0
 // Token: 0x06000064 RID: 100 RVA: 0x00005AD4 File Offset: 0x00003CD4
 private static void gmGmkSlotGameHit_100(OBS_OBJECT_WORK obj_work)
 {
     if (AppMain.GmRingCheckRestSlotRing() != 0)
     {
         return;
     }
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     GmPlayer.AddScore(AppMain.slot_start_player, AppMain.tbl_slot_bonus_score[( int )gms_GMK_SLOT_WORK.lotresult], AppMain.slot_start_player.obj_work.pos.x, AppMain.slot_start_player.obj_work.pos.y);
     AppMain.slot_start_call = -1;
     obj_work.ppFunc         = AppMain.gmGmkSlotStay;
 }
Exemplo n.º 12
0
    // Token: 0x0600140D RID: 5133 RVA: 0x000B1F60 File Offset: 0x000B0160
    private static void gmGmkBobbinDefPlayer(AppMain.GMS_ENEMY_3D_WORK gimmick_work, GMS_PLAYER_WORK player_work, int speed_x, int speed_y)
    {
        bool flag_no_recover_homing = false;

        if ((gimmick_work.ene_com.eve_rec.flag & 1) != 0)
        {
            flag_no_recover_homing = true;
        }
        AppMain.GmPlySeqInitPinballAir(player_work, speed_x, speed_y, 5, flag_no_recover_homing);
        if (!AppMain.GMM_MAIN_STAGE_IS_SS())
        {
            OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)gimmick_work;
            GmPlayer.AddScore(player_work, 10, obs_OBJECT_WORK.pos.x, obs_OBJECT_WORK.pos.y);
        }
    }
Exemplo n.º 13
0
    // Token: 0x06000543 RID: 1347 RVA: 0x0002C9B4 File Offset: 0x0002ABB4
    private static bool gmGmkTarzanRopeCheckPlayerJump(OBS_OBJECT_WORK obj_work, int angle_target, int angle_current)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        OBS_OBJECT_WORK           target_obj        = gms_ENEMY_3D_WORK.ene_com.target_obj;
        GMS_PLAYER_WORK           ply_work          = (GMS_PLAYER_WORK)target_obj;

        if (AppMain.gmGmkTarzanRopeGetCatchWait(obj_work) > 0U)
        {
            return(false);
        }
        if (GmPlayer.KeyCheckJumpKeyPush(ply_work))
        {
            target_obj.disp_flag &= 4294967279U;
            target_obj.spd_m      = 0;
            target_obj.spd.x      = 0;
            target_obj.spd.y      = 0;
            target_obj.dir.z      = 0;
            target_obj.spd_add.x  = 0;
            target_obj.spd_add.y  = 0;
            target_obj.spd_add.z  = 0;
            float num  = 1f + (float)gms_ENEMY_3D_WORK.ene_com.eve_rec.left / 10000f;
            int   num2 = (int)((float)angle_target * 0.8f * num);
            int   num3 = (int)((float)AppMain.MTM_MATH_ABS(angle_current) * 2.3f * num);
            if (angle_target == 0 && angle_current == 0)
            {
                num2 = 0;
                num3 = 16384;
            }
            else if ((angle_target < 0 && 0 < angle_current) || (0 < angle_target && angle_current < 0))
            {
                if (AppMain.MTM_MATH_ABS(angle_target + angle_current) < 1792)
                {
                    num2 = -num2;
                }
                else
                {
                    num2 = 0;
                    num3 = 16384;
                }
            }
            AppMain.GmPlySeqGmkInitGmkJump(ply_work, num2, -num3);
            AppMain.GmPlySeqChangeSequenceState(ply_work, 17);
            obj_work.ppFunc = AppMain.gmGmkTarzanRopeMainEnd;
            gms_ENEMY_3D_WORK.ene_com.target_obj = null;
            return(true);
        }
        return(false);
    }
Exemplo n.º 14
0
    // Token: 0x06000676 RID: 1654 RVA: 0x00039D7C File Offset: 0x00037F7C
    public static void gmGmkTruckBodyDefFunc(AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect)
    {
        AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK = (AppMain.GMS_ENEMY_COM_WORK)mine_rect.parent_obj;
        GMS_PLAYER_WORK            gms_PLAYER_WORK    = (GMS_PLAYER_WORK)match_rect.parent_obj;

        if (gms_ENEMY_COM_WORK == null)
        {
            return;
        }
        if (gms_PLAYER_WORK == null || gms_PLAYER_WORK.obj_work.obj_type != 1)
        {
            return;
        }
        AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)gms_ENEMY_COM_WORK;
        gms_ENEMY_COM_WORK.obj_work.flag |= 16U;
        GmPlayer.SetTruckRide(gms_PLAYER_WORK, gms_ENEMY_COM_WORK.obj_work, gms_ENEMY_COM_WORK.obj_work.field_rect[0], gms_ENEMY_COM_WORK.obj_work.field_rect[1], gms_ENEMY_COM_WORK.obj_work.field_rect[2], gms_ENEMY_COM_WORK.obj_work.field_rect[3]);
        gms_GMK_TRUCK_WORK.target_player = gms_PLAYER_WORK;
        AppMain.gmGmkTruckInitMain(gms_ENEMY_COM_WORK.obj_work, gms_PLAYER_WORK);
    }
Exemplo n.º 15
0
 // Token: 0x06000066 RID: 102 RVA: 0x00005BC4 File Offset: 0x00003DC4
 private static void gmGmkSlotGameHit_210(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     AppMain.slot_start_player.obj_work.pos.x = gms_GMK_SLOT_WORK.ppos_x + (( int )AppMain.tbl_dam_ofst_xy[gms_GMK_SLOT_WORK.timer % 8][0] << 12);
     AppMain.slot_start_player.obj_work.pos.y = gms_GMK_SLOT_WORK.ppos_y + (( int )AppMain.tbl_dam_ofst_xy[gms_GMK_SLOT_WORK.timer % 8][1] << 12);
     GmPlayer.RingDec(AppMain.slot_start_player, 1);
     if (gms_GMK_SLOT_WORK.timer % 12 == 0)
     {
         GmSound.PlaySE("Damage2");
     }
     gms_GMK_SLOT_WORK.timer--;
     if (gms_GMK_SLOT_WORK.timer <= 0)
     {
         AppMain.slot_start_player.obj_work.pos.x = gms_GMK_SLOT_WORK.ppos_x;
         AppMain.slot_start_player.obj_work.pos.y = gms_GMK_SLOT_WORK.ppos_y;
         AppMain.slot_start_call = -1;
         obj_work.ppFunc         = AppMain.gmGmkSlotStay;
     }
 }
Exemplo n.º 16
0
    // Token: 0x06001019 RID: 4121 RVA: 0x0008C17C File Offset: 0x0008A37C
    public static void gmGmkBubbleDefFunc(AppMain.OBS_RECT_WORK own_rect, AppMain.OBS_RECT_WORK target_rect)
    {
        OBS_OBJECT_WORK parent_obj  = own_rect.parent_obj;
        OBS_OBJECT_WORK parent_obj2 = target_rect.parent_obj;

        if (parent_obj2.obj_type != 1)
        {
            return;
        }
        GMS_PLAYER_WORK ply_work = (GMS_PLAYER_WORK)parent_obj2;

        AppMain.GmPlySeqInitBreathing(ply_work);
        GmPlayer.BreathingSet(ply_work);
        parent_obj.flag |= 4U;
        AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctZoneEsCreate(null, 2, 3);
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.x = parent_obj.pos.x;
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.y = parent_obj.pos.y;
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.z = parent_obj.pos.z;
        AppMain.GMM_PAD_VIB_SMALL();
        gms_EFFECT_3DES_WORK.efct_com.obj_work.ppFunc = AppMain.gmGmkBubbleMainHit;
    }
Exemplo n.º 17
0
    // Token: 0x060008D5 RID: 2261 RVA: 0x000502E4 File Offset: 0x0004E4E4
    private static void gmGmkGoalPanelMain(OBS_OBJECT_WORK obj_work)
    {
        GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];

        if (obj_work.pos.x < gms_PLAYER_WORK.obj_work.pos.x)
        {
            SaveState.deleteSave();
            if ((gms_PLAYER_WORK.player_flag & 16384U) != 0U)
            {
                AppMain.g_gm_main_system.game_flag |= 33554432U;
            }
            else
            {
                AppMain.g_gm_main_system.game_flag &= 4261412863U;
            }
            AppMain.HgTrophyTryAcquisition(1);
            GmPlayer.SetGoalState(gms_PLAYER_WORK);
            AppMain.g_gm_main_system.game_flag &= 4294966271U;
            AppMain.g_gm_main_system.game_flag |= 1048576U;
            obj_work.user_work  = 4096U;
            obj_work.user_timer = 120;
            obj_work.ppFunc     = AppMain.gmGmkGoalPanelPass;
            AppMain.GmGmkCamScrLimitSet(new AppMain.GMS_EVE_RECORD_EVENT
            {
                flag   = 5,
                left   = -96,
                top    = -104,
                width  = 192,
                height = 112
            }, obj_work.pos.x, obj_work.pos.y);
            AppMain.gm_gmk_goal_panel_effct = AppMain.GmEfctCmnEsCreate(obj_work, 32);
            AppMain.GmEffect3DESSetDispOffset(AppMain.gm_gmk_goal_panel_effct, 0f, 30f, 15f);
            AppMain.GmEffect3DESSetDispRotation(AppMain.gm_gmk_goal_panel_effct, 0, 0, 0);
            AppMain.GMM_PAD_VIB_SMALL();
            GmSound.PlaySE("GoalPanel");
        }
    }
Exemplo n.º 18
0
    // Token: 0x06000263 RID: 611 RVA: 0x0001377C File Offset: 0x0001197C
    private static void gmGmkStopperStay_Norm_100(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_STOPPER_WORK gms_GMK_STOPPER_WORK = (AppMain.GMS_GMK_STOPPER_WORK)obj_work;
        if (gms_GMK_STOPPER_WORK.ply_work != AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)] ||
            gms_GMK_STOPPER_WORK.ply_work.gmk_obj != obj_work || gms_GMK_STOPPER_WORK.ply_work.seq_state != 40)
        {
            AppMain.gmGmkStopperReset(obj_work);
            return;
        }

        OBS_CAMERA obs_CAMERA = ObjCamera.Get(0);

        GmCamera.PosSet(AppMain.FXM_FLOAT_TO_FX32(obs_CAMERA.pos.x),
                        AppMain.FXM_FLOAT_TO_FX32(-obs_CAMERA.pos.y) + 16384, AppMain.FXM_FLOAT_TO_FX32(obs_CAMERA.pos.z));
        AppMain.GMS_GMK_STOPPER_WORK gms_GMK_STOPPER_WORK2 = gms_GMK_STOPPER_WORK;
        gms_GMK_STOPPER_WORK2.player_pass_timer -= 1;
        if (gms_GMK_STOPPER_WORK.player_pass_timer <= 0)
        {
            obj_work.disp_flag &= 4294967291U;
            AppMain.gmGmkStopperStay_Norm_110(obj_work);
            return;
        }

        if (gms_GMK_STOPPER_WORK.player_pass_timer % 16 == 0)
        {
            GmPlayer.AddScore(gms_GMK_STOPPER_WORK.ply_work, 1000, gms_GMK_STOPPER_WORK.ply_work.obj_work.pos.x,
                              gms_GMK_STOPPER_WORK.ply_work.obj_work.pos.y);
            GsSound.StopSE(gms_GMK_STOPPER_WORK.se_handle);
            gms_GMK_STOPPER_WORK.se_handle.snd_ctrl_param.pitch =
                0.8f - (float)gms_GMK_STOPPER_WORK.player_pass_timer / 160f;
            GmSound.PlaySE("Casino3", gms_GMK_STOPPER_WORK.se_handle);
            if (gms_GMK_STOPPER_WORK.player_pass_timer <= 16)
            {
                GmSound.PlaySE("Casino3_1");
            }
        }
    }
Exemplo n.º 19
0
    // Token: 0x06001B4B RID: 6987 RVA: 0x000F992C File Offset: 0x000F7B2C
    private static void gmGmkItemEffectWatiMain(OBS_OBJECT_WORK obj_work)
    {
        obj_work.user_timer = AppMain.ObjTimeCountDown(obj_work.user_timer);
        if (obj_work.user_timer <= 0)
        {
            AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK = (AppMain.GMS_ENEMY_COM_WORK)obj_work;
            if (gms_ENEMY_COM_WORK.target_obj != null)
            {
                switch (AppMain.gmGmkItemConvEvtId(gms_ENEMY_COM_WORK.eve_rec.id))
                {
                case 63:
                    GmPlayer.ItemHiSpeedSet(( GMS_PLAYER_WORK )gms_ENEMY_COM_WORK.target_obj);
                    break;

                case 64:
                    GmPlayer.ItemInvincibleSet(( GMS_PLAYER_WORK )gms_ENEMY_COM_WORK.target_obj);
                    break;

                case 65:
                    GmPlayer.ItemRing10Set(( GMS_PLAYER_WORK )gms_ENEMY_COM_WORK.target_obj);
                    break;

                case 66:
                    GmPlayer.ItemBarrierSet(( GMS_PLAYER_WORK )gms_ENEMY_COM_WORK.target_obj);
                    break;

                case 67:
                    GmPlayer.Item1UPSet(( GMS_PLAYER_WORK )gms_ENEMY_COM_WORK.target_obj);
                    break;
                }
            }
            gms_ENEMY_COM_WORK.target_obj = null;
            obj_work.flag  &= 4294967279U;
            obj_work.ppFunc = AppMain.gmGmkItemFallCheckMain;
        }
        AppMain.gmGmkItemFallCheckMain(obj_work);
    }
Exemplo n.º 20
0
    // Token: 0x06000D96 RID: 3478 RVA: 0x00076CF4 File Offset: 0x00074EF4
    public static void gmRingMain(MTS_TASK_TCB tcb)
    {
        if ((AppMain.gm_ring_sys_work.flag & 1U) != 0U)
        {
#if !NICE_PHYSICS
            AppMain.gm_ring_sys_work.ring_se_cnt = 0;
#endif
            return;
        }
        if (AppMain.g_obj.glb_camera_id >= 0)
        {
            AppMain.ObjDraw3DNNSetCamera(AppMain.g_obj.glb_camera_id, AppMain.g_obj.glb_camera_type);
        }
        if (AppMain.gm_ring_sys_work.se_wait > 0)
        {
            AppMain.gm_ring_sys_work.se_wait--;
        }
        AppMain.gmRingDrawBegin();
        AppMain.GMS_RING_WORK gms_RING_WORK;
        if (AppMain.ObjObjectPauseCheck(0U) != 0U)
        {
            gms_RING_WORK = AppMain.gm_ring_sys_work.ring_list_start;
            while (gms_RING_WORK != null)
            {
                AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
                gms_RING_WORK = gms_RING_WORK2.post_ring;
                AppMain.gm_ring_sys_work.ring_draw_func(gms_RING_WORK2);
            }
            gms_RING_WORK = AppMain.gm_ring_sys_work.damage_ring_list_start;
            while (gms_RING_WORK != null)
            {
                AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
                gms_RING_WORK = gms_RING_WORK2.post_ring;
                if (gms_RING_WORK2.timer > 32 || (gms_RING_WORK2.timer & 2) != 0)
                {
                    AppMain.gm_ring_sys_work.ring_draw_func(gms_RING_WORK2);
                }
            }
            gms_RING_WORK = AppMain.gm_ring_sys_work.slot_ring_list_start;
            while (gms_RING_WORK != null)
            {
                AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
                gms_RING_WORK = gms_RING_WORK2.post_ring;
                AppMain.gm_ring_sys_work.ring_draw_func(gms_RING_WORK2);
            }
            AppMain.gmRingDrawEnd();
#if !NICE_PHYSICS
            AppMain.gm_ring_sys_work.ring_se_cnt = 0;
#endif
            return;
        }
        for (int i = 0; i < (int)AppMain.gm_ring_sys_work.player_num; i++)
        {
            GMS_PLAYER_WORK       gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[i];
            AppMain.OBS_RECT_WORK obs_RECT_WORK   = gms_PLAYER_WORK.rect_work[2];
            AppMain.ply_rect[i].pos.x = gms_PLAYER_WORK.obj_work.pos.x;
            AppMain.ply_rect[i].pos.y = gms_PLAYER_WORK.obj_work.pos.y;
            AppMain.ply_rect[i].pos.z = gms_PLAYER_WORK.obj_work.pos.z;
            short num;
            short num2;
            if (((gms_PLAYER_WORK.obj_work.disp_flag & 1U) ^ (obs_RECT_WORK.flag & 1U)) != 0U)
            {
                num  = (short)-obs_RECT_WORK.rect.right;
                num2 = (short)-obs_RECT_WORK.rect.left;
            }
            else
            {
                num  = obs_RECT_WORK.rect.left;
                num2 = obs_RECT_WORK.rect.right;
            }
            if (gms_PLAYER_WORK.obj_work.scale.x != 4096)
            {
                num  = (short)AppMain.FX_Mul((int)num, gms_PLAYER_WORK.obj_work.scale.x);
                num2 = (short)AppMain.FX_Mul((int)num2, gms_PLAYER_WORK.obj_work.scale.x);
            }
            AppMain.ply_rect[i].left  = num;
            AppMain.ply_rect[i].right = num2;
            if (((gms_PLAYER_WORK.obj_work.disp_flag & 2U) ^ (obs_RECT_WORK.flag & 2U)) != 0U)
            {
                num  = (short)-obs_RECT_WORK.rect.bottom;
                num2 = (short)-obs_RECT_WORK.rect.top;
            }
            else
            {
                num  = obs_RECT_WORK.rect.top;
                num2 = obs_RECT_WORK.rect.bottom;
            }
            if (gms_PLAYER_WORK.obj_work.scale.y != 4096)
            {
                num  = (short)AppMain.FX_Mul((int)num, gms_PLAYER_WORK.obj_work.scale.y);
                num2 = (short)AppMain.FX_Mul((int)num2, gms_PLAYER_WORK.obj_work.scale.y);
            }
            AppMain.ply_rect[i].top    = num;
            AppMain.ply_rect[i].bottom = num2;
            AppMain.ply_rect[i].back   = 0;
            AppMain.ply_rect[i].front  = 0;
        }
        AppMain.ring_rect.left   = -9;
        AppMain.ring_rect.top    = -9;
        AppMain.ring_rect.right  = 9;
        AppMain.ring_rect.bottom = 9;
        AppMain.ring_rect.back   = -8;
        AppMain.ring_rect.front  = 8;
        AppMain.GMS_RING_SYS_WORK gms_RING_SYS_WORK = AppMain.gm_ring_sys_work;
        if ((gms_RING_SYS_WORK.draw_ring_uv_frame += 1) >= 64)
        {
            AppMain.gm_ring_sys_work.draw_ring_uv_frame = 0;
        }
        if ((AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)].player_flag & 262144U) != 0U)
        {
            AppMain.gm_ring_fall_acc_x = (short)AppMain.FX_Mul(-288, AppMain.mtMathSin((int)AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)].obj_work.dir_fall));
            AppMain.gm_ring_fall_acc_y = (short)AppMain.FX_Mul(288, AppMain.mtMathCos((int)AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)].obj_work.dir_fall));
        }
        if (AppMain.gm_ring_sys_work.wait_slot_ring_num != 0)
        {
            AppMain.gm_ring_sys_work.slot_ring_timer--;
            if (AppMain.gm_ring_sys_work.slot_ring_timer <= 0)
            {
                if (AppMain.gm_ring_sys_work.wait_slot_ring_num >= 2)
                {
                    AppMain.GmRingCreateSlotRing(AppMain.gm_ring_sys_work.slot_target_obj, 1048576, AppMain.gm_ring_sys_work.slot_ring_create_dir);
                    AppMain.GmRingCreateSlotRing(AppMain.gm_ring_sys_work.slot_target_obj, 1048576, (ushort)(AppMain.gm_ring_sys_work.slot_ring_create_dir + 32768 - 2048));
                    AppMain.gm_ring_sys_work.wait_slot_ring_num -= 2;
                }
                else
                {
                    AppMain.GmRingCreateSlotRing(AppMain.gm_ring_sys_work.slot_target_obj, 1048576, AppMain.gm_ring_sys_work.slot_ring_create_dir);
                    AppMain.gm_ring_sys_work.wait_slot_ring_num--;
                }
                AppMain.GMS_RING_SYS_WORK gms_RING_SYS_WORK2 = AppMain.gm_ring_sys_work;
                gms_RING_SYS_WORK2.slot_ring_create_dir -= 2048;
                AppMain.gm_ring_sys_work.slot_ring_timer = 4;
            }
        }
        gms_RING_WORK = AppMain.gm_ring_sys_work.ring_list_start;
        while (gms_RING_WORK != null)
        {
            AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
            gms_RING_WORK = gms_RING_WORK2.post_ring;
            if (AppMain.ObjViewOutCheck(gms_RING_WORK2.pos.x, gms_RING_WORK2.pos.y, AppMain.gm_ring_die_offset, 0, 0, 0, 0) != 0)
            {
                if (gms_RING_WORK2.eve_rec != null)
                {
                    gms_RING_WORK2.eve_rec.pos_x = (byte)(gms_RING_WORK2.pos.x >> 12 & 255);
                }
                AppMain.gmRingDetachRingList(gms_RING_WORK2);
                AppMain.gmRingFreeRingWork(gms_RING_WORK2);
            }
            else
            {
                AppMain.gm_ring_sys_work.ring_draw_func(gms_RING_WORK2);
                AppMain.ring_rect.pos.z = 0;
                int i    = 0;
                int num3 = 0;
                while (i < (int)AppMain.gm_ring_sys_work.player_num)
                {
                    GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[i];
                    if ((gms_PLAYER_WORK.player_flag & 1024U) == 0U)
                    {
                        AppMain.ring_rect.pos.x = gms_RING_WORK2.pos.x;
                        AppMain.ring_rect.pos.y = gms_RING_WORK2.pos.y;
                        if (AppMain.gm_ring_sys_work.rec_func(AppMain.ply_rect[i], AppMain.ring_rect) != 0)
                        {
                            num3 = 1;
                            GmPlayer.RingGet(gms_PLAYER_WORK, 1);
                            AppMain.GmComEfctCreateRing(AppMain.ring_rect.pos.x, AppMain.ring_rect.pos.y);
                        }
                    }
                    i++;
                }
                if (num3 != 0)
                {
                    gms_RING_WORK2.timer = 0;
                    AppMain.gmRingDetachRingList(gms_RING_WORK2);
                    AppMain.gmRingFreeRingWork(gms_RING_WORK2);
                }
            }
        }
        gms_RING_WORK = AppMain.gm_ring_sys_work.damage_ring_list_start;
        while (gms_RING_WORK != null)
        {
            AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
            gms_RING_WORK = gms_RING_WORK2.post_ring;
            if (AppMain.ObjViewOutCheck(gms_RING_WORK2.pos.x, gms_RING_WORK2.pos.y, 196, 0, 0, 0, 0) != 0)
            {
                AppMain.gmRingDetachDamageRingList(gms_RING_WORK2);
                AppMain.gmRingFreeRingWork(gms_RING_WORK2);
            }
            else
            {
                AppMain.GMS_RING_WORK gms_RING_WORK3 = gms_RING_WORK2;
                gms_RING_WORK3.pos.x = gms_RING_WORK3.pos.x + gms_RING_WORK2.spd_x;
                if ((gms_RING_WORK2.flag & 4) != 0)
                {
                    AppMain.GMS_RING_WORK gms_RING_WORK4 = gms_RING_WORK2;
                    gms_RING_WORK4.pos.y = gms_RING_WORK4.pos.y - gms_RING_WORK2.spd_y;
                }
                else
                {
                    AppMain.GMS_RING_WORK gms_RING_WORK5 = gms_RING_WORK2;
                    gms_RING_WORK5.pos.y = gms_RING_WORK5.pos.y + gms_RING_WORK2.spd_y;
                }
                gms_RING_WORK2.spd_x += (int)AppMain.gm_ring_fall_acc_x;
                gms_RING_WORK2.spd_y += (int)AppMain.gm_ring_fall_acc_y;
                AppMain.gm_ring_sys_work.col_func(gms_RING_WORK2);
                AppMain.GMS_RING_WORK gms_RING_WORK6 = gms_RING_WORK2;
                gms_RING_WORK6.timer -= 1;
                if (gms_RING_WORK2.timer == 0)
                {
                    AppMain.gmRingDetachDamageRingList(gms_RING_WORK2);
                    AppMain.gmRingFreeRingWork(gms_RING_WORK2);
                }
                else
                {
                    if (gms_RING_WORK2.timer <= 216)
                    {
                        AppMain.ring_rect.pos.z = 0;
                        int i    = 0;
                        int num3 = 0;
                        while (i < (int)AppMain.gm_ring_sys_work.player_num)
                        {
                            GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[i];
                            if ((gms_PLAYER_WORK.player_flag & 1024U) == 0U)
                            {
                                AppMain.ring_rect.pos.x = gms_RING_WORK2.pos.x;
                                AppMain.ring_rect.pos.y = gms_RING_WORK2.pos.y;
                                if (AppMain.gm_ring_sys_work.rec_func(AppMain.ply_rect[i], AppMain.ring_rect) != 0)
                                {
                                    num3 = 1;
                                    short ring_stage_num = gms_PLAYER_WORK.ring_stage_num;
                                    GmPlayer.RingGet(gms_PLAYER_WORK, 1);
                                    if (ring_stage_num < 999)
                                    {
                                        GMS_PLAYER_WORK gms_PLAYER_WORK2 = gms_PLAYER_WORK;
                                        gms_PLAYER_WORK2.ring_stage_num -= 1;
                                    }
                                    AppMain.GmComEfctCreateRing(AppMain.ring_rect.pos.x, AppMain.ring_rect.pos.y);
                                    if ((AppMain.gm_ring_sys_work.flag & 16777216U << i) != 0U)
                                    {
                                        AppMain.gm_ring_sys_work.flag &= ~(16777216U << i);
                                    }
                                }
                            }
                            i++;
                        }
                        if (num3 != 0)
                        {
                            gms_RING_WORK2.timer = 0;
                            AppMain.gmRingDetachDamageRingList(gms_RING_WORK2);
                            AppMain.gmRingFreeRingWork(gms_RING_WORK2);
                        }
                    }
                    if (gms_RING_WORK2.timer > 32 || (gms_RING_WORK2.timer & 2) != 0)
                    {
                        AppMain.gm_ring_sys_work.ring_draw_func(gms_RING_WORK2);
                    }
                }
            }
        }
        if (AppMain.gm_ring_sys_work.damage_ring_list_start == null)
        {
            for (int i = 0; i < (int)AppMain.gm_ring_sys_work.player_num; i++)
            {
                if ((AppMain.gm_ring_sys_work.flag & 16777216U << i) != 0U)
                {
                    AppMain.gm_ring_sys_work.damage_num[i] = 0;
                    AppMain.gm_ring_sys_work.flag         &= ~(16777216U << i);
                }
            }
        }
        gms_RING_WORK = AppMain.gm_ring_sys_work.slot_ring_list_start;
        while (gms_RING_WORK != null)
        {
            AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
            gms_RING_WORK = gms_RING_WORK2.post_ring;
            if (AppMain.ObjViewOutCheck(gms_RING_WORK2.pos.x, gms_RING_WORK2.pos.y, 512, 0, 0, 0, 0) != 0)
            {
                AppMain.gmRingDetachSlotRingList(gms_RING_WORK2);
                AppMain.gmRingFreeRingWork(gms_RING_WORK2);
            }
            else
            {
                AppMain.GMS_RING_WORK gms_RING_WORK7 = gms_RING_WORK2;
                gms_RING_WORK7.pos.x = gms_RING_WORK7.pos.x + gms_RING_WORK2.spd_x;
                AppMain.GMS_RING_WORK gms_RING_WORK8 = gms_RING_WORK2;
                gms_RING_WORK8.pos.y = gms_RING_WORK8.pos.y + gms_RING_WORK2.spd_y;
                AppMain.gm_ring_sys_work.ring_draw_func(gms_RING_WORK2);
                AppMain.ring_rect.pos.z = 0;
                int i    = 0;
                int num3 = 0;
                while (i < (int)AppMain.gm_ring_sys_work.player_num)
                {
                    GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[i];
                    if ((gms_PLAYER_WORK.player_flag & 1024U) == 0U)
                    {
                        AppMain.ring_rect.pos.x = gms_RING_WORK2.pos.x;
                        AppMain.ring_rect.pos.y = gms_RING_WORK2.pos.y;
                        if (AppMain.gm_ring_sys_work.rec_func(AppMain.ply_rect[i], AppMain.ring_rect) != 0)
                        {
                            num3 = 1;
                            GmPlayer.RingGet(gms_PLAYER_WORK, 1);
                            AppMain.GmComEfctCreateRing(AppMain.ring_rect.pos.x, AppMain.ring_rect.pos.y);
                        }
                    }
                    i++;
                }
                if (num3 != 0)
                {
                    gms_RING_WORK2.timer = 0;
                    AppMain.gmRingDetachSlotRingList(gms_RING_WORK2);
                    AppMain.gmRingFreeRingWork(gms_RING_WORK2);
                }
            }
        }
        AppMain.gmRingDrawEnd();
#if !NICE_PHYSICS
        AppMain.gm_ring_sys_work.ring_se_cnt = 0;
#endif
    }
Exemplo n.º 21
0
    // Token: 0x060008E5 RID: 2277 RVA: 0x000512EC File Offset: 0x0004F4EC
    private static void gmGmkBreakObjHit(AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect)
    {
        OBS_OBJECT_WORK parent_obj      = mine_rect.parent_obj;
        GMS_PLAYER_WORK gms_PLAYER_WORK = (GMS_PLAYER_WORK)match_rect.parent_obj;

        if (gms_PLAYER_WORK == AppMain.g_gm_main_system.ply_work[( int )(( UIntPtr )0)])
        {
            AppMain.GMS_GMK_BOBJ_WORK gms_GMK_BOBJ_WORK = (AppMain.GMS_GMK_BOBJ_WORK)parent_obj;
            AppMain.OBS_RECT_WORK     obs_RECT_WORK     = gms_GMK_BOBJ_WORK.gmk_work.ene_com.obj_work.rect_work[0];
            if (gms_PLAYER_WORK.act_state == 39 || gms_PLAYER_WORK.act_state == 31 || (gms_PLAYER_WORK.player_flag & 262144U) != 0U)
            {
                short  num3;
                short  num2;
                short  num  = num2 = (num3 = 0);
                ushort vect = 0;
                if (parent_obj.pos.x >= gms_PLAYER_WORK.obj_work.pos.x)
                {
                    num2 = ( short )((parent_obj.pos.x >> 12) + ( int )obs_RECT_WORK.rect.left - ( int )match_rect.rect.right);
                    num2 = ( short )((gms_PLAYER_WORK.obj_work.pos.x >> 12) - ( int )num2);
                    gms_GMK_BOBJ_WORK.hitcheck = 1;
                }
                else
                {
                    num = ( short )((parent_obj.pos.x >> 12) + ( int )obs_RECT_WORK.rect.right - ( int )match_rect.rect.left - (gms_PLAYER_WORK.obj_work.pos.x >> 12));
                    gms_GMK_BOBJ_WORK.hitcheck = 1;
                    vect = 32768;
                }
                if (parent_obj.pos.y >= gms_PLAYER_WORK.obj_work.pos.y)
                {
                    num3 = ( short )((parent_obj.pos.y >> 12) + ( int )obs_RECT_WORK.rect.top - ( int )match_rect.rect.bottom);
                    num3 = ( short )((gms_PLAYER_WORK.obj_work.pos.y >> 12) - ( int )num3);
                    gms_GMK_BOBJ_WORK.hitcheck = 1;
                }
                if (obs_RECT_WORK.rect.right > gms_GMK_BOBJ_WORK.breakrect_right)
                {
                    AppMain.OBS_RECT rect = obs_RECT_WORK.rect;
                    rect.right -= num;
                    if (obs_RECT_WORK.rect.right < gms_GMK_BOBJ_WORK.breakrect_right)
                    {
                        obs_RECT_WORK.rect.right = gms_GMK_BOBJ_WORK.breakrect_right;
                    }
                }
                if (obs_RECT_WORK.rect.left < gms_GMK_BOBJ_WORK.breakrect_left)
                {
                    AppMain.OBS_RECT rect2 = obs_RECT_WORK.rect;
                    rect2.left += num2;
                    if (obs_RECT_WORK.rect.left > gms_GMK_BOBJ_WORK.breakrect_left)
                    {
                        obs_RECT_WORK.rect.left = gms_GMK_BOBJ_WORK.breakrect_left;
                    }
                }
                if (obs_RECT_WORK.rect.top < gms_GMK_BOBJ_WORK.breakrect_top)
                {
                    AppMain.OBS_RECT rect3 = obs_RECT_WORK.rect;
                    rect3.top += num3;
                    if (obs_RECT_WORK.rect.top > gms_GMK_BOBJ_WORK.breakrect_top)
                    {
                        obs_RECT_WORK.rect.top = gms_GMK_BOBJ_WORK.breakrect_top;
                    }
                }
                gms_GMK_BOBJ_WORK.hitpass = true;
                short num4 = (short)(gms_PLAYER_WORK.obj_work.spd.x >> 12);
                short num5 = (short)(gms_PLAYER_WORK.obj_work.spd.y >> 12);
                if ((obs_RECT_WORK.rect.right + num4 <= gms_GMK_BOBJ_WORK.breakrect_right || obs_RECT_WORK.rect.left + num4 >= gms_GMK_BOBJ_WORK.breakrect_left) && obs_RECT_WORK.rect.top + num5 >= gms_GMK_BOBJ_WORK.breakrect_top)
                {
                    ushort efct_zone_idx = AppMain.tbl_gmk_breakobj_effect[gms_GMK_BOBJ_WORK.zone_type];
                    switch (gms_GMK_BOBJ_WORK.zone_type)
                    {
                    case 0:
                        if (AppMain.g_gs_main_sys_info.stage_id == 2)
                        {
                            efct_zone_idx = 3;
                        }
                        break;

                    case 2:
                        if (AppMain.g_gm_main_system.water_level != 65535 && ( int )AppMain.g_gm_main_system.water_level < (parent_obj.pos.y >> 12) + ( int )gms_GMK_BOBJ_WORK.breakrect_top)
                        {
                            efct_zone_idx = 11;
                        }
                        break;
                    }
                    OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)AppMain.GmEfctZoneEsCreate(null, gms_GMK_BOBJ_WORK.zone_type, (int)efct_zone_idx);
                    obs_OBJECT_WORK.pos.x = parent_obj.pos.x;
                    obs_OBJECT_WORK.pos.y = parent_obj.pos.y;
                    obs_OBJECT_WORK.pos.z = parent_obj.pos.z;
                    AppMain.gmGmkBreakObj_CreateParts(parent_obj, gms_GMK_BOBJ_WORK.zone_type, vect);
                    gms_GMK_BOBJ_WORK.gmk_work.ene_com.obj_work.col_work.obj_col.obj = null;
                    AppMain.GmEnemyDefaultDefFunc(mine_rect, match_rect);
                    GmSound.PlaySE("BreakOBJ");
                    GmPlayer.AddScore(gms_PLAYER_WORK, 100, parent_obj.pos.x, parent_obj.pos.y);
                }
            }
        }
    }
Exemplo n.º 22
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.º 23
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.º 24
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);
    }
Exemplo n.º 25
0
    // Token: 0x0600157D RID: 5501 RVA: 0x000BAA4C File Offset: 0x000B8C4C
    private static void gmGmkFlipperMainReady(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        OBS_OBJECT_WORK           target_obj        = gms_ENEMY_3D_WORK.ene_com.target_obj;

        AppMain.gmGmkFlipperUpdateAngle(obj_work);
        int num = 1;

        if (num != 0)
        {
            GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];
            if (AppMain.gmGmkFlipperCheckControlPlayer() == 0)
            {
                AppMain.gmGmkFlipperChangeModeWait(obj_work);
                return;
            }
            if (AppMain.gmGmkFlipperCheckKeyHit(obj_work, gms_PLAYER_WORK) == 0)
            {
                return;
            }
            if (AppMain.gmGmkFlipperCheckHook(obj_work) != 0)
            {
                target_obj.spd.x = 0;
                target_obj.spd.y = 0;
                AppMain.gmGmkFlipperChangeModeHook(obj_work);
                return;
            }
            int num2 = 12288;
            int num3 = -53248;
            int num4 = AppMain.gmGmkFlipperCalcType((int)gms_ENEMY_3D_WORK.ene_com.eve_rec.id);
            if (num4 == 1)
            {
                num2 = -num2;
            }
            num2 += target_obj.pos.x - obj_work.pos.x >> 2;
            int num5 = (102400 - AppMain.MTM_MATH_ABS(target_obj.pos.x - obj_work.pos.x)) / 10;
            if (num5 > 0)
            {
                num3 += num5;
            }
            int num6 = AppMain.FX_F32_TO_FX32((100f + (float)gms_ENEMY_3D_WORK.ene_com.eve_rec.left) * 0.01f);
            if (num6 < 0)
            {
                num6 = 0;
            }
            int num7 = AppMain.FX_F32_TO_FX32((100f + (float)gms_ENEMY_3D_WORK.ene_com.eve_rec.top) * 0.01f);
            if (num7 < 0)
            {
                num7 = 0;
            }
            num2 = AppMain.FX_Mul(num2, num6);
            num3 = AppMain.FX_Mul(num3, num7);
            int flag_no_recover_homing = 0;
            if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 1) != 0)
            {
                flag_no_recover_homing = 1;
            }
            int no_spddown_timer = 0;
            if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 2) != 0)
            {
                no_spddown_timer = 30;
            }
            GmPlayer.SetAtk(gms_PLAYER_WORK);
            AppMain.GmPlySeqInitPinballAir(gms_PLAYER_WORK, num2, num3, 5, flag_no_recover_homing, no_spddown_timer);
            AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctCmnEsCreate(obj_work, 16);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.x = target_obj.pos.x;
            gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.y = target_obj.pos.y;
            gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.z = 131072;
            gms_EFFECT_3DES_WORK.efct_com.obj_work.dir.z = ( ushort )(AppMain.nnArcTan2(( double )AppMain.FX_FX32_TO_F32(num3), ( double )AppMain.FX_FX32_TO_F32(num2)) - 16384);
        }
        AppMain.gmGmkFlipperChangeModeHit(obj_work);
    }
Exemplo n.º 26
0
    // Token: 0x0600068D RID: 1677 RVA: 0x0003AF00 File Offset: 0x00039100
    private static void gmGmkEnBmprDefFunc(AppMain.OBS_RECT_WORK gimmick_rect, AppMain.OBS_RECT_WORK player_rect)
    {
        OBS_OBJECT_WORK parent_obj = gimmick_rect.parent_obj;

        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)parent_obj;
        OBS_OBJECT_WORK           parent_obj2       = player_rect.parent_obj;

        if (parent_obj2.obj_type != 1)
        {
            return;
        }
        int num = AppMain.gmGmkEnBmprCalcType((int)gms_ENEMY_3D_WORK.ene_com.eve_rec.id);

        parent_obj.dir.z  = AppMain.g_gm_gmk_en_bmpr_angle_z[num];
        parent_obj2.dir.z = 0;
        int num2 = parent_obj2.spd.x;
        int num3 = parent_obj2.spd.y;

        if ((parent_obj2.move_flag & 32768U) != 0U)
        {
            if (parent_obj2.spd_m != 0)
            {
                num2 = AppMain.FX_Mul(parent_obj2.spd_m, AppMain.mtMathCos(( int )parent_obj2.dir.z));
                num3 = AppMain.FX_Mul(parent_obj2.spd_m, AppMain.mtMathSin(( int )parent_obj2.dir.z));
            }
            else
            {
                AppMain.VecFx32 vecFx = AppMain.gmGmkEnBmprNormalizeVectorXY(new AppMain.VecFx32
                {
                    x = parent_obj2.pos.x - parent_obj.pos.x,
                    y = parent_obj2.pos.y - parent_obj.pos.y,
                    z = 0
                });
                num2 = AppMain.FX_Mul(vecFx.x, 98304);
                num3 = AppMain.FX_Mul(vecFx.y, 98304);
            }
        }
        int num4 = -12288;
        int num5 = parent_obj2.pos.x - parent_obj.pos.x;
        int num6 = parent_obj2.pos.y + num4 - parent_obj.pos.y;

        switch (num)
        {
        case 0:
            num2 = 0;
            if (num6 < 0)
            {
                num3 = -24576;
            }
            else
            {
                num3 = 24576;
                OBS_OBJECT_WORK obs_OBJECT_WORK = parent_obj;
                obs_OBJECT_WORK.dir.z = ( ushort )(obs_OBJECT_WORK.dir.z + 32768);
            }
            break;

        case 1:
        {
            int num7 = AppMain.FX_Mul(24576, 2896);
            if (num6 < 0)
            {
                num2 = -num7;
                num3 = -num7;
            }
            else
            {
                num2 = num7;
                num3 = num7;
                OBS_OBJECT_WORK obs_OBJECT_WORK2 = parent_obj;
                obs_OBJECT_WORK2.dir.z = ( ushort )(obs_OBJECT_WORK2.dir.z + 32768);
            }
            break;
        }

        case 2:
            num3 = 0;
            if (num5 < 0)
            {
                num2 = -24576;
            }
            else
            {
                num2 = 24576;
                OBS_OBJECT_WORK obs_OBJECT_WORK3 = parent_obj;
                obs_OBJECT_WORK3.dir.z = ( ushort )(obs_OBJECT_WORK3.dir.z + 32768);
            }
            break;

        case 3:
        {
            int num8 = AppMain.FX_Mul(24576, 2896);
            if (num6 > 0)
            {
                num2 = -num8;
                num3 = num8;
            }
            else
            {
                num2 = num8;
                num3 = -num8;
                OBS_OBJECT_WORK obs_OBJECT_WORK4 = parent_obj;
                obs_OBJECT_WORK4.dir.z = ( ushort )(obs_OBJECT_WORK4.dir.z + 32768);
            }
            break;
        }
        }
        AppMain.GmPlySeqInitPinballAir(( GMS_PLAYER_WORK )parent_obj2, num2, num3, 5);
        AppMain.gmGmkEnBmprChangeModeHit(parent_obj);
        int num9 = AppMain.gmGmkEnBmperGetUserWorkLife(parent_obj);

        if (num9 <= 0)
        {
            parent_obj.user_flag = ( uint )(( ulong )parent_obj.user_flag & 18446744073709551614UL);
        }
        int num10 = 10;

        if (AppMain.gmGmkEnBmprCheckGroupBonus(parent_obj) != 0)
        {
            num10 *= 50;
        }
        GmPlayer.AddScore(( GMS_PLAYER_WORK )parent_obj2, num10, parent_obj.pos.x, parent_obj.pos.y);
        AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctCmnEsCreate(parent_obj, 16);
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.x = parent_obj2.pos.x;
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.y = parent_obj2.pos.y;
        gms_EFFECT_3DES_WORK.efct_com.obj_work.pos.z = 131072;
        gms_EFFECT_3DES_WORK.efct_com.obj_work.dir.z = ( ushort )(AppMain.nnArcTan2(( double )AppMain.FX_FX32_TO_F32(num3), ( double )AppMain.FX_FX32_TO_F32(num2)) - 16384);
        AppMain.GMM_PAD_VIB_SMALL();
    }
Exemplo n.º 27
0
    // Token: 0x0600124F RID: 4687 RVA: 0x0009FF80 File Offset: 0x0009E180
    private static void gmGmkCannonReady(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_CANNON_WORK gms_GMK_CANNON_WORK = (AppMain.GMS_GMK_CANNON_WORK)obj_work;
        short angle_set = gms_GMK_CANNON_WORK.angle_set;
        short angle_now = gms_GMK_CANNON_WORK.angle_now;

        if (gms_GMK_CANNON_WORK.angle_set == gms_GMK_CANNON_WORK.angle_now)
        {
            if ((AppMain.g_gs_main_sys_info.game_flag & 1U) == 0U)
            {
                int num = (int)(AppMain._am_iphone_accel_data.sensor.x * 16384f) * 3;
                if (num > 32768)
                {
                    num = 32768;
                }
                else if (num < -32768)
                {
                    num = -32768;
                }

                num /= 2;
                if (num >= (int)(gms_GMK_CANNON_WORK.angle_now + 2730))
                {
                    num = (int)(gms_GMK_CANNON_WORK.angle_now + 2730);
                }
                else if (gms_GMK_CANNON_WORK.angle_now == 13650 && num >= 16380)
                {
                    num = 16380;
                }
                else if (num <= (int)(gms_GMK_CANNON_WORK.angle_now - 2730))
                {
                    num = (int)(gms_GMK_CANNON_WORK.angle_now - 2730);
                }
                else if (gms_GMK_CANNON_WORK.angle_now == -13650 && num <= -16380)
                {
                    num = -16380;
                }
                else
                {
                    num = (int)gms_GMK_CANNON_WORK.angle_now;
                }

                gms_GMK_CANNON_WORK.angle_set = (short)num;
            }
            else
            {
                AppMain.GMS_GMK_CANNON_WORK gms_GMK_CANNON_WORK2 = gms_GMK_CANNON_WORK;
                gms_GMK_CANNON_WORK2.angle_set += AppMain.gmGmkCannon_GetAngle(gms_GMK_CANNON_WORK.ply_work.key_on);
                if (gms_GMK_CANNON_WORK.angle_set > 16380 && (ushort)gms_GMK_CANNON_WORK.angle_set < 49156)
                {
                    gms_GMK_CANNON_WORK.angle_set = 16380;
                }

                if (gms_GMK_CANNON_WORK.angle_set < -16380 && (ushort)gms_GMK_CANNON_WORK.angle_set > 16380)
                {
                    gms_GMK_CANNON_WORK.angle_set = -16380;
                }
            }

            if (angle_set != gms_GMK_CANNON_WORK.angle_set)
            {
                GmSound.PlaySE("Cannon1");
            }
        }

        if (gms_GMK_CANNON_WORK.angle_set != gms_GMK_CANNON_WORK.angle_now)
        {
            AppMain.gmGmkCannon_CannonTurn(gms_GMK_CANNON_WORK);
            obj_work.dir.z = (ushort)gms_GMK_CANNON_WORK.angle_now;
        }

        if (gms_GMK_CANNON_WORK.angle_set == gms_GMK_CANNON_WORK.angle_now &&
            angle_now == gms_GMK_CANNON_WORK.angle_now &&
            GmPlayer.KeyCheckJumpKeyPush(gms_GMK_CANNON_WORK.ply_work))
        {
            AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK =
                AppMain.GmEfctCmnEsCreate(gms_GMK_CANNON_WORK.ply_work.obj_work, 20);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.dir.z = obj_work.dir.z;
            OBS_OBJECT_WORK obj_work2 = gms_EFFECT_3DES_WORK.efct_com.obj_work;
            obj_work2.pos.x = obj_work2.pos.x + AppMain.mtMathSin((int)obj_work.dir.z) * 32;
            OBS_OBJECT_WORK obj_work3 = gms_EFFECT_3DES_WORK.efct_com.obj_work;
            obj_work3.pos.y = obj_work3.pos.y - AppMain.mtMathCos((int)obj_work.dir.z) * 32;
            AppMain.GmPlySeqInitCannonShoot(gms_GMK_CANNON_WORK.ply_work,
                                            AppMain.mtMathCos((int)(obj_work.dir.z - 16384)) * gms_GMK_CANNON_WORK.cannon_power,
                                            AppMain.mtMathSin((int)(obj_work.dir.z - 16384)) * gms_GMK_CANNON_WORK.cannon_power);
            AppMain.gmGmkCannonFieldColOff(obj_work);
            gms_GMK_CANNON_WORK.gmk_work.ene_com.enemy_flag |= 32768U;
            gms_GMK_CANNON_WORK.shoot_after = 0;
            obj_work.ppFunc = AppMain.gmGmkCannonShoot;
            AppMain.gmGmkCannonShoot(obj_work);
            GmSound.PlaySE("Cannon2");
            AppMain.GMM_PAD_VIB_SMALL();
        }
    }