public NNS_MATERIAL_GLES11_DESC(AppMain.NNS_MATERIAL_GLES11_DESC desc)
 {
     this.fFlag    = desc.fFlag;
     this.User     = desc.User;
     this.pColor   = desc.pColor;
     this.pLogic   = desc.pLogic;
     this.nTex     = desc.nTex;
     this.pTexDesc = desc.pTexDesc;
 }
 public AppMain.NNS_MATERIAL_GLES11_DESC Assign(AppMain.NNS_MATERIAL_GLES11_DESC desc)
 {
     this.fFlag    = desc.fFlag;
     this.User     = desc.User;
     this.pColor   = desc.pColor;
     this.pLogic   = desc.pLogic;
     this.nTex     = desc.nTex;
     this.pTexDesc = desc.pTexDesc;
     return(this);
 }
        public static AppMain.NNS_MATERIAL_GLES11_DESC Read(
            BinaryReader reader,
            long data0Pos,
            out bool transparentMaterial)
        {
            transparentMaterial = false;
            AppMain.NNS_MATERIAL_GLES11_DESC materialGleS11Desc = new AppMain.NNS_MATERIAL_GLES11_DESC();
            materialGleS11Desc.fFlag = reader.ReadUInt32();
            materialGleS11Desc.User  = reader.ReadUInt32();
            uint num1 = reader.ReadUInt32();

            if (num1 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)num1, SeekOrigin.Begin);
                materialGleS11Desc.pColor = AppMain.NNS_MATERIAL_STDSHADER_COLOR.Read(reader);
                reader.BaseStream.Seek(position, SeekOrigin.Begin);
                transparentMaterial = 1.0 != (double)materialGleS11Desc.pColor.Diffuse.a;
            }
            uint num2 = reader.ReadUInt32();

            if (num2 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)num2, SeekOrigin.Begin);
                materialGleS11Desc.pLogic = AppMain.NNS_MATERIAL_GLES11_LOGIC.Read(reader);
                reader.BaseStream.Seek(position, SeekOrigin.Begin);
            }
            materialGleS11Desc.nTex = reader.ReadInt32();
            uint num3 = reader.ReadUInt32();

            if (num3 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)num3, SeekOrigin.Begin);
                materialGleS11Desc.pTexDesc = new AppMain.NNS_MATERIAL_GLES11_TEXMAP_DESC[materialGleS11Desc.nTex];
                for (int index = 0; index < materialGleS11Desc.nTex; ++index)
                {
                    materialGleS11Desc.pTexDesc[index] = AppMain.NNS_MATERIAL_GLES11_TEXMAP_DESC.Read(reader, data0Pos);
                }
                reader.BaseStream.Seek(position, SeekOrigin.Begin);
            }
            return(materialGleS11Desc);
        }
        // Token: 0x06001ED4 RID: 7892 RVA: 0x0013C4CC File Offset: 0x0013A6CC
        public static AppMain.NNS_MATERIAL_GLES11_DESC Read(BinaryReader reader, long data0Pos, out bool transparentMaterial)
        {
            transparentMaterial = false;
            AppMain.NNS_MATERIAL_GLES11_DESC nns_MATERIAL_GLES11_DESC = new AppMain.NNS_MATERIAL_GLES11_DESC();
            nns_MATERIAL_GLES11_DESC.fFlag = reader.ReadUInt32();
            nns_MATERIAL_GLES11_DESC.User  = reader.ReadUInt32();
            uint num = reader.ReadUInt32();

            if (num != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + ( long )(( ulong )num), 0);
                nns_MATERIAL_GLES11_DESC.pColor = AppMain.NNS_MATERIAL_STDSHADER_COLOR.Read(reader);
                reader.BaseStream.Seek(position, 0);
                transparentMaterial = (1f != nns_MATERIAL_GLES11_DESC.pColor.Diffuse.a);
            }
            uint num2 = reader.ReadUInt32();

            if (num2 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + ( long )(( ulong )num2), 0);
                nns_MATERIAL_GLES11_DESC.pLogic = AppMain.NNS_MATERIAL_GLES11_LOGIC.Read(reader);
                reader.BaseStream.Seek(position, 0);
            }
            nns_MATERIAL_GLES11_DESC.nTex = reader.ReadInt32();
            uint num3 = reader.ReadUInt32();

            if (num3 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + ( long )(( ulong )num3), 0);
                nns_MATERIAL_GLES11_DESC.pTexDesc = new AppMain.NNS_MATERIAL_GLES11_TEXMAP_DESC[nns_MATERIAL_GLES11_DESC.nTex];
                for (int i = 0; i < nns_MATERIAL_GLES11_DESC.nTex; i++)
                {
                    nns_MATERIAL_GLES11_DESC.pTexDesc[i] = AppMain.NNS_MATERIAL_GLES11_TEXMAP_DESC.Read(reader, data0Pos);
                }
                reader.BaseStream.Seek(position, 0);
            }
            return(nns_MATERIAL_GLES11_DESC);
        }
    // Token: 0x06000FBE RID: 4030 RVA: 0x0008922C File Offset: 0x0008742C
    private static AppMain.OBS_OBJECT_WORK GmGmkSpringInit(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_ENEMY_3D_WORK(), "GMK_SPRING");
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
        int num;

        if (eve_rec.id <= 79)
        {
            num = ( int )(eve_rec.id - 70);
        }
        else
        {
            num = ( int )(eve_rec.id - 70 + 1 - 21);
        }
        if (eve_rec.id == 71 || eve_rec.id == 73 || eve_rec.id == 75 || eve_rec.id == 77)
        {
            if (eve_rec.id == 71 || eve_rec.id == 75)
            {
                AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_spring_obj_3d_list[1], gms_ENEMY_3D_WORK.obj_3d);
            }
            else
            {
                AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_spring_obj_3d_list[2], gms_ENEMY_3D_WORK.obj_3d);
            }
            AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, false, AppMain.ObjDataGet(793), null, 0, null);
            obs_OBJECT_WORK.user_timer = 2;
            obs_OBJECT_WORK.user_work  = 3U;
        }
        else
        {
            AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_spring_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d);
            AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, false, AppMain.ObjDataGet(793), null, 0, null);
            obs_OBJECT_WORK.user_timer = 0;
            obs_OBJECT_WORK.user_work  = 1U;
        }
        if (eve_rec.id == 78 || eve_rec.id == 79)
        {
            obs_OBJECT_WORK.pos.z = -655360;
        }
        else
        {
            obs_OBJECT_WORK.pos.z = -131072;
        }
        gms_ENEMY_3D_WORK.ene_com.rect_work[0].flag &= 4294967291U;
        gms_ENEMY_3D_WORK.ene_com.rect_work[1].flag &= 4294967291U;
        AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[0];
        obs_RECT_WORK.ppDef = new AppMain.OBS_RECT_WORK_Delegate1(AppMain.gmGmkSpringDefFunc);
        obs_RECT_WORK.ppHit = null;
        AppMain.ObjRectAtkSet(obs_RECT_WORK, 0, 0);
        AppMain.ObjRectDefSet(obs_RECT_WORK, 65534, 0);
        AppMain.ObjRectWorkSet(obs_RECT_WORK, AppMain.gm_gmk_spring_rect[num][0], AppMain.gm_gmk_spring_rect[num][1], AppMain.gm_gmk_spring_rect[num][2], AppMain.gm_gmk_spring_rect[num][3]);
        obs_RECT_WORK.flag |= 1024U;
        obs_RECT_WORK       = gms_ENEMY_3D_WORK.ene_com.rect_work[2];
        AppMain.ObjRectWorkSet(obs_RECT_WORK, AppMain.gm_gmk_spring_rect[num][0], AppMain.gm_gmk_spring_rect[num][1], AppMain.gm_gmk_spring_rect[num][2], AppMain.gm_gmk_spring_rect[num][3]);
        obs_RECT_WORK.flag        &= 4294967291U;
        obs_OBJECT_WORK.move_flag |= 8448U;
        obs_OBJECT_WORK.disp_flag |= 4194304U;
        obs_OBJECT_WORK.dir.z      = AppMain.gm_gmk_spring_dir[num];
        if ((eve_rec.flag & 16) != 0)
        {
            if (eve_rec.width >= 64)
            {
                eve_rec.width = 0;
            }
            if (!AppMain.GmGmkSwitchIsOn(( uint )eve_rec.width))
            {
                AppMain.gmGmkSpringSwitchOffInit(obs_OBJECT_WORK);
            }
            else
            {
                AppMain.gmGmkSpringFwInit(obs_OBJECT_WORK);
            }
        }
        else
        {
            AppMain.gmGmkSpringFwInit(obs_OBJECT_WORK);
        }
        if (AppMain.GsGetMainSysInfo().stage_id == 14)
        {
            obs_OBJECT_WORK.obj_3d.use_light_flag  = 0U;
            obs_OBJECT_WORK.obj_3d.use_light_flag |= 64U;
        }
        else
        {
            int nMaterial = obs_OBJECT_WORK.obj_3d._object.nMaterial;
            if (nMaterial == 1)
            {
                AppMain.NNS_MATERIAL_GLES11_DESC nns_MATERIAL_GLES11_DESC = (AppMain.NNS_MATERIAL_GLES11_DESC)obs_OBJECT_WORK.obj_3d._object.pMatPtrList[0].pMaterial;
                nns_MATERIAL_GLES11_DESC.fFlag |= 3U;
            }
            else
            {
                AppMain.NNS_MATERIAL_GLES11_DESC[] array = (AppMain.NNS_MATERIAL_GLES11_DESC[])obs_OBJECT_WORK.obj_3d._object.pMatPtrList[0].pMaterial;
                for (int i = 0; i < nMaterial; i++)
                {
                    array[i].fFlag |= 3U;
                }
            }
        }
        obs_OBJECT_WORK.flag |= 1073741824U;
        return(obs_OBJECT_WORK);
    }
Beispiel #6
0
        // Token: 0x06001ED4 RID: 7892 RVA: 0x0013C4CC File Offset: 0x0013A6CC
        public static AppMain.NNS_MATERIAL_GLES11_DESC Read(BinaryReader reader, long data0Pos,
                                                            out bool transparentMaterial)
        {
            transparentMaterial = false;
            AppMain.NNS_MATERIAL_GLES11_DESC nns_MATERIAL_GLES11_DESC = new AppMain.NNS_MATERIAL_GLES11_DESC();
            nns_MATERIAL_GLES11_DESC.fFlag = reader.ReadUInt32();
            nns_MATERIAL_GLES11_DESC.User  = reader.ReadUInt32();
            uint num = reader.ReadUInt32();

            if (num != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)((ulong)num), 0);
                nns_MATERIAL_GLES11_DESC.pColor = AppMain.NNS_MATERIAL_STDSHADER_COLOR.Read(reader);
                reader.BaseStream.Seek(position, 0);
                transparentMaterial = (1f != nns_MATERIAL_GLES11_DESC.pColor.Diffuse.a);
            }

            uint num2 = reader.ReadUInt32();

            if (num2 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)((ulong)num2), 0);
                nns_MATERIAL_GLES11_DESC.pLogic = AppMain.NNS_MATERIAL_GLES11_LOGIC.Read(reader);
                reader.BaseStream.Seek(position, 0);
            }

            nns_MATERIAL_GLES11_DESC.nTex = reader.ReadInt32();
            uint num3 = reader.ReadUInt32();

            if (num3 != 0U)
            {
                long position = reader.BaseStream.Position;
                reader.BaseStream.Seek(data0Pos + (long)((ulong)num3), 0);
                nns_MATERIAL_GLES11_DESC.pTexDesc =
                    new AppMain.NNS_MATERIAL_GLES11_TEXMAP_DESC[nns_MATERIAL_GLES11_DESC.nTex];
                for (int i = 0; i < nns_MATERIAL_GLES11_DESC.nTex; i++)
                {
                    try
                    {
                        nns_MATERIAL_GLES11_DESC.pTexDesc[i] =
                            AppMain.NNS_MATERIAL_GLES11_TEXMAP_DESC.Read(reader, data0Pos);
                    }
                    catch (Exception e)
                    {
                        nns_MATERIAL_GLES11_DESC.pTexDesc[i] = new NNS_MATERIAL_GLES11_TEXMAP_DESC()
                        {
                            EnvMode = 8448,
                            LODBias = 0,
                            Offset  = new NNS_TEXCOORD()
                            {
                                u = 0, v = 0
                            },
                            Scale   = new NNS_TEXCOORD(1, 1),
                            fType   = 1073742080,
                            WrapS   = 104797,
                            WrapT   = 104787,
                            iTexIdx = i
                        };
                    }
                }

                reader.BaseStream.Seek(position, 0);
            }

            return(nns_MATERIAL_GLES11_DESC);
        }