Пример #1
0
    // Token: 0x06000269 RID: 617 RVA: 0x00013B7C File Offset: 0x00011D7C
    private static void gmGmkStopperLockWait(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;
        }

        GMS_PLAYER_WORK ply_work = gms_GMK_STOPPER_WORK.ply_work;

        if (obj_work.pos.x == ply_work.obj_work.pos.x && obj_work.pos.y == ply_work.obj_work.pos.y)
        {
            if (gms_GMK_STOPPER_WORK.call_slot_id >= 0)
            {
                AppMain.GmGmkSlotStartRequest(gms_GMK_STOPPER_WORK.call_slot_id, ply_work);
                obj_work.ppFunc = AppMain.gmGmkStopperStay_Slot;
                GmSound.PlaySE("Casino3");
                return;
            }

            obj_work.ppFunc = AppMain.gmGmkStopperStay_Norm;
            if (gms_GMK_STOPPER_WORK.se_handle != null)
            {
                GsSound.StopSE(gms_GMK_STOPPER_WORK.se_handle);
                GsSound.FreeSeHandle(gms_GMK_STOPPER_WORK.se_handle);
            }

            gms_GMK_STOPPER_WORK.se_handle       = GsSound.AllocSeHandle();
            gms_GMK_STOPPER_WORK.se_handle.flag |= 2147483648U;
            GmSound.PlaySE("Casino3", gms_GMK_STOPPER_WORK.se_handle);
        }
    }
Пример #2
0
    // Token: 0x060017B8 RID: 6072 RVA: 0x000D24D8 File Offset: 0x000D06D8
    private static void dmManualInit()
    {
        AppMain.dm_manual_mgr_p.tcb = AppMain.MTM_TASK_MAKE_TCB(AppMain.dmManualProcMain, AppMain.dmManualDest, 0U, 32767, 12288U, 10, () => new AppMain.DMS_MANUAL_MAIN_WORK(), "MANUAL_MAIN");
        AppMain.DMS_MANUAL_MAIN_WORK dms_MANUAL_MAIN_WORK = (AppMain.DMS_MANUAL_MAIN_WORK)AppMain.dm_manual_mgr_p.tcb.work;
        dms_MANUAL_MAIN_WORK.draw_state = (AppMain.AoActSysGetDrawStateEnable() ? 1U : 0U);
        AppMain.AoActSysSetDrawStateEnable(dms_MANUAL_MAIN_WORK.draw_state != 0U);
        if (dms_MANUAL_MAIN_WORK.draw_state != 0U)
        {
            AppMain.dm_manual_draw_state = AppMain.AoActSysGetDrawState();
            AppMain.AoActSysSetDrawState(AppMain.dm_manual_draw_state);
        }
        if (AppMain.GeEnvGetDecideKey() == AppMain.GSE_DECIDE_KEY.GSD_DECIDE_KEY_O)
        {
            dms_MANUAL_MAIN_WORK.is_jp_region = true;
        }
        else
        {
            dms_MANUAL_MAIN_WORK.is_jp_region = false;
        }
        AppMain.dmManualSetInitData(dms_MANUAL_MAIN_WORK);
        short cur_evt_id = AppMain.SyGetEvtInfo().cur_evt_id;

        if (cur_evt_id == 6 || cur_evt_id == 11)
        {
            AppMain.dm_manual_is_pause_maingame = true;
            dms_MANUAL_MAIN_WORK.se_handle      = GsSound.AllocSeHandle();
        }
        dms_MANUAL_MAIN_WORK.proc_update = AppMain.dmManualProcInit;
    }
Пример #3
0
    // Token: 0x06000D95 RID: 3477 RVA: 0x00076A90 File Offset: 0x00074C90
    public static void GmRingInit()
    {
        MTS_TASK_TCB mts_TASK_TCB = AppMain.MTM_TASK_MAKE_TCB(AppMain.gmRingMain, AppMain.gmRingDest, 0U, 0, 7680U, 5, () => new AppMain.GMS_RING_SYS_WORK(), "GM RING MAIN");

        if (mts_TASK_TCB == null)
        {
            return;
        }
        AppMain.gm_ring_tcb      = mts_TASK_TCB;
        AppMain.gm_ring_sys_work = (AppMain.GMS_RING_SYS_WORK)mts_TASK_TCB.work;
        AppMain.gm_ring_sys_work.Clear();
#if NICE_PHYSICS
        for (int i = 0; i < 8; i++)
        {
            AppMain.gm_ring_sys_work.h_snd_ring[i]       = GsSound.AllocSeHandle();
            AppMain.gm_ring_sys_work.h_snd_ring[i].flag |= 2147483648U;
        }
#else
        AppMain.gm_ring_sys_work.h_snd_ring[0]       = GsSound.AllocSeHandle();
        AppMain.gm_ring_sys_work.h_snd_ring[1]       = GsSound.AllocSeHandle();
        AppMain.gm_ring_sys_work.h_snd_ring[0].flag |= 2147483648U;
        AppMain.gm_ring_sys_work.h_snd_ring[1].flag |= 2147483648U;
#endif
        AppMain.gm_ring_sys_work.player_num = 1;
        for (int i = 0; i < 96; i++)
        {
            AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gm_ring_sys_work.ring_list_buf[i];
            AppMain.gm_ring_sys_work.ring_list[i] = gms_RING_WORK;
        }
        AppMain.gm_ring_scale      = 4096;
        AppMain.gm_ring_fall_acc_x = 0;
        AppMain.gm_ring_fall_acc_y = 288;
        if (21 <= AppMain.g_gs_main_sys_info.stage_id && AppMain.g_gs_main_sys_info.stage_id <= 27)
        {
            AppMain.g_gm_ring_size     = (short)((double)(AppMain.OBD_LCD_X - AppMain.OBD_LCD_Y) * 1.4 + 20.0);
            AppMain.gm_ring_die_offset = (short)((double)(AppMain.OBD_LCD_X - AppMain.OBD_LCD_Y) * 1.4 + 72.0);
        }
        else
        {
            AppMain.g_gm_ring_size     = 20;
            AppMain.gm_ring_die_offset = 72;
        }
        AppMain.gm_ring_sys_work.rec_func       = AppMain.gmRingHitFuncNormal;
        AppMain.gm_ring_sys_work.col_func       = AppMain.gmRingMoveCollsion;
        AppMain.gm_ring_sys_work.ref_spd_base   = 8192;
        AppMain.gm_ring_sys_work.ring_draw_func = AppMain.gmRingDrawFuncRing3D;
        AppMain.gm_ring_sys_work.se_wait        = 0;
        AppMain.gm_ring_sys_work.color          = uint.MaxValue;
        if (AppMain.g_gs_main_sys_info.stage_id == 2 || AppMain.g_gs_main_sys_info.stage_id == 3)
        {
            AppMain.gm_ring_sys_work.color = 4292927743U;
        }
        else if (AppMain.g_gs_main_sys_info.stage_id == 14)
        {
            AppMain.gm_ring_sys_work.color = 3233857791U;
        }
        AppMain.gm_ring_sys_work.dir = 49152;
        AppMain.ObjDrawAction3dActionSet3DNNMaterial(AppMain.gm_ring_obj_3d, 0);
    }
Пример #4
0
 // Token: 0x0600066F RID: 1647 RVA: 0x00039200 File Offset: 0x00037400
 public static void gmGmkTruckInitMain(OBS_OBJECT_WORK obj_work, GMS_PLAYER_WORK ply_work)
 {
     AppMain.UNREFERENCED_PARAMETER(ply_work);
     AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work;
     obj_work.flag      |= 2U;
     obj_work.move_flag |= 8448U;
     obj_work.ppFunc     = AppMain.gmGmkTruckMain;
     AppMain.gmGmkTruckCreateSparkEfct(gms_GMK_TRUCK_WORK, 27);
     gms_GMK_TRUCK_WORK.h_snd_lorry = GsSound.AllocSeHandle();
 }
Пример #5
0
 // Token: 0x06000075 RID: 117 RVA: 0x000061EC File Offset: 0x000043EC
 private static void gmGmkBumperInit(OBS_OBJECT_WORK obj_work, int bumper_type)
 {
     AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
     AppMain.gmGmkBumperSetRect(gms_ENEMY_3D_WORK, bumper_type);
     obj_work.move_flag = 8448U;
     obj_work.dir.z     = AppMain.g_gm_gmk_bumper_angle_z[bumper_type];
     AppMain.ObjDrawObjectActionSet3DNNMaterial(obj_work, 0);
     obj_work.disp_flag |= 4194324U;
     obj_work.pos.z      = -122880;
     AppMain.GMS_GMK_BUMPER_WORK gms_GMK_BUMPER_WORK = (AppMain.GMS_GMK_BUMPER_WORK)gms_ENEMY_3D_WORK;
     gms_GMK_BUMPER_WORK.se_handle = GsSound.AllocSeHandle();
     obj_work.ppFunc = null;
     obj_work.ppMove = null;
     obj_work.ppOut  = AppMain.gmGmkBumperDrawFunc;
     AppMain.mtTaskChangeTcbDestructor(obj_work.tcb, AppMain.gmGmkBumperDestFunc);
 }
Пример #6
0
 // Token: 0x06001B1E RID: 6942 RVA: 0x000F7274 File Offset: 0x000F5474
 private static void gmGmkPressWallStay(OBS_OBJECT_WORK obj_work)
 {
     if (AppMain.g_obj.camera[0][0] >= obj_work.pos.x || (AppMain.g_gm_gamedat_zone_type_tbl[( int )AppMain.g_gs_main_sys_info.stage_id] == 2 && obj_work.user_flag != 0U))
     {
         AppMain.GMS_GMK_PWALL_WORK gms_GMK_PWALL_WORK = (AppMain.GMS_GMK_PWALL_WORK)obj_work;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.obj       = obj_work;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.diff_data = AppMain.g_gm_default_col;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.width     = 192;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.ofst_x    = -192;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.height    = 256;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.ofst_y    = 0;
         gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col.flag     |= 134217824U;
         AppMain.OBS_COLLISION_OBJ obj_col = gms_GMK_PWALL_WORK.gmk_work.ene_com.col_work.obj_col;
         obj_col.attr       &= 65534;
         obj_work.disp_flag &= 4294967263U;
         if (AppMain.g_gm_gamedat_zone_type_tbl[( int )AppMain.g_gs_main_sys_info.stage_id] == 2 && gms_GMK_PWALL_WORK.wall_height > 0)
         {
             AppMain.gmGmkPressWallCreateRail(obj_work, gms_GMK_PWALL_WORK.wall_height, gms_GMK_PWALL_WORK.master_posy);
         }
         if (AppMain.g_gm_gamedat_zone_type_tbl[( int )AppMain.g_gs_main_sys_info.stage_id] == 3)
         {
             AppMain.gmGmkPressWallCreateParts(obj_work, gms_GMK_PWALL_WORK.master_posy, gms_GMK_PWALL_WORK.wall_height);
             gms_GMK_PWALL_WORK.gmk_work.ene_com.rect_work[2].flag &= 4294967291U;
             gms_GMK_PWALL_WORK.gmk_work.ene_com.rect_work[0].flag &= 4294967291U;
             gms_GMK_PWALL_WORK.gmk_work.ene_com.rect_work[1].flag |= 4U;
             AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_GMK_PWALL_WORK.gmk_work.ene_com.rect_work[1];
             AppMain.ObjRectWorkZSet(obs_RECT_WORK, -16, 0, -32, 0, 192, 32);
             obs_RECT_WORK.flag |= 4U;
             obs_RECT_WORK.flag |= 1024U;
             obj_work.flag      &= 4294967293U;
             obs_RECT_WORK.ppHit = AppMain.gmGmkPressWallZ4Hit;
         }
         if (AppMain.g_gm_gamedat_zone_type_tbl[( int )AppMain.g_gs_main_sys_info.stage_id] == 2 && obj_work.user_flag != 0U)
         {
             obj_work.user_flag_OBJECT = null;
         }
         else
         {
             AppMain.GMM_PAD_VIB_MID_TIME(60f);
             gms_GMK_PWALL_WORK.se_handle = GsSound.AllocSeHandle();
             GmSound.PlaySEForce("MovingWall", gms_GMK_PWALL_WORK.se_handle);
         }
         gms_GMK_PWALL_WORK.efct_obj = null;
         obj_work.ppFunc             = AppMain.gmGmkPressWallForce;
         AppMain.gmGmkPressWallForce(obj_work);
     }
 }
Пример #7
0
 // Token: 0x06002554 RID: 9556 RVA: 0x0014C6F8 File Offset: 0x0014A8F8
 private void fadeInStart(int prio)
 {
     if (!AppMain.CMain_PauseMenu.canGoStageSelect())
     {
         AppMain.CMain_PauseMenu.local_create_action_table[11].idx = 2;
         AppMain.CMain_PauseMenu.local_create_action_table[14].idx = 7;
     }
     else
     {
         AppMain.CMain_PauseMenu.local_create_action_table[11].idx = 1;
         AppMain.CMain_PauseMenu.local_create_action_table[14].idx = 5;
     }
     if (AppMain.CMain_PauseMenu.isSpecialStage())
     {
         AppMain.CMain_PauseMenu.local_create_action_table[13].idx = 6;
     }
     else
     {
         AppMain.CMain_PauseMenu.local_create_action_table[13].idx = 4;
     }
     for (int i = 0; i < 17; i++)
     {
         AppMain.CMain_PauseMenu.SLocalCreateActionTable slocalCreateActionTable = AppMain.CMain_PauseMenu.local_create_action_table[i];
         A2S_AMA_HEADER ama = (A2S_AMA_HEADER)this.m_file[slocalCreateActionTable.file];
         AppMain.CMain_PauseMenu.SAction saction = this.m_act[i];
         saction.act     = AppMain.AoActCreate(ama, ( uint )slocalCreateActionTable.idx);
         saction.tex     = this.m_tex[slocalCreateActionTable.tex];
         saction.flag[0] = true;
         saction.flag[1] = true;
         saction.AcmInit();
     }
     for (int j = 0; j < 3; j++)
     {
         AppMain.CMain_PauseMenu.SAction saction2 = this.m_act[AppMain.CMain_PauseMenu.c_local_create_trg_table[j]];
         CTrgAoAction ctrgAoAction = this.m_trg[j];
         ctrgAoAction.Create(saction2.act);
     }
     this.m_flag[7]        = true;
     this.m_act[0].flag[1] = false;
     this.m_act[0].scale   = new Vector2(0f, 0f);
     this.m_se_handle      = GsSound.AllocSeHandle();
     base.AttachTask("gmPauseMenu.Execute", ( uint )prio, 0U, 0U);
     this.playSe(0);
     this.m_procCount.SetProc(this.fadeIn);
 }
Пример #8
0
    // Token: 0x06000FEA RID: 4074 RVA: 0x0008AC68 File Offset: 0x00088E68
    private static void gmGmkRockChaseInit(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        AppMain.gmGmkRockSetRectWait(gms_ENEMY_3D_WORK);
        AppMain.ObjObjectFieldRectSet(obj_work, -28, -28, 28, 42);
        obj_work.disp_flag |= 4194304U;
        gms_ENEMY_3D_WORK.ene_com.target_obj = AppMain.g_gm_main_system.ply_work[( int )(( UIntPtr )0)].obj_work;
        obj_work.pos.z = -131072;
        AppMain.GMS_GMK_ROCK_CHASE_WORK gms_GMK_ROCK_CHASE_WORK = (AppMain.GMS_GMK_ROCK_CHASE_WORK)obj_work;
        ushort angle_z = AppMain.mtMathRand();

        AppMain.gmGmkRockChaseSetAngleZ(gms_GMK_ROCK_CHASE_WORK, angle_z);
        obj_work.user_work = ( uint )AppMain.mtMathRand();
        gms_GMK_ROCK_CHASE_WORK.se_handle = GsSound.AllocSeHandle();
        obj_work.ppFunc = null;
        obj_work.ppMove = AppMain.gmGmkRockMoveFunc;
        obj_work.ppOut  = AppMain.gmGmkRockChaseDrawFunc;
        AppMain.mtTaskChangeTcbDestructor(obj_work.tcb, AppMain.gmGmkRockChaseTcbDest);
    }
    // Token: 0x060007AA RID: 1962 RVA: 0x00043B1C File Offset: 0x00041D1C
    private void dmLogoSegaStart()
    {
        NNS_RGBA nns_RGBA = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_RGB  nns_RGB  = new NNS_RGB(1f, 1f, 1f);

        this.dmLogoSegaObjSysytemInit();
        GsSound.Reset();
        GsSound.Begin(3, 32767U, 0);
        MTS_TASK_TCB mts_TASK_TCB = AppMain.MTM_TASK_MAKE_TCB(this.dmLogoSegaMainFunc, null, 0U, 0, 4096U, 0, () => new AppMain.DMS_LOGO_SEGA_WORK(), "DM_LSEGA_MAIN");

        AppMain.DMS_LOGO_SEGA_WORK dms_LOGO_SEGA_WORK = (AppMain.DMS_LOGO_SEGA_WORK)mts_TASK_TCB.work;
        AppMain.nnSetPrimitive3DMaterial(ref nns_RGBA, ref nns_RGB, 1f);
        AppMain.AoActSysSetDrawStateEnable(false);
        this.dmLogoSegaActionCreate(dms_LOGO_SEGA_WORK);
        dms_LOGO_SEGA_WORK.ply_obj = this.dmLogoSegaCreatePlayer();
        dms_LOGO_SEGA_WORK.timer   = 0;
        dms_LOGO_SEGA_WORK.func    = this.dmLogoSegaStartWaitFunc;
        dms_LOGO_SEGA_WORK.h_se    = GsSound.AllocSeHandle();
    }
Пример #10
0
    // Token: 0x060008B2 RID: 2226 RVA: 0x0004E7E0 File Offset: 0x0004C9E0
    private static void gmGmkRockRideWaitInit(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        AppMain.gmGmkRockRideWaitSetRect(gms_ENEMY_3D_WORK);
        obj_work.flag      |= 1U;
        obj_work.move_flag |= 8448U;
        obj_work.disp_flag |= 4194304U;
        obj_work.spd_m      = 0;
        gms_ENEMY_3D_WORK.ene_com.target_obj = AppMain.g_gm_main_system.ply_work[( int )(( UIntPtr )0)].obj_work;
        ushort angle_z = AppMain.mtMathRand();

        AppMain.gmGmkRockRideSetUserTimerAngleZ(obj_work, angle_z);
        obj_work.user_work = ( uint )AppMain.mtMathRand();
        AppMain.GMS_GMK_ROCK_WORK gms_GMK_ROCK_WORK = (AppMain.GMS_GMK_ROCK_WORK)obj_work;
        gms_GMK_ROCK_WORK.se_handle = GsSound.AllocSeHandle();
        obj_work.ppFunc             = AppMain.gmGmkRockRideWaitMain;
        obj_work.ppMove             = null;
        obj_work.ppOut = AppMain.gmGmkRockRideDrawFunc;
        AppMain.mtTaskChangeTcbDestructor(obj_work.tcb, AppMain.gmGmkRockRideTcbDest);
    }
Пример #11
0
 // Token: 0x06000654 RID: 1620 RVA: 0x0003832C File Offset: 0x0003652C
 private static OBS_OBJECT_WORK GmGmkWaterSliderCreateEffect()
 {
     if (AppMain.g_gm_gmk_water_slider_effct_player == null)
     {
         GMS_PLAYER_WORK gms_PLAYER_WORK = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];
         OBS_OBJECT_WORK obj_work        = gms_PLAYER_WORK.obj_work;
         AppMain.g_gm_gmk_water_slider_effct_player = AppMain.GmEfctZoneEsCreate(obj_work, 2, 23);
         OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)AppMain.g_gm_gmk_water_slider_effct_player;
         obs_OBJECT_WORK.parent_ofst.z = 131072;
         obs_OBJECT_WORK.ppFunc        = AppMain.gmGmkWaterSliderEffectMainFunc;
         AppMain.mtTaskChangeTcbDestructor(obs_OBJECT_WORK.tcb, AppMain.gmGmkWaterSliderEffectDestFunc);
     }
     if (AppMain.g_gm_gmk_water_slider_se_handle == null)
     {
         AppMain.g_gm_gmk_water_slider_se_handle = GsSound.AllocSeHandle();
         GmSound.PlaySE("WaterSlider", AppMain.g_gm_gmk_water_slider_se_handle);
     }
     AppMain.GMM_PAD_VIB_SMALL_TIME(30f);
     return(( OBS_OBJECT_WORK )AppMain.g_gm_gmk_water_slider_effct_player);
 }
Пример #12
0
 // Token: 0x06001B10 RID: 6928 RVA: 0x000F6A64 File Offset: 0x000F4C64
 private static void gmGmkPulleySparkInit(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_ENEMY_3D_WORK   gms_ENEMY_3D_WORK   = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
     AppMain.GMS_GMK_PULLEY_WORK gms_GMK_PULLEY_WORK = (AppMain.GMS_GMK_PULLEY_WORK)obj_work;
     if (gms_GMK_PULLEY_WORK.efct_work == null)
     {
         short dir_y = 0;
         short num   = 0;
         gms_GMK_PULLEY_WORK.efct_work = AppMain.GmEfctZoneEsCreate(obj_work, 0, 6);
         if (obj_work.spd.x < 0)
         {
             num = -16384;
             AppMain.GmComEfctAddDispOffsetF(gms_GMK_PULLEY_WORK.efct_work, 3f, 0f, 0f);
         }
         if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 2) != 0)
         {
             if ((gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 1) != 0)
             {
                 num += 4836;
             }
             else
             {
                 num += -4836;
             }
         }
         AppMain.GmComEfctAddDispRotationS(gms_GMK_PULLEY_WORK.efct_work, 0, dir_y, num);
         AppMain.GMS_GMK_PULLEY_WORK gms_GMK_PULLEY_WORK2 = (AppMain.GMS_GMK_PULLEY_WORK)obj_work;
         if (gms_GMK_PULLEY_WORK2.se_handle == null || gms_GMK_PULLEY_WORK2.se_handle.au_player.sound[0] == null)
         {
             gms_GMK_PULLEY_WORK2.se_handle = GsSound.AllocSeHandle();
             GmSound.PlaySE("Pulley", gms_GMK_PULLEY_WORK2.se_handle);
             return;
         }
         gms_GMK_PULLEY_WORK2.se_handle.snd_ctrl_param.volume = 1f;
     }
 }
Пример #13
0
    // Token: 0x06000670 RID: 1648 RVA: 0x00039260 File Offset: 0x00037460
    public static void gmGmkTruckMain(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work;
        if (gms_GMK_TRUCK_WORK.target_player == null)
        {
            AppMain.gmGmkTruckInitDeathFall(obj_work, null);
            obj_work.ppFunc(obj_work);
            return;
        }
        if ((gms_GMK_TRUCK_WORK.target_player.player_flag & 262144U) == 0U)
        {
            AppMain.gmGmkTruckInitFree(obj_work, gms_GMK_TRUCK_WORK.target_player);
            obj_work.ppFunc(obj_work);
            return;
        }
        if ((gms_GMK_TRUCK_WORK.target_player.gmk_flag2 & 64U) != 0U)
        {
            AppMain.gmGmkTruckInitDeathFall(obj_work, gms_GMK_TRUCK_WORK.target_player);
            obj_work.ppFunc(obj_work);
            return;
        }
        if ((gms_GMK_TRUCK_WORK.target_player.player_flag & 1024U) != 0U)
        {
            obj_work.pos.z = 983040;
        }
        GMS_PLAYER_WORK target_player = gms_GMK_TRUCK_WORK.target_player;

        obj_work.prev_pos   = obj_work.pos;
        obj_work.pos.x      = target_player.obj_work.pos.x;
        obj_work.pos.y      = target_player.obj_work.pos.y;
        obj_work.move.x     = obj_work.pos.x - obj_work.prev_pos.x;
        obj_work.move.y     = obj_work.pos.y - obj_work.prev_pos.y;
        obj_work.move.z     = obj_work.pos.z - obj_work.prev_pos.z;
        obj_work.dir        = target_player.obj_work.dir;
        obj_work.dir.z      = ( ushort )(obj_work.dir.z + target_player.obj_work.dir_fall);
        obj_work.vib_timer  = target_player.obj_work.vib_timer;
        obj_work.disp_flag &= 4294967279U;
        if ((target_player.obj_work.move_flag & 1U) != 0U)
        {
            gms_GMK_TRUCK_WORK.tire_dir_spd = target_player.obj_work.spd_m;
        }
        else
        {
            gms_GMK_TRUCK_WORK.tire_dir_spd = AppMain.ObjSpdDownSet(gms_GMK_TRUCK_WORK.tire_dir_spd, 128);
        }
        AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK2 = gms_GMK_TRUCK_WORK;
        gms_GMK_TRUCK_WORK2.tire_dir += ( ushort )AppMain.FX_Div(gms_GMK_TRUCK_WORK.tire_dir_spd, 65536);
        int  num  = -1;
        uint num2 = 0U;

        if ((0 <= target_player.act_state && target_player.act_state <= 7) || target_player.act_state == 69 || target_player.act_state == 70 || target_player.act_state == 74 || target_player.act_state == 76 || target_player.act_state == 75)
        {
            num  = 3;
            num2 = 4U;
        }
        else if (71 <= target_player.act_state && target_player.act_state <= 72)
        {
            num  = 0;
            num2 = 4U;
        }
        else if ((target_player.obj_work.move_flag & 1U) == 0U)
        {
            num  = 1;
            num2 = 4U;
        }
        else if ((target_player.obj_work.move_flag & 1U) != 0U && (target_player.obj_work.move_flag & 4194304U) == 0U)
        {
            num = 2;
        }
        else if (obj_work.obj_3d.act_id[0] == 2 && (obj_work.disp_flag & 8U) != 0U)
        {
            if (target_player.obj_work.spd_m != 0)
            {
                num = 0;
            }
            else
            {
                num = 3;
            }
            num2 = 4U;
        }
        else if (11 <= target_player.act_state && target_player.act_state <= 16 && (obj_work.obj_3d.act_id[0] != 2 || (obj_work.disp_flag & 8U) != 0U))
        {
            num  = 3;
            num2 = 4U;
        }
        if (num != -1 && obj_work.obj_3d.act_id[0] != num)
        {
            AppMain.ObjDrawObjectActionSet3DNNBlend(obj_work, num);
            obj_work.disp_flag |= num2;
        }
        if (obj_work.obj_3d.act_id[0] != 3 && (11 > target_player.act_state || target_player.act_state > 16 || obj_work.obj_3d.act_id[0] != 2))
        {
            obj_work.obj_3d.frame[0] = target_player.obj_work.obj_3d.frame[0];
        }
        gms_GMK_TRUCK_WORK.slope_f_y_dir = 0;
        gms_GMK_TRUCK_WORK.slope_f_z_dir = 0;
        gms_GMK_TRUCK_WORK.slope_z_dir   = 0;
        float num3;
        float num4;
        float num5;

        if ((target_player.player_flag & 4U) == 0U)
        {
            num3 = 0f;
            num4 = 8f;
            num5 = -5f;
        }
        else
        {
            num3 = 0f;
            num4 = 8f;
            num5 = 5f;
        }
        AppMain.nnMakeUnitMatrix(obj_work.obj_3d.user_obj_mtx_r);
        AppMain.nnTranslateMatrix(obj_work.obj_3d.user_obj_mtx_r, obj_work.obj_3d.user_obj_mtx_r, gms_GMK_TRUCK_WORK.trans_r.x, gms_GMK_TRUCK_WORK.trans_r.y, gms_GMK_TRUCK_WORK.trans_r.z);
        if ((target_player.gmk_flag & 262144U) != 0U && target_player.gmk_work3 != 0)
        {
            NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

            gms_GMK_TRUCK_WORK.slope_z_dir   = ( ushort )target_player.gmk_work3;
            gms_GMK_TRUCK_WORK.slope_f_z_dir = ( ushort )(AppMain.MTM_MATH_ABS(target_player.gmk_work3) >> 2);
            gms_GMK_TRUCK_WORK.slope_f_y_dir = ( ushort )(target_player.gmk_work3 >> 2);
            AppMain.nnMakeUnitMatrix(nns_MATRIX);
            AppMain.nnTranslateMatrix(nns_MATRIX, nns_MATRIX, -num3, -num4, -num5);
            AppMain.nnRotateXMatrix(nns_MATRIX, nns_MATRIX, ( int )gms_GMK_TRUCK_WORK.slope_z_dir);
            AppMain.nnRotateYMatrix(nns_MATRIX, nns_MATRIX, ( int )gms_GMK_TRUCK_WORK.slope_f_y_dir);
            AppMain.nnRotateZMatrix(nns_MATRIX, nns_MATRIX, ( int )gms_GMK_TRUCK_WORK.slope_f_z_dir);
            AppMain.nnTranslateMatrix(nns_MATRIX, nns_MATRIX, num3, num4, num5);
            AppMain.nnMultiplyMatrix(obj_work.obj_3d.user_obj_mtx_r, obj_work.obj_3d.user_obj_mtx_r, nns_MATRIX);
            GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);
        }
        if ((target_player.obj_work.move_flag & 1U) != 0U && AppMain.MTM_MATH_ABS(target_player.obj_work.spd_m) >= AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD && (gms_GMK_TRUCK_WORK.efct_f_spark == null || gms_GMK_TRUCK_WORK.efct_b_spark == null))
        {
            AppMain.gmGmkTruckCreateSparkEfct(gms_GMK_TRUCK_WORK, 27);
        }
        if (gms_GMK_TRUCK_WORK.h_snd_lorry.au_player.sound == null || gms_GMK_TRUCK_WORK.h_snd_lorry.au_player.sound[0] == null)
        {
            gms_GMK_TRUCK_WORK.h_snd_lorry = GsSound.AllocSeHandle();
            gms_GMK_TRUCK_WORK.h_snd_lorry.au_player.SetAisac("Speed", 0f);
            GmSound.PlaySEForce("Lorry", gms_GMK_TRUCK_WORK.h_snd_lorry, true);
        }
        AppMain.gmGmkTruckSetMoveSeParam(obj_work, gms_GMK_TRUCK_WORK.h_snd_lorry, target_player, ((target_player.player_flag & 16777216U) != 0U) ? 1 : 0);
    }
Пример #14
0
    // Token: 0x06000272 RID: 626 RVA: 0x0001423C File Offset: 0x0001243C
    private static void gmGmkSpCtplt_PlayerHold(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SPCTPLT_WORK gms_GMK_SPCTPLT_WORK = (AppMain.GMS_GMK_SPCTPLT_WORK)obj_work;
        GMS_PLAYER_WORK ply_work = gms_GMK_SPCTPLT_WORK.ply_work;

        if ((ply_work.player_flag & 1024U) != 0U || (AppMain.g_gm_main_system.game_flag & 262656U) != 0U)
        {
            return;
        }
        if ((AppMain.g_gm_main_system.game_flag & 16781312U) == 0U)
        {
            if ((ply_work.key_release & 160) != 0)
            {
                int num  = 0;
                int num2 = (319488 - gms_GMK_SPCTPLT_WORK.ctplt_height) / 2;
                ply_work.obj_work.spd_m = num2;
                if (gms_GMK_SPCTPLT_WORK.ctplt_tilt != 0)
                {
                    num2 = (num = ( int )(2896.3093 * ( double )num2 / 4096.0));
                    if (gms_GMK_SPCTPLT_WORK.ctplt_tilt == 57344)
                    {
                        num = -num;
                    }
                }
                else if (num2 < 8192)
                {
                    num2 = 8192;
                }
                else if (num2 > 36864)
                {
                    num2 = 36864 + 9 * num2 / 21;
                }
                AppMain.ObjDrawObjectActionSet3DNNMaterial(obj_work, 1);
                obj_work.disp_flag &= 4294967291U;
                AppMain.ObjDrawObjectActionSet(obj_work, 2);
                gms_GMK_SPCTPLT_WORK.ctplt_height = 319488;
                ply_work.obj_work.dir.z           = ( ushort )(gms_GMK_SPCTPLT_WORK.ctplt_tilt + 49152);
                AppMain.GmPlySeqInitPinballCtplt(ply_work, num, -num2);
                AppMain.GMM_PAD_VIB_SMALL();
                obj_work.ppFunc = AppMain.gmGmkSpCtplt_PlayerHold_100;
                gms_GMK_SPCTPLT_WORK.ctplt_return_timer = 4;
                gms_GMK_SPCTPLT_WORK.ply_work           = null;
                AppMain.gmGmkSpCtpltSeStop(obj_work);
            }
            else if ((ply_work.key_on & 160) != 0)
            {
                if (gms_GMK_SPCTPLT_WORK.ctplt_height == 319488)
                {
                    AppMain.ObjDrawObjectActionSet3DNNMaterial(obj_work, 0);
                    obj_work.disp_flag &= 4294967291U;
                    AppMain.ObjDrawObjectActionSet(obj_work, 1);
                    gms_GMK_SPCTPLT_WORK.se_handle = GsSound.AllocSeHandle();
                    GmSound.PlaySE("Catapult1", gms_GMK_SPCTPLT_WORK.se_handle);
                }
                if (gms_GMK_SPCTPLT_WORK.ctplt_height > 147456)
                {
                    gms_GMK_SPCTPLT_WORK.ctplt_height -= 3018;
                    if (gms_GMK_SPCTPLT_WORK.ctplt_height < 147456)
                    {
                        gms_GMK_SPCTPLT_WORK.ctplt_height = 147456;
                    }
                }
            }
        }
        int num3;
        int num4;

        if (gms_GMK_SPCTPLT_WORK.ctplt_tilt == 0)
        {
            num3 = 0;
            num4 = -gms_GMK_SPCTPLT_WORK.ctplt_height;
        }
        else
        {
            num4 = (num3 = -( int )(2896.3093 * ( double )gms_GMK_SPCTPLT_WORK.ctplt_height / 4096.0));
            if (gms_GMK_SPCTPLT_WORK.ctplt_tilt == 8192)
            {
                num3 = -num3;
            }
        }
        ply_work.obj_work.pos.x = obj_work.pos.x + num3;
        ply_work.obj_work.pos.y = obj_work.pos.y + num4;
    }
Пример #15
0
    // Token: 0x0600074F RID: 1871 RVA: 0x0003FE28 File Offset: 0x0003E028
    public static OBS_OBJECT_WORK GmGmkSwWallInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type)
    {
        OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_GMK_SWWALL_WORK(), "GMK_SW_WALL");

        AppMain.GMS_ENEMY_3D_WORK   gms_ENEMY_3D_WORK   = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
        AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)obs_OBJECT_WORK;
        AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_sw_wall_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d);
        if (256 <= eve_rec.id && eve_rec.id <= 259)
        {
            AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_sw_wall_obj_3d_list[1], gms_GMK_SWWALL_WORK.obj_3d_opt[0]);
            AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_sw_wall_obj_3d_list[2], gms_GMK_SWWALL_WORK.obj_3d_opt[1]);
            gms_GMK_SWWALL_WORK.obj_3d_opt[1].drawflag |= 32U;
            gms_ENEMY_3D_WORK.ene_com.enemy_flag       |= 1U;
        }
        else
        {
            gms_GMK_SWWALL_WORK.h_snd = GsSound.AllocSeHandle();
        }
        AppMain.mtTaskChangeTcbDestructor(obs_OBJECT_WORK.tcb, AppMain.gmGmkSwWallDest);
        obs_OBJECT_WORK.pos.z  = -655360;
        obs_OBJECT_WORK.ppOut  = AppMain.gmGmkSwWallDispFunc;
        gms_GMK_SWWALL_WORK.id = ( uint )AppMain.MTM_MATH_CLIP(( int )eve_rec.left, 0, 64);
        ushort num;
        ushort num2;

        if (248 <= eve_rec.id && eve_rec.id <= 251)
        {
            gms_GMK_SWWALL_WORK.wall_size = 524288;
            num  = ( ushort )(eve_rec.id - 248);
            num2 = 32;
        }
        else if (252 <= eve_rec.id && eve_rec.id <= 255)
        {
            gms_GMK_SWWALL_WORK.wall_size = 1048576;
            num  = ( ushort )(eve_rec.id - 252);
            num2 = 32;
        }
        else
        {
            gms_GMK_SWWALL_WORK.wall_size = 393216;
            num  = ( ushort )(eve_rec.id - 256);
            num2 = 24;
            gms_GMK_SWWALL_WORK.gear_pos.Assign(obs_OBJECT_WORK.pos);
            gms_GMK_SWWALL_WORK.gearbase_pos.Assign(obs_OBJECT_WORK.pos);
            switch (eve_rec.id)
            {
            default:
            {
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK2 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK2.gear_pos.x = gms_GMK_SWWALL_WORK2.gear_pos.x + -144179;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK3 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK3.gear_pos.y = gms_GMK_SWWALL_WORK3.gear_pos.y + 68812;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK4 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK4.gearbase_pos.x = gms_GMK_SWWALL_WORK4.gearbase_pos.x + -196608;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK5 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK5.gearbase_pos.y = gms_GMK_SWWALL_WORK5.gearbase_pos.y + 49152;
                gms_GMK_SWWALL_WORK.gear_base_dir   = 62806;
                break;
            }

            case 257:
            {
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK6 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK6.gear_pos.x = gms_GMK_SWWALL_WORK6.gear_pos.x - -144179;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK7 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK7.gear_pos.y = gms_GMK_SWWALL_WORK7.gear_pos.y + 68812;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK8 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK8.gearbase_pos.x = gms_GMK_SWWALL_WORK8.gearbase_pos.x - -196608;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK9 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK9.gearbase_pos.y   = gms_GMK_SWWALL_WORK9.gearbase_pos.y + 49152;
                gms_GMK_SWWALL_WORK.gear_base_dir     = 2730;
                gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 4U;
                break;
            }

            case 258:
            {
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK10 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK10.gear_pos.x = gms_GMK_SWWALL_WORK10.gear_pos.x + 68812;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK11 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK11.gear_pos.y = gms_GMK_SWWALL_WORK11.gear_pos.y + -144179;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK12 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK12.gearbase_pos.x = gms_GMK_SWWALL_WORK12.gearbase_pos.x + 49152;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK13 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK13.gearbase_pos.y  = gms_GMK_SWWALL_WORK13.gearbase_pos.y + -196608;
                gms_GMK_SWWALL_WORK.gear_base_dir     = 8192;
                gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 4U;
                obs_OBJECT_WORK.dir.z = 49152;
                break;
            }

            case 259:
            {
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK14 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK14.gear_pos.x = gms_GMK_SWWALL_WORK14.gear_pos.x + 68812;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK15 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK15.gear_pos.y = gms_GMK_SWWALL_WORK15.gear_pos.y - -144179;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK16 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK16.gearbase_pos.x = gms_GMK_SWWALL_WORK16.gearbase_pos.x + 49152;
                AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK17 = gms_GMK_SWWALL_WORK;
                gms_GMK_SWWALL_WORK17.gearbase_pos.y = gms_GMK_SWWALL_WORK17.gearbase_pos.y - -196608;
                gms_GMK_SWWALL_WORK.gear_base_dir    = 2730;
                obs_OBJECT_WORK.dir.z = 49152;
                break;
            }
            }
        }
        gms_GMK_SWWALL_WORK.wall_type = num;
        if (AppMain.GmGmkSwitchTypeIsGear(gms_GMK_SWWALL_WORK.id) && (AppMain.GmGmkSwitchGetPer(gms_GMK_SWWALL_WORK.id) != 0 || !AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id)) && (AppMain.GmGmkSwitchGetPer(gms_GMK_SWWALL_WORK.id) != 4096 || AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id)))
        {
            int num3 = AppMain.GmGmkSwitchGetPer(gms_GMK_SWWALL_WORK.id);
            if (AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id))
            {
                if ((eve_rec.flag & 1) != 0)
                {
                    num3 = 4096 - num3;
                }
            }
            else if ((eve_rec.flag & 1) == 0)
            {
                num3 = 4096 - num3;
            }
            gms_GMK_SWWALL_WORK.wall_draw_size = AppMain.FX_Mul(gms_GMK_SWWALL_WORK.wall_size, num3);
        }
        else if ((AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id) && (eve_rec.flag & 1) != 0) || (!AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id) && (eve_rec.flag & 1) == 0))
        {
            gms_GMK_SWWALL_WORK.wall_draw_size = gms_GMK_SWWALL_WORK.wall_size;
        }
        AppMain.OBS_COLLISION_WORK col_work = gms_ENEMY_3D_WORK.ene_com.col_work;
        col_work.obj_col.obj       = obs_OBJECT_WORK;
        col_work.obj_col.dir_data  = gms_GMK_SWWALL_WORK.col_dir_buf;
        col_work.obj_col.diff_data = AppMain.g_gm_default_col;
        col_work.obj_col.flag     |= 402653216U;
        if (num <= 1)
        {
            col_work.obj_col.height = num2;
            col_work.obj_col.ofst_y = -16;
        }
        else
        {
            col_work.obj_col.width  = num2;
            col_work.obj_col.ofst_x = -16;
        }
        AppMain.gmGmkSwWallSetCol(col_work, gms_GMK_SWWALL_WORK.wall_size, gms_GMK_SWWALL_WORK.wall_draw_size, num);
        obs_OBJECT_WORK.move_flag            |= 8448U;
        obs_OBJECT_WORK.disp_flag            |= 4194304U;
        gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 16384U;
        if (gms_GMK_SWWALL_WORK.wall_draw_size == 0 || gms_GMK_SWWALL_WORK.wall_draw_size == gms_GMK_SWWALL_WORK.wall_size)
        {
            AppMain.gmGmkSwWallFwInit(obs_OBJECT_WORK);
        }
        else if ((AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id) && (eve_rec.flag & 1) != 0) || (!AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id) && (eve_rec.flag & 1) == 0))
        {
            AppMain.gmGmkSwWallCloseInit(obs_OBJECT_WORK);
        }
        else
        {
            AppMain.gmGmkSwWallOpenInit(obs_OBJECT_WORK);
        }
        return(obs_OBJECT_WORK);
    }