Exemple #1
0
 // Token: 0x06000D92 RID: 3474 RVA: 0x0007691C File Offset: 0x00074B1C
 public static AppMain.GMS_RING_WORK GmRingCreate(AppMain.GMS_EVE_RECORD_RING eve_rec, int pos_x, int pos_y, int pos_z)
 {
     if (AppMain.gm_ring_sys_work == null)
     {
         return(null);
     }
     AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gmRingAllocRingWork();
     if (gms_RING_WORK == null)
     {
         return(null);
     }
     gms_RING_WORK.pos.x   = pos_x;
     gms_RING_WORK.pos.y   = pos_y;
     gms_RING_WORK.pos.z   = pos_z;
     gms_RING_WORK.spd_x   = 0;
     gms_RING_WORK.spd_y   = 0;
     gms_RING_WORK.scale.x = (gms_RING_WORK.scale.y = (gms_RING_WORK.scale.z = AppMain.gm_ring_scale));
     gms_RING_WORK.timer   = 0;
     gms_RING_WORK.flag    = 0;
     if (eve_rec != null)
     {
         eve_rec.pos_x = byte.MaxValue;
     }
     gms_RING_WORK.eve_rec  = eve_rec;
     gms_RING_WORK.duct_obj = null;
     AppMain.gmRingAttachRingList(gms_RING_WORK);
     return(gms_RING_WORK);
 }
Exemple #2
0
 public static AppMain.GMS_RING_WORK GmRingCreate(
     AppMain.GMS_EVE_RECORD_RING eve_rec,
     int pos_x,
     int pos_y,
     int pos_z)
 {
     if (AppMain.gm_ring_sys_work == null)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     AppMain.GMS_RING_WORK ring_work = AppMain.gmRingAllocRingWork();
     if (ring_work == null)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     ring_work.pos.x   = pos_x;
     ring_work.pos.y   = pos_y;
     ring_work.pos.z   = pos_z;
     ring_work.spd_x   = 0;
     ring_work.spd_y   = 0;
     ring_work.scale.x = ring_work.scale.y = ring_work.scale.z = AppMain.gm_ring_scale;
     ring_work.timer   = (short)0;
     ring_work.flag    = (ushort)0;
     if (eve_rec != null)
     {
         eve_rec.pos_x = byte.MaxValue;
     }
     ring_work.eve_rec  = eve_rec;
     ring_work.duct_obj = (AppMain.OBS_OBJECT_WORK)null;
     AppMain.gmRingAttachRingList(ring_work);
     return(ring_work);
 }
Exemple #3
0
 private static AppMain.GMS_RING_WORK GmRingCreateSlotRing(
     AppMain.OBS_OBJECT_WORK target_obj,
     int dist,
     ushort dir)
 {
     if (AppMain.gm_ring_sys_work == null)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     AppMain.GMS_RING_WORK ring_work = AppMain.gmRingAllocRingWork();
     if (ring_work == null)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     ring_work.pos.x    = target_obj.pos.x + AppMain.FX_Mul(dist, AppMain.mtMathCos((int)dir));
     ring_work.pos.y    = target_obj.pos.y + AppMain.FX_Mul(-dist, AppMain.mtMathSin((int)dir));
     ring_work.pos.z    = target_obj.pos.z;
     ring_work.spd_x    = AppMain.FX_Mul(24576, AppMain.mtMathCos((int)(ushort)((uint)dir + 32768U)));
     ring_work.spd_y    = AppMain.FX_Mul(-24576, AppMain.mtMathSin((int)(ushort)((uint)dir + 32768U)));
     ring_work.scale.x  = ring_work.scale.y = ring_work.scale.z = 4096;
     ring_work.timer    = (short)0;
     ring_work.flag     = (ushort)0;
     ring_work.eve_rec  = (AppMain.GMS_EVE_RECORD_RING)null;
     ring_work.duct_obj = (AppMain.OBS_OBJECT_WORK)null;
     AppMain.gmRingAttachSlotRingList(ring_work);
     return(ring_work);
 }
Exemple #4
0
 private static AppMain.GMS_RING_WORK GmRingCreateDamageRing(
     int pos_x,
     int pos_y,
     int pos_z,
     int spd_x,
     int spd_y,
     ushort flag)
 {
     if (AppMain.gm_ring_sys_work == null)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     AppMain.GMS_RING_WORK ring_work = AppMain.gmRingAllocRingWork();
     if (ring_work == null)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     ring_work.pos.x    = pos_x;
     ring_work.pos.y    = pos_y;
     ring_work.pos.z    = pos_z;
     ring_work.spd_x    = spd_x;
     ring_work.spd_y    = spd_y;
     ring_work.scale.x  = ring_work.scale.y = ring_work.scale.z = 4096;
     ring_work.timer    = (short)(256 + ((int)AppMain.mtMathRand() & 31));
     ring_work.flag     = flag;
     ring_work.eve_rec  = (AppMain.GMS_EVE_RECORD_RING)null;
     ring_work.duct_obj = (AppMain.OBS_OBJECT_WORK)null;
     AppMain.gmRingAttachDamageRingList(ring_work);
     return(ring_work);
 }
Exemple #5
0
 public void Clear()
 {
     this.flag           = 0U;
     this.ring_draw_func = (AppMain._ring_work_func_delegate_)null;
     this.rec_func       = (AppMain._rec_func_)null;
     this.col_func       = (AppMain._ring_work_func_delegate_)null;
     this.dir            = (ushort)0;
     Array.Clear((Array)this.damage_num, 0, 1);
     this.player_num             = (byte)0;
     this.ref_spd_base           = (short)0;
     this.ring_list_start        = (AppMain.GMS_RING_WORK)null;
     this.ring_list_end          = (AppMain.GMS_RING_WORK)null;
     this.twinkle_list_start     = (AppMain.GMS_RING_WORK)null;
     this.twinkle_list_end       = (AppMain.GMS_RING_WORK)null;
     this.damage_ring_list_start = (AppMain.GMS_RING_WORK)null;
     this.damage_ring_list_end   = (AppMain.GMS_RING_WORK)null;
     this.slot_ring_list_start   = (AppMain.GMS_RING_WORK)null;
     this.slot_ring_list_end     = (AppMain.GMS_RING_WORK)null;
     this.ring_list_cnt          = 0;
     Array.Clear((Array)this.ring_list, 0, 96);
     AppMain.ClearArray <AppMain.GMS_RING_WORK>(this.ring_list_buf);
     this.wait_slot_ring_num   = 0;
     this.slot_ring_create_dir = (ushort)0;
     this.slot_target_obj      = (AppMain.OBS_OBJECT_WORK)null;
     this.slot_ring_timer      = 0;
     this.draw_ring_count      = (ushort)0;
     this.draw_ring_uv_frame   = (ushort)0;
     AppMain.ClearArray <AppMain.VecFx32>(this.draw_ring_pos);
     Array.Clear((Array)this.h_snd_ring, 0, 2);
     this.ring_se_cnt = 0;
     this.color       = 0U;
     this.se_wait     = 0;
 }
Exemple #6
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);
    }
Exemple #7
0
 private static void gmGmkLoopExecuteRing(int loop_x, int loop_y)
 {
     for (AppMain.GMS_RING_WORK gmsRingWork = AppMain.GmRingGetWork().damage_ring_list_start; gmsRingWork != null; gmsRingWork = gmsRingWork.post_ring)
     {
         gmsRingWork.pos.x += loop_x;
         gmsRingWork.pos.y += loop_y;
     }
 }
Exemple #8
0
 private static void gmGmkDrainTankOutSinkRing()
 {
     for (AppMain.GMS_RING_WORK gmsRingWork = AppMain.GmRingGetWork().damage_ring_list_start; gmsRingWork != null; gmsRingWork = gmsRingWork.post_ring)
     {
         gmsRingWork.spd_y  = 4096;
         gmsRingWork.spd_x /= 2;
     }
 }
 // Token: 0x06001245 RID: 4677 RVA: 0x0009FA78 File Offset: 0x0009DC78
 private static void gmGmkDrainTankOutSinkRing()
 {
     AppMain.GMS_RING_SYS_WORK gms_RING_SYS_WORK = AppMain.GmRingGetWork();
     for (AppMain.GMS_RING_WORK gms_RING_WORK = gms_RING_SYS_WORK.damage_ring_list_start; gms_RING_WORK != null; gms_RING_WORK = gms_RING_WORK.post_ring)
     {
         gms_RING_WORK.spd_y  = 4096;
         gms_RING_WORK.spd_x /= 2;
     }
 }
Exemple #10
0
 // Token: 0x06000D93 RID: 3475 RVA: 0x000769CC File Offset: 0x00074BCC
 public static AppMain.GMS_RING_WORK gmRingAllocRingWork()
 {
     if (AppMain.gm_ring_sys_work.ring_list_cnt >= 96)
     {
         return(null);
     }
     AppMain.GMS_RING_WORK result = AppMain.gm_ring_sys_work.ring_list[AppMain.gm_ring_sys_work.ring_list_cnt];
     AppMain.gm_ring_sys_work.ring_list_cnt++;
     return(result);
 }
Exemple #11
0
 public static AppMain.GMS_RING_WORK gmRingAllocRingWork()
 {
     if (AppMain.gm_ring_sys_work.ring_list_cnt >= 96)
     {
         return((AppMain.GMS_RING_WORK)null);
     }
     AppMain.GMS_RING_WORK ring = AppMain.gm_ring_sys_work.ring_list[AppMain.gm_ring_sys_work.ring_list_cnt];
     ++AppMain.gm_ring_sys_work.ring_list_cnt;
     return(ring);
 }
Exemple #12
0
 // Token: 0x06000709 RID: 1801 RVA: 0x0003EB00 File Offset: 0x0003CD00
 private static AppMain.GMS_RING_WORK GmBoss4UtilIterateDamageRingGet()
 {
     AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gm_boss4_util_ring;
     if (gms_RING_WORK == null)
     {
         return(null);
     }
     AppMain.gm_boss4_util_ring = gms_RING_WORK.post_ring;
     return(gms_RING_WORK);
 }
Exemple #13
0
 // Token: 0x06001562 RID: 5474 RVA: 0x000B9AE8 File Offset: 0x000B7CE8
 private static void gmGmkLoopExecuteRing(int loop_x, int loop_y)
 {
     AppMain.GMS_RING_SYS_WORK gms_RING_SYS_WORK = AppMain.GmRingGetWork();
     for (AppMain.GMS_RING_WORK gms_RING_WORK = gms_RING_SYS_WORK.damage_ring_list_start; gms_RING_WORK != null; gms_RING_WORK = gms_RING_WORK.post_ring)
     {
         AppMain.GMS_RING_WORK gms_RING_WORK2 = gms_RING_WORK;
         gms_RING_WORK2.pos.x = gms_RING_WORK2.pos.x + loop_x;
         AppMain.GMS_RING_WORK gms_RING_WORK3 = gms_RING_WORK;
         gms_RING_WORK3.pos.y = gms_RING_WORK3.pos.y + loop_y;
     }
 }
Exemple #14
0
 public void Clear()
 {
     this.pos.Clear();
     this.scale.Clear();
     this.spd_x     = 0;
     this.spd_y     = 0;
     this.timer     = (short)0;
     this.flag      = (ushort)0;
     this.eve_rec   = (AppMain.GMS_EVE_RECORD_RING)null;
     this.pre_ring  = (AppMain.GMS_RING_WORK)null;
     this.post_ring = (AppMain.GMS_RING_WORK)null;
     this.duct_obj  = (AppMain.OBS_OBJECT_WORK)null;
 }
Exemple #15
0
 public static void GmRingInit()
 {
     AppMain.MTS_TASK_TCB mtsTaskTcb = AppMain.MTM_TASK_MAKE_TCB(new AppMain.GSF_TASK_PROCEDURE(AppMain.gmRingMain), new AppMain.GSF_TASK_PROCEDURE(AppMain.gmRingDest), 0U, (ushort)0, 7680U, 5, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_RING_SYS_WORK()), "GM RING MAIN");
     if (mtsTaskTcb == null)
     {
         return;
     }
     AppMain.gm_ring_tcb      = mtsTaskTcb;
     AppMain.gm_ring_sys_work = (AppMain.GMS_RING_SYS_WORK)mtsTaskTcb.work;
     AppMain.gm_ring_sys_work.Clear();
     for (int i = 0; i < 8; i++)
     {
         AppMain.gm_ring_sys_work.h_snd_ring[i]       = AppMain.GsSoundAllocSeHandle();
         AppMain.gm_ring_sys_work.h_snd_ring[i].flag |= 2147483648U;
     }
     AppMain.gm_ring_sys_work.player_num = (byte)1;
     for (int index = 0; index < 96; ++index)
     {
         AppMain.GMS_RING_WORK gmsRingWork = AppMain.gm_ring_sys_work.ring_list_buf[index];
         AppMain.gm_ring_sys_work.ring_list[index] = gmsRingWork;
     }
     AppMain.gm_ring_scale      = 4096;
     AppMain.gm_ring_fall_acc_x = (short)0;
     AppMain.gm_ring_fall_acc_y = (short)288;
     if ((ushort)21 <= AppMain.g_gs_main_sys_info.stage_id && AppMain.g_gs_main_sys_info.stage_id <= (ushort)27)
     {
         AppMain.g_gm_ring_size     = (short)((double)((int)AppMain.OBD_LCD_X - (int)AppMain.OBD_LCD_Y) * 1.4 + 20.0);
         AppMain.gm_ring_die_offset = (short)((double)((int)AppMain.OBD_LCD_X - (int)AppMain.OBD_LCD_Y) * 1.4 + 72.0);
     }
     else
     {
         AppMain.g_gm_ring_size     = (short)20;
         AppMain.gm_ring_die_offset = (short)72;
     }
     AppMain.gm_ring_sys_work.rec_func       = new AppMain._rec_func_(AppMain.gmRingHitFuncNormal);
     AppMain.gm_ring_sys_work.col_func       = new AppMain._ring_work_func_delegate_(AppMain.gmRingMoveCollsion);
     AppMain.gm_ring_sys_work.ref_spd_base   = (short)8192;
     AppMain.gm_ring_sys_work.ring_draw_func = new AppMain._ring_work_func_delegate_(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 == (ushort)2 || AppMain.g_gs_main_sys_info.stage_id == (ushort)3)
     {
         AppMain.gm_ring_sys_work.color = 4292927743U;
     }
     else if (AppMain.g_gs_main_sys_info.stage_id == (ushort)14)
     {
         AppMain.gm_ring_sys_work.color = 3233857791U;
     }
     AppMain.gm_ring_sys_work.dir = (ushort)49152;
     AppMain.ObjDrawAction3dActionSet3DNNMaterial(AppMain.gm_ring_obj_3d, 0);
 }
Exemple #16
0
    private static void gmRingDrawFuncRing3D(AppMain.GMS_RING_WORK ring_work)
    {
        AppMain.VecU16 vecU16 = new AppMain.VecU16();
        vecU16.x = (ushort)0;
        vecU16.y = AppMain.gm_ring_sys_work.dir;
        AppMain.OBS_CAMERA obsCamera = AppMain.ObjCameraGet(AppMain.g_obj.glb_camera_id);
        vecU16.z = (ushort)-obsCamera.roll;
        int drawRingCount = (int)AppMain.gm_ring_sys_work.draw_ring_count;

        AppMain.gm_ring_sys_work.draw_ring_pos[drawRingCount].x = ring_work.pos.x;
        AppMain.gm_ring_sys_work.draw_ring_pos[drawRingCount].y = ring_work.pos.y;
        AppMain.gm_ring_sys_work.draw_ring_pos[drawRingCount].z = ring_work.pos.z;
        ++AppMain.gm_ring_sys_work.draw_ring_count;
    }
Exemple #17
0
    // Token: 0x06000DA2 RID: 3490 RVA: 0x000783E0 File Offset: 0x000765E0
    private static void gmRingDrawFuncRing3D(AppMain.GMS_RING_WORK ring_work)
    {
        AppMain.VecU16 vecU = default(AppMain.VecU16);
        vecU.x = 0;
        vecU.y = AppMain.gm_ring_sys_work.dir;
        AppMain.OBS_CAMERA obs_CAMERA = AppMain.ObjCameraGet(AppMain.g_obj.glb_camera_id);
        vecU.z = ( ushort )(-( ushort )obs_CAMERA.roll);
        int draw_ring_count = (int)AppMain.gm_ring_sys_work.draw_ring_count;

        AppMain.gm_ring_sys_work.draw_ring_pos[draw_ring_count].x = ring_work.pos.x;
        AppMain.gm_ring_sys_work.draw_ring_pos[draw_ring_count].y = ring_work.pos.y;
        AppMain.gm_ring_sys_work.draw_ring_pos[draw_ring_count].z = ring_work.pos.z;
        AppMain.GMS_RING_SYS_WORK gms_RING_SYS_WORK = AppMain.gm_ring_sys_work;
        gms_RING_SYS_WORK.draw_ring_count += 1;
    }
Exemple #18
0
 // Token: 0x06000D94 RID: 3476 RVA: 0x00076A14 File Offset: 0x00074C14
 public static void gmRingAttachRingList(AppMain.GMS_RING_WORK ring_work)
 {
     if (AppMain.gm_ring_sys_work.ring_list_end != null)
     {
         AppMain.gm_ring_sys_work.ring_list_end.post_ring = ring_work;
         ring_work.pre_ring  = AppMain.gm_ring_sys_work.ring_list_end;
         ring_work.post_ring = null;
         AppMain.gm_ring_sys_work.ring_list_end = ring_work;
         return;
     }
     AppMain.GMS_RING_SYS_WORK gms_RING_SYS_WORK = AppMain.gm_ring_sys_work;
     AppMain.gm_ring_sys_work.ring_list_end = ring_work;
     gms_RING_SYS_WORK.ring_list_start      = ring_work;
     ring_work.pre_ring = (ring_work.post_ring = null);
 }
Exemple #19
0
 private static void gmRingAttachDamageRingList(AppMain.GMS_RING_WORK ring_work)
 {
     if (AppMain.gm_ring_sys_work.damage_ring_list_end != null)
     {
         AppMain.gm_ring_sys_work.damage_ring_list_end.post_ring = ring_work;
         ring_work.pre_ring  = AppMain.gm_ring_sys_work.damage_ring_list_end;
         ring_work.post_ring = (AppMain.GMS_RING_WORK)null;
         AppMain.gm_ring_sys_work.damage_ring_list_end = ring_work;
     }
     else
     {
         AppMain.gm_ring_sys_work.damage_ring_list_start = AppMain.gm_ring_sys_work.damage_ring_list_end = ring_work;
         ring_work.pre_ring = ring_work.post_ring = (AppMain.GMS_RING_WORK)null;
     }
 }
Exemple #20
0
 // Token: 0x06000DA0 RID: 3488 RVA: 0x00078308 File Offset: 0x00076508
 public static void gmRingDetachDamageRingList(AppMain.GMS_RING_WORK ring_work)
 {
     if (ring_work.pre_ring == null)
     {
         AppMain.gm_ring_sys_work.damage_ring_list_start = ring_work.post_ring;
     }
     else
     {
         ring_work.pre_ring.post_ring = ring_work.post_ring;
     }
     if (ring_work.post_ring == null)
     {
         AppMain.gm_ring_sys_work.damage_ring_list_end = ring_work.pre_ring;
         return;
     }
     ring_work.post_ring.pre_ring = ring_work.pre_ring;
 }
Exemple #21
0
 // Token: 0x06000D9D RID: 3485 RVA: 0x00078138 File Offset: 0x00076338
 private static void gmRingDetachSlotRingList(AppMain.GMS_RING_WORK ring_work)
 {
     if (ring_work.pre_ring == null)
     {
         AppMain.gm_ring_sys_work.slot_ring_list_start = ring_work.post_ring;
     }
     else
     {
         ring_work.pre_ring.post_ring = ring_work.post_ring;
     }
     if (ring_work.post_ring == null)
     {
         AppMain.gm_ring_sys_work.slot_ring_list_end = ring_work.pre_ring;
         return;
     }
     ring_work.post_ring.pre_ring = ring_work.pre_ring;
 }
Exemple #22
0
 private static void gmRingDest(AppMain.MTS_TASK_TCB tcb)
 {
     for (AppMain.GMS_RING_WORK gmsRingWork = AppMain.gm_ring_sys_work.ring_list_start; gmsRingWork != null; gmsRingWork = gmsRingWork.post_ring)
     {
         if (gmsRingWork.eve_rec != null)
         {
             gmsRingWork.eve_rec.pos_x = (byte)(gmsRingWork.pos.x >> 12 & (int)byte.MaxValue);
         }
     }
     for (int index = 0; index < 2; ++index)
     {
         if (AppMain.gm_ring_sys_work.h_snd_ring[index] != null)
         {
             AppMain.GmSoundStopSE(AppMain.gm_ring_sys_work.h_snd_ring[index]);
             AppMain.GsSoundFreeSeHandle(AppMain.gm_ring_sys_work.h_snd_ring[index]);
             AppMain.gm_ring_sys_work.h_snd_ring[index] = (AppMain.GSS_SND_SE_HANDLE)null;
         }
     }
     AppMain.gm_ring_tcb      = (AppMain.MTS_TASK_TCB)null;
     AppMain.gm_ring_sys_work = (AppMain.GMS_RING_SYS_WORK)null;
 }
Exemple #23
0
 // Token: 0x06000D9B RID: 3483 RVA: 0x00077E68 File Offset: 0x00076068
 private static void gmRingDest(AppMain.MTS_TASK_TCB tcb)
 {
     for (AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gm_ring_sys_work.ring_list_start; gms_RING_WORK != null; gms_RING_WORK = gms_RING_WORK.post_ring)
     {
         if (gms_RING_WORK.eve_rec != null)
         {
             gms_RING_WORK.eve_rec.pos_x = ( byte )(gms_RING_WORK.pos.x >> 12 & 255);
         }
     }
     for (int i = 0; i < 2; i++)
     {
         if (AppMain.gm_ring_sys_work.h_snd_ring[i] != null)
         {
             AppMain.GmSoundStopSE(AppMain.gm_ring_sys_work.h_snd_ring[i]);
             AppMain.GsSoundFreeSeHandle(AppMain.gm_ring_sys_work.h_snd_ring[i]);
             AppMain.gm_ring_sys_work.h_snd_ring[i] = null;
         }
     }
     AppMain.gm_ring_tcb      = null;
     AppMain.gm_ring_sys_work = null;
 }
Exemple #24
0
    // Token: 0x06000D9B RID: 3483 RVA: 0x00077E68 File Offset: 0x00076068
    public static void gmRingDest(MTS_TASK_TCB tcb)
    {
        for (AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gm_ring_sys_work.ring_list_start; gms_RING_WORK != null; gms_RING_WORK = gms_RING_WORK.post_ring)
        {
            if (gms_RING_WORK.eve_rec != null)
            {
                gms_RING_WORK.eve_rec.pos_x = (byte)(gms_RING_WORK.pos.x >> 12 & 255);
            }
        }
#if !NICE_PHYSICS
        for (int i = 0; i < 2; i++)
        {
            if (AppMain.gm_ring_sys_work.h_snd_ring[i] != null)
            {
                GsSound.StopSE(AppMain.gm_ring_sys_work.h_snd_ring[i]);
                GsSound.FreeSeHandle(AppMain.gm_ring_sys_work.h_snd_ring[i]);
                AppMain.gm_ring_sys_work.h_snd_ring[i] = null;
            }
        }
#endif
        AppMain.gm_ring_tcb      = null;
        AppMain.gm_ring_sys_work = null;
    }
Exemple #25
0
 // Token: 0x06000D9F RID: 3487 RVA: 0x00078200 File Offset: 0x00076400
 public static AppMain.GMS_RING_WORK GmRingCreateSlotRing(OBS_OBJECT_WORK target_obj, int dist, ushort dir)
 {
     if (AppMain.gm_ring_sys_work == null)
     {
         return(null);
     }
     AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gmRingAllocRingWork();
     if (gms_RING_WORK == null)
     {
         return(null);
     }
     gms_RING_WORK.pos.x    = target_obj.pos.x + AppMain.FX_Mul(dist, AppMain.mtMathCos((int)dir));
     gms_RING_WORK.pos.y    = target_obj.pos.y + AppMain.FX_Mul(-dist, AppMain.mtMathSin((int)dir));
     gms_RING_WORK.pos.z    = target_obj.pos.z;
     gms_RING_WORK.spd_x    = AppMain.FX_Mul(24576, AppMain.mtMathCos((int)(dir + 32768)));
     gms_RING_WORK.spd_y    = AppMain.FX_Mul(-24576, AppMain.mtMathSin((int)(dir + 32768)));
     gms_RING_WORK.scale.x  = (gms_RING_WORK.scale.y = (gms_RING_WORK.scale.z = 4096));
     gms_RING_WORK.timer    = 0;
     gms_RING_WORK.flag     = 0;
     gms_RING_WORK.eve_rec  = null;
     gms_RING_WORK.duct_obj = null;
     AppMain.gmRingAttachSlotRingList(gms_RING_WORK);
     return(gms_RING_WORK);
 }
Exemple #26
0
 // Token: 0x06000DA6 RID: 3494 RVA: 0x00078708 File Offset: 0x00076908
 public static AppMain.GMS_RING_WORK GmRingCreateDamageRing(int pos_x, int pos_y, int pos_z, int spd_x, int spd_y, ushort flag)
 {
     if (AppMain.gm_ring_sys_work == null)
     {
         return(null);
     }
     AppMain.GMS_RING_WORK gms_RING_WORK = AppMain.gmRingAllocRingWork();
     if (gms_RING_WORK == null)
     {
         return(null);
     }
     gms_RING_WORK.pos.x    = pos_x;
     gms_RING_WORK.pos.y    = pos_y;
     gms_RING_WORK.pos.z    = pos_z;
     gms_RING_WORK.spd_x    = spd_x;
     gms_RING_WORK.spd_y    = spd_y;
     gms_RING_WORK.scale.x  = (gms_RING_WORK.scale.y = (gms_RING_WORK.scale.z = 4096));
     gms_RING_WORK.timer    = (short)(256 + (AppMain.mtMathRand() & 31));
     gms_RING_WORK.flag     = flag;
     gms_RING_WORK.eve_rec  = null;
     gms_RING_WORK.duct_obj = null;
     AppMain.gmRingAttachDamageRingList(gms_RING_WORK);
     return(gms_RING_WORK);
 }
Exemple #27
0
    private static void gmRingMain(AppMain.MTS_TASK_TCB tcb)
    {
        var betterSfx = gs.backup.SSave.CreateInstance().GetRemaster().BetterSoundEffects;
        var modernSfx = gs.backup.SSave.CreateInstance().GetRemaster().ModernSoundEffects;

        if (((int)AppMain.gm_ring_sys_work.flag & 1) != 0 && !(betterSfx || modernSfx))
        {
            AppMain.gm_ring_sys_work.ring_se_cnt = 0;
        }
        else
        {
            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();
            if (AppMain.ObjObjectPauseCheck(0U) != 0U)
            {
                AppMain.GMS_RING_WORK gmsRingWork1 = AppMain.gm_ring_sys_work.ring_list_start;
                while (gmsRingWork1 != null)
                {
                    AppMain.GMS_RING_WORK gms_ring_work = gmsRingWork1;
                    gmsRingWork1 = gms_ring_work.post_ring;
                    AppMain.gm_ring_sys_work.ring_draw_func(gms_ring_work);
                }
                AppMain.GMS_RING_WORK gmsRingWork2 = AppMain.gm_ring_sys_work.damage_ring_list_start;
                while (gmsRingWork2 != null)
                {
                    AppMain.GMS_RING_WORK gms_ring_work = gmsRingWork2;
                    gmsRingWork2 = gms_ring_work.post_ring;
                    if (gms_ring_work.timer > (short)32 || ((int)gms_ring_work.timer & 2) != 0)
                    {
                        AppMain.gm_ring_sys_work.ring_draw_func(gms_ring_work);
                    }
                }
                AppMain.GMS_RING_WORK gmsRingWork3 = AppMain.gm_ring_sys_work.slot_ring_list_start;
                while (gmsRingWork3 != null)
                {
                    AppMain.GMS_RING_WORK gms_ring_work = gmsRingWork3;
                    gmsRingWork3 = gms_ring_work.post_ring;
                    AppMain.gm_ring_sys_work.ring_draw_func(gms_ring_work);
                }
                AppMain.gmRingDrawEnd();

                if (!(betterSfx || modernSfx))
                {
                    AppMain.gm_ring_sys_work.ring_se_cnt = 0;
                }
            }
            else
            {
                for (int index = 0; index < (int)AppMain.gm_ring_sys_work.player_num; ++index)
                {
                    AppMain.GMS_PLAYER_WORK gmsPlayerWork = AppMain.g_gm_main_system.ply_work[index];
                    AppMain.OBS_RECT_WORK   obsRectWork   = gmsPlayerWork.rect_work[2];
                    AppMain.ply_rect[index].pos.x = gmsPlayerWork.obj_work.pos.x;
                    AppMain.ply_rect[index].pos.y = gmsPlayerWork.obj_work.pos.y;
                    AppMain.ply_rect[index].pos.z = gmsPlayerWork.obj_work.pos.z;
                    short num1;
                    short num2;
                    if (((int)gmsPlayerWork.obj_work.disp_flag & 1 ^ (int)obsRectWork.flag & 1) != 0)
                    {
                        num1 = (short)-obsRectWork.rect.right;
                        num2 = (short)-obsRectWork.rect.left;
                    }
                    else
                    {
                        num1 = obsRectWork.rect.left;
                        num2 = obsRectWork.rect.right;
                    }
                    if (gmsPlayerWork.obj_work.scale.x != 4096)
                    {
                        num1 = (short)AppMain.FX_Mul((int)num1, gmsPlayerWork.obj_work.scale.x);
                        num2 = (short)AppMain.FX_Mul((int)num2, gmsPlayerWork.obj_work.scale.x);
                    }
                    AppMain.ply_rect[index].left  = num1;
                    AppMain.ply_rect[index].right = num2;
                    short num3;
                    short num4;
                    if (((int)gmsPlayerWork.obj_work.disp_flag & 2 ^ (int)obsRectWork.flag & 2) != 0)
                    {
                        num3 = (short)-obsRectWork.rect.bottom;
                        num4 = (short)-obsRectWork.rect.top;
                    }
                    else
                    {
                        num3 = obsRectWork.rect.top;
                        num4 = obsRectWork.rect.bottom;
                    }
                    if (gmsPlayerWork.obj_work.scale.y != 4096)
                    {
                        num3 = (short)AppMain.FX_Mul((int)num3, gmsPlayerWork.obj_work.scale.y);
                        num4 = (short)AppMain.FX_Mul((int)num4, gmsPlayerWork.obj_work.scale.y);
                    }
                    AppMain.ply_rect[index].top    = num3;
                    AppMain.ply_rect[index].bottom = num4;
                    AppMain.ply_rect[index].back   = (short)0;
                    AppMain.ply_rect[index].front  = (short)0;
                }
                AppMain.ring_rect.left   = (short)-9;
                AppMain.ring_rect.top    = (short)-9;
                AppMain.ring_rect.right  = (short)9;
                AppMain.ring_rect.bottom = (short)9;
                AppMain.ring_rect.back   = (short)-8;
                AppMain.ring_rect.front  = (short)8;
                if (++AppMain.gm_ring_sys_work.draw_ring_uv_frame >= (ushort)64)
                {
                    AppMain.gm_ring_sys_work.draw_ring_uv_frame = (ushort)0;
                }
                if (((int)AppMain.g_gm_main_system.ply_work[0].player_flag & 262144) != 0)
                {
                    AppMain.gm_ring_fall_acc_x = (short)AppMain.FX_Mul(-288, AppMain.mtMathSin((int)AppMain.g_gm_main_system.ply_work[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[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)((int)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.gm_ring_sys_work.slot_ring_create_dir -= (ushort)2048;
                        AppMain.gm_ring_sys_work.slot_ring_timer       = 4;
                    }
                }
                AppMain.GMS_RING_WORK gmsRingWork1 = AppMain.gm_ring_sys_work.ring_list_start;
                while (gmsRingWork1 != null)
                {
                    AppMain.GMS_RING_WORK gmsRingWork2 = gmsRingWork1;
                    gmsRingWork1 = gmsRingWork2.post_ring;
                    if (AppMain.ObjViewOutCheck(gmsRingWork2.pos.x, gmsRingWork2.pos.y, AppMain.gm_ring_die_offset, (short)0, (short)0, (short)0, (short)0) != 0)
                    {
                        if (gmsRingWork2.eve_rec != null)
                        {
                            gmsRingWork2.eve_rec.pos_x = (byte)(gmsRingWork2.pos.x >> 12 & (int)byte.MaxValue);
                        }
                        AppMain.gmRingDetachRingList(gmsRingWork2);
                        AppMain.gmRingFreeRingWork(gmsRingWork2);
                    }
                    else
                    {
                        AppMain.gm_ring_sys_work.ring_draw_func(gmsRingWork2);
                        AppMain.ring_rect.pos.z = 0;
                        int index = 0;
                        int num   = 0;
                        for (; index < (int)AppMain.gm_ring_sys_work.player_num; ++index)
                        {
                            AppMain.GMS_PLAYER_WORK ply_work = AppMain.g_gm_main_system.ply_work[index];
                            if (((int)ply_work.player_flag & 1024) == 0)
                            {
                                AppMain.ring_rect.pos.x = gmsRingWork2.pos.x;
                                AppMain.ring_rect.pos.y = gmsRingWork2.pos.y;
                                if (AppMain.gm_ring_sys_work.rec_func(AppMain.ply_rect[index], AppMain.ring_rect) != (ushort)0)
                                {
                                    num = 1;
                                    AppMain.GmPlayerRingGet(ply_work, (short)1);
                                    AppMain.GmComEfctCreateRing(AppMain.ring_rect.pos.x, AppMain.ring_rect.pos.y);
                                }
                            }
                        }
                        if (num != 0)
                        {
                            gmsRingWork2.timer = (short)0;
                            AppMain.gmRingDetachRingList(gmsRingWork2);
                            AppMain.gmRingFreeRingWork(gmsRingWork2);
                        }
                    }
                }
                AppMain.GMS_RING_WORK gmsRingWork3 = AppMain.gm_ring_sys_work.damage_ring_list_start;
                while (gmsRingWork3 != null)
                {
                    AppMain.GMS_RING_WORK gmsRingWork2 = gmsRingWork3;
                    gmsRingWork3 = gmsRingWork2.post_ring;
                    if (AppMain.ObjViewOutCheck(gmsRingWork2.pos.x, gmsRingWork2.pos.y, (short)196, (short)0, (short)0, (short)0, (short)0) != 0)
                    {
                        AppMain.gmRingDetachDamageRingList(gmsRingWork2);
                        AppMain.gmRingFreeRingWork(gmsRingWork2);
                    }
                    else
                    {
                        gmsRingWork2.pos.x += gmsRingWork2.spd_x;
                        if (((int)gmsRingWork2.flag & 4) != 0)
                        {
                            gmsRingWork2.pos.y -= gmsRingWork2.spd_y;
                        }
                        else
                        {
                            gmsRingWork2.pos.y += gmsRingWork2.spd_y;
                        }
                        gmsRingWork2.spd_x += (int)AppMain.gm_ring_fall_acc_x;
                        gmsRingWork2.spd_y += (int)AppMain.gm_ring_fall_acc_y;
                        AppMain.gm_ring_sys_work.col_func(gmsRingWork2);
                        --gmsRingWork2.timer;
                        if (gmsRingWork2.timer == (short)0)
                        {
                            AppMain.gmRingDetachDamageRingList(gmsRingWork2);
                            AppMain.gmRingFreeRingWork(gmsRingWork2);
                        }
                        else
                        {
                            if (gmsRingWork2.timer <= (short)216)
                            {
                                AppMain.ring_rect.pos.z = 0;
                                int index = 0;
                                int num   = 0;
                                for (; index < (int)AppMain.gm_ring_sys_work.player_num; ++index)
                                {
                                    AppMain.GMS_PLAYER_WORK ply_work = AppMain.g_gm_main_system.ply_work[index];
                                    if (((int)ply_work.player_flag & 1024) == 0)
                                    {
                                        AppMain.ring_rect.pos.x = gmsRingWork2.pos.x;
                                        AppMain.ring_rect.pos.y = gmsRingWork2.pos.y;
                                        if (AppMain.gm_ring_sys_work.rec_func(AppMain.ply_rect[index], AppMain.ring_rect) != (ushort)0)
                                        {
                                            num = 1;
                                            short ringStageNum = ply_work.ring_stage_num;
                                            AppMain.GmPlayerRingGet(ply_work, (short)1);
                                            if (ringStageNum < (short)999)
                                            {
                                                --ply_work.ring_stage_num;
                                            }
                                            AppMain.GmComEfctCreateRing(AppMain.ring_rect.pos.x, AppMain.ring_rect.pos.y);
                                            if (((int)AppMain.gm_ring_sys_work.flag & 16777216 << index) != 0)
                                            {
                                                AppMain.gm_ring_sys_work.flag &= (uint)~(16777216 << index);
                                            }
                                        }
                                    }
                                }
                                if (num != 0)
                                {
                                    gmsRingWork2.timer = (short)0;
                                    AppMain.gmRingDetachDamageRingList(gmsRingWork2);
                                    AppMain.gmRingFreeRingWork(gmsRingWork2);
                                }
                            }
                            if (gmsRingWork2.timer > (short)32 || ((int)gmsRingWork2.timer & 2) != 0)
                            {
                                AppMain.gm_ring_sys_work.ring_draw_func(gmsRingWork2);
                            }
                        }
                    }
                }
                if (AppMain.gm_ring_sys_work.damage_ring_list_start == null)
                {
                    for (int index = 0; index < (int)AppMain.gm_ring_sys_work.player_num; ++index)
                    {
                        if (((int)AppMain.gm_ring_sys_work.flag & 16777216 << index) != 0)
                        {
                            AppMain.gm_ring_sys_work.damage_num[index] = (byte)0;
                            AppMain.gm_ring_sys_work.flag &= (uint)~(16777216 << index);
                        }
                    }
                }
                AppMain.GMS_RING_WORK gmsRingWork4 = AppMain.gm_ring_sys_work.slot_ring_list_start;
                while (gmsRingWork4 != null)
                {
                    AppMain.GMS_RING_WORK gmsRingWork2 = gmsRingWork4;
                    gmsRingWork4 = gmsRingWork2.post_ring;
                    if (AppMain.ObjViewOutCheck(gmsRingWork2.pos.x, gmsRingWork2.pos.y, (short)512, (short)0, (short)0, (short)0, (short)0) != 0)
                    {
                        AppMain.gmRingDetachSlotRingList(gmsRingWork2);
                        AppMain.gmRingFreeRingWork(gmsRingWork2);
                    }
                    else
                    {
                        gmsRingWork2.pos.x += gmsRingWork2.spd_x;
                        gmsRingWork2.pos.y += gmsRingWork2.spd_y;
                        AppMain.gm_ring_sys_work.ring_draw_func(gmsRingWork2);
                        AppMain.ring_rect.pos.z = 0;
                        int index = 0;
                        int num   = 0;
                        for (; index < (int)AppMain.gm_ring_sys_work.player_num; ++index)
                        {
                            AppMain.GMS_PLAYER_WORK ply_work = AppMain.g_gm_main_system.ply_work[index];
                            if (((int)ply_work.player_flag & 1024) == 0)
                            {
                                AppMain.ring_rect.pos.x = gmsRingWork2.pos.x;
                                AppMain.ring_rect.pos.y = gmsRingWork2.pos.y;
                                if (AppMain.gm_ring_sys_work.rec_func(AppMain.ply_rect[index], AppMain.ring_rect) != (ushort)0)
                                {
                                    num = 1;
                                    AppMain.GmPlayerRingGet(ply_work, (short)1);
                                    AppMain.GmComEfctCreateRing(AppMain.ring_rect.pos.x, AppMain.ring_rect.pos.y);
                                }
                            }
                        }
                        if (num != 0)
                        {
                            gmsRingWork2.timer = (short)0;
                            AppMain.gmRingDetachSlotRingList(gmsRingWork2);
                            AppMain.gmRingFreeRingWork(gmsRingWork2);
                        }
                    }
                }
                AppMain.gmRingDrawEnd();
                if (!(betterSfx || modernSfx))
                {
                    AppMain.gm_ring_sys_work.ring_se_cnt = 0;
                }
            }
        }
    }
Exemple #28
0
    // Token: 0x06000D9C RID: 3484 RVA: 0x00077F0C File Offset: 0x0007610C
    public static void gmRingMoveCollsion(AppMain.GMS_RING_WORK ring_work)
    {
        int num  = 0;
        int num2 = ring_work.spd_y;

        AppMain.OBS_COL_CHK_DATA obs_COL_CHK_DATA = GlobalPool <AppMain.OBS_COL_CHK_DATA> .Alloc();

        if ((ring_work.flag & 4) != 0)
        {
            num2 = -num2;
        }
        if ((ring_work.flag & 2) != 0)
        {
            obs_COL_CHK_DATA.flag = 1;
        }
        else
        {
            obs_COL_CHK_DATA.flag = 0;
        }
        obs_COL_CHK_DATA.dir   = null;
        obs_COL_CHK_DATA.attr  = null;
        obs_COL_CHK_DATA.pos_x = ring_work.pos.x >> 12;
        obs_COL_CHK_DATA.pos_y = ring_work.pos.y >> 12;
        if (ring_work.spd_y > 0)
        {
            obs_COL_CHK_DATA.pos_y += 9;
            obs_COL_CHK_DATA.vec    = 2;
            num = AppMain.ObjDiffCollisionFast(obs_COL_CHK_DATA);
            if (num < 0)
            {
                if ((ring_work.flag & 4) != 0)
                {
                    ring_work.pos.y = ring_work.pos.y - (num << 12);
                }
                else
                {
                    ring_work.pos.y = ring_work.pos.y + (num << 12);
                }
            }
        }
        else if (ring_work.spd_y < 0)
        {
            obs_COL_CHK_DATA.pos_y += -9;
            obs_COL_CHK_DATA.vec    = 3;
            num = AppMain.ObjDiffCollisionFast(obs_COL_CHK_DATA);
            if (num < 0)
            {
                if ((ring_work.flag & 4) != 0)
                {
                    ring_work.pos.y = ring_work.pos.y + (num << 12);
                }
                else
                {
                    ring_work.pos.y = ring_work.pos.y - (num << 12);
                }
            }
        }
        if (num < 0)
        {
            ring_work.spd_y -= ring_work.spd_y >> 2;
            ring_work.spd_y  = -ring_work.spd_y;
        }
        num = 0;
        obs_COL_CHK_DATA.pos_y = ring_work.pos.y >> 12;
        if (ring_work.spd_x > 0)
        {
            obs_COL_CHK_DATA.pos_x += 9;
            obs_COL_CHK_DATA.vec    = 0;
            num = AppMain.ObjDiffCollisionFast(obs_COL_CHK_DATA);
            if (num < 0)
            {
                ring_work.pos.x = ring_work.pos.x + (num << 12);
            }
        }
        else if (ring_work.spd_x < 0)
        {
            obs_COL_CHK_DATA.pos_x += -9;
            obs_COL_CHK_DATA.vec    = 1;
            num = AppMain.ObjDiffCollisionFast(obs_COL_CHK_DATA);
            if (num < 0)
            {
                ring_work.pos.x = ring_work.pos.x - (num << 12);
            }
        }
        if (num < 0)
        {
            ring_work.spd_x -= ring_work.spd_x >> 2;
            ring_work.spd_x  = -ring_work.spd_x;
        }
        GlobalPool <AppMain.OBS_COL_CHK_DATA> .Release(obs_COL_CHK_DATA);
    }
Exemple #29
0
 private static void gmRingFreeRingWork(AppMain.GMS_RING_WORK ring_work)
 {
     --AppMain.gm_ring_sys_work.ring_list_cnt;
     AppMain.gm_ring_sys_work.ring_list[AppMain.gm_ring_sys_work.ring_list_cnt] = ring_work;
 }
Exemple #30
0
    private static void gmRingMoveCollsion(AppMain.GMS_RING_WORK ring_work)
    {
        int num1 = 0;
        int spdY = ring_work.spd_y;

        AppMain.OBS_COL_CHK_DATA pData = AppMain.GlobalPool <AppMain.OBS_COL_CHK_DATA> .Alloc();

        if (((int)ring_work.flag & 4) != 0)
        {
            int num2 = -spdY;
        }
        pData.flag  = ((int)ring_work.flag & 2) == 0 ? (ushort)0 : (ushort)1;
        pData.dir   = (ushort[])null;
        pData.attr  = (uint[])null;
        pData.pos_x = ring_work.pos.x >> 12;
        pData.pos_y = ring_work.pos.y >> 12;
        if (ring_work.spd_y > 0)
        {
            pData.pos_y += 9;
            pData.vec    = (ushort)2;
            num1         = AppMain.ObjDiffCollisionFast(pData);
            if (num1 < 0)
            {
                if (((int)ring_work.flag & 4) != 0)
                {
                    ring_work.pos.y -= num1 << 12;
                }
                else
                {
                    ring_work.pos.y += num1 << 12;
                }
            }
        }
        else if (ring_work.spd_y < 0)
        {
            pData.pos_y += -9;
            pData.vec    = (ushort)3;
            num1         = AppMain.ObjDiffCollisionFast(pData);
            if (num1 < 0)
            {
                if (((int)ring_work.flag & 4) != 0)
                {
                    ring_work.pos.y += num1 << 12;
                }
                else
                {
                    ring_work.pos.y -= num1 << 12;
                }
            }
        }
        if (num1 < 0)
        {
            ring_work.spd_y -= ring_work.spd_y >> 2;
            ring_work.spd_y  = -ring_work.spd_y;
        }
        int num3 = 0;

        pData.pos_y = ring_work.pos.y >> 12;
        if (ring_work.spd_x > 0)
        {
            pData.pos_x += 9;
            pData.vec    = (ushort)0;
            num3         = AppMain.ObjDiffCollisionFast(pData);
            if (num3 < 0)
            {
                ring_work.pos.x += num3 << 12;
            }
        }
        else if (ring_work.spd_x < 0)
        {
            pData.pos_x += -9;
            pData.vec    = (ushort)1;
            num3         = AppMain.ObjDiffCollisionFast(pData);
            if (num3 < 0)
            {
                ring_work.pos.x -= num3 << 12;
            }
        }
        if (num3 < 0)
        {
            ring_work.spd_x -= ring_work.spd_x >> 2;
            ring_work.spd_x  = -ring_work.spd_x;
        }
        AppMain.GlobalPool <AppMain.OBS_COL_CHK_DATA> .Release(pData);
    }