예제 #1
0
    public static void gmGmkSwWallCheckColOff(AppMain.GMS_GMK_SWWALL_WORK swwall_work)
    {
        if (AppMain.g_gs_main_sys_info.stage_id != (ushort)9)
        {
            return;
        }
        AppMain.OBS_OBJECT_WORK      obsObjectWork1 = (AppMain.OBS_OBJECT_WORK)swwall_work;
        AppMain.GMS_EVE_RECORD_EVENT eveRec         = swwall_work.gmk_work.ene_com.eve_rec;
        if (eveRec.id != (ushort)248 && eveRec.id != (ushort)249 && (eveRec.id != (ushort)252 && eveRec.id != (ushort)253))
        {
            return;
        }
        AppMain.OBS_OBJECT_WORK obsObjectWork2 = (AppMain.OBS_OBJECT_WORK)AppMain.g_gm_main_system.ply_work[0];
        int num1 = obsObjectWork2.pos.x >> 12;
        int num2 = obsObjectWork2.pos.y >> 12;
        int num3 = obsObjectWork1.pos.x >> 12;
        int num4 = obsObjectWork1.pos.y >> 12;
        int num5 = swwall_work.wall_size >> 12;

        if (num3 - (num5 >> 1) < num1 + (int)obsObjectWork2.field_rect[2] && num3 + (num5 >> 1) > num1 + (int)obsObjectWork2.field_rect[0] && (num4 + (int)obsObjectWork1.col_work.obj_col.ofst_y + 8 <= num2 + (int)obsObjectWork2.field_rect[3] && num4 + (int)obsObjectWork1.col_work.obj_col.ofst_y + (int)obsObjectWork1.col_work.obj_col.height > num2 + (int)obsObjectWork2.field_rect[1]))
        {
            obsObjectWork1.col_work.obj_col.obj = (AppMain.OBS_OBJECT_WORK)null;
        }
        else
        {
            obsObjectWork1.col_work.obj_col.obj = obsObjectWork1;
        }
    }
예제 #2
0
 public static void gmGmkSwWallCloseMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK swwall_work = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     if (((int)swwall_work.gmk_work.ene_com.eve_rec.flag & 1) != 0 && !AppMain.GmGmkSwitchIsOn(swwall_work.id) || ((int)swwall_work.gmk_work.ene_com.eve_rec.flag & 1) == 0 && AppMain.GmGmkSwitchIsOn(swwall_work.id))
     {
         AppMain.gmGmkSwWallOpenInit(obj_work);
     }
     if (swwall_work.wall_spd != 0)
     {
         swwall_work.wall_draw_size += swwall_work.wall_spd;
     }
     else
     {
         int v2 = AppMain.GmGmkSwitchGetPer(swwall_work.id);
         if (((int)swwall_work.gmk_work.ene_com.eve_rec.flag & 1) != 0)
         {
             v2 = 4096 - v2;
         }
         swwall_work.wall_draw_size = AppMain.FX_Mul(swwall_work.wall_size, v2);
     }
     if (swwall_work.wall_draw_size >= swwall_work.wall_size)
     {
         swwall_work.wall_draw_size = swwall_work.wall_size;
         AppMain.gmGmkSwWallFwInit(obj_work);
     }
     swwall_work.gear_dir = (ushort)(swwall_work.wall_draw_size / 64 * 16);
     if (swwall_work.gmk_work.ene_com.eve_rec.id == (ushort)257 || swwall_work.gmk_work.ene_com.eve_rec.id == (ushort)258)
     {
         swwall_work.gear_dir = (ushort)-swwall_work.gear_dir;
     }
     AppMain.gmGmkSwWallSetCol(swwall_work.gmk_work.ene_com.col_work, swwall_work.wall_size, swwall_work.wall_draw_size, swwall_work.wall_type);
     AppMain.gmGmkSwWallCheckColOff(swwall_work);
 }
 // Token: 0x06000756 RID: 1878 RVA: 0x00040804 File Offset: 0x0003EA04
 public static void gmGmkSwWallCloseMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     if (((gms_GMK_SWWALL_WORK.gmk_work.ene_com.eve_rec.flag & 1) != 0 && !AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id)) || ((gms_GMK_SWWALL_WORK.gmk_work.ene_com.eve_rec.flag & 1) == 0 && AppMain.GmGmkSwitchIsOn(gms_GMK_SWWALL_WORK.id)))
     {
         AppMain.gmGmkSwWallOpenInit(obj_work);
     }
     if (gms_GMK_SWWALL_WORK.wall_spd != 0)
     {
         gms_GMK_SWWALL_WORK.wall_draw_size += gms_GMK_SWWALL_WORK.wall_spd;
     }
     else
     {
         int num = AppMain.GmGmkSwitchGetPer(gms_GMK_SWWALL_WORK.id);
         if ((gms_GMK_SWWALL_WORK.gmk_work.ene_com.eve_rec.flag & 1) != 0)
         {
             num = 4096 - num;
         }
         gms_GMK_SWWALL_WORK.wall_draw_size = AppMain.FX_Mul(gms_GMK_SWWALL_WORK.wall_size, num);
     }
     if (gms_GMK_SWWALL_WORK.wall_draw_size >= gms_GMK_SWWALL_WORK.wall_size)
     {
         gms_GMK_SWWALL_WORK.wall_draw_size = gms_GMK_SWWALL_WORK.wall_size;
         AppMain.gmGmkSwWallFwInit(obj_work);
     }
     gms_GMK_SWWALL_WORK.gear_dir = ( ushort )(gms_GMK_SWWALL_WORK.wall_draw_size / 64 * 16);
     if (gms_GMK_SWWALL_WORK.gmk_work.ene_com.eve_rec.id == 257 || gms_GMK_SWWALL_WORK.gmk_work.ene_com.eve_rec.id == 258)
     {
         gms_GMK_SWWALL_WORK.gear_dir = ( ushort )-gms_GMK_SWWALL_WORK.gear_dir;
     }
     AppMain.gmGmkSwWallSetCol(gms_GMK_SWWALL_WORK.gmk_work.ene_com.col_work, gms_GMK_SWWALL_WORK.wall_size, gms_GMK_SWWALL_WORK.wall_draw_size, gms_GMK_SWWALL_WORK.wall_type);
     AppMain.gmGmkSwWallCheckColOff(gms_GMK_SWWALL_WORK);
 }
예제 #4
0
 public static void gmGmkSwWallOpenMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK gmsGmkSwwallWork = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     if (((int)gmsGmkSwwallWork.gmk_work.ene_com.eve_rec.flag & 1) != 0 && AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id) || ((int)gmsGmkSwwallWork.gmk_work.ene_com.eve_rec.flag & 1) == 0 && !AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id))
     {
         AppMain.gmGmkSwWallCloseInit(obj_work);
     }
     if (gmsGmkSwwallWork.wall_spd != 0)
     {
         gmsGmkSwwallWork.wall_draw_size -= gmsGmkSwwallWork.wall_spd;
     }
     else
     {
         int v2 = AppMain.GmGmkSwitchGetPer(gmsGmkSwwallWork.id);
         if (((int)gmsGmkSwwallWork.gmk_work.ene_com.eve_rec.flag & 1) != 0)
         {
             v2 = 4096 - v2;
         }
         gmsGmkSwwallWork.wall_draw_size = AppMain.FX_Mul(gmsGmkSwwallWork.wall_size, v2);
     }
     if (gmsGmkSwwallWork.wall_draw_size <= 0)
     {
         gmsGmkSwwallWork.wall_draw_size = 0;
         AppMain.gmGmkSwWallFwInit(obj_work);
     }
     gmsGmkSwwallWork.gear_dir = (ushort)(gmsGmkSwwallWork.wall_draw_size / 64 * 16);
     if (gmsGmkSwwallWork.gmk_work.ene_com.eve_rec.id == (ushort)257 || gmsGmkSwwallWork.gmk_work.ene_com.eve_rec.id == (ushort)258)
     {
         gmsGmkSwwallWork.gear_dir = (ushort)-gmsGmkSwwallWork.gear_dir;
     }
     AppMain.gmGmkSwWallSetCol(gmsGmkSwwallWork.gmk_work.ene_com.col_work, gmsGmkSwwallWork.wall_size, gmsGmkSwwallWork.wall_draw_size, gmsGmkSwwallWork.wall_type);
 }
예제 #5
0
    // Token: 0x0600075A RID: 1882 RVA: 0x00040F04 File Offset: 0x0003F104
    public static void gmGmkSwWallCheckColOff(AppMain.GMS_GMK_SWWALL_WORK swwall_work)
    {
        if (AppMain.g_gs_main_sys_info.stage_id != 9)
        {
            return;
        }
        OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)swwall_work;

        AppMain.GMS_EVE_RECORD_EVENT eve_rec = swwall_work.gmk_work.ene_com.eve_rec;
        if (eve_rec.id == 248 || eve_rec.id == 249 || eve_rec.id == 252 || eve_rec.id == 253)
        {
            OBS_OBJECT_WORK obs_OBJECT_WORK2 = (OBS_OBJECT_WORK)AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];
            int             num  = obs_OBJECT_WORK2.pos.x >> 12;
            int             num2 = obs_OBJECT_WORK2.pos.y >> 12;
            int             num3 = obs_OBJECT_WORK.pos.x >> 12;
            int             num4 = obs_OBJECT_WORK.pos.y >> 12;
            int             num5 = swwall_work.wall_size >> 12;
            if (num3 - (num5 >> 1) < num + ( int )obs_OBJECT_WORK2.field_rect[2] && num3 + (num5 >> 1) > num + ( int )obs_OBJECT_WORK2.field_rect[0] && num4 + ( int )obs_OBJECT_WORK.col_work.obj_col.ofst_y + 8 <= num2 + ( int )obs_OBJECT_WORK2.field_rect[3] && num4 + ( int )obs_OBJECT_WORK.col_work.obj_col.ofst_y + ( int )obs_OBJECT_WORK.col_work.obj_col.height > num2 + ( int )obs_OBJECT_WORK2.field_rect[1])
            {
                obs_OBJECT_WORK.col_work.obj_col.obj = null;
                return;
            }
            obs_OBJECT_WORK.col_work.obj_col.obj = obs_OBJECT_WORK;
        }
    }
 // Token: 0x06000751 RID: 1873 RVA: 0x00040498 File Offset: 0x0003E698
 public static void gmGmkSwWallFwInit(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     obj_work.flag  &= 4294967279U;
     obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSwWallFwMain);
     obj_work.col_work.obj_col.obj = obj_work;
     if (gms_GMK_SWWALL_WORK.h_snd != null)
     {
         AppMain.GmSoundStopSE(gms_GMK_SWWALL_WORK.h_snd);
     }
 }
예제 #7
0
 public static void gmGmkSwWallCloseInit(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK gmsGmkSwwallWork = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     gmsGmkSwwallWork.wall_spd     = !AppMain.GmGmkSwitchTypeIsGear(gmsGmkSwwallWork.id) ? 16384 : 0;
     obj_work.flag                |= 16U;
     obj_work.ppFunc               = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSwWallCloseMain);
     obj_work.col_work.obj_col.obj = obj_work;
     if (gmsGmkSwwallWork.h_snd == null)
     {
         return;
     }
     AppMain.GmSoundStopSE(gmsGmkSwwallWork.h_snd);
     AppMain.GmSoundPlaySE("Boss3_01", gmsGmkSwwallWork.h_snd);
 }
예제 #8
0
 public static void gmGmkSwWallDest(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.GMS_GMK_SWWALL_WORK tcbWork = (AppMain.GMS_GMK_SWWALL_WORK)AppMain.mtTaskGetTcbWork(tcb);
     if (((int)tcbWork.gmk_work.ene_com.enemy_flag & 2) != 0)
     {
         AppMain.ObjAction3dNNMotionRelease(tcbWork.obj_3d_opt[1]);
     }
     if (tcbWork.h_snd != null)
     {
         AppMain.GmSoundStopSE(tcbWork.h_snd);
         AppMain.GsSoundFreeSeHandle(tcbWork.h_snd);
         tcbWork.h_snd = (AppMain.GSS_SND_SE_HANDLE)null;
     }
     AppMain.GmEnemyDefaultExit(tcb);
 }
 // Token: 0x06000750 RID: 1872 RVA: 0x00040430 File Offset: 0x0003E630
 public static void gmGmkSwWallDest(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)AppMain.mtTaskGetTcbWork(tcb);
     if ((gms_GMK_SWWALL_WORK.gmk_work.ene_com.enemy_flag & 2U) != 0U)
     {
         AppMain.ObjAction3dNNMotionRelease(gms_GMK_SWWALL_WORK.obj_3d_opt[1]);
     }
     if (gms_GMK_SWWALL_WORK.h_snd != null)
     {
         AppMain.GmSoundStopSE(gms_GMK_SWWALL_WORK.h_snd);
         AppMain.GsSoundFreeSeHandle(gms_GMK_SWWALL_WORK.h_snd);
         gms_GMK_SWWALL_WORK.h_snd = null;
     }
     AppMain.GmEnemyDefaultExit(tcb);
 }
예제 #10
0
 public static void gmGmkSwWallFwMain(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK  swwall_work = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     AppMain.GMS_EVE_RECORD_EVENT eveRec      = swwall_work.gmk_work.ene_com.eve_rec;
     if (swwall_work.wall_draw_size != 0)
     {
         if (((int)eveRec.flag & 1) == 0 && AppMain.GmGmkSwitchIsOn(swwall_work.id) || ((int)eveRec.flag & 1) != 0 && !AppMain.GmGmkSwitchIsOn(swwall_work.id))
         {
             AppMain.gmGmkSwWallOpenInit(obj_work);
         }
     }
     else if (((int)eveRec.flag & 1) != 0 && AppMain.GmGmkSwitchIsOn(swwall_work.id) || ((int)eveRec.flag & 1) == 0 && !AppMain.GmGmkSwitchIsOn(swwall_work.id))
     {
         AppMain.gmGmkSwWallCloseInit(obj_work);
     }
     AppMain.gmGmkSwWallCheckColOff(swwall_work);
 }
 // Token: 0x06000755 RID: 1877 RVA: 0x00040778 File Offset: 0x0003E978
 public static void gmGmkSwWallCloseInit(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     if (AppMain.GmGmkSwitchTypeIsGear(gms_GMK_SWWALL_WORK.id))
     {
         gms_GMK_SWWALL_WORK.wall_spd = 0;
     }
     else
     {
         gms_GMK_SWWALL_WORK.wall_spd = 16384;
     }
     obj_work.flag  |= 16U;
     obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSwWallCloseMain);
     obj_work.col_work.obj_col.obj = obj_work;
     if (gms_GMK_SWWALL_WORK.h_snd != null)
     {
         AppMain.GmSoundStopSE(gms_GMK_SWWALL_WORK.h_snd);
         AppMain.GmSoundPlaySE("Boss3_01", gms_GMK_SWWALL_WORK.h_snd);
     }
 }
예제 #12
0
 // Token: 0x06000753 RID: 1875 RVA: 0x00040594 File Offset: 0x0003E794
 public static void gmGmkSwWallOpenInit(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
     if (AppMain.GmGmkSwitchTypeIsGear(gms_GMK_SWWALL_WORK.id))
     {
         gms_GMK_SWWALL_WORK.wall_spd = 0;
     }
     else
     {
         gms_GMK_SWWALL_WORK.wall_spd = 16384;
     }
     obj_work.flag  |= 16U;
     obj_work.ppFunc = AppMain.gmGmkSwWallOpenMain;
     obj_work.col_work.obj_col.obj = obj_work;
     if (gms_GMK_SWWALL_WORK.h_snd != null)
     {
         GsSound.StopSE(gms_GMK_SWWALL_WORK.h_snd);
         GmSound.PlaySE("Boss3_01", gms_GMK_SWWALL_WORK.h_snd);
     }
 }
예제 #13
0
    public static void gmGmkSwWallDispFunc(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SWWALL_WORK gmsGmkSwwallWork = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
        AppMain.VecFx32             vecFx32          = new AppMain.VecFx32();
        AppMain.VecFx32             scale            = new AppMain.VecFx32();
        AppMain.VecU16 vecU16 = new AppMain.VecU16();
        int            num1   = (gmsGmkSwwallWork.wall_draw_size + 131071) / 131072;

        AppMain.OBS_COLLISION_WORK colWork = gmsGmkSwwallWork.gmk_work.ene_com.col_work;
        vecFx32.Assign(obj_work.pos);
        int num2;
        int num3 = num2 = 0;

        if (gmsGmkSwwallWork.wall_type <= (ushort)1)
        {
            if (gmsGmkSwwallWork.wall_type == (ushort)0)
            {
                vecFx32.x += (int)colWork.obj_col.width + (int)colWork.obj_col.ofst_x - 16 << 12;
                num3       = -131072;
            }
            else
            {
                vecFx32.x += (int)colWork.obj_col.ofst_x + 16 << 12;
                num3       = 131072;
            }
        }
        else if (gmsGmkSwwallWork.wall_type == (ushort)2)
        {
            vecFx32.y += (int)colWork.obj_col.height + (int)colWork.obj_col.ofst_y - 16 << 12;
            num2       = -131072;
        }
        else
        {
            vecFx32.y += (int)colWork.obj_col.ofst_y + 16 << 12;
            num2       = 131072;
        }
        uint dispFlag = obj_work.disp_flag;

        if (((int)gmsGmkSwwallWork.gmk_work.ene_com.enemy_flag & 2) != 0)
        {
            while (num1 > 0)
            {
                AppMain.ObjDrawAction3DNN(obj_work.obj_3d, new AppMain.VecFx32?(vecFx32), new AppMain.VecU16?(obj_work.dir), obj_work.scale, ref dispFlag);
                --num1;
                vecFx32.x += num3;
                vecFx32.y += num2;
            }
        }
        else
        {
            while (num1 > 0)
            {
                AppMain.ObjDrawAction3DNN(obj_work.obj_3d, new AppMain.VecFx32?(vecFx32), new AppMain.VecU16?(obj_work.dir), obj_work.scale, ref dispFlag);
                --num1;
                vecFx32.x += num3;
                vecFx32.y += num2;
            }
        }
        if (((int)gmsGmkSwwallWork.gmk_work.ene_com.enemy_flag & 1) == 0)
        {
            return;
        }
        vecU16.x = vecU16.y = (ushort)0;
        vecU16.z = (ushort)((uint)gmsGmkSwwallWork.gear_dir + (uint)gmsGmkSwwallWork.gear_base_dir);
        AppMain.ObjDrawAction3DNN(gmsGmkSwwallWork.obj_3d_opt[0], new AppMain.VecFx32?(gmsGmkSwwallWork.gear_pos), new AppMain.VecU16?(vecU16), obj_work.scale, ref dispFlag);
        scale.x = scale.y = scale.z = 4096;
        if (((int)gmsGmkSwwallWork.gmk_work.ene_com.enemy_flag & 4) != 0)
        {
            scale.x = -scale.x;
        }
        AppMain.ObjDrawAction3DNN(gmsGmkSwwallWork.obj_3d_opt[1], new AppMain.VecFx32?(gmsGmkSwwallWork.gearbase_pos), new AppMain.VecU16?(obj_work.dir), scale, ref dispFlag);
    }
예제 #14
0
    public static AppMain.OBS_OBJECT_WORK GmGmkSwWallInit(
        AppMain.GMS_EVE_RECORD_EVENT eve_rec,
        int pos_x,
        int pos_y,
        byte type)
    {
        AppMain.OBS_OBJECT_WORK     work             = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_GMK_SWWALL_WORK()), "GMK_SW_WALL");
        AppMain.GMS_ENEMY_3D_WORK   gmsEnemy3DWork   = (AppMain.GMS_ENEMY_3D_WORK)work;
        AppMain.GMS_GMK_SWWALL_WORK gmsGmkSwwallWork = (AppMain.GMS_GMK_SWWALL_WORK)work;
        AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_gmk_sw_wall_obj_3d_list[0], gmsEnemy3DWork.obj_3d);
        if ((ushort)256 <= eve_rec.id && eve_rec.id <= (ushort)259)
        {
            AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_sw_wall_obj_3d_list[1], gmsGmkSwwallWork.obj_3d_opt[0]);
            AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_sw_wall_obj_3d_list[2], gmsGmkSwwallWork.obj_3d_opt[1]);
            gmsGmkSwwallWork.obj_3d_opt[1].drawflag |= 32U;
            gmsEnemy3DWork.ene_com.enemy_flag       |= 1U;
        }
        else
        {
            gmsGmkSwwallWork.h_snd = AppMain.GsSoundAllocSeHandle();
        }
        AppMain.mtTaskChangeTcbDestructor(work.tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.gmGmkSwWallDest));
        work.pos.z          = -655360;
        work.ppOut          = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSwWallDispFunc);
        gmsGmkSwwallWork.id = (uint)AppMain.MTM_MATH_CLIP((int)eve_rec.left, 0, 64);
        ushort wall_type;
        ushort num;

        if ((ushort)248 <= eve_rec.id && eve_rec.id <= (ushort)251)
        {
            gmsGmkSwwallWork.wall_size = 524288;
            wall_type = (ushort)((uint)eve_rec.id - 248U);
            num       = (ushort)32;
        }
        else if ((ushort)252 <= eve_rec.id && eve_rec.id <= (ushort)byte.MaxValue)
        {
            gmsGmkSwwallWork.wall_size = 1048576;
            wall_type = (ushort)((uint)eve_rec.id - 252U);
            num       = (ushort)32;
        }
        else
        {
            gmsGmkSwwallWork.wall_size = 393216;
            wall_type = (ushort)((uint)eve_rec.id - 256U);
            num       = (ushort)24;
            gmsGmkSwwallWork.gear_pos.Assign(work.pos);
            gmsGmkSwwallWork.gearbase_pos.Assign(work.pos);
            switch (eve_rec.id)
            {
            case 257:
                gmsGmkSwwallWork.gear_pos.x       -= -144179;
                gmsGmkSwwallWork.gear_pos.y       += 68812;
                gmsGmkSwwallWork.gearbase_pos.x   -= -196608;
                gmsGmkSwwallWork.gearbase_pos.y   += 49152;
                gmsGmkSwwallWork.gear_base_dir     = (ushort)2730;
                gmsEnemy3DWork.ene_com.enemy_flag |= 4U;
                break;

            case 258:
                gmsGmkSwwallWork.gear_pos.x       += 68812;
                gmsGmkSwwallWork.gear_pos.y       += -144179;
                gmsGmkSwwallWork.gearbase_pos.x   += 49152;
                gmsGmkSwwallWork.gearbase_pos.y   += -196608;
                gmsGmkSwwallWork.gear_base_dir     = (ushort)8192;
                gmsEnemy3DWork.ene_com.enemy_flag |= 4U;
                work.dir.z = (ushort)49152;
                break;

            case 259:
                gmsGmkSwwallWork.gear_pos.x     += 68812;
                gmsGmkSwwallWork.gear_pos.y     -= -144179;
                gmsGmkSwwallWork.gearbase_pos.x += 49152;
                gmsGmkSwwallWork.gearbase_pos.y -= -196608;
                gmsGmkSwwallWork.gear_base_dir   = (ushort)2730;
                work.dir.z = (ushort)49152;
                break;

            default:
                gmsGmkSwwallWork.gear_pos.x     += -144179;
                gmsGmkSwwallWork.gear_pos.y     += 68812;
                gmsGmkSwwallWork.gearbase_pos.x += -196608;
                gmsGmkSwwallWork.gearbase_pos.y += 49152;
                gmsGmkSwwallWork.gear_base_dir   = (ushort)62806;
                break;
            }
        }
        gmsGmkSwwallWork.wall_type = wall_type;
        if (AppMain.GmGmkSwitchTypeIsGear(gmsGmkSwwallWork.id) && (AppMain.GmGmkSwitchGetPer(gmsGmkSwwallWork.id) != 0 || !AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id)) && (AppMain.GmGmkSwitchGetPer(gmsGmkSwwallWork.id) != 4096 || AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id)))
        {
            int v2 = AppMain.GmGmkSwitchGetPer(gmsGmkSwwallWork.id);
            if (AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id))
            {
                if (((int)eve_rec.flag & 1) != 0)
                {
                    v2 = 4096 - v2;
                }
            }
            else if (((int)eve_rec.flag & 1) == 0)
            {
                v2 = 4096 - v2;
            }
            gmsGmkSwwallWork.wall_draw_size = AppMain.FX_Mul(gmsGmkSwwallWork.wall_size, v2);
        }
        else if (AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id) && ((int)eve_rec.flag & 1) != 0 || !AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id) && ((int)eve_rec.flag & 1) == 0)
        {
            gmsGmkSwwallWork.wall_draw_size = gmsGmkSwwallWork.wall_size;
        }
        AppMain.OBS_COLLISION_WORK colWork = gmsEnemy3DWork.ene_com.col_work;
        colWork.obj_col.obj       = work;
        colWork.obj_col.dir_data  = gmsGmkSwwallWork.col_dir_buf;
        colWork.obj_col.diff_data = AppMain.g_gm_default_col;
        colWork.obj_col.flag     |= 402653216U;
        if (wall_type <= (ushort)1)
        {
            colWork.obj_col.height = num;
            colWork.obj_col.ofst_y = (short)-16;
        }
        else
        {
            colWork.obj_col.width  = num;
            colWork.obj_col.ofst_x = (short)-16;
        }
        AppMain.gmGmkSwWallSetCol(colWork, gmsGmkSwwallWork.wall_size, gmsGmkSwwallWork.wall_draw_size, wall_type);
        work.move_flag |= 8448U;
        work.disp_flag |= 4194304U;
        gmsEnemy3DWork.ene_com.enemy_flag |= 16384U;
        if (gmsGmkSwwallWork.wall_draw_size == 0 || gmsGmkSwwallWork.wall_draw_size == gmsGmkSwwallWork.wall_size)
        {
            AppMain.gmGmkSwWallFwInit(work);
        }
        else if (AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id) && ((int)eve_rec.flag & 1) != 0 || !AppMain.GmGmkSwitchIsOn(gmsGmkSwwallWork.id) && ((int)eve_rec.flag & 1) == 0)
        {
            AppMain.gmGmkSwWallCloseInit(work);
        }
        else
        {
            AppMain.gmGmkSwWallOpenInit(work);
        }
        return(work);
    }
    // Token: 0x0600074F RID: 1871 RVA: 0x0003FE28 File Offset: 0x0003E028
    public static AppMain.OBS_OBJECT_WORK GmGmkSwWallInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type)
    {
        AppMain.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 = AppMain.GsSoundAllocSeHandle();
        }
        AppMain.mtTaskChangeTcbDestructor(obs_OBJECT_WORK.tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.gmGmkSwWallDest));
        obs_OBJECT_WORK.pos.z  = -655360;
        obs_OBJECT_WORK.ppOut  = new AppMain.MPP_VOID_OBS_OBJECT_WORK(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);
    }
    // Token: 0x06000757 RID: 1879 RVA: 0x0004096C File Offset: 0x0003EB6C
    public static void gmGmkSwWallDispFunc(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SWWALL_WORK gms_GMK_SWWALL_WORK = (AppMain.GMS_GMK_SWWALL_WORK)obj_work;
        AppMain.VecFx32             vecFx = default(AppMain.VecFx32);
        AppMain.VecFx32             scale = default(AppMain.VecFx32);
        AppMain.VecU16 vecU = default(AppMain.VecU16);
        int            i    = (gms_GMK_SWWALL_WORK.wall_draw_size + 131071) / 131072;

        AppMain.OBS_COLLISION_WORK col_work = gms_GMK_SWWALL_WORK.gmk_work.ene_com.col_work;
        vecFx.Assign(obj_work.pos);
        int num2;
        int num = num2 = 0;

        if (gms_GMK_SWWALL_WORK.wall_type <= 1)
        {
            if (gms_GMK_SWWALL_WORK.wall_type == 0)
            {
                vecFx.x += ( int )(col_work.obj_col.width + ( ushort )col_work.obj_col.ofst_x - 16) << 12;
                num2     = -131072;
            }
            else
            {
                vecFx.x += ( int )(col_work.obj_col.ofst_x + 16) << 12;
                num2     = 131072;
            }
        }
        else if (gms_GMK_SWWALL_WORK.wall_type == 2)
        {
            vecFx.y += ( int )(col_work.obj_col.height + ( ushort )col_work.obj_col.ofst_y - 16) << 12;
            num      = -131072;
        }
        else
        {
            vecFx.y += ( int )(col_work.obj_col.ofst_y + 16) << 12;
            num      = 131072;
        }
        uint disp_flag = obj_work.disp_flag;

        if ((gms_GMK_SWWALL_WORK.gmk_work.ene_com.enemy_flag & 2U) != 0U)
        {
            while (i > 0)
            {
                AppMain.ObjDrawAction3DNN(obj_work.obj_3d, new AppMain.VecFx32?(vecFx), new AppMain.VecU16?(obj_work.dir), obj_work.scale, ref disp_flag);
                i--;
                vecFx.x += num2;
                vecFx.y += num;
            }
        }
        else
        {
            while (i > 0)
            {
                AppMain.ObjDrawAction3DNN(obj_work.obj_3d, new AppMain.VecFx32?(vecFx), new AppMain.VecU16?(obj_work.dir), obj_work.scale, ref disp_flag);
                i--;
                vecFx.x += num2;
                vecFx.y += num;
            }
        }
        if ((gms_GMK_SWWALL_WORK.gmk_work.ene_com.enemy_flag & 1U) != 0U)
        {
            vecU.x = (vecU.y = 0);
            vecU.z = ( ushort )(gms_GMK_SWWALL_WORK.gear_dir + gms_GMK_SWWALL_WORK.gear_base_dir);
            AppMain.ObjDrawAction3DNN(gms_GMK_SWWALL_WORK.obj_3d_opt[0], new AppMain.VecFx32?(gms_GMK_SWWALL_WORK.gear_pos), new AppMain.VecU16?(vecU), obj_work.scale, ref disp_flag);
            scale.x = (scale.y = (scale.z = 4096));
            if ((gms_GMK_SWWALL_WORK.gmk_work.ene_com.enemy_flag & 4U) != 0U)
            {
                scale.x = -scale.x;
            }
            AppMain.ObjDrawAction3DNN(gms_GMK_SWWALL_WORK.obj_3d_opt[1], new AppMain.VecFx32?(gms_GMK_SWWALL_WORK.gearbase_pos), new AppMain.VecU16?(obj_work.dir), scale, ref disp_flag);
        }
    }