private static void gmEveMgrCreateEventBlkEvent( uint flag, ushort bx, ushort by, int[] r_on, int[] r_off) { uint num1 = (uint)bx + (uint)AppMain.gm_eve_data.width * (uint)by; AppMain.GMS_EVE_DATA_EV_LIST ev = AppMain.gm_eve_data.ev_list[(int)num1]; ushort eveNum = ev.eve_num; AppMain.ArrayPointer <AppMain.GMS_EVE_RECORD_EVENT> arrayPointer = new AppMain.ArrayPointer <AppMain.GMS_EVE_RECORD_EVENT>(ev.eve_rec); int num2 = (int)bx << 8; int num3 = (int)by << 8; int num4 = 0; while (num4 < (int)eveNum) { if ((((int)flag & 4) == 0 || ((int)arrayPointer[0].flag & 32768) != 0) && arrayPointer[0].pos_x != byte.MaxValue) { int num5 = (int)arrayPointer[0].pos_x + num2; int num6 = (int)arrayPointer[0].pos_y + num3; int num7 = (int)AppMain.g_gm_event_size_tbl[(int)arrayPointer[0].id]; int num8 = num7 + 16 + 32; if (((int)flag & 1) == 0 || num5 >= r_on[0] - num8 && num5 <= r_on[2] + num8 && (num6 >= r_on[1] - num8 && num6 <= r_on[3] + num8)) { int num9 = num7 + 16; if ((((int)flag & 2) == 0 || num5 <= r_off[0] - num9 || (num5 >= r_off[2] + num9 || num6 <= r_off[1] - num9) || num6 >= r_off[3] + num9) && (arrayPointer[0].id < (ushort)346 && AppMain.g_gm_event_tbl[(int)arrayPointer[0].id] != null)) { if (((int)arrayPointer[0].flag & 4096 << (int)(ushort)AppMain.GsGetGameLevel()) != 0) { arrayPointer[0].pos_x = byte.MaxValue; } else { AppMain.OBS_OBJECT_WORK obsObjectWork = AppMain.g_gm_event_tbl[(int)arrayPointer[0].id](arrayPointer[0], num5 << 12, num6 << 12, (byte)0); } } } } ++num4; ++arrayPointer; } }
// Token: 0x06000084 RID: 132 RVA: 0x00007560 File Offset: 0x00005760 private static void gmEveMgrCreateEventBlkEvent(uint flag, ushort bx, ushort by, int[] r_on, int[] r_off) { uint num = (uint)(bx + AppMain.gm_eve_data.width * by); AppMain.GMS_EVE_DATA_EV_LIST gms_EVE_DATA_EV_LIST = AppMain.gm_eve_data.ev_list[(int)((UIntPtr)num)]; ushort eve_num = gms_EVE_DATA_EV_LIST.eve_num; AppMain.ArrayPointer <AppMain.GMS_EVE_RECORD_EVENT> pointer = new AppMain.ArrayPointer <AppMain.GMS_EVE_RECORD_EVENT>(gms_EVE_DATA_EV_LIST.eve_rec); int num2 = (int)bx << 8; int num3 = (int)by << 8; int i = 0; while (i < ( int )eve_num) { if (((flag & 4U) == 0U || (pointer[0].flag & 32768) != 0) && pointer[0].pos_x != 255) { int num4 = (int)pointer[0].pos_x + num2; int num5 = (int)pointer[0].pos_y + num3; int num6 = (int)AppMain.g_gm_event_size_tbl[(int)pointer[0].id]; int num7 = num6 + 16 + 32; if ((flag & 1U) == 0U || (num4 >= r_on[0] - num7 && num4 <= r_on[2] + num7 && num5 >= r_on[1] - num7 && num5 <= r_on[3] + num7)) { int num8 = num6 + 16; if (((flag & 2U) == 0U || num4 <= r_off[0] - num8 || num4 >= r_off[2] + num8 || num5 <= r_off[1] - num8 || num5 >= r_off[3] + num8) && pointer[0].id < 346 && AppMain.g_gm_event_tbl[( int )pointer[0].id] != null) { if ((( int )pointer[0].flag & 4096 << ( int )(( ushort )AppMain.GsGetGameLevel())) != 0) { pointer[0].pos_x = byte.MaxValue; } else { AppMain.g_gm_event_tbl[( int )pointer[0].id](pointer[0], num4 << 12, num5 << 12, 0); } } } } i++; pointer = ++pointer; } }