示例#1
0
    // Token: 0x06000783 RID: 1923 RVA: 0x000425D8 File Offset: 0x000407D8
    private static bool gmGmkBoss3RouteSetMoveParam(OBS_OBJECT_WORK target_obj_work, OBS_OBJECT_WORK gimmick_obj_work)
    {
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)gimmick_obj_work;
        GMS_PLAYER_WORK           gms_PLAYER_WORK   = AppMain.g_gm_main_system.ply_work[(int)((UIntPtr)0)];
        float num = (float)gms_ENEMY_3D_WORK.ene_com.eve_rec.width / 10f;

        if (gms_PLAYER_WORK.obj_work.pos.y >= target_obj_work.pos.y && (gms_ENEMY_3D_WORK.ene_com.eve_rec.flag & 1) != 0 && AppMain.ObjViewOutCheck(target_obj_work.pos.x, target_obj_work.pos.y, 96, 0, 0, 0, 0) != 0)
        {
            target_obj_work.spd.x = 0;
            target_obj_work.spd.y = 0;
            return(false);
        }
        int        x          = gimmick_obj_work.pos.x + (int)(gms_ENEMY_3D_WORK.ene_com.eve_rec.left * 64) * 4096;
        int        x2         = gimmick_obj_work.pos.y + (int)(gms_ENEMY_3D_WORK.ene_com.eve_rec.top * 64) * 4096;
        float      num2       = AppMain.FX_FX32_TO_F32(x);
        float      num3       = AppMain.FX_FX32_TO_F32(x2);
        float      num4       = AppMain.FX_FX32_TO_F32(target_obj_work.pos.x);
        float      num5       = AppMain.FX_FX32_TO_F32(target_obj_work.pos.y);
        float      num6       = num2 - num4;
        float      num7       = num3 - num5;
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        AppMain.amVectorSet(nns_VECTOR, num6, num7, 0f);
        float num8 = 1f / AppMain.nnLengthVector(nns_VECTOR);
        float x3   = num6 * num8 * num;
        float x4   = num7 * num8 * num;

        target_obj_work.spd.x = AppMain.FX_F32_TO_FX32(x3);
        target_obj_work.spd.y = AppMain.FX_F32_TO_FX32(x4);
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

        return(true);
    }
    // Token: 0x06000A4B RID: 2635 RVA: 0x0005C214 File Offset: 0x0005A414
    private static AppMain.AMS_TCB amTaskMake(AppMain.AMS_TASK taskp, AppMain.TaskProc proc, AppMain.TaskProc dest, uint prio, uint user, uint attr, string name, uint stall, int group, uint run)
    {
        AppMain.AMS_TCB ams_TCB = GlobalPool <AppMain.AMS_TCB> .Alloc();

        ams_TCB.name = name;
        AppMain.AMS_TCB_FOOTER ams_TCB_FOOTER = AppMain.amTaskGetTcbFooter(ams_TCB);
        ams_TCB_FOOTER.cpu_cnt     = 0U;
        ams_TCB_FOOTER.cpu_cnt_max = 0U;
        ams_TCB.priority           = prio;
        ams_TCB.priority           = prio;
        ams_TCB.user_id            = user;
        ams_TCB.attribute          = attr;
        AppMain.amTaskSetProcedure(ams_TCB, proc);
        AppMain.amTaskSetDestructor(ams_TCB, dest);
        AppMain.AMS_TCB next = taskp.tcb_head.next;
        while (next != taskp.tcb_tail && next.priority <= prio)
        {
            next = next.next;
        }
        next.prev.next = ams_TCB;
        ams_TCB.prev   = next.prev;
        next.prev      = ams_TCB;
        ams_TCB.next   = next;
        return(ams_TCB);
    }
示例#3
0
    // Token: 0x060008D1 RID: 2257 RVA: 0x000500A4 File Offset: 0x0004E2A4
    public static void GmGmkNeedleSetLight()
    {
        NNS_RGBA   nns_RGBA   = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        if (AppMain.g_gs_main_sys_info.stage_id == 14)
        {
            nns_VECTOR.x = -0.1f;
            nns_VECTOR.y = -0.09f;
            nns_VECTOR.z = -0.93f;
        }
        else
        {
            nns_VECTOR.x = -1f;
            nns_VECTOR.y = -1f;
            nns_VECTOR.z = -1f;
        }
        nns_RGBA.r = 1f;
        nns_RGBA.g = 1f;
        nns_RGBA.b = 1f;
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        float intensity;

        if (AppMain.g_gs_main_sys_info.stage_id == 14)
        {
            intensity = 0.8f;
        }
        else
        {
            intensity = 1f;
        }
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_2, ref nns_RGBA, intensity, nns_VECTOR);
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);
    }
示例#4
0
    // Token: 0x06000F5D RID: 3933 RVA: 0x0008803C File Offset: 0x0008623C
    public void amQuatVectorToQuat(ref NNS_QUATERNION pQuat, NNS_VECTOR4D pV1, NNS_VECTOR4D pV2)
    {
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        NNS_VECTOR nns_VECTOR2 = GlobalPool <NNS_VECTOR> .Alloc();

        NNS_VECTOR nns_VECTOR3 = GlobalPool <NNS_VECTOR> .Alloc();

        NNS_VECTOR nns_VECTOR4 = GlobalPool <NNS_VECTOR> .Alloc();

        AppMain.VEC3_COPY(nns_VECTOR, pV1);
        AppMain.VEC3_COPY(nns_VECTOR2, pV2);
        AppMain.nnAddVector(nns_VECTOR4, nns_VECTOR, nns_VECTOR2);
        float num = AppMain.nnDotProductVector(nns_VECTOR4, nns_VECTOR4);

        num = ( float )(1.0 / Math.Sqrt(( double )num));
        AppMain.nnScaleVector(nns_VECTOR2, nns_VECTOR4, num);
        AppMain.nnCrossProductVector(nns_VECTOR3, nns_VECTOR, nns_VECTOR2);
        AppMain.VEC3_COPY(pQuat, nns_VECTOR3);
        pQuat.w = AppMain.nnDotProductVector(nns_VECTOR, nns_VECTOR2);
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR2);

        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR3);

        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR4);
    }
示例#5
0
    // Token: 0x06000707 RID: 1799 RVA: 0x0003E9C4 File Offset: 0x0003CBC4
    private static void GmBoss4UtilRotateVecFx32(ref AppMain.VecFx32 f, int angle)
    {
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

        nns_MATRIX.M00 = 1f;
        nns_MATRIX.M10 = 0f;
        nns_MATRIX.M20 = 0f;
        nns_MATRIX.M30 = 0f;
        nns_MATRIX.M01 = 0f;
        nns_MATRIX.M11 = 1f;
        nns_MATRIX.M21 = 0f;
        nns_MATRIX.M31 = 0f;
        nns_MATRIX.M02 = 0f;
        nns_MATRIX.M12 = 0f;
        nns_MATRIX.M22 = 1f;
        nns_MATRIX.M32 = 0f;
        nns_MATRIX.M03 = 0f;
        nns_MATRIX.M13 = 0f;
        nns_MATRIX.M23 = 0f;
        nns_MATRIX.M33 = 1f;
        AppMain.nnMakeRotateZMatrix(nns_MATRIX, angle);
        AppMain.nnTranslateMatrix(nns_MATRIX, nns_MATRIX, AppMain.FX_FX32_TO_F32(f.x), AppMain.FX_FX32_TO_F32(f.y), AppMain.FX_FX32_TO_F32(f.z));
        f.x = AppMain.FX_F32_TO_FX32(nns_MATRIX.M03);
        f.y = AppMain.FX_F32_TO_FX32(nns_MATRIX.M13);
        f.z = AppMain.FX_F32_TO_FX32(nns_MATRIX.M23);
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);
    }
示例#6
0
    // Token: 0x060018E8 RID: 6376 RVA: 0x000E2E04 File Offset: 0x000E1004
    private static void aoWinSysMakeCommandA(uint state, AppMain.NNS_TEXLIST texlist, uint tex_id, float x, float y, float w, float h, float z)
    {
        AppMain.AMS_PARAM_DRAW_PRIMITIVE ams_PARAM_DRAW_PRIMITIVE = GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Alloc();

        ams_PARAM_DRAW_PRIMITIVE.mtx      = null;
        ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = null;
        ams_PARAM_DRAW_PRIMITIVE.format3D = 4;
        ams_PARAM_DRAW_PRIMITIVE.type     = 1;
        ams_PARAM_DRAW_PRIMITIVE.count    = 8;
        ams_PARAM_DRAW_PRIMITIVE.texlist  = texlist;
        ams_PARAM_DRAW_PRIMITIVE.texId    = ( int )tex_id;
        ams_PARAM_DRAW_PRIMITIVE.ablend   = 1;
        ams_PARAM_DRAW_PRIMITIVE.sortZ    = z;
        ams_PARAM_DRAW_PRIMITIVE.aTest    = 0;
        ams_PARAM_DRAW_PRIMITIVE.zMask    = 1;
        ams_PARAM_DRAW_PRIMITIVE.zTest    = 0;
        ams_PARAM_DRAW_PRIMITIVE.noSort   = 1;
        ams_PARAM_DRAW_PRIMITIVE.uwrap    = 1;
        ams_PARAM_DRAW_PRIMITIVE.vwrap    = 1;
        AppMain.NNS_PRIM3D_PCT_ARRAY nns_PRIM3D_PCT_ARRAY = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(8);
        AppMain.aoWinSysMakeVertex00A(nns_PRIM3D_PCT_ARRAY, x, y, w, h);
        ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = nns_PRIM3D_PCT_ARRAY;
        AppMain.amDrawPrimitive3D(state, ams_PARAM_DRAW_PRIMITIVE);
        nns_PRIM3D_PCT_ARRAY = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(8);
        AppMain.aoWinSysMakeVertex01A(nns_PRIM3D_PCT_ARRAY, x, y, w, h);
        ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = nns_PRIM3D_PCT_ARRAY;
        AppMain.amDrawPrimitive3D(state, ams_PARAM_DRAW_PRIMITIVE);
        nns_PRIM3D_PCT_ARRAY = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(8);
        AppMain.aoWinSysMakeVertex02A(nns_PRIM3D_PCT_ARRAY, x, y, w, h);
        ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = nns_PRIM3D_PCT_ARRAY;
        AppMain.amDrawPrimitive3D(state, ams_PARAM_DRAW_PRIMITIVE);
        GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Release(ams_PARAM_DRAW_PRIMITIVE);
    }
示例#7
0
    // Token: 0x06000F64 RID: 3940 RVA: 0x0008825C File Offset: 0x0008645C
    public static void amQuatMultiVector(NNS_VECTOR4D pDst, NNS_VECTOR4D pSrc, ref NNS_QUATERNION pQuat, NNS_VECTOR4D pVec)
    {
        NNS_QUATERNION nns_QUATERNION  = default(NNS_QUATERNION);
        NNS_QUATERNION nns_QUATERNION2 = default(NNS_QUATERNION);
        NNS_QUATERNION nns_QUATERNION3 = default(NNS_QUATERNION);
        NNS_QUATERNION nns_QUATERNION4 = default(NNS_QUATERNION);

        AppMain.VEC4_COPY(ref nns_QUATERNION4, pSrc);
        nns_QUATERNION2.x = -pQuat.x;
        nns_QUATERNION2.y = -pQuat.y;
        nns_QUATERNION2.z = -pQuat.z;
        nns_QUATERNION2.w = pQuat.w;
        AppMain.nnMultiplyQuaternion(ref nns_QUATERNION3, ref pQuat, ref nns_QUATERNION4);
        AppMain.nnMultiplyQuaternion(ref nns_QUATERNION, ref nns_QUATERNION3, ref nns_QUATERNION2);
        if (pVec == null)
        {
            AppMain.VEC4_COPY(pDst, ref nns_QUATERNION);
            return;
        }
        NNS_VECTOR4D nns_VECTOR4D = GlobalPool <NNS_VECTOR4D> .Alloc();

        NNS_VECTOR4D nns_VECTOR4D2 = GlobalPool <NNS_VECTOR4D> .Alloc();

        AppMain.VEC4_COPY(nns_VECTOR4D, ref nns_QUATERNION);
        AppMain.VEC4_COPY(nns_VECTOR4D2, pVec);
        AppMain.amVectorAdd(pDst, nns_VECTOR4D, nns_VECTOR4D2);
        GlobalPool <NNS_VECTOR4D> .Release(nns_VECTOR4D);

        GlobalPool <NNS_VECTOR4D> .Release(nns_VECTOR4D2);
    }
示例#8
0
    // Token: 0x06001E8D RID: 7821 RVA: 0x0013AA2C File Offset: 0x00138C2C
    public static NNS_VECTOR Read(BinaryReader reader)
    {
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        nns_VECTOR.x = reader.ReadSingle();
        nns_VECTOR.y = reader.ReadSingle();
        nns_VECTOR.z = reader.ReadSingle();
        return(nns_VECTOR);
    }
示例#9
0
    // Token: 0x0600118B RID: 4491 RVA: 0x00099C14 File Offset: 0x00097E14
    private static void gmWaterSurfaceUserFuncMatrixPush(object param)
    {
        AppMain.amMatrixPush();
        NNS_MATRIX mtx        = AppMain.amMatrixGetCurrent();
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

        AppMain.nnMultiplyMatrix(nns_MATRIX, AppMain.amDrawGetWorldViewMatrix(), mtx);
        AppMain.nnSetPrimitive3DMatrix(nns_MATRIX);
    }
示例#10
0
    // Token: 0x06000D7D RID: 3453 RVA: 0x00076148 File Offset: 0x00074348
    private static void GmSplStageSetLight()
    {
        NNS_RGBA   nns_RGBA   = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        nns_VECTOR.x = -0.4f;
        nns_VECTOR.y = -0.4f;
        nns_VECTOR.z = -1f;
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_1, ref nns_RGBA, 1f, nns_VECTOR);
    }
示例#11
0
        // Token: 0x060022FB RID: 8955 RVA: 0x00147B24 File Offset: 0x00145D24
        public NNS_MATRIX getInvert()
        {
            if (this.invert == null)
            {
                NNS_MATRIX src = this.get();
                this.invert = GlobalPool <NNS_MATRIX> .Alloc();

                AppMain.nnInvertMatrix(this.invert, src);
            }
            return(this.invert);
        }
示例#12
0
    // Token: 0x060005E3 RID: 1507 RVA: 0x00034600 File Offset: 0x00032800
    private static void gmBoss4EggMain(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_BOSS4_BODY_WORK gms_BOSS4_BODY_WORK = (AppMain.GMS_BOSS4_BODY_WORK)obj_work.parent_obj;
        AppMain.GMS_BOSS4_EGG_WORK  gms_BOSS4_EGG_WORK  = (AppMain.GMS_BOSS4_EGG_WORK)obj_work;
        OBS_OBJECT_WORK             obs_OBJECT_WORK     = (OBS_OBJECT_WORK)gms_BOSS4_BODY_WORK;
        NNS_MATRIX nns_MATRIX  = AppMain.GmBoss4UtilGetNodeMatrix(gms_BOSS4_BODY_WORK.node_work, 2);
        NNS_MATRIX nns_MATRIX2 = AppMain.GmBoss4UtilGetNodeMatrix(gms_BOSS4_BODY_WORK.node_work, 2);
        NNS_MATRIX nns_MATRIX3 = GlobalPool <NNS_MATRIX> .Alloc();

        AppMain.nnCopyMatrix(nns_MATRIX3, nns_MATRIX);
        nns_MATRIX3.M03 = nns_MATRIX.M03 - nns_MATRIX2.M03 + ( float )obs_OBJECT_WORK.pos.x / 4096f;
        AppMain.GmBoss4UtilSetMatrixNN(obj_work, nns_MATRIX3);
        AppMain.GmBoss4UtilUpdateTurnGently(gms_BOSS4_EGG_WORK.dir_work);
        AppMain.GmBoss4UtilUpdateDirection(gms_BOSS4_EGG_WORK.dir_work, obj_work);
        if (gms_BOSS4_EGG_WORK.proc_update != null)
        {
            gms_BOSS4_EGG_WORK.proc_update(gms_BOSS4_EGG_WORK);
        }
        if ((gms_BOSS4_BODY_WORK.flag[0] & 8388608U) != 0U)
        {
            gms_BOSS4_BODY_WORK.flag[0] &= 4286578687U;
            AppMain.gmBoss4EggProcEscapeInit(gms_BOSS4_EGG_WORK);
        }
        if ((gms_BOSS4_BODY_WORK.flag[0] & 2097152U) != 0U)
        {
            gms_BOSS4_BODY_WORK.flag[0] &= 4292870143U;
            AppMain.gmBoss4EggProcThrowInit(gms_BOSS4_EGG_WORK);
        }
        if ((gms_BOSS4_BODY_WORK.flag[0] & 4194304U) != 0U)
        {
            gms_BOSS4_BODY_WORK.flag[0] &= 4290772991U;
            AppMain.gmBoss4EggProcThrowLeftInit(gms_BOSS4_EGG_WORK);
        }
        if ((gms_BOSS4_BODY_WORK.flag[0] & 536870912U) != 0U)
        {
            gms_BOSS4_BODY_WORK.flag[0] &= 3758096383U;
            AppMain.gmBoss4EggProcDamageInit(gms_BOSS4_EGG_WORK);
        }
        if ((gms_BOSS4_BODY_WORK.flag[0] & 16777216U) != 0U)
        {
            gms_BOSS4_BODY_WORK.flag[0] &= 4278190079U;
            AppMain.gmBoss4SetPartTextureBurnt(obj_work);
        }
        if ((AppMain.GMM_BS_OBJ(gms_BOSS4_BODY_WORK).disp_flag & 16U) != 0U)
        {
            obj_work.disp_flag |= 16U;
        }
        else
        {
            obj_work.disp_flag &= 4294967279U;
        }
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX3);
    }
示例#13
0
    // Token: 0x06000791 RID: 1937 RVA: 0x00043198 File Offset: 0x00041398
    public static void gmEneTStarAttackInit(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_T_STAR_WORK gms_ENE_T_STAR_WORK = (AppMain.GMS_ENE_T_STAR_WORK)obj_work;
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

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

        AppMain.nnMakeUnitMatrix(nns_MATRIX);
        AppMain.nnMakeUnitMatrix(nns_MATRIX2);
        AppMain.nnMakeRotateZMatrix(nns_MATRIX2, AkMath.DEGtoA32(72));
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        for (int i = 0; i < 5; i++)
        {
            OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GmEventMgrLocalEventBirth(308, obj_work.pos.x, obj_work.pos.y, 0, 0, 0, 0, 0, 0);
            obs_OBJECT_WORK.parent_obj = obj_work;
            obs_OBJECT_WORK.dir.y      = 49152;
            obs_OBJECT_WORK.dir.z      = ( ushort )AkMath.DEGtoA16(-72 * i);
            nns_VECTOR.x          = nns_MATRIX.M01;
            nns_VECTOR.y          = nns_MATRIX.M11;
            nns_VECTOR.z          = 0f;
            obs_OBJECT_WORK.spd.x = AppMain.FX_F32_TO_FX32(nns_VECTOR.x * 4f);
            obs_OBJECT_WORK.spd.y = -AppMain.FX_F32_TO_FX32(nns_VECTOR.y * 4f);
            OBS_OBJECT_WORK obs_OBJECT_WORK2 = obs_OBJECT_WORK;
            obs_OBJECT_WORK2.pos.x = obs_OBJECT_WORK2.pos.x + AppMain.FX_F32_TO_FX32(nns_VECTOR.x * 10f);
            OBS_OBJECT_WORK obs_OBJECT_WORK3 = obs_OBJECT_WORK;
            obs_OBJECT_WORK3.pos.y = obs_OBJECT_WORK3.pos.y + -AppMain.FX_F32_TO_FX32(nns_VECTOR.y * 10f);
            AppMain.nnMultiplyMatrix(nns_MATRIX, nns_MATRIX, nns_MATRIX2);
            AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
            gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 32768U;
            AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctEneEsCreate(obs_OBJECT_WORK, 10);
            gms_EFFECT_3DES_WORK.efct_com.obj_work.dir.z = ( ushort )AkMath.DEGtoA16(-72 * i);
        }
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

        obj_work.disp_flag       |= 32U;
        obj_work.disp_flag       |= 4U;
        obj_work.ppFunc           = AppMain.gmEneTStarAttackMain;
        obj_work.move_flag       &= 4294967291U;
        obj_work.spd.x            = 0;
        obj_work.spd.y            = 0;
        gms_ENE_T_STAR_WORK.timer = 300;
        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK2 = (AppMain.GMS_ENEMY_3D_WORK)obj_work;
        gms_ENEMY_3D_WORK2.ene_com.rect_work[1].flag &= 4294967291U;
        gms_ENEMY_3D_WORK2.ene_com.rect_work[0].flag &= 4294967291U;
        gms_ENEMY_3D_WORK2.ene_com.rect_work[2].flag &= 4294967291U;
        GmSound.PlaySE("Boss2_03");
        gms_ENEMY_3D_WORK2.ene_com.enemy_flag |= 65536U;
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);

        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX2);
    }
示例#14
0
    // Token: 0x060006EE RID: 1774 RVA: 0x0003DE2C File Offset: 0x0003C02C
    private static void GmBoss4UtilSetMatrixES(OBS_OBJECT_WORK obj_work, NNS_MATRIX w_mtx)
    {
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

        AppMain.MTM_ASSERT(obj_work);
        AppMain.MTM_ASSERT(obj_work.obj_3des);
        obj_work.pos.x          = AppMain.FX_F32_TO_FX32(w_mtx.M03);
        obj_work.pos.y          = -AppMain.FX_F32_TO_FX32(w_mtx.M13);
        obj_work.pos.z          = AppMain.FX_F32_TO_FX32(w_mtx.M23);
        obj_work.obj_3des.flag |= 32U;
        AkMath.NormalizeMtx(nns_MATRIX, w_mtx);
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);
    }
示例#15
0
    // Token: 0x06000D88 RID: 3464 RVA: 0x00076598 File Offset: 0x00074798
    private static void gmSplStageLightCtrl(AppMain.GMS_SPL_STG_WORK tcb_work)
    {
        NNS_RGBA   nns_RGBA   = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        AppMain.UNREFERENCED_PARAMETER(tcb_work);
        nns_VECTOR = AppMain.gmSplStageLightRot(-1f, -1f, -1f);
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_0, ref nns_RGBA, 1f, nns_VECTOR);
        nns_VECTOR = AppMain.gmSplStageLightRot(-0.4f, -0.4f, -1f);
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_1, ref nns_RGBA, 1f, nns_VECTOR);
    }
示例#16
0
    // Token: 0x06000D89 RID: 3465 RVA: 0x00076630 File Offset: 0x00074830
    private static NNS_VECTOR gmSplStageLightRot(float pos_x, float pos_y, float pos_z)
    {
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        float num  = pos_x * AppMain.nnSin((int)(-(int)AppMain.g_gm_main_system.pseudofall_dir));
        float num2 = pos_x * AppMain.nnCos((int)(-(int)AppMain.g_gm_main_system.pseudofall_dir));
        float num3 = pos_y * AppMain.nnSin((int)(-(int)AppMain.g_gm_main_system.pseudofall_dir));
        float num4 = pos_y * AppMain.nnCos((int)(-(int)AppMain.g_gm_main_system.pseudofall_dir));

        nns_VECTOR.x = num2 - num3;
        nns_VECTOR.y = num + num4;
        nns_VECTOR.z = pos_z;
        return(nns_VECTOR);
    }
        // Token: 0x060024CF RID: 9423 RVA: 0x0014B31C File Offset: 0x0014951C
        public GMS_EFFECT_CREATE_PARAM(int ame_idx, uint pos_type, uint init_flag, NNS_VECTOR disp_ofst,
                                       NNS_ROTATE_A16 disp_rot, float scale, AppMain.MPP_VOID_OBS_OBJECT_WORK main_func, int model_idx)
        {
            this.ame_idx   = ame_idx;
            this.pos_type  = pos_type;
            this.init_flag = init_flag;
            this.disp_ofst = GlobalPool <NNS_VECTOR> .Alloc();

            this.disp_ofst.Assign(disp_ofst);
            this.disp_rot  = disp_rot;
            this.scale     = scale;
            this.main_func = main_func;
            this.model_idx = model_idx;
        }
示例#18
0
    // Token: 0x06000E6A RID: 3690 RVA: 0x00080FB4 File Offset: 0x0007F1B4
    public static void gmBoss5TurretGetDispRotatedOfstPos(AppMain.GMS_BOSS5_TURRET_WORK trt_work, ref AppMain.VecFx32 src_ofst_pos, out AppMain.VecFx32 dest_ofst_pos)
    {
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

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

        AppMain.amVectorSet(nns_VECTOR, AppMain.FX_FX32_TO_F32(src_ofst_pos.x), AppMain.FX_FX32_TO_F32(-src_ofst_pos.y), AppMain.FX_FX32_TO_F32(src_ofst_pos.z));
        AppMain.nnMakeQuaternionMatrix(nns_MATRIX, ref trt_work.disp_quat);
        AppMain.nnTransformVector(nns_VECTOR, nns_MATRIX, nns_VECTOR);
        dest_ofst_pos = new AppMain.VecFx32(AppMain.FX_F32_TO_FX32(nns_VECTOR.x), AppMain.FX_F32_TO_FX32(-nns_VECTOR.y), AppMain.FX_F32_TO_FX32(nns_VECTOR.z));
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);
    }
示例#19
0
    // Token: 0x0600066B RID: 1643 RVA: 0x00038BA8 File Offset: 0x00036DA8
    public static OBS_OBJECT_WORK GmGmkTruckInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type)
    {
        OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_GMK_TRUCK_WORK(), "GMK_TRUCK");

        AppMain.GMS_ENEMY_3D_WORK  gms_ENEMY_3D_WORK  = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
        AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obs_OBJECT_WORK;
        AppMain.mtTaskChangeTcbDestructor(obs_OBJECT_WORK.tcb, AppMain.gmGmkTruckDest);
        AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_truck_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d);
        AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, true, AppMain.ObjDataGet(930), null, 0, null);
        AppMain.ObjDrawObjectActionSet(obs_OBJECT_WORK, 0);
        AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_truck_obj_3d_list[1], gms_GMK_TRUCK_WORK.obj_3d_tire);
        gms_ENEMY_3D_WORK.obj_3d.mtn_cb_func  = AppMain.gmGmkTruckMotionCallback;
        gms_ENEMY_3D_WORK.obj_3d.mtn_cb_param = gms_GMK_TRUCK_WORK;
        obs_OBJECT_WORK.ppOut            = AppMain.gmGmkTruckDispFunc;
        obs_OBJECT_WORK.flag            |= 1U;
        obs_OBJECT_WORK.move_flag       |= 128U;
        obs_OBJECT_WORK.disp_flag       |= 16777220U;
        obs_OBJECT_WORK.disp_flag       |= 16U;
        obs_OBJECT_WORK.obj_3d.blend_spd = 0.125f;
        gms_GMK_TRUCK_WORK.trans_r.x     = 0f;
        gms_GMK_TRUCK_WORK.trans_r.y     = 0f;
        gms_GMK_TRUCK_WORK.trans_r.z     = 4f / AppMain.FXM_FX32_TO_FLOAT(AppMain.g_obj.draw_scale.x);
        AppMain.nnMakeUnitMatrix(gms_ENEMY_3D_WORK.obj_3d.user_obj_mtx_r);
        AppMain.nnTranslateMatrix(gms_ENEMY_3D_WORK.obj_3d.user_obj_mtx_r, gms_ENEMY_3D_WORK.obj_3d.user_obj_mtx_r, gms_GMK_TRUCK_WORK.trans_r.x, gms_GMK_TRUCK_WORK.trans_r.y, gms_GMK_TRUCK_WORK.trans_r.z);
        AppMain.ObjObjectFieldRectSet(obs_OBJECT_WORK, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_LEFT, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_TOP, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_RIGHT, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_BOTTOM);
        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[2];
        obs_RECT_WORK.ppDef = AppMain.gmGmkTruckBodyDefFunc;
        obs_RECT_WORK.ppHit = null;
        AppMain.ObjRectAtkSet(obs_RECT_WORK, 0, 0);
        AppMain.ObjRectWorkSet(obs_RECT_WORK, -64, -64, 64, 64);
        NNS_RGBA   nns_RGBA   = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        nns_VECTOR.x = -0.85f;
        nns_VECTOR.y = -0.45f;
        nns_VECTOR.z = -3.05f;
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_1, ref nns_RGBA, 1f, nns_VECTOR);
        gms_ENEMY_3D_WORK.obj_3d.use_light_flag       &= 4294967294U;
        gms_GMK_TRUCK_WORK.obj_3d_tire.use_light_flag &= 4294967294U;
        gms_ENEMY_3D_WORK.obj_3d.use_light_flag       |= 2U;
        gms_GMK_TRUCK_WORK.obj_3d_tire.use_light_flag |= 2U;
        AppMain.gmGmkTruckCreateLightEfct(gms_GMK_TRUCK_WORK);
        gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 65536U;
        obs_OBJECT_WORK.obj_3d.command_state  = 16U;
        return(obs_OBJECT_WORK);
    }
示例#20
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);
    }
示例#21
0
    // Token: 0x06000012 RID: 18 RVA: 0x000020E8 File Offset: 0x000002E8
    private static int ObjBlockCollisionDet(int lPosX, int lPosY, ushort usFlag, ushort usVec, ushort[] pDir, uint[] pAttr)
    {
        AppMain.OBS_COL_CHK_DATA obs_COL_CHK_DATA = GlobalPool <AppMain.OBS_COL_CHK_DATA> .Alloc();

        obs_COL_CHK_DATA.pos_x = lPosX;
        obs_COL_CHK_DATA.pos_y = lPosY;
        obs_COL_CHK_DATA.dir   = pDir;
        obs_COL_CHK_DATA.attr  = pAttr;
        obs_COL_CHK_DATA.flag  = usFlag;
        obs_COL_CHK_DATA.vec   = usVec;
        int result = AppMain.ObjBlockCollision(obs_COL_CHK_DATA);

        GlobalPool <AppMain.OBS_COL_CHK_DATA> .Release(obs_COL_CHK_DATA);

        return(result);
    }
示例#22
0
    // Token: 0x06000DFD RID: 3581 RVA: 0x0007B3B8 File Offset: 0x000795B8
    private static void gmEneUnidesNeedleWaitMain(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK  = (AppMain.GMS_ENE_UNIDES_WORK)obj_work;
        AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK2 = (AppMain.GMS_ENE_UNIDES_WORK)obj_work.parent_obj;
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

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

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

        int   num   = gms_ENE_UNIDES_WORK2.rot_y;
        int   rot_x = gms_ENE_UNIDES_WORK2.rot_x;
        int   rot_z = gms_ENE_UNIDES_WORK2.rot_z;
        float len   = gms_ENE_UNIDES_WORK2.len;

        num += AkMath.DEGtoA32(360) / 4 * gms_ENE_UNIDES_WORK.num;
        num %= AkMath.DEGtoA32(360);
        AppMain.nnMakeRotateXMatrix(nns_MATRIX, rot_x);
        AppMain.nnRotateZMatrix(nns_MATRIX, nns_MATRIX, rot_z);
        AppMain.nnRotateYMatrix(nns_MATRIX, nns_MATRIX, num);
        AppMain.nnMakeTranslateMatrix(nns_MATRIX2, len, 0f, 0f);
        AppMain.nnMultiplyMatrix(nns_MATRIX3, nns_MATRIX, nns_MATRIX2);
        SNNS_VECTOR snns_VECTOR;

        AppMain.nnCopyMatrixTranslationVector(out snns_VECTOR, nns_MATRIX3);
        obj_work.pos.x = AppMain.FX_F32_TO_FX32(snns_VECTOR.x) + gms_ENE_UNIDES_WORK2.ene_3d_work.ene_com.obj_work.pos.x;
        obj_work.pos.y = AppMain.FX_F32_TO_FX32(snns_VECTOR.y) + gms_ENE_UNIDES_WORK2.ene_3d_work.ene_com.obj_work.pos.y;
        obj_work.pos.z = 655360;
        if (gms_ENE_UNIDES_WORK2.attack != 0 && ( double )snns_VECTOR.y >= ( double )len * 0.98 && gms_ENE_UNIDES_WORK2.stop == 0)
        {
            if (gms_ENE_UNIDES_WORK2.attack_first != 0)
            {
                obj_work.ppFunc = AppMain.gmEneUnidesNeedleAttackInit;
            }
            else
            {
                gms_ENE_UNIDES_WORK2.zoom_now     = 1;
                gms_ENE_UNIDES_WORK2.attack_first = 1;
                gms_ENE_UNIDES_WORK2.stop         = 1;
            }
        }
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);

        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX2);

        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX3);
    }
示例#23
0
    // Token: 0x06000681 RID: 1665 RVA: 0x0003A978 File Offset: 0x00038B78
    public static void gmGmkTruckSparkEfctDispFunc(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj;
        NNS_MATRIX nns_MATRIX = (NNS_MATRIX)obj_work.user_work_OBJECT;
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        if (obj_work.parent_obj == null)
        {
            GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

            return;
        }
        OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)gms_GMK_TRUCK_WORK.target_player;

        if (obs_OBJECT_WORK == null)
        {
            obs_OBJECT_WORK = ( OBS_OBJECT_WORK )gms_GMK_TRUCK_WORK;
        }
        AppMain.VecFx32 pos;
        pos.x = AppMain.FXM_FLOAT_TO_FX32(nns_MATRIX.M03);
        pos.y = AppMain.FXM_FLOAT_TO_FX32(-nns_MATRIX.M13);
        pos.z = AppMain.FXM_FLOAT_TO_FX32(nns_MATRIX.M23);
        ushort dir_z;
        ushort ang;

        if (obs_OBJECT_WORK.spd_m >= 0)
        {
            obj_work.disp_flag &= 4294967294U;
            dir_z = ( ushort )(8192 - obj_work.parent_obj.dir.z);
            ang   = ( ushort )(-obj_work.parent_obj.dir.z - 2048);
        }
        else
        {
            obj_work.disp_flag |= 1U;
            dir_z = ( ushort )(8192 + obj_work.parent_obj.dir.z);
            ang   = ( ushort )(obj_work.parent_obj.dir.z + 2048);
        }
        obj_work.pos = pos;
        nns_VECTOR.x = AppMain.nnSin(( int )ang) * AppMain.GMD_GMK_TRUCK_EFCT_SPRAK_OFST_DIST;
        nns_VECTOR.y = AppMain.nnCos(( int )ang) * AppMain.GMD_GMK_TRUCK_EFCT_SPRAK_OFST_DIST;
        nns_VECTOR.z = 0f;
        AppMain.GmComEfctSetDispOffsetF((AppMain.GMS_EFFECT_3DES_WORK)obj_work, nns_VECTOR.x, nns_VECTOR.y, nns_VECTOR.z);
        AppMain.GmComEfctSetDispRotation((AppMain.GMS_EFFECT_3DES_WORK)obj_work, 0, 0, dir_z);
        AppMain.ObjDrawActionSummary(obj_work);
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);
    }
    // Token: 0x060007AB RID: 1963 RVA: 0x00043C0C File Offset: 0x00041E0C
    private void dmLogoSegaObjSysytemInit()
    {
        NNS_RGBA   nns_RGBA   = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        NNS_VECTOR pos = new NNS_VECTOR(0f, 0f, 50f);

        AppMain.ObjInit(4, 61435, 0, AppMain.GMD_OBJ_LCD_X, AppMain.GMD_OBJ_LCD_Y, ( float )AppMain.GSD_DISP_WIDTH, ( float )AppMain.GSD_DISP_HEIGHT);
        AppMain.ObjDataAlloc(10);
        AppMain.ObjDrawESEffectSystemInit(0, 20480U, 0U);
        AppMain.ObjDrawSetNNCommandStateTbl(0U, 0U, true);
        AppMain.AoActSysClearPeak();
        AppMain.g_obj.flag             = 4259848U;
        AppMain.g_obj.ppPre            = null;
        AppMain.g_obj.ppPost           = null;
        AppMain.g_obj.ppCollision      = null;
        AppMain.g_obj.ppObjPre         = null;
        AppMain.g_obj.ppObjPost        = null;
        AppMain.g_obj.ppRegRecAuto     = null;
        AppMain.g_obj.draw_scale.x     = (AppMain.g_obj.draw_scale.y = (AppMain.g_obj.draw_scale.z = 29127));
        AppMain.g_obj.inv_draw_scale.x = (AppMain.g_obj.inv_draw_scale.y = (AppMain.g_obj.inv_draw_scale.z = AppMain.FX_Div(4096, AppMain.g_obj.draw_scale.x)));
        AppMain.g_obj.depth            = 128;
        AppMain.g_obj.ambient_color.r  = 0.8f;
        AppMain.g_obj.ambient_color.g  = 0.8f;
        AppMain.g_obj.ambient_color.b  = 0.8f;
        nns_VECTOR.x = -1f;
        nns_VECTOR.y = -1f;
        nns_VECTOR.z = -1f;
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_0, ref nns_RGBA, 1f, nns_VECTOR);
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

        ObjCamera.Init(0, pos, 0, 0, 6144);
        ObjCamera.Init3d(0);
        AppMain.g_obj.glb_camera_id   = 0;
        AppMain.g_obj.glb_camera_type = 1;
        OBS_CAMERA obs_CAMERA = ObjCamera.Get(0);

        obs_CAMERA.user_func     = this.dmLogoSegaCamera;
        obs_CAMERA.command_state = 0U;
        obs_CAMERA.scale         = 0.9f;
        obs_CAMERA.ofst.z        = 1000f;
        this.amTrailEFInitialize();
    }
示例#25
0
    // Token: 0x06001A3D RID: 6717 RVA: 0x000EAF10 File Offset: 0x000E9110
    private void amMotionMaterialDraw(uint state, AMS_MOTION motion, NNS_TEXLIST texlist, uint drawflag,
                                      NNS_MATERIALCALLBACK_FUNC func)
    {
        if (motion.mmobject == null)
        {
            amMotionDraw(state, motion, texlist, drawflag);
            return;
        }

        int node_num = motion.node_num;
        AMS_PARAM_DRAW_MOTION_TRS ams_PARAM_DRAW_MOTION_TRS = new AMS_PARAM_DRAW_MOTION_TRS();
        NNS_MATRIX nns_MATRIX = ams_PARAM_DRAW_MOTION_TRS.mtx = GlobalPool <NNS_MATRIX> .Alloc();

        nnCopyMatrix(nns_MATRIX, amMatrixGetCurrent());
        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 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] = new NNS_TRS(motion.data[i]);
        }

        ams_PARAM_DRAW_MOTION_TRS._object = motion._object;
        ams_PARAM_DRAW_MOTION_TRS.mmotion = motion.mmtn[motion.mmotion_id];
        ams_PARAM_DRAW_MOTION_TRS.mframe  = motion.mmotion_frame;
        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;
        }

        amDrawRegistCommand(state, -12, ams_PARAM_DRAW_MOTION_TRS);
    }
示例#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)
    {
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

        NNS_MATRIX nns_MATRIX2 = GlobalPool <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);
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);

        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX2);
    }
示例#27
0
    // Token: 0x06000038 RID: 56 RVA: 0x00003C0C File Offset: 0x00001E0C
    private static void _amTrailDrawPartsNormalTex(AppMain.AMS_TRAIL_PARTS pNow, AppMain.AMS_TRAIL_PARAM work, AppMain.NNS_PRIM3D_PCT[] _pv, int pv)
    {
        int   num   = pv - 6;
        float scale = work.startSize;
        float num2  = (float)(work.trailPartsNum - work.list_no) / (float)work.trailPartsNum;

        num2 *= work.vanish_rate;
        scale = work.startSize * num2 + work.endSize * (1f - num2);
        NNS_RGBA nns_RGBA;

        nns_RGBA.r = work.startColor.r * num2 + work.endColor.r * (1f - num2);
        nns_RGBA.g = work.startColor.g * num2 + work.endColor.g * (1f - num2);
        nns_RGBA.b = work.startColor.b * num2 + work.endColor.b * (1f - num2);
        nns_RGBA.a = work.startColor.a * num2 + work.endColor.a * (1f - num2);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        NNS_VECTOR nns_VECTOR2 = GlobalPool <NNS_VECTOR> .Alloc();

        NNS_VECTOR nns_VECTOR3 = GlobalPool <NNS_VECTOR> .Alloc();

        AppMain.nnDistanceVector(pNow.pos, AppMain._am_ef_camPos);
        AppMain.amVectorSet(nns_VECTOR3, 0f, 0f, 1f);
        AppMain.nnCrossProductVector(nns_VECTOR, nns_VECTOR3, pNow.dir);
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.nnScaleVector(nns_VECTOR2, nns_VECTOR, scale);
        AppMain.nnAddVector(ref _pv[pv + 1].Pos, pNow.pPrev.pos, nns_VECTOR2);
        AppMain.nnSubtractVector(ref _pv[pv + 5].Pos, pNow.pPrev.pos, nns_VECTOR2);
        _pv[pv]           = _pv[num + 1];
        _pv[pv + 2]       = _pv[num + 5];
        _pv[pv + 4]       = _pv[pv + 2];
        _pv[pv + 5].Col   = AppMain.AMD_FCOLTORGBA8888(nns_RGBA.r, nns_RGBA.g, nns_RGBA.b, nns_RGBA.a);
        _pv[pv + 1].Col   = _pv[pv + 5].Col;
        _pv[pv + 1].Tex.u = num2;
        _pv[pv + 1].Tex.v = 0f;
        _pv[pv + 5].Tex.u = num2;
        _pv[pv + 5].Tex.v = 1f;
        _pv[pv + 3]       = _pv[pv + 1];
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);

        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR2);

        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR3);
    }
    // Token: 0x06000501 RID: 1281 RVA: 0x0002B054 File Offset: 0x00029254
    private static void gmBoss5LdPartInitSpin(AppMain.GMS_BOSS5_LDPART_WORK ldpart_work)
    {
        AppMain.nnMakeUnitQuaternion(ref ldpart_work.cur_rot_quat);
        AppMain.nnMakeUnitQuaternion(ref ldpart_work.rot_diff_quat);
        int num = 0;

        while (( long )num < ( long )(( ulong )AppMain.GMD_BOSS5_LAND_LDPART_SPIN_ROT_AXIS_NUM))
        {
            NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

            float num2 = AppMain.FX_FX32_TO_F32(AkMath.RandFx()) * 2f - 1f;
            num2 = AppMain.MTM_MATH_CLIP(num2, -1f, 1f);
            short rand_angle = AkMath.DEGtoA16(360f * AppMain.FX_FX32_TO_F32(AkMath.RandFx()));
            AkMath.GetRandomUnitVector(nns_VECTOR, num2, rand_angle);
            NNS_QUATERNION nns_QUATERNION;
            AppMain.nnMakeRotateAxisQuaternion(out nns_QUATERNION, nns_VECTOR.x, nns_VECTOR.y, nns_VECTOR.z, AppMain.GMD_BOSS5_LAND_LDPART_SPIN_ROT_SPD_DEG);
            AppMain.nnMultiplyQuaternion(ref ldpart_work.rot_diff_quat, ref nns_QUATERNION, ref ldpart_work.rot_diff_quat);
            num++;
        }
    }
示例#29
0
    // Token: 0x060018C0 RID: 6336 RVA: 0x000E1CDC File Offset: 0x000DFEDC
    private void DmTitleOpInit()
    {
        NNS_RGBA   nns_RGBA   = new NNS_RGBA(1f, 1f, 1f, 1f);
        NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc();

        nns_VECTOR.Clear();
        NNS_VECTOR pos = new NNS_VECTOR(0f, 0f, 50f);

        AppMain.g_obj.flag             = 4259848U;
        AppMain.g_obj.ppPre            = null;
        AppMain.g_obj.ppPost           = null;
        AppMain.g_obj.ppCollision      = null;
        AppMain.g_obj.ppObjPre         = null;
        AppMain.g_obj.ppObjPost        = null;
        AppMain.g_obj.ppRegRecAuto     = null;
        AppMain.g_obj.draw_scale.x     = (AppMain.g_obj.draw_scale.y = (AppMain.g_obj.draw_scale.z = 13107));
        AppMain.g_obj.inv_draw_scale.x = (AppMain.g_obj.inv_draw_scale.y = (AppMain.g_obj.inv_draw_scale.z = AppMain.FX_Div(4096, AppMain.g_obj.draw_scale.x)));
        AppMain.g_obj.depth            = 128;
        AppMain.g_obj.ambient_color.r  = 0.8f;
        AppMain.g_obj.ambient_color.g  = 0.8f;
        AppMain.g_obj.ambient_color.b  = 0.8f;
        nns_VECTOR.x = -1f;
        nns_VECTOR.y = -1f;
        nns_VECTOR.z = -1f;
        AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR);
        AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_0, ref nns_RGBA, 1f, nns_VECTOR);
        ObjCamera.Init(0, pos, 0, 0, 12288);
        ObjCamera.Init3d(0);
        AppMain.g_obj.glb_camera_id   = 0;
        AppMain.g_obj.glb_camera_type = 0;
        OBS_CAMERA obs_CAMERA = ObjCamera.Get(0);

        obs_CAMERA.user_func     = this.dmTitleOpCamera;
        obs_CAMERA.command_state = 0U;
        obs_CAMERA.fovy          = AppMain.NNM_DEGtoA32(40f);
        obs_CAMERA.znear         = 0.1f;
        obs_CAMERA.zfar          = 32768f;
        this.dmTitleOpMgrInit();
        GlobalPool <NNS_VECTOR> .Release(nns_VECTOR);
    }
示例#30
0
    // Token: 0x06000E7A RID: 3706 RVA: 0x000815F0 File Offset: 0x0007F7F0
    public static int gmBoss5TurretUpdateSlideCover(AppMain.GMS_BOSS5_TURRET_WORK trt_work)
    {
        AppMain.GMS_BOSS5_BODY_WORK gms_BOSS5_BODY_WORK = (AppMain.GMS_BOSS5_BODY_WORK)AppMain.GMM_BS_OBJ(trt_work).parent_obj;
        int result;

        if (trt_work.cvr_slide_type == 0)
        {
            if (trt_work.cvr_slide_ratio < 1f)
            {
                trt_work.cvr_slide_ratio += AppMain.GMD_BOSS5_TURRET_COVER_SLIDE_OPEN_RATIO_SPD_F;
                result = 0;
            }
            else
            {
                trt_work.cvr_slide_ratio = 1f;
                result = 1;
            }
        }
        else if (trt_work.cvr_slide_ratio > 0f)
        {
            trt_work.cvr_slide_ratio -= AppMain.GMD_BOSS5_TURRET_COVER_SLIDE_CLOSE_RATIO_SPD_F;
            result = 0;
        }
        else
        {
            trt_work.cvr_slide_ratio = 0f;
            result = 1;
        }
        NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc();

        float num = 1f + trt_work.cvr_slide_ratio * (AppMain.GMD_BOSS5_TURRET_COVER_SLIDE_SCALE_MAX - 1f);

        AppMain.nnMakeRotateXMatrix(nns_MATRIX, AkMath.DEGtoA32(trt_work.cvr_slide_ratio * AppMain.GMD_BOSS5_TURRET_COVER_SLIDE_DEG_MAX));
        AppMain.nnScaleMatrix(nns_MATRIX, nns_MATRIX, num, num, num);
        AppMain.GmBsCmnSetCNMMtx(gms_BOSS5_BODY_WORK.cnm_mgr_work, nns_MATRIX, gms_BOSS5_BODY_WORK.cover_cnm_reg_id);
        GlobalPool <NNS_MATRIX> .Release(nns_MATRIX);

        return(result);
    }