예제 #1
0
 // Token: 0x06001A2F RID: 6703 RVA: 0x000EAB54 File Offset: 0x000E8D54
 public static void amMotionApply(AppMain.AMS_MOTION motion, float marge, float per)
 {
     AppMain.ArrayPointer <AppMain.NNS_TRS> arrayPointer = motion.mbuf[0].mbuf;
     if (per <= 0f)
     {
         return;
     }
     if (motion.mbuf[1].mbuf != null)
     {
         if (marge >= 1f)
         {
             arrayPointer = motion.mbuf[1].mbuf;
         }
         else if (marge > 0f)
         {
             if (per >= 1f)
             {
                 AppMain.nnLinkMotion(motion.data, motion.mbuf[0].mbuf, motion.mbuf[1].mbuf, motion.node_num, marge);
                 return;
             }
             arrayPointer = motion.mmbuf;
             AppMain.nnLinkMotion(arrayPointer, motion.mbuf[0].mbuf, motion.mbuf[1].mbuf, motion.node_num, marge);
         }
     }
     if (per >= 1f)
     {
         for (int i = 0; i < motion.node_num; i++)
         {
             motion.data[i].Assign(arrayPointer[i]);
         }
         return;
     }
     AppMain.nnLinkMotion(motion.data, motion.data, arrayPointer, motion.node_num, per);
 }
예제 #2
0
    public static void amMotionRegistFile(
        AppMain.AMS_MOTION motion,
        int file_id,
        AppMain.AMS_AMB_HEADER amb)
    {
        int num1 = 0;

        AppMain.AMS_MOTION_FILE amsMotionFile1            = motion.mtnfile[0];
        AppMain.ArrayPointer <AppMain.NNS_MOTION> motion1 = (AppMain.ArrayPointer <AppMain.NNS_MOTION>)(amsMotionFile1.motion + amsMotionFile1.motion_num);
        int index = num1 + 1;
        int num2  = 1;

        while (num2 < 4)
        {
            AppMain.ArrayPointer <AppMain.NNS_MOTION> arrayPointer = (AppMain.ArrayPointer <AppMain.NNS_MOTION>)(motion.mtnfile[index].motion + motion.mtnfile[index].motion_num);
            if (motion1 < arrayPointer)
            {
                motion1 = arrayPointer;
            }
            ++num2;
            ++index;
        }
        if (motion1 == (AppMain.ArrayPointer <AppMain.NNS_MOTION>)(AppMain.NNS_MOTION[]) null)
        {
            motion1 = new AppMain.ArrayPointer <AppMain.NNS_MOTION>(motion.mtnbuf, 0);
        }
        AppMain.AMS_MOTION_FILE amsMotionFile2 = motion.mtnfile[file_id];
        amsMotionFile2.file       = (object)amb;
        amsMotionFile2.motion     = motion1;
        amsMotionFile2.motion_num = AppMain.amMotionSetup(motion1, amb);
    }
예제 #3
0
    // Token: 0x06001A25 RID: 6693 RVA: 0x000EA644 File Offset: 0x000E8844
    public static void amMotionRegistFile(AppMain.AMS_MOTION motion, int file_id, object buf)
    {
        int num = 0;

        AppMain.AMS_MOTION_FILE ams_MOTION_FILE = motion.mtnfile[0];
        AppMain.ArrayPointer <AppMain.NNS_MOTION> arrayPointer = ams_MOTION_FILE.motion + ams_MOTION_FILE.motion_num;
        num++;
        int i = 1;

        while (i < 4)
        {
            AppMain.ArrayPointer <AppMain.NNS_MOTION> arrayPointer2 = motion.mtnfile[num].motion + motion.mtnfile[num].motion_num;
            if (arrayPointer < arrayPointer2)
            {
                arrayPointer = arrayPointer2;
            }
            i++;
            num++;
        }
        if (arrayPointer == null)
        {
            arrayPointer = new AppMain.ArrayPointer <AppMain.NNS_MOTION>(motion.mtnbuf, 0);
        }
        ams_MOTION_FILE        = motion.mtnfile[file_id];
        ams_MOTION_FILE.file   = buf;
        ams_MOTION_FILE.motion = arrayPointer;
        if (buf is AppMain.NNS_MOTION)
        {
            ams_MOTION_FILE.motion_num = 1;
            motion.mtnbuf[0]           = (AppMain.NNS_MOTION)buf;
            return;
        }
        ams_MOTION_FILE.motion_num = AppMain.amMotionSetup(arrayPointer, buf);
    }
예제 #4
0
 private void amMotionMaterialDraw(
     AppMain.AMS_MOTION motion,
     AppMain.NNS_TEXLIST texlist,
     uint drawflag)
 {
     this.amMotionMaterialDraw(motion, texlist, drawflag, (AppMain.NNS_MATERIALCALLBACK_FUNC)null);
 }
예제 #5
0
    // Token: 0x06001A24 RID: 6692 RVA: 0x000EA598 File Offset: 0x000E8798
    public static void amMotionRegistFile(AppMain.AMS_MOTION motion, int file_id, AppMain.AMS_AMB_HEADER amb)
    {
        int num = 0;

        AppMain.AMS_MOTION_FILE ams_MOTION_FILE = motion.mtnfile[0];
        AppMain.ArrayPointer <AppMain.NNS_MOTION> arrayPointer = ams_MOTION_FILE.motion + ams_MOTION_FILE.motion_num;
        num++;
        int i = 1;

        while (i < 4)
        {
            AppMain.ArrayPointer <AppMain.NNS_MOTION> arrayPointer2 = motion.mtnfile[num].motion + motion.mtnfile[num].motion_num;
            if (arrayPointer < arrayPointer2)
            {
                arrayPointer = arrayPointer2;
            }
            i++;
            num++;
        }
        if (arrayPointer == null)
        {
            arrayPointer = new AppMain.ArrayPointer <AppMain.NNS_MOTION>(motion.mtnbuf, 0);
        }
        ams_MOTION_FILE            = motion.mtnfile[file_id];
        ams_MOTION_FILE.file       = amb;
        ams_MOTION_FILE.motion     = arrayPointer;
        ams_MOTION_FILE.motion_num = AppMain.amMotionSetup(arrayPointer, amb);
    }
예제 #6
0
    // Token: 0x06001A3A RID: 6714 RVA: 0x000EAE04 File Offset: 0x000E9004
    private void amMotionDraw(uint state, AppMain.AMS_MOTION motion, AppMain.NNS_TEXLIST texlist, uint drawflag, AppMain.NNS_MATERIALCALLBACK_FUNC func)
    {
        int node_num = motion.node_num;

        AppMain.AMS_PARAM_DRAW_MOTION_TRS ams_PARAM_DRAW_MOTION_TRS = AppMain.amDrawAlloc_AMS_PARAM_DRAW_MOTION_TRS();
        AppMain.NNS_MATRIX nns_MATRIX = ams_PARAM_DRAW_MOTION_TRS.mtx = AppMain.amDrawAlloc_NNS_MATRIX();
        AppMain.nnCopyMatrix(nns_MATRIX, AppMain.amMatrixGetCurrent());
        ams_PARAM_DRAW_MOTION_TRS._object       = motion._object;
        ams_PARAM_DRAW_MOTION_TRS.mtx           = nns_MATRIX;
        ams_PARAM_DRAW_MOTION_TRS.sub_obj_type  = 0U;
        ams_PARAM_DRAW_MOTION_TRS.flag          = drawflag;
        ams_PARAM_DRAW_MOTION_TRS.texlist       = texlist;
        ams_PARAM_DRAW_MOTION_TRS.trslist       = new AppMain.NNS_TRS[node_num];
        ams_PARAM_DRAW_MOTION_TRS.material_func = func;
        for (int i = 0; i < node_num; i++)
        {
            ams_PARAM_DRAW_MOTION_TRS.trslist[i] = AppMain.amDrawAlloc_NNS_TRS();
            ams_PARAM_DRAW_MOTION_TRS.trslist[i].Assign(motion.data[i]);
        }
        int motion_id = motion.mbuf[0].motion_id;

        ams_PARAM_DRAW_MOTION_TRS.motion = motion.mtnfile[motion_id >> 16].motion[motion_id & 65535];
        ams_PARAM_DRAW_MOTION_TRS.frame  = motion.mbuf[0].frame;
        AppMain.amDrawRegistCommand(state, -11, ams_PARAM_DRAW_MOTION_TRS);
    }
예제 #7
0
    private void amMotionDraw(
        AppMain.AMS_MOTION motion,
        AppMain.NNS_TEXLIST texlist,
        uint drawflag,
        AppMain.NNS_MATERIALCALLBACK_FUNC func)
    {
        AppMain.AMS_PARAM_DRAW_MOTION_TRS paramDrawMotionTrs;
        AppMain.AMS_COMMAND_HEADER        command = new AppMain.AMS_COMMAND_HEADER()
        {
            param      = (object)(paramDrawMotionTrs = new AppMain.AMS_PARAM_DRAW_MOTION_TRS()),
            command_id = -11
        };
        command.param = (object)paramDrawMotionTrs;
        paramDrawMotionTrs._object       = motion._object;
        paramDrawMotionTrs.mtx           = (AppMain.NNS_MATRIX)null;
        paramDrawMotionTrs.sub_obj_type  = 0U;
        paramDrawMotionTrs.flag          = drawflag;
        paramDrawMotionTrs.texlist       = texlist;
        paramDrawMotionTrs.trslist       = motion.data;
        paramDrawMotionTrs.material_func = func;
        int motionId = motion.mbuf[0].motion_id;

        paramDrawMotionTrs.motion = motion.mtnfile[motionId >> 16].motion[motionId & (int)ushort.MaxValue];
        paramDrawMotionTrs.frame  = motion.mbuf[0].frame;
        AppMain._amDrawMotionTRS(command, drawflag);
    }
예제 #8
0
    // Token: 0x06001A43 RID: 6723 RVA: 0x000EB138 File Offset: 0x000E9338
    private void amMotionMaterialDraw(AppMain.AMS_MOTION motion, AppMain.NNS_TEXLIST texlist, uint drawflag, AppMain.NNS_MATERIALCALLBACK_FUNC func)
    {
        if (motion.mmobject == null)
        {
            this.amMotionDraw(motion, texlist, drawflag);
            return;
        }
        AppMain.AMS_COMMAND_HEADER        ams_COMMAND_HEADER        = new AppMain.AMS_COMMAND_HEADER();
        AppMain.AMS_PARAM_DRAW_MOTION_TRS ams_PARAM_DRAW_MOTION_TRS = (AppMain.AMS_PARAM_DRAW_MOTION_TRS)(ams_COMMAND_HEADER.param = new AppMain.AMS_PARAM_DRAW_MOTION_TRS());
        ams_COMMAND_HEADER.command_id           = -12;
        ams_COMMAND_HEADER.param                = ams_PARAM_DRAW_MOTION_TRS;
        ams_PARAM_DRAW_MOTION_TRS._object       = motion.mmobject;
        ams_PARAM_DRAW_MOTION_TRS.mtx           = null;
        ams_PARAM_DRAW_MOTION_TRS.sub_obj_type  = 0U;
        ams_PARAM_DRAW_MOTION_TRS.flag          = drawflag;
        ams_PARAM_DRAW_MOTION_TRS.texlist       = texlist;
        ams_PARAM_DRAW_MOTION_TRS.trslist       = motion.data;
        ams_PARAM_DRAW_MOTION_TRS.material_func = func;
        ams_PARAM_DRAW_MOTION_TRS.mmotion       = null;
        ams_PARAM_DRAW_MOTION_TRS.mframe        = 0f;
        int motion_id = motion.mbuf[0].motion_id;

        if (motion.mtnfile[motion_id >> 16].file != null)
        {
            ams_PARAM_DRAW_MOTION_TRS.motion = motion.mtnfile[motion_id >> 16].motion[motion_id & 65535];
            ams_PARAM_DRAW_MOTION_TRS.frame  = motion.mbuf[0].frame;
        }
        else
        {
            ams_PARAM_DRAW_MOTION_TRS.motion = null;
            ams_PARAM_DRAW_MOTION_TRS.frame  = 0f;
        }
        AppMain._amDrawMotionTRS(ams_COMMAND_HEADER, drawflag);
    }
예제 #9
0
 private void amMotionMaterialDraw(
     uint state,
     AppMain.AMS_MOTION motion,
     AppMain.NNS_TEXLIST texlist)
 {
     this.amMotionMaterialDraw(state, motion, texlist, 0U, (AppMain.NNS_MATERIALCALLBACK_FUNC)null);
 }
예제 #10
0
    private void amMotionDraw(
        uint state,
        AppMain.AMS_MOTION motion,
        AppMain.NNS_TEXLIST texlist,
        uint drawflag,
        AppMain.NNS_MATERIALCALLBACK_FUNC func)
    {
        int nodeNum = motion.node_num;

        AppMain.AMS_PARAM_DRAW_MOTION_TRS paramDrawMotionTrs = AppMain.amDrawAlloc_AMS_PARAM_DRAW_MOTION_TRS();
        AppMain.NNS_MATRIX dst = paramDrawMotionTrs.mtx = AppMain.amDrawAlloc_NNS_MATRIX();
        AppMain.nnCopyMatrix(dst, AppMain.amMatrixGetCurrent());
        paramDrawMotionTrs._object       = motion._object;
        paramDrawMotionTrs.mtx           = dst;
        paramDrawMotionTrs.sub_obj_type  = 0U;
        paramDrawMotionTrs.flag          = drawflag;
        paramDrawMotionTrs.texlist       = texlist;
        paramDrawMotionTrs.trslist       = new AppMain.NNS_TRS[nodeNum];
        paramDrawMotionTrs.material_func = func;
        for (int index = 0; index < nodeNum; ++index)
        {
            paramDrawMotionTrs.trslist[index] = AppMain.amDrawAlloc_NNS_TRS();
            paramDrawMotionTrs.trslist[index].Assign(motion.data[index]);
        }
        int motionId = motion.mbuf[0].motion_id;

        paramDrawMotionTrs.motion = motion.mtnfile[motionId >> 16].motion[motionId & (int)ushort.MaxValue];
        paramDrawMotionTrs.frame  = motion.mbuf[0].frame;
        AppMain.amDrawRegistCommand(state, -11, (object)paramDrawMotionTrs);
    }
예제 #11
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);
    }
예제 #12
0
 // Token: 0x06001A37 RID: 6711 RVA: 0x000EADB8 File Offset: 0x000E8FB8
 public static void amMotionMaterialCalc(AppMain.AMS_MOTION motion)
 {
     if (!AppMain.amThreadCheckDraw())
     {
         return;
     }
     AppMain.nnCalcMaterialMotion(motion.mmobject, motion._object, motion.mmtn[motion.mmotion_id], motion.mmotion_frame);
 }
예제 #13
0
 // Token: 0x06001A34 RID: 6708 RVA: 0x000EAD20 File Offset: 0x000E8F20
 private static void amMotionMaterialRegistFile(AppMain.AMS_MOTION motion, int file_id, object file)
 {
     motion.mmtn[file_id] = (AppMain.NNS_MOTION)file;
     motion.mmotion_id    = file_id;
     motion.mmotion_frame = 0f;
     motion.mmobj_size    = 0U;
     motion.mmobject      = new AppMain.NNS_OBJECT();
     AppMain.nnInitMaterialMotionObject(motion.mmobject, motion._object, motion.mmtn[motion.mmotion_id]);
 }
예제 #14
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);
    }
예제 #15
0
 private void amMotionMaterialGetFrames(
     AppMain.AMS_MOTION motion,
     int motion_id,
     out float start,
     out float end)
 {
     AppMain.NNS_MOTION nnsMotion = motion.mmtn[motion.mmotion_id];
     start = nnsMotion.StartFrame;
     end   = nnsMotion.EndFrame;
 }
예제 #16
0
 private void amMotionGetFrames(
     AppMain.AMS_MOTION motion,
     int motion_id,
     out float start,
     out float end)
 {
     AppMain.NNS_MOTION nnsMotion = motion.mtnfile[motion_id >> 16].motion[motion_id & (int)ushort.MaxValue];
     start = nnsMotion.StartFrame;
     end   = nnsMotion.EndFrame;
 }
 // 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);
 }
예제 #18
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: 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);
 }
예제 #20
0
    private static void dwaterUpdate(
        float speed,
        float pos_x,
        float pos_y,
        float dy,
        int rot_z,
        float scale)
    {
        float num1 = 0.006666667f;

        AppMain._dmap_water.speed_surface += 0.0005f;
        if ((double)AppMain._dmap_water.speed_surface > 1.0)
        {
            --AppMain._dmap_water.speed_surface;
        }
        AppMain._dmap_water.pos_x  = pos_x;
        AppMain._dmap_water.pos_y  = pos_y;
        AppMain._dmap_water.pos_dy = dy;
        AppMain._dmap_water.rot_z  = rot_z;
        AppMain._dmap_water.scale  = scale;
        float f1   = AppMain._dmap_water.ofst_u + AppMain._dmap_water.speed_u * speed;
        float num2 = (double)f1 < 0.0 ? (float)(1.0 - (-(double)f1 - (double)AppMain.floorf(-f1))) : f1 - AppMain.floorf(f1);

        AppMain._dmap_water.ofst_u = num2;
        float f2   = AppMain._dmap_water.ofst_v + AppMain._dmap_water.speed_v * speed;
        float num3 = (double)f2 < 0.0 ? (float)(1.0 - (-(double)f2 - (double)AppMain.floorf(-f2))) : f2 - AppMain.floorf(f2);

        AppMain._dmap_water.ofst_v = num3;
        float num4 = (float)((double)num1 * (double)AppMain._dmap_water.repeat_u / 1.14999997615814);
        float f3   = AppMain._dmap_water.ofst_u + pos_x * num4;
        float num5 = (double)f3 < 0.0 ? (float)(1.0 - (-(double)f3 - (double)AppMain.floorf(-f3))) : f3 - AppMain.floorf(f3);

        AppMain._dmap_water.draw_u = num5;
        AppMain._dmap_water.draw_v = AppMain._dmap_water.ofst_v;
        AppMain.ArrayPointer <AppMain.DMAP_WATER_OBJ> arrayPointer = new AppMain.ArrayPointer <AppMain.DMAP_WATER_OBJ>(AppMain._dmap_water._object);
        int num6 = 0;

        while (num6 < 2)
        {
            AppMain.AMS_MOTION motion = ((AppMain.DMAP_WATER_OBJ) ~arrayPointer).motion;
            float num7       = ((AppMain.DMAP_WATER_OBJ) ~arrayPointer).frame + speed;
            float startFrame = AppMain.amMotionMaterialGetStartFrame(motion, 0);
            float endFrame   = AppMain.amMotionMaterialGetEndFrame(motion, 0);
            while ((double)num7 >= (double)endFrame)
            {
                num7 = startFrame + (num7 - endFrame);
            }
            ((AppMain.DMAP_WATER_OBJ) ~arrayPointer).frame = num7;
            ++num6;
            ++arrayPointer;
        }
    }
예제 #21
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);
 }
예제 #22
0
    // Token: 0x06001A33 RID: 6707 RVA: 0x000EACA4 File Offset: 0x000E8EA4
    public static void amMotionMaterialRegistFile(AppMain.AMS_MOTION motion, int file_id, AppMain.AMS_AMB_HEADER amb)
    {
        int file_num = amb.file_num;

        for (int i = 0; i < file_num; i++)
        {
            motion.mmtn[file_id + i] = (AppMain.NNS_MOTION)amb.buf[i];
        }
        motion.mmotion_id    = file_id;
        motion.mmotion_frame = 0f;
        motion.mmobj_size    = 0U;
        motion.mmobject      = new AppMain.NNS_OBJECT();
        AppMain.nnInitMaterialMotionObject(motion.mmobject, motion._object, motion.mmtn[motion.mmotion_id]);
    }
예제 #23
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);
    }
예제 #24
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);
     }
 }
예제 #25
0
    // Token: 0x06001A2C RID: 6700 RVA: 0x000EAA84 File Offset: 0x000E8C84
    public static void amMotionCalc(AppMain.AMS_MOTION motion, int mbuf_id)
    {
        int i = 0;

        while (i < 2)
        {
            if ((mbuf_id & 1) != 0 && !(motion.mbuf[i].mbuf == null))
            {
                int num  = motion.mbuf[i].motion_id;
                int num2 = num >> 16;
                num &= 65535;
                AppMain.nnCalcTRSListMotion(motion.mbuf[i].mbuf.array, motion.mbuf[i].mbuf.offset, motion._object, motion.mtnfile[num2].motion[num], motion.mbuf[i].frame);
            }
            i++;
            mbuf_id >>= 1;
        }
    }
예제 #26
0
    public static void amMotionCalc(AppMain.AMS_MOTION motion, int mbuf_id)
    {
        int index1 = 0;

        while (index1 < 2)
        {
            if ((mbuf_id & 1) != 0 && !(motion.mbuf[index1].mbuf == (AppMain.ArrayPointer <AppMain.NNS_TRS>)(AppMain.NNS_TRS[]) null))
            {
                int motionId = motion.mbuf[index1].motion_id;
                int index2   = motionId >> 16;
                int index3   = motionId & (int)ushort.MaxValue;
                AppMain.nnCalcTRSListMotion(motion.mbuf[index1].mbuf.array, motion.mbuf[index1].mbuf.offset, motion._object, motion.mtnfile[index2].motion[index3], motion.mbuf[index1].frame);
            }
            ++index1;
            mbuf_id >>= 1;
        }
    }
예제 #27
0
    private void amMotionMaterialDraw(
        uint state,
        AppMain.AMS_MOTION motion,
        AppMain.NNS_TEXLIST texlist,
        uint drawflag,
        AppMain.NNS_MATERIALCALLBACK_FUNC func)
    {
        if (motion.mmobject == null)
        {
            this.amMotionDraw(state, motion, texlist, drawflag);
        }
        else
        {
            int nodeNum = motion.node_num;
            AppMain.AMS_PARAM_DRAW_MOTION_TRS paramDrawMotionTrs = new AppMain.AMS_PARAM_DRAW_MOTION_TRS();
            AppMain.NNS_MATRIX dst = paramDrawMotionTrs.mtx = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc();

            AppMain.nnCopyMatrix(dst, AppMain.amMatrixGetCurrent());
            paramDrawMotionTrs.mtx           = dst;
            paramDrawMotionTrs.sub_obj_type  = 0U;
            paramDrawMotionTrs.flag          = drawflag;
            paramDrawMotionTrs.texlist       = texlist;
            paramDrawMotionTrs.trslist       = new AppMain.NNS_TRS[nodeNum];
            paramDrawMotionTrs.material_func = func;
            for (int index = 0; index < nodeNum; ++index)
            {
                paramDrawMotionTrs.trslist[index] = new AppMain.NNS_TRS(motion.data[index]);
            }
            paramDrawMotionTrs._object = motion._object;
            paramDrawMotionTrs.mmotion = motion.mmtn[motion.mmotion_id];
            paramDrawMotionTrs.mframe  = motion.mmotion_frame;
            int motionId = motion.mbuf[0].motion_id;
            if (motion.mtnfile[motionId >> 16].file != null)
            {
                paramDrawMotionTrs.motion = motion.mtnfile[motionId >> 16].motion[motionId & (int)ushort.MaxValue];
                paramDrawMotionTrs.frame  = motion.mbuf[0].frame;
            }
            else
            {
                paramDrawMotionTrs.motion = (AppMain.NNS_MOTION)null;
                paramDrawMotionTrs.frame  = 0.0f;
            }
            AppMain.amDrawRegistCommand(state, -12, (object)paramDrawMotionTrs);
        }
    }
예제 #28
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();
     }
 }
예제 #29
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);
    }
예제 #30
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);
    }