Пример #1
0
 public AppMain.NNS_OBJECT Assign(AppMain.NNS_OBJECT nnsObject)
 {
     if (this != nnsObject)
     {
         this.Center.Assign(nnsObject.Center);
         this.Radius           = nnsObject.Radius;
         this.nMaterial        = nnsObject.nMaterial;
         this.pMatPtrList      = nnsObject.pMatPtrList;
         this.nVtxList         = nnsObject.nVtxList;
         this.pVtxListPtrList  = nnsObject.pVtxListPtrList;
         this.nPrimList        = nnsObject.nPrimList;
         this.pPrimListPtrList = nnsObject.pPrimListPtrList;
         this.nNode            = nnsObject.nNode;
         this.MaxNodeDepth     = nnsObject.MaxNodeDepth;
         this.pNodeList        = nnsObject.pNodeList;
         this.nMtxPal          = nnsObject.nMtxPal;
         this.nSubobj          = nnsObject.nSubobj;
         this.pSubobjList      = nnsObject.pSubobjList;
         this.nTex             = nnsObject.nTex;
         this.fType            = nnsObject.fType;
         this.Version          = nnsObject.Version;
         this.BoundingBoxX     = nnsObject.BoundingBoxX;
         this.BoundingBoxY     = nnsObject.BoundingBoxY;
         this.BoundingBoxZ     = nnsObject.BoundingBoxZ;
     }
     return(this);
 }
Пример #2
0
 public void Clear()
 {
     this.ecb               = (AppMain.AMS_AME_ECB)null;
     this.texlist           = (AppMain.NNS_TEXLIST)null;
     this.texlistbuf        = (object)null;
     this.texlist_data_work = (AppMain.OBS_DATA_WORK)null;
     this._object           = (AppMain.NNS_OBJECT)null;
     this.object_data_work  = (AppMain.OBS_DATA_WORK)null;
     this.eff               = (object)null;
     this.eff_data_work     = (AppMain.OBS_DATA_WORK)null;
     this.ambtex            = (object)null;
     this.ambtex_data_work  = (AppMain.OBS_DATA_WORK)null;
     this.model             = (object)null;
     this.model_data_work   = (AppMain.OBS_DATA_WORK)null;
     this.flag              = 0U;
     this.command_state     = 0U;
     this.disp_rot.Clear();
     this.disp_ofst.Clear();
     this.dup_draw_ofst.Clear();
     this.user_dir_quat.Clear();
     this.user_attr       = 0;
     this.tex_reg_index   = 0;
     this.model_reg_index = 0;
     this.speed           = 0.0f;
 }
 // Token: 0x0600114B RID: 4427 RVA: 0x0009752C File Offset: 0x0009572C
 public static int amObjectRelease(AppMain.NNS_OBJECT _object)
 {
     return(AppMain.amDrawRegistCommand(4, new AppMain.AMS_PARAM_DELETE_VERTEX_OBJECT
     {
         obj = _object
     }));
 }
Пример #4
0
 private static AppMain.AMS_MOTION amMotionCreate(
     AppMain.NNS_OBJECT _object,
     int motion_num,
     int mmotion_num)
 {
     return(AppMain.amMotionCreate(_object, motion_num, mmotion_num, 0));
 }
Пример #5
0
    // Token: 0x06000536 RID: 1334 RVA: 0x0002BFC4 File Offset: 0x0002A1C4
    private static AppMain.GMS_ENEMY_3D_WORK gmGmkTarzanRopeLoadObj(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, int type)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = AppMain.gmGmkTarzanRopeLoadObjNoModel(eve_rec, pos_x, pos_y, type);
        OBS_OBJECT_WORK           obj_work          = gms_ENEMY_3D_WORK.ene_com.obj_work;
        int num;

        if (eve_rec.left >= 50)
        {
            num = 2;
        }
        else if (eve_rec.left >= 20)
        {
            num = 1;
        }
        else
        {
            num = 0;
        }
        int num2 = AppMain.g_gm_gmk_tarzan_rope_model_id[num];

        AppMain.ObjObjectCopyAction3dNNModel(obj_work, AppMain.g_gm_gmk_tarzan_rope_obj_3d_list[num2], gms_ENEMY_3D_WORK.obj_3d);
        AppMain.ObjObjectAction3dNNMotionLoad(obj_work, 0, false, AppMain.ObjDataGet(831), null, 0, null);
        obj_work.obj_3d.mtn_cb_func  = AppMain.gmGmkTarzanRopeMotionCallback;
        obj_work.obj_3d.mtn_cb_param = obj_work;
        AppMain.NNS_OBJECT @object = obj_work.obj_3d._object;
        float num3 = @object.pNodeList[0].Translation.y;

        num3 *= ( float )eve_rec.left / 30f;
        int             num4            = AppMain.FX_F32_TO_FX32(num3);
        OBS_OBJECT_WORK obs_OBJECT_WORK = obj_work;

        obs_OBJECT_WORK.pos.y = obs_OBJECT_WORK.pos.y - num4;
        return(gms_ENEMY_3D_WORK);
    }
Пример #6
0
    public static AppMain.AMS_MOTION amMotionCreate(
        AppMain.NNS_OBJECT _object,
        int motion_num,
        int mmotion_num,
        int flag)
    {
        motion_num  = motion_num + 3 & -4;
        mmotion_num = mmotion_num + 3 & -4;
        int nNode = _object.nNode;

        AppMain.AMS_MOTION amsMotion = new AppMain.AMS_MOTION();
        amsMotion.mtnbuf   = new AppMain.NNS_MOTION[motion_num];
        amsMotion.mmtn     = new AppMain.NNS_MOTION[mmotion_num];
        amsMotion.data     = AppMain.New <AppMain.NNS_TRS>((flag & 1) != 0 ? 4 * nNode : 2 * nNode);
        amsMotion._object  = _object;
        amsMotion.node_num = nNode;
        for (int index = 0; index < 4; ++index)
        {
            amsMotion.mtnfile[index].file       = (object)null;
            amsMotion.mtnfile[index].motion     = (AppMain.ArrayPointer <AppMain.NNS_MOTION>)(AppMain.NNS_MOTION[]) null;
            amsMotion.mtnfile[index].motion_num = 0;
        }
        amsMotion.motion_num = motion_num;
        for (int index = 0; index < motion_num; ++index)
        {
            amsMotion.mtnbuf[index] = (AppMain.NNS_MOTION)null;
        }
        AppMain.ArrayPointer <AppMain.AMS_MOTION_BUF> mbuf = (AppMain.ArrayPointer <AppMain.AMS_MOTION_BUF>)amsMotion.mbuf;
        int num = 0;

        while (num < 2)
        {
            ((AppMain.AMS_MOTION_BUF) ~mbuf).motion_id = 0;
            ((AppMain.AMS_MOTION_BUF) ~mbuf).frame     = 0.0f;
            if (num == 0)
            {
                ((AppMain.AMS_MOTION_BUF) ~mbuf).mbuf = new AppMain.ArrayPointer <AppMain.NNS_TRS>(amsMotion.data, nNode);
            }
            else if ((flag & 1) != 0)
            {
                ((AppMain.AMS_MOTION_BUF) ~mbuf).mbuf = (AppMain.ArrayPointer <AppMain.NNS_TRS>)(amsMotion.mbuf[0].mbuf + nNode);
                amsMotion.mmbuf = (AppMain.ArrayPointer <AppMain.NNS_TRS>)(amsMotion.mbuf[1].mbuf + nNode);
                AppMain.nnCalcTRSList(amsMotion.mbuf[1].mbuf.array, amsMotion.mbuf[1].mbuf.offset, _object);
            }
            else
            {
                ((AppMain.AMS_MOTION_BUF) ~mbuf).mbuf = (AppMain.ArrayPointer <AppMain.NNS_TRS>)(AppMain.NNS_TRS[]) null;
                amsMotion.mmbuf = (AppMain.ArrayPointer <AppMain.NNS_TRS>)(AppMain.NNS_TRS[]) null;
            }
            ++num;
            ++mbuf;
        }
        AppMain.nnCalcTRSList(amsMotion.mbuf[0].mbuf.array, amsMotion.mbuf[0].mbuf.offset, _object);
        AppMain.nnCalcTRSList(amsMotion.data, 0, _object);
        amsMotion.mmobject    = (AppMain.NNS_OBJECT)null;
        amsMotion.mmobj_size  = 0U;
        amsMotion.mmotion_num = mmotion_num;
        return(amsMotion);
    }
Пример #7
0
 public static void amEffectSetObject(
     AppMain.AMS_AME_ECB ecb,
     AppMain.NNS_OBJECT object_,
     int state)
 {
     ecb.pObj         = object_;
     ecb.drawObjState = (uint)state;
 }
Пример #8
0
    // Token: 0x06001A22 RID: 6690 RVA: 0x000EA3A4 File Offset: 0x000E85A4
    public static AppMain.AMS_MOTION amMotionCreate(AppMain.NNS_OBJECT _object, int motion_num, int mmotion_num, int flag)
    {
        motion_num  = (motion_num + 3 & -4);
        mmotion_num = (mmotion_num + 3 & -4);
        int nNode = _object.nNode;

        AppMain.AMS_MOTION ams_MOTION = new AppMain.AMS_MOTION();
        ams_MOTION.mtnbuf   = new AppMain.NNS_MOTION[motion_num];
        ams_MOTION.mmtn     = new AppMain.NNS_MOTION[mmotion_num];
        ams_MOTION.data     = AppMain.New <AppMain.NNS_TRS>(((flag & 1) != 0) ? (4 * nNode) : (2 * nNode));
        ams_MOTION._object  = _object;
        ams_MOTION.node_num = nNode;
        int i;

        for (i = 0; i < 4; i++)
        {
            ams_MOTION.mtnfile[i].file       = null;
            ams_MOTION.mtnfile[i].motion     = null;
            ams_MOTION.mtnfile[i].motion_num = 0;
        }
        ams_MOTION.motion_num = motion_num;
        for (i = 0; i < motion_num; i++)
        {
            ams_MOTION.mtnbuf[i] = null;
        }
        AppMain.ArrayPointer <AppMain.AMS_MOTION_BUF> pointer = ams_MOTION.mbuf;
        i = 0;
        while (i < 2)
        {
            (~pointer).motion_id = 0;
            (~pointer).frame     = 0f;
            if (i == 0)
            {
                (~pointer).mbuf = new AppMain.ArrayPointer <AppMain.NNS_TRS>(ams_MOTION.data, nNode);
            }
            else if ((flag & 1) != 0)
            {
                (~pointer).mbuf  = ams_MOTION.mbuf[0].mbuf + nNode;
                ams_MOTION.mmbuf = ams_MOTION.mbuf[1].mbuf + nNode;
                AppMain.nnCalcTRSList(ams_MOTION.mbuf[1].mbuf.array, ams_MOTION.mbuf[1].mbuf.offset, _object);
            }
            else
            {
                (~pointer).mbuf  = null;
                ams_MOTION.mmbuf = null;
            }
            i++;
            pointer = ++pointer;
        }
        AppMain.nnCalcTRSList(ams_MOTION.mbuf[0].mbuf.array, ams_MOTION.mbuf[0].mbuf.offset, _object);
        AppMain.nnCalcTRSList(ams_MOTION.data, 0, _object);
        ams_MOTION.mmobject    = null;
        ams_MOTION.mmobj_size  = 0U;
        ams_MOTION.mmotion_num = mmotion_num;
        return(ams_MOTION);
    }
Пример #9
0
 private static void GmBsCmnCreateCNMMgrWork(
     AppMain.GMS_BS_CMN_CNM_MGR_WORK cnm_mgr_work,
     AppMain.NNS_OBJECT _object,
     ushort reg_max)
 {
     AppMain.UNREFERENCED_PARAMETER((object)_object);
     cnm_mgr_work.reg_node_cnt   = (ushort)0;
     cnm_mgr_work.reg_node_max   = reg_max;
     cnm_mgr_work.node_info_list = AppMain.New <AppMain.GMS_BS_CMN_CNM_NODE_INFO>((int)reg_max);
 }
 // Token: 0x06001146 RID: 4422 RVA: 0x00097444 File Offset: 0x00095644
 public static int amObjectLoad(out AppMain.NNS_OBJECT _object, AppMain.NNS_OBJECT obj_file, uint drawflag)
 {
     AppMain.AMS_PARAM_VERTEX_BUFFER_OBJECT ams_PARAM_VERTEX_BUFFER_OBJECT = new AppMain.AMS_PARAM_VERTEX_BUFFER_OBJECT();
     _object = new AppMain.NNS_OBJECT();
     ams_PARAM_VERTEX_BUFFER_OBJECT.obj      = _object;
     ams_PARAM_VERTEX_BUFFER_OBJECT.srcobj   = obj_file;
     ams_PARAM_VERTEX_BUFFER_OBJECT.bindflag = 0U;
     ams_PARAM_VERTEX_BUFFER_OBJECT.drawflag = drawflag;
     return(AppMain.amDrawRegistCommand(3, ams_PARAM_VERTEX_BUFFER_OBJECT));
 }
Пример #11
0
 private static void gmBsCmnBossMotionCallbackFunc(
     AppMain.AMS_MOTION motion,
     AppMain.NNS_OBJECT _object,
     object mtn_cb_param)
 {
     for (AppMain.GMS_BS_CMN_BMCB_LINK next = ((AppMain.GMS_BS_CMN_BMCB_MGR)mtn_cb_param).bmcb_head.next; next != null && next.bmcb_func != null; next = next.next)
     {
         next.bmcb_func(motion, _object, next.bmcb_param);
     }
 }
 // Token: 0x060003F9 RID: 1017 RVA: 0x00020608 File Offset: 0x0001E808
 private static void gmEneHariMotionCallback(AppMain.AMS_MOTION motion, AppMain.NNS_OBJECT _object, object param)
 {
     AppMain.NNS_MATRIX        nns_MATRIX        = AppMain.gmEneHariMotionCallback_node_mtx;
     AppMain.NNS_MATRIX        nns_MATRIX2       = AppMain.gmEneHariMotionCallback_base_mtx;
     AppMain.GMS_ENE_HARI_WORK gms_ENE_HARI_WORK = (AppMain.GMS_ENE_HARI_WORK)((AppMain.OBS_OBJECT_WORK)param);
     AppMain.nnMakeUnitMatrix(nns_MATRIX2);
     AppMain.nnMultiplyMatrix(nns_MATRIX2, nns_MATRIX2, AppMain.amMatrixGetCurrent());
     AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, 7, motion.data, nns_MATRIX2);
     gms_ENE_HARI_WORK.jet_mtx.Assign(nns_MATRIX);
 }
Пример #13
0
 private static void GmBsCmnCreateSNMWork(
     AppMain.GMS_BS_CMN_SNM_WORK snm_work,
     AppMain.NNS_OBJECT _object,
     ushort reg_max)
 {
     AppMain.UNREFERENCED_PARAMETER((object)_object);
     AppMain.gmBsCmnInitBossMotionCBLink(snm_work.bmcb_link, new AppMain.MPP_VOID_MOTION_NSSOBJECT_OBJECT(AppMain.gmBsCmnMotionCallbackStoreNodeMatrix), (object)snm_work);
     snm_work.reg_node_cnt   = (ushort)0;
     snm_work.reg_node_max   = reg_max;
     snm_work.node_info_list = AppMain.New <AppMain.GMS_BS_CMN_SNM_NODE_INFO>((int)reg_max);
 }
Пример #14
0
 private static void nnCalcNodeStatusListMatrixPalette(
     uint[] nodestatlist,
     AppMain.NNS_MATRIX[] mtxpal,
     AppMain.NNS_OBJECT obj,
     uint flag)
 {
     AppMain.nnnodestatuslist.nnsMtxPal       = mtxpal;
     AppMain.nnnodestatuslist.nnsNodeStatList = nodestatlist;
     AppMain.nnnodestatuslist.nnsNodeList     = obj.pNodeList;
     AppMain.nnnodestatuslist.nnsNSFlag       = flag;
     AppMain.nnCalcNodeStatusListMatrixPaletteNode(0);
 }
 // Token: 0x06000534 RID: 1332 RVA: 0x0002BEF0 File Offset: 0x0002A0F0
 private static void gmGmkTarzanRopeMotionCallback(AppMain.AMS_MOTION motion, AppMain.NNS_OBJECT obj, object val)
 {
     AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)((AppMain.OBS_OBJECT_WORK)val);
     if (gms_ENEMY_3D_WORK.ene_com.target_obj == null)
     {
         return;
     }
     AppMain.NNS_MATRIX nns_MATRIX = new AppMain.NNS_MATRIX();
     AppMain.nnMakeUnitMatrix(nns_MATRIX);
     AppMain.nnMultiplyMatrix(nns_MATRIX, nns_MATRIX, AppMain.amMatrixGetCurrent());
     AppMain.nnCalcNodeMatrixTRSList(AppMain.g_gm_gmk_tarzan_rope_active_matrix, obj, 13, motion.data, nns_MATRIX);
 }
Пример #16
0
 private static void gmEneHariMotionCallback(
     AppMain.AMS_MOTION motion,
     AppMain.NNS_OBJECT _object,
     object param)
 {
     AppMain.NNS_MATRIX        motionCallbackNodeMtx = AppMain.gmEneHariMotionCallback_node_mtx;
     AppMain.NNS_MATRIX        motionCallbackBaseMtx = AppMain.gmEneHariMotionCallback_base_mtx;
     AppMain.GMS_ENE_HARI_WORK gmsEneHariWork        = (AppMain.GMS_ENE_HARI_WORK)(AppMain.OBS_OBJECT_WORK) param;
     AppMain.nnMakeUnitMatrix(motionCallbackBaseMtx);
     AppMain.nnMultiplyMatrix(motionCallbackBaseMtx, motionCallbackBaseMtx, AppMain.amMatrixGetCurrent());
     AppMain.nnCalcNodeMatrixTRSList(motionCallbackNodeMtx, _object, 7, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, motionCallbackBaseMtx);
     gmsEneHariWork.jet_mtx.Assign(motionCallbackNodeMtx);
 }
Пример #17
0
 public static int amObjectLoad(
     out AppMain.NNS_OBJECT _object,
     AppMain.NNS_OBJECT obj_file,
     uint drawflag)
 {
     AppMain.AMS_PARAM_VERTEX_BUFFER_OBJECT vertexBufferObject = new AppMain.AMS_PARAM_VERTEX_BUFFER_OBJECT();
     _object = new AppMain.NNS_OBJECT();
     vertexBufferObject.obj      = _object;
     vertexBufferObject.srcobj   = obj_file;
     vertexBufferObject.bindflag = 0U;
     vertexBufferObject.drawflag = drawflag;
     return(AppMain.amDrawRegistCommand(3, (object)vertexBufferObject));
 }
 public void Clear()
 {
     this._object       = (AppMain.NNS_OBJECT)null;
     this.mtx           = (AppMain.NNS_MATRIX)null;
     this.texlist       = (AppMain.NNS_TEXLIST)null;
     this.sub_obj_type  = 0U;
     this.flag          = 0U;
     this.material_func = (AppMain.NNS_MATERIALCALLBACK_FUNC)null;
     this.motion        = (AppMain.NNS_MOTION)null;
     this.frame         = 0.0f;
     this.trslist       = (AppMain.NNS_TRS[])null;
     this.mmotion       = (AppMain.NNS_MOTION)null;
     this.mframe        = 0.0f;
 }
Пример #19
0
    // Token: 0x06000677 RID: 1655 RVA: 0x00039E28 File Offset: 0x00038028
    public static void gmGmkTruckMotionCallback(AppMain.AMS_MOTION motion, AppMain.NNS_OBJECT _object, object param)
    {
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

        NNS_MATRIX nns_MATRIX2 = GlobalPool <NNS_MATRIX> .Alloc();

        AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)param;
        AppMain.nnMakeUnitMatrix(nns_MATRIX2);
        AppMain.nnMultiplyMatrix(nns_MATRIX2, nns_MATRIX2, AppMain.amMatrixGetCurrent());
        AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_F, motion.data, nns_MATRIX2);
        gms_GMK_TRUCK_WORK.tire_pos_f.Assign(nns_MATRIX);
        AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_B, motion.data, nns_MATRIX2);
        gms_GMK_TRUCK_WORK.tire_pos_b.Assign(nns_MATRIX);
        AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_LIGHT_POS, motion.data, nns_MATRIX2);
        gms_GMK_TRUCK_WORK.light_pos.Assign(nns_MATRIX);
    }
Пример #20
0
 private static void gmBsCmnMotionCallbackStoreNodeMatrix(
     AppMain.AMS_MOTION motion,
     AppMain.NNS_OBJECT _object,
     object mtn_cb_param)
 {
     AppMain.GMS_BS_CMN_SNM_WORK gmsBsCmnSnmWork   = (AppMain.GMS_BS_CMN_SNM_WORK)mtn_cb_param;
     AppMain.NNS_MATRIX          nodeMatrixBaseMtx = AppMain.gmBsCmnMotionCallbackStoreNodeMatrix_base_mtx;
     AppMain.nnMakeUnitMatrix(nodeMatrixBaseMtx);
     AppMain.nnMultiplyMatrix(nodeMatrixBaseMtx, nodeMatrixBaseMtx, AppMain.amMatrixGetCurrent());
     for (int index = 0; index < (int)gmsBsCmnSnmWork.reg_node_cnt; ++index)
     {
         int nodeIndex = gmsBsCmnSnmWork.node_info_list[index].node_index;
         AppMain.NNS_MATRIX nodeMatrixNodeMtx = AppMain.gmBsCmnMotionCallbackStoreNodeMatrix_node_mtx;
         AppMain.nnCalcNodeMatrixTRSList(nodeMatrixNodeMtx, _object, nodeIndex, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nodeMatrixBaseMtx);
         gmsBsCmnSnmWork.node_info_list[index].node_w_mtx.Assign(nodeMatrixNodeMtx);
     }
 }
    // Token: 0x06001148 RID: 4424 RVA: 0x000974D0 File Offset: 0x000956D0
    private static int amObjectLoad(out AppMain.NNS_OBJECT _object, AppMain.NNS_TEXFILELIST txbfilelist, out AppMain.NNS_TEXLIST texlist, out object texlistbuf, object buf, uint drawflag, string filepath, AMS_AMB_HEADER amb)
    {
        AppMain.NNS_OBJECT      obj_file;
        AppMain.NNS_TEXFILELIST nns_TEXFILELIST;
        AppMain.amObjectSetup(out obj_file, out nns_TEXFILELIST, buf);
        int nTex = txbfilelist.nTex;

        texlistbuf = null;
        AppMain.nnSetUpTexlist(out texlist, nTex, ref texlistbuf);
        int result = AppMain.amObjectLoad(out _object, obj_file, drawflag);

        if (filepath != null || amb != null)
        {
            result = AppMain.amTextureLoad(texlist, txbfilelist, filepath, amb);
        }
        return(result);
    }
    // Token: 0x06001145 RID: 4421 RVA: 0x000972F4 File Offset: 0x000954F4
    public static void amObjectSetup(out AppMain.NNS_OBJECT _object, out AppMain.NNS_TEXFILELIST texfilelist, object _buf)
    {
        _object     = null;
        texfilelist = null;
        AmbChunk ambChunk = (AmbChunk)_buf;

        using (MemoryStream memoryStream = new MemoryStream(ambChunk.array, ambChunk.offset, ambChunk.array.Length - ambChunk.offset))
        {
            BinaryReader binaryReader = new BinaryReader(memoryStream);
            AppMain.NNS_BINCNK_FILEHEADER nns_BINCNK_FILEHEADER = AppMain.NNS_BINCNK_FILEHEADER.Read(binaryReader);
            long num;
            binaryReader.BaseStream.Seek(num = (long)nns_BINCNK_FILEHEADER.OfsData, 0);
            AppMain.NNS_BINCNK_DATAHEADER nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader);
            long num2 = num;
            binaryReader.BaseStream.Seek((long)nns_BINCNK_FILEHEADER.OfsNOF0, 0);
            AppMain.NNS_BINCNK_NOF0HEADER.Read(binaryReader);
            int i = nns_BINCNK_FILEHEADER.nChunk;
            while (i > 0)
            {
                uint id = nns_BINCNK_DATAHEADER.Id;
                // NIOB/NZOB (little endian)
                if (id != 0x424F494E && id != 0x424F5A4E)
                {
                    if (id == 1145980238U)
                    {
                        break;
                    }
                    if (id == 1280592206U || id == 0x4C545A4e)
                    {
                        binaryReader.BaseStream.Seek(num2 + (long)nns_BINCNK_DATAHEADER.OfsMainData, 0);
                        texfilelist = AppMain.NNS_TEXFILELIST.Read(binaryReader, num2);
                    }
                }
                else
                {
                    binaryReader.BaseStream.Seek(num2 + (long)nns_BINCNK_DATAHEADER.OfsMainData, 0);
                    _object = AppMain.NNS_OBJECT.Read(binaryReader, num2);
                }
                i--;
                binaryReader.BaseStream.Seek(num += (long)(8 + nns_BINCNK_DATAHEADER.OfsNextId), 0);
                nns_BINCNK_DATAHEADER             = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader);
            }
        }
    }
Пример #23
0
 public void Clear()
 {
     this._object         = (AppMain.NNS_OBJECT)null;
     this.texlist         = (AppMain.NNS_TEXLIST)null;
     this.texlistbuf      = (object)null;
     this.motion          = (AppMain.AMS_MOTION)null;
     this.model           = (object)null;
     this.model_data_work = (AppMain.OBS_DATA_WORK)null;
     Array.Clear((Array)this.mtn, 0, this.mtn.Length);
     Array.Clear((Array)this.mtn_data_work, 0, this.mtn_data_work.Length);
     Array.Clear((Array)this.mat_mtn, 0, this.mat_mtn.Length);
     Array.Clear((Array)this.mat_mtn_data_work, 0, this.mat_mtn_data_work.Length);
     this.command_state = 0U;
     this.flag          = 0U;
     this.marge         = 0.0f;
     this.per           = 0.0f;
     Array.Clear((Array)this.act_id, 0, this.act_id.Length);
     Array.Clear((Array)this.frame, 0, this.frame.Length);
     Array.Clear((Array)this.speed, 0, this.speed.Length);
     this.mat_act_id = 0;
     this.mat_frame  = 0.0f;
     this.mat_speed  = 0.0f;
     this.user_obj_mtx.Clear();
     this.user_obj_mtx_r.Clear();
     this.blend_spd    = 0.0f;
     this.sub_obj_type = 0U;
     this.drawflag     = 0U;
     this.draw_state.Clear();
     this.use_light_flag    = 0U;
     this.user_func         = (AppMain.MPP_VOID_OBJECT_DELEGATE)null;
     this.user_param        = (object)null;
     this.mplt_cb_func      = (AppMain.MPP_VOID_ARRAYNNSMATRIX_NNSOBJECT_OBJECT)null;
     this.mplt_cb_param     = (object)null;
     this.mtn_cb_func       = (AppMain.mtn_cb_func_delegate)null;
     this.mtn_cb_param      = (object)null;
     this.material_cb_func  = (AppMain.MPP_BOOL_NNSDRAWCALLBACKVAL_OBJECT_DELEGATE)null;
     this.material_cb_param = (object)null;
     this.reg_index         = 0;
     for (int index = 0; index < 4; ++index)
     {
         this.mtn_load_setting[index].Clear();
         this.mat_mtn_load_setting[index].Clear();
     }
 }
Пример #24
0
 public override void Clear()
 {
     this.next      = (AppMain.AMS_AME_LIST)null;
     this.prev      = (AppMain.AMS_AME_LIST)null;
     this.attribute = 0;
     this.priority  = 0;
     this.translate.Clear();
     this.rotate.Clear();
     this.bounding.Clear();
     this.transparency = 0;
     this.size_rate    = 0.0f;
     this.pObj         = (AppMain.NNS_OBJECT)null;
     this.entry_head   = (AppMain.AMS_AME_ENTRY)null;
     this.entry_tail   = (AppMain.AMS_AME_ENTRY)null;
     this.entry_num    = 0;
     this.drawState    = 0U;
     this.drawObjState = 0U;
     this.skip_update  = 0;
 }
Пример #25
0
    public static void gmGmkTruckMotionCallback(
        AppMain.AMS_MOTION motion,
        AppMain.NNS_OBJECT _object,
        object param)
    {
        AppMain.NNS_MATRIX nnsMatrix1 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nnsMatrix2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.GMS_GMK_TRUCK_WORK gmsGmkTruckWork = (AppMain.GMS_GMK_TRUCK_WORK)param;
        AppMain.nnMakeUnitMatrix(nnsMatrix2);
        AppMain.nnMultiplyMatrix(nnsMatrix2, nnsMatrix2, AppMain.amMatrixGetCurrent());
        AppMain.nnCalcNodeMatrixTRSList(nnsMatrix1, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_F, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nnsMatrix2);
        gmsGmkTruckWork.tire_pos_f.Assign(nnsMatrix1);
        AppMain.nnCalcNodeMatrixTRSList(nnsMatrix1, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_B, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nnsMatrix2);
        gmsGmkTruckWork.tire_pos_b.Assign(nnsMatrix1);
        AppMain.nnCalcNodeMatrixTRSList(nnsMatrix1, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_LIGHT_POS, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nnsMatrix2);
        gmsGmkTruckWork.light_pos.Assign(nnsMatrix1);
    }
Пример #26
0
    // Token: 0x060015A9 RID: 5545 RVA: 0x000BD0A8 File Offset: 0x000BB2A8
    public static void gmEneStingMotionCallback(AppMain.AMS_MOTION motion, AppMain.NNS_OBJECT _object, object param)
    {
        AppMain.NNS_MATRIX nns_MATRIX = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.NNS_MATRIX nns_MATRIX2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

        AppMain.GMS_ENE_STING_WORK gms_ENE_STING_WORK = (AppMain.GMS_ENE_STING_WORK)param;
        AppMain.nnMakeUnitMatrix(nns_MATRIX2);
        AppMain.nnMultiplyMatrix(nns_MATRIX2, nns_MATRIX2, AppMain.amMatrixGetCurrent());
        AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_ENE_STING_NODE_ID_R_JET, motion.data, nns_MATRIX2);
        gms_ENE_STING_WORK.jet_r_mtx.Assign(nns_MATRIX);
        AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_ENE_STING_NODE_ID_L_JET, motion.data, nns_MATRIX2);
        gms_ENE_STING_WORK.jet_l_mtx.Assign(nns_MATRIX);
        AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_ENE_STING_NODE_ID_GUN, motion.data, nns_MATRIX2);
        gms_ENE_STING_WORK.gun_mtx.Assign(nns_MATRIX);
        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX);

        AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX2);
    }
Пример #27
0
    public static void amObjectSetup(
        out AppMain.NNS_OBJECT _object,
        out AppMain.NNS_TEXFILELIST texfilelist,
        object _buf)
    {
        _object     = (AppMain.NNS_OBJECT)null;
        texfilelist = (AppMain.NNS_TEXFILELIST)null;
        AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)_buf;
        using (MemoryStream memoryStream = new MemoryStream(ambChunk.array, ambChunk.offset, ambChunk.array.Length - ambChunk.offset))
        {
            BinaryReader reader = new BinaryReader((Stream)memoryStream);
            AppMain.NNS_BINCNK_FILEHEADER bincnkFileheader = AppMain.NNS_BINCNK_FILEHEADER.Read(reader);
            long ofsData;
            reader.BaseStream.Seek(ofsData = (long)bincnkFileheader.OfsData, SeekOrigin.Begin);
            AppMain.NNS_BINCNK_DATAHEADER bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader);
            long data0Pos = ofsData;
            reader.BaseStream.Seek((long)bincnkFileheader.OfsNOF0, SeekOrigin.Begin);
            AppMain.NNS_BINCNK_NOF0HEADER.Read(reader);
            int nChunk = bincnkFileheader.nChunk;
            while (nChunk > 0)
            {
                switch (bincnkDataheader.Id)
                {
                case 1112492366:
                    reader.BaseStream.Seek(data0Pos + (long)bincnkDataheader.OfsMainData, SeekOrigin.Begin);
                    _object = AppMain.NNS_OBJECT.Read(reader, data0Pos);
                    break;

                case 1145980238:
                    return;

                case 1280592206:
                    reader.BaseStream.Seek(data0Pos + (long)bincnkDataheader.OfsMainData, SeekOrigin.Begin);
                    texfilelist = AppMain.NNS_TEXFILELIST.Read(reader, data0Pos);
                    break;
                }
                --nChunk;
                reader.BaseStream.Seek(ofsData += (long)(8 + bincnkDataheader.OfsNextId), SeekOrigin.Begin);
                bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader);
            }
        }
    }
Пример #28
0
    private static int amObjectLoad(
        out AppMain.NNS_OBJECT _object,
        AppMain.NNS_TEXFILELIST txbfilelist,
        out AppMain.NNS_TEXLIST texlist,
        out object texlistbuf,
        object buf,
        uint drawflag,
        string filepath,
        AppMain.AMS_AMB_HEADER amb)
    {
        AppMain.NNS_OBJECT _object1;
        AppMain.amObjectSetup(out _object1, out AppMain.NNS_TEXFILELIST _, buf);
        int nTex = txbfilelist.nTex;

        texlistbuf = (object)null;
        AppMain.nnSetUpTexlist(out texlist, nTex, ref texlistbuf);
        int num = AppMain.amObjectLoad(out _object, _object1, drawflag);

        if (filepath != null || amb != null)
        {
            num = AppMain.amTextureLoad(texlist, txbfilelist, filepath, amb);
        }
        return(num);
    }
Пример #29
0
 // Token: 0x06001996 RID: 6550 RVA: 0x000E8374 File Offset: 0x000E6574
 private uint nnCheckObjectClipMotion(AppMain.NNS_OBJECT obj, AppMain.NNS_MOTION mot, float frame, NNS_MATRIX basemtx)
 {
     AppMain.mppAssertNotImpl();
     return(uint.MaxValue);
 }
Пример #30
0
 // Token: 0x06001994 RID: 6548 RVA: 0x000E8364 File Offset: 0x000E6564
 private uint nnCheckObjectClip(AppMain.NNS_OBJECT obj, NNS_MATRIX basemtx)
 {
     AppMain.mppAssertNotImpl();
     return(0U);
 }