// Token: 0x06000A5B RID: 2651 RVA: 0x0005C7A9 File Offset: 0x0005A9A9
 private static void _amTaskDeleteReal(AppMain.AMS_TCB tcb)
 {
     AppMain.AMS_TASK taskp = tcb.taskp;
     tcb.prev.next = tcb.next;
     tcb.next.prev = tcb.prev;
     GlobalPool <AppMain.AMS_TCB> .Release(tcb);
 }
Exemplo n.º 2
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);
    }
Exemplo n.º 3
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);
    }
Exemplo n.º 4
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);
    }
Exemplo n.º 5
0
    public static void AddToPool(int poolId, Money amount)
    {
        var pool = GlobalPool.Get(poolId);

        pool.SumAmount += amount;
        pool.Save();
    }
Exemplo n.º 6
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);
    }
Exemplo n.º 7
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);
    }
Exemplo n.º 8
0
    public static void CreditFromSundayPool()
    {
        try
        {
            var sundayPool  = GlobalPool.Get(PoolsHelper.GetSundayPoolId());
            var poolPercent = TitanFeatures.StringSawSundayPool.Value;
            if (Money.MultiplyPercent(sundayPool.SumAmount, poolPercent) > Money.Zero)
            {
                var users        = TableHelper.GetListFromRawQuery <Member>(string.Format(@"SELECT * FROM Users WHERE AccountStatusInt = {0} AND UpgradeId != {1} 
            AND UserId IN (SELECT DISTINCT UserId FROM AdPacks WHERE MoneyToReturn > MoneyReturned)", (int)MemberStatus.Active, Membership.Standard.Id));
                var toDistribute = Money.MultiplyPercent(sundayPool.SumAmount, poolPercent);
                var perUser      = Money.Zero;

                if (users.Count > 0)
                {
                    perUser = toDistribute / users.Count;
                }

                if (perUser > Money.Zero)
                {
                    foreach (var user in users)
                    {
                        user.AddToMainBalance(perUser, "Sunday AdPack Distribution");
                        user.SaveBalances();
                    }
                    GlobalPoolManager.SubtractFromPool(sundayPool.GlobalPoolType, toDistribute);
                }
            }
        }
        catch (Exception ex)
        {
            ErrorLogger.Log(ex);
        }
    }
Exemplo n.º 9
0
 /// <summary>
 ///     Handles the events raised by public events of the generic class and its instances
 /// </summary>
 /// <param name="instance">The instance that raised the event</param>
 /// <param name="eventName">The name of the raised event</param>
 /// <param name="isVoid">Indicates if the raised event has a return value</param>
 /// <param name="eventArgs">An array containing the parameters of the raised event</param>
 /// <returns>Returns the result of raising registered delegates</returns>
 protected virtual object RaiseEvent(object instance, string eventName, bool isVoid, object[] eventArgs)
 {
     if (instance != null)
     {
         if (Instances.ContainsKey(instance))
         {
             var instanceId = GlobalPool.GetInstanceId(instance);
             if (instanceId != null)
             {
                 return
                     (OnPushJavascript(
                          new PushJavascriptEventArgs(
                              // ReSharper disable once UseStringInterpolation
                              string.Format("{0}.__instances[\"{1}\"].raise_{2}({3});",
                                            Identification, instanceId, eventName,
                                            string.Join(", ", eventArgs.Select(JsonConvert.SerializeObject))))
                 {
                     FireAway = isVoid
                 }));
             }
         }
         return(null);
     }
     return
         (OnPushJavascript(
              // ReSharper disable once UseStringInterpolation
              new PushJavascriptEventArgs(string.Format("{0}.raise_{1}({2});", Identification, eventName,
                                                        string.Join(", ", eventArgs.Select(JsonConvert.SerializeObject))))
     {
         FireAway = isVoid
     }));
 }
Exemplo n.º 10
0
        public static void NmFireGun(this Gun gun, Action <List <Bullet> > value, bool alsoAddThemToWorld = true)
        {
            var firedBullets = GlobalPool <List <Bullet> > .Rent();

            firedBullets.Clear(); // ensure clean
            value(firedBullets);

            if (firedBullets.Count == 0)
            {
                goto collect;
            }

            if (alsoAddThemToWorld)
            {
                var currentLevel = Level.current;
                foreach (var item in firedBullets)
                {
                    currentLevel.AddThing(item);
                }
            }

            if (gun != null)
            {
                gun.bulletFireIndex++;
            }
            if (Network.isActive)
            {
                NMFireGun gunEvent = new(gun, firedBullets, gun?.bulletFireIndex ?? 0, rel : false, 4);
                Send.Message(gunEvent, NetMessagePriority.ReliableOrdered);
            }
collect:
            firedBullets.Clear();
            GlobalPool <List <Bullet> > .Return(firedBullets);
        }
Exemplo n.º 11
0
    // 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);
    }
Exemplo n.º 12
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);
    }
Exemplo n.º 13
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);
    }
Exemplo n.º 14
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);
    }
Exemplo n.º 15
0
        public void WriteUnbufferedMessage(MemoryStream bufferWithOffset, MemoryStream memAck = null)
        {
            if (Closed || string.IsNullOrEmpty(Signature) || Band.Failed())
            {
                return;
            }
            var message = GlobalPool <MessageUnbuffered> .GetObject(bufferWithOffset, memAck);

            _messages.Enqueue(message);
            Flush();
        }
Exemplo n.º 16
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);
    }
Exemplo n.º 17
0
        public static SocketAsyncEventArgs CreateOrGetSocketAsyncEventArgs(this IOHandler ioHandler)
        {
            SocketAsyncEventArgs saea;

            if (!GlobalPool <SocketAsyncEventArgs> .GetObject(out saea))
            {
                saea.Completed += saeCompleted;
            }
            saea.UserToken = ioHandler;
            return(saea);
        }
Exemplo n.º 18
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);
        }
Exemplo n.º 19
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);
    }
Exemplo n.º 20
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);
    }
Exemplo n.º 21
0
 public Channel GetChannel(uint id)
 {
     if (!_channels.ContainsKey(id))
     {
         Channel result;
         if (GlobalPool <Channel> .GetObject(out result, id))
         {
             result.id = id;
         }
         _channels[id] = result;
     }
     return(_channels[id]);
 }
Exemplo n.º 22
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);
    }
Exemplo n.º 23
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);
    }
        public SynchronizedPool(int maxCount)
        {
            int num  = maxCount;
            int num2 = 0x10 + SynchronizedPoolHelper <T> .ProcessorCount;

            if (num > num2)
            {
                num = num2;
            }
            this.maxCount   = maxCount;
            this.entries    = new Entry <T> [num];
            this.pending    = new PendingEntry <T> [4];
            this.globalPool = new GlobalPool <T>(maxCount);
        }
Exemplo n.º 25
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);
    }
Exemplo n.º 26
0
        public SynchronizedPool(int maxCount)
        {
            int threadCount    = maxCount;
            int maxThreadCount = maxThreadItemsPerProcessor + SynchronizedPoolHelper.ProcessorCount;

            if (threadCount > maxThreadCount)
            {
                threadCount = maxThreadCount;
            }
            _maxCount   = maxCount;
            _entries    = new Entry[threadCount];
            _pending    = new PendingEntry[4];
            _globalPool = new GlobalPool(maxCount);
        }
Exemplo n.º 27
0
    //发一条微博帮忙推广
    static public bool PostAdvertisement(int UserCount, int StatusCount)
    {
        string strResult = GlobalPool.GetAPI(SysArgFor.USER_RELATION).API.Statuses_Update("(" + DateTime.Now.ToString() + ")I'm using an open source application Sinawler v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() +
                                                                                          ". There have been " + UserCount.ToString() + " users and " + StatusCount.ToString() + " statuses in queues!Project Homepage: http://code.google.com/p/sinawler/");

        if (strResult == null)
        {
            return(false);
        }
        else
        {
            return(true);
        }
    }
        // 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;
        }
Exemplo n.º 29
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);
    }
Exemplo n.º 30
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);
    }