Ejemplo n.º 1
0
    // Token: 0x0600005E RID: 94 RVA: 0x00004CCC File Offset: 0x00002ECC
    private static void gmGmkSlotStart(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
        gms_GMK_SLOT_WORK.reel_status[0].reel = ( short )(AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * 15);
        AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK gms_GMK_SLOT_REEL_STATUS_WORK = gms_GMK_SLOT_WORK.reel_status[1];
        short gmd_GMK_SLOT_REEL1KOMA_HEIGHT = AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT;

        gms_GMK_SLOT_REEL_STATUS_WORK.reel         = ( short )0;
        gms_GMK_SLOT_WORK.reel_status[2].reel      = AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT;
        gms_GMK_SLOT_WORK.reel_status[0].reel_spd  = 0;
        gms_GMK_SLOT_WORK.reel_status[1].reel_spd  = 0;
        gms_GMK_SLOT_WORK.reel_status[2].reel_spd  = 0;
        gms_GMK_SLOT_WORK.reel_status[0].reel_acc  = 0;
        gms_GMK_SLOT_WORK.reel_status[1].reel_acc  = 0;
        gms_GMK_SLOT_WORK.reel_status[2].reel_acc  = 0;
        gms_GMK_SLOT_WORK.reel_status[0].reel_time = 0;
        gms_GMK_SLOT_WORK.reel_status[1].reel_time = 0;
        gms_GMK_SLOT_WORK.reel_status[2].reel_time = 0;
        gms_GMK_SLOT_WORK.prob[0] = AppMain.GMD_GMK_SLOT_PROB_JJJ;
        gms_GMK_SLOT_WORK.prob[1] = AppMain.GMD_GMK_SLOT_PROB_EEE;
        gms_GMK_SLOT_WORK.prob[2] = AppMain.GMD_GMK_SLOT_PROB_SSS;
        gms_GMK_SLOT_WORK.prob[4] = AppMain.GMD_GMK_SLOT_PROB_BBB;
        gms_GMK_SLOT_WORK.prob[3] = AppMain.GMD_GMK_SLOT_PROB_RRR;
        obj_work.ppFunc           = AppMain.gmGmkSlotStay;
    }
Ejemplo n.º 2
0
    private static void gmGmkSlotStart(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
        gmsGmkSlotWork.reel_status[0].reel = (short)((int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * 15);
        AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK reelStatu = gmsGmkSlotWork.reel_status[1];
        int slotReeL1KomaHeight = (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT;

        reelStatu.reel = (short)0;
        gmsGmkSlotWork.reel_status[2].reel      = AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT;
        gmsGmkSlotWork.reel_status[0].reel_spd  = 0;
        gmsGmkSlotWork.reel_status[1].reel_spd  = 0;
        gmsGmkSlotWork.reel_status[2].reel_spd  = 0;
        gmsGmkSlotWork.reel_status[0].reel_acc  = 0;
        gmsGmkSlotWork.reel_status[1].reel_acc  = 0;
        gmsGmkSlotWork.reel_status[2].reel_acc  = 0;
        gmsGmkSlotWork.reel_status[0].reel_time = 0;
        gmsGmkSlotWork.reel_status[1].reel_time = 0;
        gmsGmkSlotWork.reel_status[2].reel_time = 0;
        gmsGmkSlotWork.prob[0] = AppMain.GMD_GMK_SLOT_PROB_JJJ;
        gmsGmkSlotWork.prob[1] = AppMain.GMD_GMK_SLOT_PROB_EEE;
        gmsGmkSlotWork.prob[2] = AppMain.GMD_GMK_SLOT_PROB_SSS;
        gmsGmkSlotWork.prob[4] = AppMain.GMD_GMK_SLOT_PROB_BBB;
        gmsGmkSlotWork.prob[3] = AppMain.GMD_GMK_SLOT_PROB_RRR;
        obj_work.ppFunc        = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotStay);
    }
Ejemplo n.º 3
0
 // Token: 0x0600005F RID: 95 RVA: 0x00004DF0 File Offset: 0x00002FF0
 private static void gmGmkSlotStay(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     AppMain.rand_result <<= 16;
     AppMain.rand_result  += ( uint )AppMain.mtMathRand();
     if (AppMain.slot_start_call == gms_GMK_SLOT_WORK.slot_id)
     {
         AppMain.gmGmkSlotGameStart(obj_work);
     }
 }
Ejemplo n.º 4
0
 private static void gmGmkSlotGameHit_100(AppMain.OBS_OBJECT_WORK obj_work)
 {
     if (AppMain.GmRingCheckRestSlotRing() != 0)
     {
         return;
     }
     AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     AppMain.GmPlayerAddScore(AppMain.slot_start_player, AppMain.tbl_slot_bonus_score[(int)gmsGmkSlotWork.lotresult], AppMain.slot_start_player.obj_work.pos.x, AppMain.slot_start_player.obj_work.pos.y);
     AppMain.slot_start_call = -1;
     obj_work.ppFunc         = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotStay);
 }
Ejemplo n.º 5
0
 // Token: 0x06000065 RID: 101 RVA: 0x00005B48 File Offset: 0x00003D48
 private static void gmGmkSlotGameHit_200(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     gms_GMK_SLOT_WORK.timer--;
     if (gms_GMK_SLOT_WORK.timer <= 0)
     {
         gms_GMK_SLOT_WORK.ppos_x = AppMain.slot_start_player.obj_work.pos.x;
         gms_GMK_SLOT_WORK.ppos_y = AppMain.slot_start_player.obj_work.pos.y;
         gms_GMK_SLOT_WORK.timer  = 100;
         obj_work.ppFunc          = AppMain.gmGmkSlotGameHit_210;
     }
 }
Ejemplo n.º 6
0
 // Token: 0x06000063 RID: 99 RVA: 0x00005A60 File Offset: 0x00003C60
 private static void gmGmkSlotGameHit(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     if (gms_GMK_SLOT_WORK.lotresult != 1)
     {
         AppMain.GmRingSlotSetNum(AppMain.slot_start_player, AppMain.tbl_slot_bonus_ring[( int )gms_GMK_SLOT_WORK.lotresult]);
         obj_work.ppFunc = AppMain.gmGmkSlotGameHit_100;
         return;
     }
     AppMain.GmEfctCmnEsCreate(AppMain.slot_start_player.obj_work, 96);
     obj_work.ppFunc         = AppMain.gmGmkSlotGameHit_200;
     gms_GMK_SLOT_WORK.timer = 30;
 }
Ejemplo n.º 7
0
 private static void gmGmkSlotGameHit_200(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     --gmsGmkSlotWork.timer;
     if (gmsGmkSlotWork.timer > 0)
     {
         return;
     }
     gmsGmkSlotWork.ppos_x = AppMain.slot_start_player.obj_work.pos.x;
     gmsGmkSlotWork.ppos_y = AppMain.slot_start_player.obj_work.pos.y;
     gmsGmkSlotWork.timer  = 100;
     obj_work.ppFunc       = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameHit_210);
 }
Ejemplo n.º 8
0
 private static void gmGmkSlotGameHit(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     if (gmsGmkSlotWork.lotresult != (short)1)
     {
         AppMain.GmRingSlotSetNum(AppMain.slot_start_player, AppMain.tbl_slot_bonus_ring[(int)gmsGmkSlotWork.lotresult]);
         obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameHit_100);
     }
     else
     {
         AppMain.GmEfctCmnEsCreate(AppMain.slot_start_player.obj_work, 96);
         obj_work.ppFunc      = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameHit_200);
         gmsGmkSlotWork.timer = 30;
     }
 }
Ejemplo n.º 9
0
 // Token: 0x06000066 RID: 102 RVA: 0x00005BC4 File Offset: 0x00003DC4
 private static void gmGmkSlotGameHit_210(OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     AppMain.slot_start_player.obj_work.pos.x = gms_GMK_SLOT_WORK.ppos_x + (( int )AppMain.tbl_dam_ofst_xy[gms_GMK_SLOT_WORK.timer % 8][0] << 12);
     AppMain.slot_start_player.obj_work.pos.y = gms_GMK_SLOT_WORK.ppos_y + (( int )AppMain.tbl_dam_ofst_xy[gms_GMK_SLOT_WORK.timer % 8][1] << 12);
     GmPlayer.RingDec(AppMain.slot_start_player, 1);
     if (gms_GMK_SLOT_WORK.timer % 12 == 0)
     {
         GmSound.PlaySE("Damage2");
     }
     gms_GMK_SLOT_WORK.timer--;
     if (gms_GMK_SLOT_WORK.timer <= 0)
     {
         AppMain.slot_start_player.obj_work.pos.x = gms_GMK_SLOT_WORK.ppos_x;
         AppMain.slot_start_player.obj_work.pos.y = gms_GMK_SLOT_WORK.ppos_y;
         AppMain.slot_start_call = -1;
         obj_work.ppFunc         = AppMain.gmGmkSlotStay;
     }
 }
 // Token: 0x0600006C RID: 108 RVA: 0x00005F30 File Offset: 0x00004130
 private static AppMain.OBS_OBJECT_WORK GmGmkSlotInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type)
 {
     AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_GMK_SLOT_WORK(), "Gmk_Slot");
     AppMain.OBS_OBJECT_WORK   obs_OBJECT_WORK   = (AppMain.OBS_OBJECT_WORK)gms_GMK_SLOT_WORK;
     AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)gms_GMK_SLOT_WORK;
     AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_slot_obj_3d_list[3], gms_ENEMY_3D_WORK.obj_3d);
     AppMain.ObjAction3dNNMaterialMotionLoad(gms_ENEMY_3D_WORK.obj_3d, 0, null, null, 0, (AppMain.AMS_AMB_HEADER)AppMain.ObjDataGet(875).pData, 1, 1);
     AppMain.ObjDrawAction3dActionSet3DNNMaterial(gms_ENEMY_3D_WORK.obj_3d, 0);
     obs_OBJECT_WORK.pos.z      = -135168;
     obs_OBJECT_WORK.move_flag |= 256U;
     obs_OBJECT_WORK.disp_flag |= 4194308U;
     gms_GMK_SLOT_WORK.slot_id  = ( int )eve_rec.left;
     if (AppMain.slot_start_call == 0)
     {
         AppMain.slot_start_call = -1;
     }
     AppMain.gmGmkSlot_CreateReel(gms_GMK_SLOT_WORK);
     AppMain.gmGmkSlotStart(obs_OBJECT_WORK);
     return(obs_OBJECT_WORK);
 }
Ejemplo n.º 11
0
 private static void gmGmkSlotGameHit_210(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     AppMain.slot_start_player.obj_work.pos.x = gmsGmkSlotWork.ppos_x + ((int)AppMain.tbl_dam_ofst_xy[gmsGmkSlotWork.timer % 8][0] << 12);
     AppMain.slot_start_player.obj_work.pos.y = gmsGmkSlotWork.ppos_y + ((int)AppMain.tbl_dam_ofst_xy[gmsGmkSlotWork.timer % 8][1] << 12);
     AppMain.GmPlayerRingDec(AppMain.slot_start_player, (short)1);
     if (gmsGmkSlotWork.timer % 12 == 0)
     {
         AppMain.GmSoundPlaySE("Damage2");
     }
     --gmsGmkSlotWork.timer;
     if (gmsGmkSlotWork.timer > 0)
     {
         return;
     }
     AppMain.slot_start_player.obj_work.pos.x = gmsGmkSlotWork.ppos_x;
     AppMain.slot_start_player.obj_work.pos.y = gmsGmkSlotWork.ppos_y;
     AppMain.slot_start_call = -1;
     obj_work.ppFunc         = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotStay);
 }
Ejemplo n.º 12
0
 private static void gmGmkSlot_CreateReel(AppMain.GMS_GMK_SLOT_WORK pwork)
 {
     AppMain.OBS_OBJECT_WORK obsObjectWork = (AppMain.OBS_OBJECT_WORK)pwork;
     for (int index = 0; index < 3; ++index)
     {
         AppMain.OBS_OBJECT_WORK        work             = AppMain.GMM_EFFECT_CREATE_WORK((AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_GMK_SLOTPARTS_WORK()), (AppMain.OBS_OBJECT_WORK)null, (ushort)0, "Gmk_SlotReel");
         AppMain.GMS_GMK_SLOTPARTS_WORK gmkSlotpartsWork = (AppMain.GMS_GMK_SLOTPARTS_WORK)work;
         AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_gmk_slot_obj_3d_list[(int)AppMain.tbl_gmk_slot_reelmodel_id[index]], gmkSlotpartsWork.eff_work.obj_3d);
         work.parent_obj            = obsObjectWork;
         work.pos.x                 = obsObjectWork.pos.x + (48 * index - 48) * 4096;
         work.pos.y                 = obsObjectWork.pos.y;
         work.pos.z                 = obsObjectWork.pos.z;
         work.obj_3d.drawflag      |= 268435456U;
         work.flag                 &= 4294966271U;
         work.flag                 |= 2U;
         work.move_flag            |= 256U;
         work.disp_flag            &= 4294967039U;
         work.disp_flag            |= 138412032U;
         work.ppFunc                = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotReel);
         gmkSlotpartsWork.reel_id   = index;
         gmkSlotpartsWork.slot_work = pwork;
     }
 }
 // Token: 0x06000068 RID: 104 RVA: 0x00005CE0 File Offset: 0x00003EE0
 private static void gmGmkSlot_CreateReel(AppMain.GMS_GMK_SLOT_WORK pwork)
 {
     AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = (AppMain.OBS_OBJECT_WORK)pwork;
     for (int i = 0; i < 3; i++)
     {
         AppMain.OBS_OBJECT_WORK        obs_OBJECT_WORK2       = AppMain.GMM_EFFECT_CREATE_WORK(() => new AppMain.GMS_GMK_SLOTPARTS_WORK(), null, 0, "Gmk_SlotReel");
         AppMain.GMS_GMK_SLOTPARTS_WORK gms_GMK_SLOTPARTS_WORK = (AppMain.GMS_GMK_SLOTPARTS_WORK)obs_OBJECT_WORK2;
         AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK2, AppMain.gm_gmk_slot_obj_3d_list[( int )AppMain.tbl_gmk_slot_reelmodel_id[i]], gms_GMK_SLOTPARTS_WORK.eff_work.obj_3d);
         obs_OBJECT_WORK2.parent_obj       = obs_OBJECT_WORK;
         obs_OBJECT_WORK2.pos.x            = obs_OBJECT_WORK.pos.x + (48 * i - 48) * 4096;
         obs_OBJECT_WORK2.pos.y            = obs_OBJECT_WORK.pos.y;
         obs_OBJECT_WORK2.pos.z            = obs_OBJECT_WORK.pos.z;
         obs_OBJECT_WORK2.obj_3d.drawflag |= 268435456U;
         obs_OBJECT_WORK2.flag            &= 4294966271U;
         obs_OBJECT_WORK2.flag            |= 2U;
         obs_OBJECT_WORK2.move_flag       |= 256U;
         obs_OBJECT_WORK2.disp_flag       &= 4294967039U;
         obs_OBJECT_WORK2.disp_flag       |= 138412032U;
         obs_OBJECT_WORK2.ppFunc           = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotReel);
         gms_GMK_SLOTPARTS_WORK.reel_id    = i;
         gms_GMK_SLOTPARTS_WORK.slot_work  = pwork;
     }
 }
Ejemplo n.º 14
0
 private static AppMain.OBS_OBJECT_WORK GmGmkSlotInit(
     AppMain.GMS_EVE_RECORD_EVENT eve_rec,
     int pos_x,
     int pos_y,
     byte type)
 {
     AppMain.GMS_GMK_SLOT_WORK work           = (AppMain.GMS_GMK_SLOT_WORK)AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_GMK_SLOT_WORK()), "Gmk_Slot");
     AppMain.OBS_OBJECT_WORK   obj_work       = (AppMain.OBS_OBJECT_WORK)work;
     AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)work;
     AppMain.ObjObjectCopyAction3dNNModel(obj_work, AppMain.gm_gmk_slot_obj_3d_list[3], gmsEnemy3DWork.obj_3d);
     AppMain.ObjAction3dNNMaterialMotionLoad(gmsEnemy3DWork.obj_3d, 0, (AppMain.OBS_DATA_WORK)null, (string)null, 0, (AppMain.AMS_AMB_HEADER)AppMain.ObjDataGet(875).pData, 1, 1);
     AppMain.ObjDrawAction3dActionSet3DNNMaterial(gmsEnemy3DWork.obj_3d, 0);
     obj_work.pos.z      = -135168;
     obj_work.move_flag |= 256U;
     obj_work.disp_flag |= 4194308U;
     work.slot_id        = (int)eve_rec.left;
     if (AppMain.slot_start_call == 0)
     {
         AppMain.slot_start_call = -1;
     }
     AppMain.gmGmkSlot_CreateReel(work);
     AppMain.gmGmkSlotStart(obj_work);
     return(obj_work);
 }
Ejemplo n.º 15
0
 private static void gmGmkSlotGameLose(AppMain.OBS_OBJECT_WORK obj_work)
 {
     AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
     AppMain.slot_start_call = -1;
     obj_work.ppFunc         = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotStay);
 }
Ejemplo n.º 16
0
    // Token: 0x06000061 RID: 97 RVA: 0x00004E58 File Offset: 0x00003058
    private static void gmGmkSlotGameStart(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
        gms_GMK_SLOT_WORK.slot_step     = 0;
        gms_GMK_SLOT_WORK.current_reel  = 0;
        gms_GMK_SLOT_WORK.slot_se_timer = 0;
        int num = (int)(AppMain.rand_result % 100U);

        num -= ( int )AppMain.GMD_GMK_SLOT_1ST_LOT;
        if (num >= 0)
        {
            num = num * 100 / ( int )(100 - AppMain.GMD_GMK_SLOT_1ST_LOT);
            int i;
            for (i = 0; i < 5; i++)
            {
                num -= ( int )gms_GMK_SLOT_WORK.prob[i];
                if (num <= 0)
                {
                    gms_GMK_SLOT_WORK.prob[i] = AppMain.tbl_gmk_slot_prob[i];
                    break;
                }
                if (gms_GMK_SLOT_WORK.prob[i] < AppMain.tbl_gmk_slot_prob_max[i])
                {
                    short[] prob = gms_GMK_SLOT_WORK.prob;
                    int     num2 = i;
                    prob[num2] += AppMain.tbl_gmk_slot_prob[i];
                    if (gms_GMK_SLOT_WORK.prob[i] > AppMain.tbl_gmk_slot_prob_max[i])
                    {
                        gms_GMK_SLOT_WORK.prob[i] = AppMain.tbl_gmk_slot_prob_max[i];
                    }
                }
            }
            gms_GMK_SLOT_WORK.lotresult = ( short )i;
            if (i != 5)
            {
                gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark = (gms_GMK_SLOT_WORK.reel_status[1].reel_target_mark = (gms_GMK_SLOT_WORK.reel_status[2].reel_target_mark = i));
            }
            else
            {
                int num3 = 0;
                for (i = 0; i < 3; i++)
                {
                    gms_GMK_SLOT_WORK.reel_status[i].reel_target_mark = ( int )(AppMain.getRand() % 5U);
                    if (gms_GMK_SLOT_WORK.reel_status[i].reel_target_mark == 4)
                    {
                        num3++;
                    }
                }
                int num4 = (int)(AppMain.getRand() % 3U);
                if (num3 <= 1)
                {
                    gms_GMK_SLOT_WORK.lotresult = 5;
                    if (num3 == 0)
                    {
                        gms_GMK_SLOT_WORK.reel_status[num4].reel_target_mark = 4;
                    }
                }
                else if (num3 >= 2)
                {
                    gms_GMK_SLOT_WORK.lotresult = 6;
                    if (num3 == 3)
                    {
                        gms_GMK_SLOT_WORK.reel_status[num4].reel_target_mark = ( int )(AppMain.getRand() % 4U);
                    }
                }
            }
        }
        else if (num < ( int )(-( int )AppMain.GMD_GMK_SLOT_EGG_LOT))
        {
            gms_GMK_SLOT_WORK.lotresult = -1;
            for (int j = 0; j < 3; j++)
            {
                gms_GMK_SLOT_WORK.reel_status[j].reel_target_mark = ( int )(AppMain.getRand() % 4U);
            }
            if (gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == gms_GMK_SLOT_WORK.reel_status[1].reel_target_mark && gms_GMK_SLOT_WORK.reel_status[1].reel_target_mark == gms_GMK_SLOT_WORK.reel_status[2].reel_target_mark)
            {
                if (gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == 1)
                {
                    gms_GMK_SLOT_WORK.lotresult = 8;
                }
                else
                {
                    int num5;
                    do
                    {
                        num5 = ( int )(AppMain.getRand() % 4U);
                    }while (gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == num5);
                    gms_GMK_SLOT_WORK.reel_status[2].reel_target_mark = num5;
                }
            }
        }
        else
        {
            gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark = (gms_GMK_SLOT_WORK.reel_status[1].reel_target_mark = (gms_GMK_SLOT_WORK.reel_status[2].reel_target_mark = 1));
            gms_GMK_SLOT_WORK.lotresult = 8;
        }
        for (int k = 0; k < 3; k++)
        {
            ushort num6 = (ushort)AppMain.getRand();
            do
            {
                num6 = ( ushort )((num6 + 1) % ( ushort )AppMain.GMD_GMK_SLOT_REEL_ALLMARK);
                gms_GMK_SLOT_WORK.reel_status[k].reel_target_pos = ( int )num6;
            }while (( int )AppMain.tbl_gmk_reel_mark[k][( int )(AppMain.GMD_GMK_SLOT_REEL_ALLMARK - ( short )num6 & 15)] != gms_GMK_SLOT_WORK.reel_status[k].reel_target_mark);
        }
        gms_GMK_SLOT_WORK.freestop = 0;
        AppMain.gmGmkSlotGameStart_100(obj_work);
        obj_work.ppFunc = AppMain.gmGmkSlotGameStart_100;
    }
Ejemplo n.º 17
0
    // Token: 0x06000062 RID: 98 RVA: 0x00005164 File Offset: 0x00003364
    private static void gmGmkSlotGameStart_100(OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SLOT_WORK gms_GMK_SLOT_WORK = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
        if (gms_GMK_SLOT_WORK.timer <= 0)
        {
            AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK gms_GMK_SLOT_REEL_STATUS_WORK = gms_GMK_SLOT_WORK.reel_status[gms_GMK_SLOT_WORK.current_reel];
            int slot_step = gms_GMK_SLOT_WORK.slot_step;
            if (slot_step <= 30)
            {
                if (slot_step <= 10)
                {
                    if (slot_step != 0)
                    {
                        if (slot_step == 10)
                        {
                            gms_GMK_SLOT_WORK.current_reel = 0;
                            gms_GMK_SLOT_WORK.slot_step    = 40;
                            gms_GMK_SLOT_WORK.timer_next   = 0;
                            gms_GMK_SLOT_WORK.freestop     = 1;
                            gms_GMK_SLOT_WORK.timer        = 0;
                        }
                    }
                    else
                    {
                        gms_GMK_SLOT_WORK.reel_status[0].reel_time = 0;
                        gms_GMK_SLOT_WORK.reel_status[1].reel_time = 15;
                        gms_GMK_SLOT_WORK.reel_status[2].reel_time = 30;
                        gms_GMK_SLOT_WORK.reel_status[0].reel_acc  = ( int )AppMain.GMD_GMK_SLOT_REEL_ACC;
                        gms_GMK_SLOT_WORK.reel_status[1].reel_acc  = ( int )AppMain.GMD_GMK_SLOT_REEL_ACC;
                        gms_GMK_SLOT_WORK.reel_status[2].reel_acc  = ( int )AppMain.GMD_GMK_SLOT_REEL_ACC;
                        gms_GMK_SLOT_WORK.timer     = 10;
                        gms_GMK_SLOT_WORK.timer    += ( int )(AppMain.mtMathRand() % 1);
                        gms_GMK_SLOT_WORK.slot_step = 10;
                    }
                }
                else if (slot_step != 20)
                {
                    if (slot_step == 30)
                    {
                        gms_GMK_SLOT_WORK.current_reel = 2;
                        if (gms_GMK_SLOT_WORK.timer < 0)
                        {
                            gms_GMK_SLOT_WORK.slot_step = 80;
                        }
                        else if (gms_GMK_SLOT_WORK.freestop != 0)
                        {
                            if (gms_GMK_SLOT_WORK.lotresult < 0 || gms_GMK_SLOT_WORK.lotresult == 5 || gms_GMK_SLOT_WORK.lotresult == 6)
                            {
                                gms_GMK_SLOT_WORK.timer     = 0;
                                gms_GMK_SLOT_WORK.slot_step = 40;
                            }
                            else
                            {
                                gms_GMK_SLOT_WORK.timer = 60;
                                if (gms_GMK_SLOT_WORK.lotresult != 8)
                                {
                                    gms_GMK_SLOT_WORK.slot_step = 50;
                                }
                                else
                                {
                                    gms_GMK_SLOT_WORK.slot_step = 60;
                                }
                            }
                        }
                        else
                        {
                            gms_GMK_SLOT_WORK.timer     = 0;
                            gms_GMK_SLOT_WORK.slot_step = 40;
                        }
                    }
                }
                else
                {
                    gms_GMK_SLOT_WORK.current_reel = 1;
                    gms_GMK_SLOT_WORK.slot_step    = 40;
                    gms_GMK_SLOT_WORK.timer_next   = 0;
                    gms_GMK_SLOT_WORK.freestop     = 1;
                    gms_GMK_SLOT_WORK.timer        = 0;
                }
            }
            else if (slot_step <= 51)
            {
                switch (slot_step)
                {
                case 40:
                    if (gms_GMK_SLOT_WORK.freestop == 0)
                    {
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = ( int )AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = 0;
                        gms_GMK_SLOT_WORK.timer     = 0;
                        gms_GMK_SLOT_WORK.slot_step = 71;
                        goto IL_825;
                    }
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = ( int )(-( int )AppMain.GMD_GMK_SLOT_REEL_BRAKE);
                    gms_GMK_SLOT_WORK.slot_step++;
                    break;

                case 41:
                    break;

                default:
                    switch (slot_step)
                    {
                    case 50:
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = ( int )(-AppMain.GMD_GMK_SLOT_REEL_BRAKE / 2);
                        gms_GMK_SLOT_WORK.slot_step++;
                        break;

                    case 51:
                        break;

                    default:
                        goto IL_825;
                    }
                    if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd <= ( int )AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED + gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc)
                    {
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = ( int )AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = 0;
                        gms_GMK_SLOT_WORK.timer     = 30;
                        gms_GMK_SLOT_WORK.slot_step = 70;
                        goto IL_825;
                    }
                    goto IL_825;
                }
                if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd <= ( int )AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED + gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc)
                {
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = ( int )AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = 0;
                    gms_GMK_SLOT_WORK.timer     = 0;
                    gms_GMK_SLOT_WORK.slot_step = 70;
                }
            }
            else
            {
                int num;
                switch (slot_step)
                {
                case 60:
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = ( int )(-AppMain.GMD_GMK_SLOT_REEL_BRAKE / 2);
                    gms_GMK_SLOT_WORK.slot_step++;
                    break;

                case 61:
                    break;

                case 62:
                    num = ( int )(( ushort )gms_GMK_SLOT_REEL_STATUS_WORK.reel / ( ushort )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT % ( ushort )AppMain.GMD_GMK_SLOT_REEL_ALLMARK);
                    if (num == gms_GMK_SLOT_REEL_STATUS_WORK.reel_target_pos)
                    {
                        gms_GMK_SLOT_WORK.slot_step        = 69;
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel = ( short )(( int )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * num);
                        gms_GMK_SLOT_WORK.lotresult        = 1;
                        goto IL_825;
                    }
                    goto IL_825;

                case 63:
                case 64:
                case 65:
                case 66:
                case 67:
                case 68:
                    goto IL_825;

                case 69:
                    goto IL_431;

                case 70:
                    if (( ushort )gms_GMK_SLOT_REEL_STATUS_WORK.reel / ( ushort )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT != ( ushort )(( int )gms_GMK_SLOT_REEL_STATUS_WORK.reel - gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd) / ( ushort )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT)
                    {
                        goto IL_403;
                    }
                    goto IL_825;

                case 71:
                    goto IL_403;

                case 72:
                    goto IL_44A;

                default:
                    switch (slot_step)
                    {
                    case 80:
                    {
                        if (( ushort )gms_GMK_SLOT_REEL_STATUS_WORK.reel / ( ushort )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT == ( ushort )(( int )gms_GMK_SLOT_REEL_STATUS_WORK.reel - gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd) / ( ushort )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT)
                        {
                            goto IL_825;
                        }
                        AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK gms_GMK_SLOT_REEL_STATUS_WORK2 = gms_GMK_SLOT_REEL_STATUS_WORK;
                        gms_GMK_SLOT_REEL_STATUS_WORK2.reel          &= -4096;
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_target_pos = ( int )gms_GMK_SLOT_REEL_STATUS_WORK.reel;
                        int num2 = (int)(16 - (ushort)gms_GMK_SLOT_REEL_STATUS_WORK.reel / (ushort)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT & 15);
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_target_mark = ( int )AppMain.tbl_gmk_reel_mark[gms_GMK_SLOT_WORK.current_reel][num2];
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime      = 8;
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd         = ( int )AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                        GmSound.PlaySE("Casino5");
                        gms_GMK_SLOT_WORK.slot_step = 81;
                        break;
                    }

                    case 81:
                        break;

                    default:
                        goto IL_825;
                    }
                    if ((gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime & 1) == 0)
                    {
                        if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime == 4)
                        {
                            gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd /= 2;
                        }
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = -gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd;
                    }
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime--;
                    if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime != 0)
                    {
                        goto IL_825;
                    }
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel     = ( short )gms_GMK_SLOT_REEL_STATUS_WORK.reel_target_pos;
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = 0;
                    if (gms_GMK_SLOT_WORK.current_reel == 0)
                    {
                        gms_GMK_SLOT_WORK.timer     = gms_GMK_SLOT_WORK.timer_next;
                        gms_GMK_SLOT_WORK.timer    += ( int )(AppMain.mtMathRand() % 1);
                        gms_GMK_SLOT_WORK.slot_step = 20;
                        goto IL_825;
                    }
                    if (gms_GMK_SLOT_WORK.current_reel == 1)
                    {
                        gms_GMK_SLOT_WORK.timer     = gms_GMK_SLOT_WORK.timer_next;
                        gms_GMK_SLOT_WORK.timer    += ( int )(AppMain.mtMathRand() % 1);
                        gms_GMK_SLOT_WORK.slot_step = 30;
                        goto IL_825;
                    }
                    if (gms_GMK_SLOT_WORK.current_reel != 2)
                    {
                        goto IL_825;
                    }
                    if (gms_GMK_SLOT_WORK.lotresult == 9)
                    {
                        if (gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == gms_GMK_SLOT_WORK.reel_status[1].reel_target_mark && gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == gms_GMK_SLOT_WORK.reel_status[2].reel_target_mark)
                        {
                            gms_GMK_SLOT_WORK.lotresult = ( short )gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark;
                        }
                        else
                        {
                            int num3 = 5;
                            for (int i = 0; i < 3; i++)
                            {
                                if (gms_GMK_SLOT_WORK.reel_status[i].reel_target_mark == 4)
                                {
                                    gms_GMK_SLOT_WORK.lotresult = ( short )num3;
                                    num3++;
                                }
                            }
                        }
                    }
                    if (gms_GMK_SLOT_WORK.lotresult < 0 || gms_GMK_SLOT_WORK.lotresult == 9)
                    {
                        obj_work.ppFunc = AppMain.gmGmkSlotGameLose;
                        goto IL_825;
                    }
                    obj_work.ppFunc = AppMain.gmGmkSlotGameHit;
                    goto IL_825;
                }
                if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd <= ( int )AppMain.GMD_GMK_SLOT_REEL_EGG_SPEED + gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc)
                {
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = ( int )AppMain.GMD_GMK_SLOT_REEL_EGG_SPEED;
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_acc = 0;
                    gms_GMK_SLOT_WORK.slot_step++;
                    gms_GMK_SLOT_WORK.suberi_cnt   = 0;
                    gms_GMK_SLOT_WORK.suberi_input = 0;
                    goto IL_825;
                }
                goto IL_825;
IL_403:
                num = ( int )(( ushort )gms_GMK_SLOT_REEL_STATUS_WORK.reel / ( ushort )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT % ( ushort )AppMain.GMD_GMK_SLOT_REEL_ALLMARK);
                if (num != gms_GMK_SLOT_REEL_STATUS_WORK.reel_target_pos)
                {
                    goto IL_825;
                }
                gms_GMK_SLOT_REEL_STATUS_WORK.reel = ( short )(( int )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * num);
IL_431:
                gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime = 8;
                GmSound.PlaySE("Casino5");
                gms_GMK_SLOT_WORK.slot_step = 72;
IL_44A:
                if ((gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime & 1) == 0)
                {
                    if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime == 4)
                    {
                        gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd /= 2;
                    }
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = -gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd;
                }
                gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime--;
                if (gms_GMK_SLOT_REEL_STATUS_WORK.reel_extime == 0)
                {
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel     = ( short )(( int )AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * gms_GMK_SLOT_REEL_STATUS_WORK.reel_target_pos);
                    gms_GMK_SLOT_REEL_STATUS_WORK.reel_spd = 0;
                    if (gms_GMK_SLOT_WORK.current_reel == 0)
                    {
                        gms_GMK_SLOT_WORK.timer     = gms_GMK_SLOT_WORK.timer_next;
                        gms_GMK_SLOT_WORK.timer    += ( int )(AppMain.mtMathRand() % 1);
                        gms_GMK_SLOT_WORK.slot_step = 20;
                    }
                    else if (gms_GMK_SLOT_WORK.current_reel == 1)
                    {
                        gms_GMK_SLOT_WORK.timer     = gms_GMK_SLOT_WORK.timer_next;
                        gms_GMK_SLOT_WORK.timer    += ( int )(AppMain.mtMathRand() % 1);
                        gms_GMK_SLOT_WORK.slot_step = 30;
                    }
                    else if (gms_GMK_SLOT_WORK.current_reel == 2)
                    {
                        if (gms_GMK_SLOT_WORK.lotresult == 9)
                        {
                            if (gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == gms_GMK_SLOT_WORK.reel_status[1].reel_target_mark && gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark == gms_GMK_SLOT_WORK.reel_status[2].reel_target_mark)
                            {
                                gms_GMK_SLOT_WORK.lotresult = ( short )gms_GMK_SLOT_WORK.reel_status[0].reel_target_mark;
                            }
                            else
                            {
                                int num4 = 5;
                                for (int j = 0; j < 3; j++)
                                {
                                    if (gms_GMK_SLOT_WORK.reel_status[j].reel_target_mark == 4)
                                    {
                                        gms_GMK_SLOT_WORK.lotresult = ( short )num4;
                                        num4++;
                                    }
                                }
                            }
                        }
                        if (gms_GMK_SLOT_WORK.lotresult < 0 || gms_GMK_SLOT_WORK.lotresult == 9)
                        {
                            obj_work.ppFunc = AppMain.gmGmkSlotGameLose;
                        }
                        else
                        {
                            obj_work.ppFunc = AppMain.gmGmkSlotGameHit;
                        }
                    }
                }
            }
        }
        else
        {
            gms_GMK_SLOT_WORK.timer--;
        }
IL_825:
        if (gms_GMK_SLOT_WORK.slot_se_timer > 0)
        {
            gms_GMK_SLOT_WORK.slot_se_timer--;
        }
        for (int k = 0; k < 3; k++)
        {
            AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK gms_GMK_SLOT_REEL_STATUS_WORK3 = gms_GMK_SLOT_WORK.reel_status[k];
            if (gms_GMK_SLOT_REEL_STATUS_WORK3.reel_spd != 0)
            {
                short num5 = (short)((int)gms_GMK_SLOT_REEL_STATUS_WORK3.reel + gms_GMK_SLOT_REEL_STATUS_WORK3.reel_spd);
                if (num5 / 4096 != gms_GMK_SLOT_REEL_STATUS_WORK3.reel / 4096 && ( int )(num5 & -4096) != gms_GMK_SLOT_REEL_STATUS_WORK3.reel_se && gms_GMK_SLOT_WORK.slot_se_timer <= 0)
                {
                    GmSound.PlaySE("Casino4");
                    gms_GMK_SLOT_WORK.slot_se_timer = 3;
                }
                gms_GMK_SLOT_REEL_STATUS_WORK3.reel_se = ( int )(num5 & -4096);
            }
        }
        AppMain.gmGmkSlot_ReelControl(gms_GMK_SLOT_WORK.reel_status[0]);
        AppMain.gmGmkSlot_ReelControl(gms_GMK_SLOT_WORK.reel_status[1]);
        AppMain.gmGmkSlot_ReelControl(gms_GMK_SLOT_WORK.reel_status[2]);
    }
Ejemplo n.º 18
0
    private static void gmGmkSlotGameStart(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
        gmsGmkSlotWork.slot_step     = 0;
        gmsGmkSlotWork.current_reel  = 0;
        gmsGmkSlotWork.slot_se_timer = 0;
        int num1 = (int)(AppMain.rand_result % 100U) - (int)AppMain.GMD_GMK_SLOT_1ST_LOT;

        if (num1 >= 0)
        {
            int num2 = num1 * 100 / (100 - (int)AppMain.GMD_GMK_SLOT_1ST_LOT);
            int index1;
            for (index1 = 0; index1 < 5; ++index1)
            {
                num2 -= (int)gmsGmkSlotWork.prob[index1];
                if (num2 <= 0)
                {
                    gmsGmkSlotWork.prob[index1] = AppMain.tbl_gmk_slot_prob[index1];
                    break;
                }
                if ((int)gmsGmkSlotWork.prob[index1] < (int)AppMain.tbl_gmk_slot_prob_max[index1])
                {
                    gmsGmkSlotWork.prob[index1] += AppMain.tbl_gmk_slot_prob[index1];
                    if ((int)gmsGmkSlotWork.prob[index1] > (int)AppMain.tbl_gmk_slot_prob_max[index1])
                    {
                        gmsGmkSlotWork.prob[index1] = AppMain.tbl_gmk_slot_prob_max[index1];
                    }
                }
            }
            gmsGmkSlotWork.lotresult = (short)index1;
            if (index1 != 5)
            {
                gmsGmkSlotWork.reel_status[0].reel_target_mark = gmsGmkSlotWork.reel_status[1].reel_target_mark = gmsGmkSlotWork.reel_status[2].reel_target_mark = index1;
            }
            else
            {
                int num3 = 0;
                for (int index2 = 0; index2 < 3; ++index2)
                {
                    gmsGmkSlotWork.reel_status[index2].reel_target_mark = (int)(AppMain.getRand() % 5U);
                    if (gmsGmkSlotWork.reel_status[index2].reel_target_mark == 4)
                    {
                        ++num3;
                    }
                }
                int index3 = (int)(AppMain.getRand() % 3U);
                if (num3 <= 1)
                {
                    gmsGmkSlotWork.lotresult = (short)5;
                    if (num3 == 0)
                    {
                        gmsGmkSlotWork.reel_status[index3].reel_target_mark = 4;
                    }
                }
                else if (num3 >= 2)
                {
                    gmsGmkSlotWork.lotresult = (short)6;
                    if (num3 == 3)
                    {
                        gmsGmkSlotWork.reel_status[index3].reel_target_mark = (int)(AppMain.getRand() % 4U);
                    }
                }
            }
        }
        else if (num1 < (int)-AppMain.GMD_GMK_SLOT_EGG_LOT)
        {
            gmsGmkSlotWork.lotresult = (short)-1;
            for (int index = 0; index < 3; ++index)
            {
                gmsGmkSlotWork.reel_status[index].reel_target_mark = (int)(AppMain.getRand() % 4U);
            }
            if (gmsGmkSlotWork.reel_status[0].reel_target_mark == gmsGmkSlotWork.reel_status[1].reel_target_mark && gmsGmkSlotWork.reel_status[1].reel_target_mark == gmsGmkSlotWork.reel_status[2].reel_target_mark)
            {
                if (gmsGmkSlotWork.reel_status[0].reel_target_mark == 1)
                {
                    gmsGmkSlotWork.lotresult = (short)8;
                }
                else
                {
                    int num2;
                    do
                    {
                        num2 = (int)(AppMain.getRand() % 4U);
                    }while (gmsGmkSlotWork.reel_status[0].reel_target_mark == num2);
                    gmsGmkSlotWork.reel_status[2].reel_target_mark = num2;
                }
            }
        }
        else
        {
            gmsGmkSlotWork.reel_status[0].reel_target_mark = gmsGmkSlotWork.reel_status[1].reel_target_mark = gmsGmkSlotWork.reel_status[2].reel_target_mark = 1;
            gmsGmkSlotWork.lotresult = (short)8;
        }
        for (int index = 0; index < 3; ++index)
        {
            ushort num2 = (ushort)AppMain.getRand();
            do
            {
                num2 = (ushort)(((uint)num2 + 1U) % (uint)AppMain.GMD_GMK_SLOT_REEL_ALLMARK);
                gmsGmkSlotWork.reel_status[index].reel_target_pos = (int)num2;
            }while ((int)AppMain.tbl_gmk_reel_mark[index][(int)AppMain.GMD_GMK_SLOT_REEL_ALLMARK - (int)num2 & 15] != gmsGmkSlotWork.reel_status[index].reel_target_mark);
        }
        gmsGmkSlotWork.freestop = 0;
        AppMain.gmGmkSlotGameStart_100(obj_work);
        obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameStart_100);
    }
Ejemplo n.º 19
0
    private static void gmGmkSlotGameStart_100(AppMain.OBS_OBJECT_WORK obj_work)
    {
        AppMain.GMS_GMK_SLOT_WORK gmsGmkSlotWork = (AppMain.GMS_GMK_SLOT_WORK)obj_work;
        if (gmsGmkSlotWork.timer <= 0)
        {
            AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK reelStatu = gmsGmkSlotWork.reel_status[gmsGmkSlotWork.current_reel];
            switch (gmsGmkSlotWork.slot_step)
            {
            case 0:
                gmsGmkSlotWork.reel_status[0].reel_time = 0;
                gmsGmkSlotWork.reel_status[1].reel_time = 15;
                gmsGmkSlotWork.reel_status[2].reel_time = 30;
                gmsGmkSlotWork.reel_status[0].reel_acc  = (int)AppMain.GMD_GMK_SLOT_REEL_ACC;
                gmsGmkSlotWork.reel_status[1].reel_acc  = (int)AppMain.GMD_GMK_SLOT_REEL_ACC;
                gmsGmkSlotWork.reel_status[2].reel_acc  = (int)AppMain.GMD_GMK_SLOT_REEL_ACC;
                gmsGmkSlotWork.timer     = 10;
                gmsGmkSlotWork.timer    += (int)AppMain.mtMathRand() % 1;
                gmsGmkSlotWork.slot_step = 10;
                break;

            case 10:
                gmsGmkSlotWork.current_reel = 0;
                gmsGmkSlotWork.slot_step    = 40;
                gmsGmkSlotWork.timer_next   = 0;
                gmsGmkSlotWork.freestop     = 1;
                gmsGmkSlotWork.timer        = 0;
                break;

            case 20:
                gmsGmkSlotWork.current_reel = 1;
                gmsGmkSlotWork.slot_step    = 40;
                gmsGmkSlotWork.timer_next   = 0;
                gmsGmkSlotWork.freestop     = 1;
                gmsGmkSlotWork.timer        = 0;
                break;

            case 30:
                gmsGmkSlotWork.current_reel = 2;
                if (gmsGmkSlotWork.timer < 0)
                {
                    gmsGmkSlotWork.slot_step = 80;
                    break;
                }
                if (gmsGmkSlotWork.freestop != 0)
                {
                    if (gmsGmkSlotWork.lotresult < (short)0 || gmsGmkSlotWork.lotresult == (short)5 || gmsGmkSlotWork.lotresult == (short)6)
                    {
                        gmsGmkSlotWork.timer     = 0;
                        gmsGmkSlotWork.slot_step = 40;
                        break;
                    }
                    gmsGmkSlotWork.timer     = 60;
                    gmsGmkSlotWork.slot_step = gmsGmkSlotWork.lotresult == (short)8 ? 60 : 50;
                    break;
                }
                gmsGmkSlotWork.timer     = 0;
                gmsGmkSlotWork.slot_step = 40;
                break;

            case 40:
                if (gmsGmkSlotWork.freestop == 0)
                {
                    reelStatu.reel_spd       = (int)AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                    reelStatu.reel_acc       = 0;
                    gmsGmkSlotWork.timer     = 0;
                    gmsGmkSlotWork.slot_step = 71;
                    break;
                }
                reelStatu.reel_acc = (int)-AppMain.GMD_GMK_SLOT_REEL_BRAKE;
                ++gmsGmkSlotWork.slot_step;
                goto case 41;

            case 41:
                if (reelStatu.reel_spd <= (int)AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED + reelStatu.reel_acc)
                {
                    reelStatu.reel_spd       = (int)AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                    reelStatu.reel_acc       = 0;
                    gmsGmkSlotWork.timer     = 0;
                    gmsGmkSlotWork.slot_step = 70;
                    break;
                }
                break;

            case 50:
                reelStatu.reel_acc = (int)-AppMain.GMD_GMK_SLOT_REEL_BRAKE / 2;
                ++gmsGmkSlotWork.slot_step;
                goto case 51;

            case 51:
                if (reelStatu.reel_spd <= (int)AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED + reelStatu.reel_acc)
                {
                    reelStatu.reel_spd       = (int)AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                    reelStatu.reel_acc       = 0;
                    gmsGmkSlotWork.timer     = 30;
                    gmsGmkSlotWork.slot_step = 70;
                    break;
                }
                break;

            case 60:
                reelStatu.reel_acc = (int)-AppMain.GMD_GMK_SLOT_REEL_BRAKE / 2;
                ++gmsGmkSlotWork.slot_step;
                goto case 61;

            case 61:
                if (reelStatu.reel_spd <= (int)AppMain.GMD_GMK_SLOT_REEL_EGG_SPEED + reelStatu.reel_acc)
                {
                    reelStatu.reel_spd = (int)AppMain.GMD_GMK_SLOT_REEL_EGG_SPEED;
                    reelStatu.reel_acc = 0;
                    ++gmsGmkSlotWork.slot_step;
                    gmsGmkSlotWork.suberi_cnt   = 0;
                    gmsGmkSlotWork.suberi_input = 0;
                    break;
                }
                break;

            case 62:
                int num1 = (int)(ushort)reelStatu.reel / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT % (int)AppMain.GMD_GMK_SLOT_REEL_ALLMARK;
                if (num1 == reelStatu.reel_target_pos)
                {
                    gmsGmkSlotWork.slot_step = 69;
                    reelStatu.reel           = (short)((int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * num1);
                    gmsGmkSlotWork.lotresult = (short)1;
                    break;
                }
                break;

            case 69:
                reelStatu.reel_extime = 8;
                AppMain.GmSoundPlaySE("Casino5");
                gmsGmkSlotWork.slot_step = 72;
                goto case 72;

            case 70:
                if ((int)(ushort)reelStatu.reel / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT == (int)(ushort)((uint)reelStatu.reel - (uint)reelStatu.reel_spd) / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT)
                {
                    break;
                }
                goto case 71;

            case 71:
                int num2 = (int)(ushort)reelStatu.reel / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT % (int)AppMain.GMD_GMK_SLOT_REEL_ALLMARK;
                if (num2 == reelStatu.reel_target_pos)
                {
                    reelStatu.reel = (short)((int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * num2);
                    goto case 69;
                }
                else
                {
                    break;
                }

            case 72:
                if ((reelStatu.reel_extime & 1) == 0)
                {
                    if (reelStatu.reel_extime == 4)
                    {
                        reelStatu.reel_spd /= 2;
                    }
                    reelStatu.reel_spd = -reelStatu.reel_spd;
                }
                --reelStatu.reel_extime;
                if (reelStatu.reel_extime == 0)
                {
                    reelStatu.reel     = (short)((int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT * reelStatu.reel_target_pos);
                    reelStatu.reel_spd = 0;
                    if (gmsGmkSlotWork.current_reel == 0)
                    {
                        gmsGmkSlotWork.timer     = gmsGmkSlotWork.timer_next;
                        gmsGmkSlotWork.timer    += (int)AppMain.mtMathRand() % 1;
                        gmsGmkSlotWork.slot_step = 20;
                        break;
                    }
                    if (gmsGmkSlotWork.current_reel == 1)
                    {
                        gmsGmkSlotWork.timer     = gmsGmkSlotWork.timer_next;
                        gmsGmkSlotWork.timer    += (int)AppMain.mtMathRand() % 1;
                        gmsGmkSlotWork.slot_step = 30;
                        break;
                    }
                    if (gmsGmkSlotWork.current_reel == 2)
                    {
                        if (gmsGmkSlotWork.lotresult == (short)9)
                        {
                            if (gmsGmkSlotWork.reel_status[0].reel_target_mark == gmsGmkSlotWork.reel_status[1].reel_target_mark && gmsGmkSlotWork.reel_status[0].reel_target_mark == gmsGmkSlotWork.reel_status[2].reel_target_mark)
                            {
                                gmsGmkSlotWork.lotresult = (short)gmsGmkSlotWork.reel_status[0].reel_target_mark;
                            }
                            else
                            {
                                int num3 = 5;
                                for (int index = 0; index < 3; ++index)
                                {
                                    if (gmsGmkSlotWork.reel_status[index].reel_target_mark == 4)
                                    {
                                        gmsGmkSlotWork.lotresult = (short)num3;
                                        ++num3;
                                    }
                                }
                            }
                        }
                        obj_work.ppFunc = gmsGmkSlotWork.lotresult < (short)0 || gmsGmkSlotWork.lotresult == (short)9 ? new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameLose) : new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameHit);
                        break;
                    }
                    break;
                }
                break;

            case 80:
                if ((int)(ushort)reelStatu.reel / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT != (int)(ushort)((uint)reelStatu.reel - (uint)reelStatu.reel_spd) / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT)
                {
                    reelStatu.reel           &= (short)-4096;
                    reelStatu.reel_target_pos = (int)reelStatu.reel;
                    int index = 16 - (int)(ushort)reelStatu.reel / (int)AppMain.GMD_GMK_SLOT_REEL1KOMA_HEIGHT & 15;
                    reelStatu.reel_target_mark = (int)AppMain.tbl_gmk_reel_mark[gmsGmkSlotWork.current_reel][index];
                    reelStatu.reel_extime      = 8;
                    reelStatu.reel_spd         = (int)AppMain.GMD_GMK_SLOT_REEL_MIN_SPEED;
                    AppMain.GmSoundPlaySE("Casino5");
                    gmsGmkSlotWork.slot_step = 81;
                    goto case 81;
                }
                else
                {
                    break;
                }

            case 81:
                if ((reelStatu.reel_extime & 1) == 0)
                {
                    if (reelStatu.reel_extime == 4)
                    {
                        reelStatu.reel_spd /= 2;
                    }
                    reelStatu.reel_spd = -reelStatu.reel_spd;
                }
                --reelStatu.reel_extime;
                if (reelStatu.reel_extime == 0)
                {
                    reelStatu.reel     = (short)reelStatu.reel_target_pos;
                    reelStatu.reel_spd = 0;
                    if (gmsGmkSlotWork.current_reel == 0)
                    {
                        gmsGmkSlotWork.timer     = gmsGmkSlotWork.timer_next;
                        gmsGmkSlotWork.timer    += (int)AppMain.mtMathRand() % 1;
                        gmsGmkSlotWork.slot_step = 20;
                        break;
                    }
                    if (gmsGmkSlotWork.current_reel == 1)
                    {
                        gmsGmkSlotWork.timer     = gmsGmkSlotWork.timer_next;
                        gmsGmkSlotWork.timer    += (int)AppMain.mtMathRand() % 1;
                        gmsGmkSlotWork.slot_step = 30;
                        break;
                    }
                    if (gmsGmkSlotWork.current_reel == 2)
                    {
                        if (gmsGmkSlotWork.lotresult == (short)9)
                        {
                            if (gmsGmkSlotWork.reel_status[0].reel_target_mark == gmsGmkSlotWork.reel_status[1].reel_target_mark && gmsGmkSlotWork.reel_status[0].reel_target_mark == gmsGmkSlotWork.reel_status[2].reel_target_mark)
                            {
                                gmsGmkSlotWork.lotresult = (short)gmsGmkSlotWork.reel_status[0].reel_target_mark;
                            }
                            else
                            {
                                int num3 = 5;
                                for (int index = 0; index < 3; ++index)
                                {
                                    if (gmsGmkSlotWork.reel_status[index].reel_target_mark == 4)
                                    {
                                        gmsGmkSlotWork.lotresult = (short)num3;
                                        ++num3;
                                    }
                                }
                            }
                        }
                        obj_work.ppFunc = gmsGmkSlotWork.lotresult < (short)0 || gmsGmkSlotWork.lotresult == (short)9 ? new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameLose) : new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSlotGameHit);
                        break;
                    }
                    break;
                }
                break;
            }
        }
        else
        {
            --gmsGmkSlotWork.timer;
        }
        if (gmsGmkSlotWork.slot_se_timer > 0)
        {
            --gmsGmkSlotWork.slot_se_timer;
        }
        for (int index = 0; index < 3; ++index)
        {
            AppMain.GMS_GMK_SLOT_REEL_STATUS_WORK reelStatu = gmsGmkSlotWork.reel_status[index];
            if (reelStatu.reel_spd != 0)
            {
                short num = (short)((int)reelStatu.reel + reelStatu.reel_spd);
                if ((int)num / 4096 != (int)reelStatu.reel / 4096 && ((int)num & -4096) != reelStatu.reel_se && gmsGmkSlotWork.slot_se_timer <= 0)
                {
                    AppMain.GmSoundPlaySE("Casino4");
                    gmsGmkSlotWork.slot_se_timer = 3;
                }
                reelStatu.reel_se = (int)num & -4096;
            }
        }
        AppMain.gmGmkSlot_ReelControl(gmsGmkSlotWork.reel_status[0]);
        AppMain.gmGmkSlot_ReelControl(gmsGmkSlotWork.reel_status[1]);
        AppMain.gmGmkSlot_ReelControl(gmsGmkSlotWork.reel_status[2]);
    }