private static void gmBoss4ChibiFuncBoost(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_BOSS4_CHIBI_WORK parentObj1 = (AppMain.GMS_BOSS4_CHIBI_WORK)obj_work.parent_obj; AppMain.OBS_OBJECT_WORK parentObj2 = obj_work.parent_obj; AppMain.MTM_ASSERT((int)parentObj1.node_work.snm_work.reg_node_max); if (((int)obj_work.disp_flag & 8) != 0) { obj_work.flag |= 4U; } if (((int)parentObj2.disp_flag & 32) != 0) { AppMain.gmBoss4ChibiBoosterDelete(parentObj1); } obj_work.disp_flag &= 4294967263U; if ((int)parentObj1.dir.cur_angle < (int)AppMain.AKM_DEGtoA16(50) && (int)parentObj1.dir.cur_angle > (int)AppMain.AKM_DEGtoA16(-50)) { obj_work.disp_flag |= 32U; } AppMain.GmBsCmnUpdateObject3DESStuckWithNode(obj_work, parentObj1.node_work.snm_work, parentObj1.node_work.work[0], 1); obj_work.disp_flag &= 4294963199U; if (((int)AppMain.g_obj.flag & 1) != 0) { obj_work.disp_flag |= 4096U; } else { obj_work.pos.x += parentObj2.spd.x; obj_work.pos.y += parentObj2.spd.y; obj_work.pos.x += AppMain.GmBoss4GetScrollOffset(); } }
// Token: 0x060005F3 RID: 1523 RVA: 0x00034ABC File Offset: 0x00032CBC private static AppMain.DMS_STFRL_SONIC_WORK DmStfrlMdlCtrlSetSonicObj() { AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.OBM_OBJECT_TASK_DETAIL_INIT(24576, 0, 0, 0, () => new AppMain.DMS_STFRL_SONIC_WORK(), "STAFFROLL_SONIC"); AppMain.DMS_STFRL_SONIC_WORK dms_STFRL_SONIC_WORK = (AppMain.DMS_STFRL_SONIC_WORK)obs_OBJECT_WORK; AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.dm_stfrl_sonic_obj_3d_list[0], obs_OBJECT_WORK.obj_3d); obs_OBJECT_WORK.obj_3d.blend_spd = 0.0625f; AppMain.ObjDrawObjectSetToon(obs_OBJECT_WORK); AppMain.OBS_ACTION3D_NN_WORK obj_3d = dms_STFRL_SONIC_WORK.obj_work.obj_3d; AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, true, AppMain.g_gm_player_data_work[( int )(( UIntPtr )0)][4], null, 0, null, 136, 16); obs_OBJECT_WORK.flag |= 16U; obs_OBJECT_WORK.disp_flag |= 4194309U; obs_OBJECT_WORK.disp_flag &= 4294967263U; obs_OBJECT_WORK.disp_flag |= 150995456U; obs_OBJECT_WORK.obj_3d.drawflag |= 8388608U; obs_OBJECT_WORK.pos.x = 0; obs_OBJECT_WORK.pos.y = 98304; obs_OBJECT_WORK.pos.z = -12288; obs_OBJECT_WORK.dir.y = ( ushort )AppMain.AKM_DEGtoA16(90); obs_OBJECT_WORK.obj_3d.draw_state.alpha.alpha = 1f; dms_STFRL_SONIC_WORK.alpha = 1f; AppMain.ObjDrawObjectActionSet(obs_OBJECT_WORK, 21); obs_OBJECT_WORK.ppOut = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.dmStfrlMdlCtrlSonicDrawFunc); obs_OBJECT_WORK.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.dmStfrlMdlCtrlSonicProcWaitSetup); return(dms_STFRL_SONIC_WORK); }
public static void gmEneTStarWalkMain(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_ENE_T_STAR_WORK gmsEneTStarWork = (AppMain.GMS_ENE_T_STAR_WORK)obj_work; obj_work.disp_flag |= 4U; if (gmsEneTStarWork.rotate > (ushort)0) { obj_work.dir.z += (ushort)AppMain.AKM_DEGtoA16(10); --gmsEneTStarWork.rotate; if (gmsEneTStarWork.rotate == (ushort)0) { obj_work.dir.z = (ushort)0; } } if (gmsEneTStarWork.timer > 0) { --gmsEneTStarWork.timer; if (gmsEneTStarWork.timer != 60) { return; } gmsEneTStarWork.rotate = (ushort)36; } else { obj_work.spd.x = 0; obj_work.spd.y = 0; gmsEneTStarWork.timer = 15; obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneTStarStopMain); } }
private static AppMain.OBS_OBJECT_WORK GmEneUnidesInit( AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type) { AppMain.UNREFERENCED_PARAMETER((object)type); AppMain.OBS_OBJECT_WORK work = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_ENE_UNIDES_WORK()), "ENE_UNIDES"); AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)work; AppMain.GMS_ENE_UNIDES_WORK gmsEneUnidesWork = (AppMain.GMS_ENE_UNIDES_WORK)work; AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_ene_unides_obj_3d_list[0], gmsEnemy3DWork.obj_3d); AppMain.ObjObjectAction3dNNMotionLoad(work, 0, true, AppMain.ObjDataGet(692), (string)null, 0, (AppMain.AMS_AMB_HEADER)null); AppMain.ObjDrawObjectSetToon(work); work.pos.z = 655360; AppMain.OBS_RECT_WORK pRec1 = gmsEnemy3DWork.ene_com.rect_work[1]; AppMain.ObjRectWorkSet(pRec1, (short)-8, (short)0, (short)8, (short)16); pRec1.flag |= 4U; AppMain.OBS_RECT_WORK pRec2 = gmsEnemy3DWork.ene_com.rect_work[0]; AppMain.ObjRectWorkSet(pRec2, (short)-16, (short)-8, (short)16, (short)16); pRec2.flag |= 4U; gmsEnemy3DWork.ene_com.rect_work[2].flag &= 4294967291U; AppMain.OBS_RECT_WORK pRec3 = gmsEnemy3DWork.ene_com.rect_work[2]; AppMain.ObjRectWorkSet(pRec3, (short)-19, (short)-16, (short)19, (short)16); pRec3.flag &= 4294967291U; work.move_flag &= 4294967167U; work.move_flag |= 256U; if (((int)eve_rec.flag & 1) == 0) { work.disp_flag |= 1U; work.dir.y = (ushort)AppMain.AKM_DEGtoA16(45); } else { work.dir.y = (ushort)AppMain.AKM_DEGtoA16(-45); } work.user_work = (uint)(work.pos.x + ((int)eve_rec.left << 12)); work.user_flag = (uint)(work.pos.x + ((int)eve_rec.left + (int)eve_rec.width << 12)); gmsEneUnidesWork.spd_dec = 76; gmsEneUnidesWork.spd_dec_dist = 15360; gmsEneUnidesWork.len = 17.5f; gmsEneUnidesWork.rot_x = AppMain.AKM_DEGtoA32(90f); gmsEneUnidesWork.rot_y = AppMain.AKM_DEGtoA32(0.0f); gmsEneUnidesWork.rot_z = AppMain.AKM_DEGtoA32(0.0f); gmsEneUnidesWork.num = 0; AppMain.gmEneUnidesWaitInit(work); for (int index = 0; index < 4; ++index) { AppMain.OBS_OBJECT_WORK obsObjectWork = AppMain.GmEventMgrLocalEventBirth((ushort)309, pos_x, pos_y, (ushort)0, (sbyte)0, (sbyte)0, (byte)0, (byte)0, (byte)0); obsObjectWork.parent_obj = work; ((AppMain.GMS_ENE_UNIDES_WORK)obsObjectWork).num = index; ++gmsEneUnidesWork.num; } gmsEneUnidesWork.attack = 0; gmsEneUnidesWork.attack_first = 0; gmsEneUnidesWork.zoom_now = 0; gmsEneUnidesWork.zoom = 1f; work.obj_3d.use_light_flag &= 4294967294U; work.obj_3d.use_light_flag |= 64U; return(work); }
// Token: 0x0600078F RID: 1935 RVA: 0x00043078 File Offset: 0x00041278 public static void gmEneTStarWalkMain(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_ENE_T_STAR_WORK gms_ENE_T_STAR_WORK = (AppMain.GMS_ENE_T_STAR_WORK)obj_work; obj_work.disp_flag |= 4U; if (gms_ENE_T_STAR_WORK.rotate > 0) { obj_work.dir.z = ( ushort )(obj_work.dir.z + ( ushort )AppMain.AKM_DEGtoA16(10)); AppMain.GMS_ENE_T_STAR_WORK gms_ENE_T_STAR_WORK2 = gms_ENE_T_STAR_WORK; gms_ENE_T_STAR_WORK2.rotate -= 1; if (gms_ENE_T_STAR_WORK.rotate == 0) { obj_work.dir.z = 0; } } if (gms_ENE_T_STAR_WORK.timer > 0) { gms_ENE_T_STAR_WORK.timer--; if (gms_ENE_T_STAR_WORK.timer == 60) { gms_ENE_T_STAR_WORK.rotate = 36; } return; } obj_work.spd.x = 0; obj_work.spd.y = 0; gms_ENE_T_STAR_WORK.timer = 15; obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneTStarStopMain); }
// Token: 0x06000DEF RID: 3567 RVA: 0x0007AAF4 File Offset: 0x00078CF4 private static AppMain.OBS_OBJECT_WORK GmEneUnidesInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type) { AppMain.UNREFERENCED_PARAMETER(type); AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_ENE_UNIDES_WORK(), "ENE_UNIDES"); AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK; AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK = (AppMain.GMS_ENE_UNIDES_WORK)obs_OBJECT_WORK; AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_ene_unides_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d); AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, true, AppMain.ObjDataGet(692), null, 0, null); AppMain.ObjDrawObjectSetToon(obs_OBJECT_WORK); obs_OBJECT_WORK.pos.z = 655360; AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[1]; AppMain.ObjRectWorkSet(obs_RECT_WORK, -8, 0, 8, 16); obs_RECT_WORK.flag |= 4U; obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[0]; AppMain.ObjRectWorkSet(obs_RECT_WORK, -16, -8, 16, 16); obs_RECT_WORK.flag |= 4U; gms_ENEMY_3D_WORK.ene_com.rect_work[2].flag &= 4294967291U; obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[2]; AppMain.ObjRectWorkSet(obs_RECT_WORK, -19, -16, 19, 16); obs_RECT_WORK.flag &= 4294967291U; obs_OBJECT_WORK.move_flag &= 4294967167U; obs_OBJECT_WORK.move_flag |= 256U; if ((eve_rec.flag & 1) == 0) { obs_OBJECT_WORK.disp_flag |= 1U; obs_OBJECT_WORK.dir.y = ( ushort )AppMain.AKM_DEGtoA16(45); } else { obs_OBJECT_WORK.dir.y = ( ushort )AppMain.AKM_DEGtoA16(-45); } obs_OBJECT_WORK.user_work = ( uint )(obs_OBJECT_WORK.pos.x + (( int )eve_rec.left << 12)); obs_OBJECT_WORK.user_flag = ( uint )(obs_OBJECT_WORK.pos.x + (( int )(eve_rec.left + ( sbyte )eve_rec.width) << 12)); gms_ENE_UNIDES_WORK.spd_dec = 76; gms_ENE_UNIDES_WORK.spd_dec_dist = 15360; gms_ENE_UNIDES_WORK.len = 17.5f; gms_ENE_UNIDES_WORK.rot_x = AppMain.AKM_DEGtoA32(90f); gms_ENE_UNIDES_WORK.rot_y = AppMain.AKM_DEGtoA32(0f); gms_ENE_UNIDES_WORK.rot_z = AppMain.AKM_DEGtoA32(0f); gms_ENE_UNIDES_WORK.num = 0; AppMain.gmEneUnidesWaitInit(obs_OBJECT_WORK); for (int i = 0; i < 4; i++) { AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK2 = AppMain.GmEventMgrLocalEventBirth(309, pos_x, pos_y, 0, 0, 0, 0, 0, 0); obs_OBJECT_WORK2.parent_obj = obs_OBJECT_WORK; AppMain.GMS_ENE_UNIDES_WORK gms_ENE_UNIDES_WORK2 = (AppMain.GMS_ENE_UNIDES_WORK)obs_OBJECT_WORK2; gms_ENE_UNIDES_WORK2.num = i; gms_ENE_UNIDES_WORK.num++; } gms_ENE_UNIDES_WORK.attack = 0; gms_ENE_UNIDES_WORK.attack_first = 0; gms_ENE_UNIDES_WORK.zoom_now = 0; gms_ENE_UNIDES_WORK.zoom = 1f; obs_OBJECT_WORK.obj_3d.use_light_flag &= 4294967294U; obs_OBJECT_WORK.obj_3d.use_light_flag |= 64U; return(obs_OBJECT_WORK); }
// Token: 0x06000791 RID: 1937 RVA: 0x00043198 File Offset: 0x00041398 public static void gmEneTStarAttackInit(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_ENE_T_STAR_WORK gms_ENE_T_STAR_WORK = (AppMain.GMS_ENE_T_STAR_WORK)obj_work; AppMain.NNS_MATRIX nns_MATRIX = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.NNS_MATRIX nns_MATRIX2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.nnMakeUnitMatrix(nns_MATRIX); AppMain.nnMakeUnitMatrix(nns_MATRIX2); AppMain.nnMakeRotateZMatrix(nns_MATRIX2, AppMain.AKM_DEGtoA32(72)); AppMain.NNS_VECTOR nns_VECTOR = AppMain.GlobalPool <AppMain.NNS_VECTOR> .Alloc(); for (int i = 0; i < 5; i++) { AppMain.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 )AppMain.AKM_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); AppMain.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); AppMain.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 )AppMain.AKM_DEGtoA16(-72 * i); } AppMain.GlobalPool <AppMain.NNS_VECTOR> .Release(nns_VECTOR); obj_work.disp_flag |= 32U; obj_work.disp_flag |= 4U; obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(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; AppMain.GmSoundPlaySE("Boss2_03"); gms_ENEMY_3D_WORK2.ene_com.enemy_flag |= 65536U; AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nns_MATRIX2); }
// Token: 0x06000604 RID: 1540 RVA: 0x000354A4 File Offset: 0x000336A4 private static void dmStfrlMdlCtrlBodyProcBodyCompInitStart(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.DMS_STFRL_BOSS_BODY_WORK dms_STFRL_BOSS_BODY_WORK = (AppMain.DMS_STFRL_BOSS_BODY_WORK)obj_work; obj_work.pos.x = 0; obj_work.pos.y = -737280; obj_work.pos.z = -81920; obj_work.dir.y = ( ushort )AppMain.AKM_DEGtoA16(300); if ((dms_STFRL_BOSS_BODY_WORK.flag & 2U) != 0U) { obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.dmStfrlMdlCtrlBodyProcBodyCompStartWait); dms_STFRL_BOSS_BODY_WORK.flag &= 4294967293U; } }
// Token: 0x06000603 RID: 1539 RVA: 0x00035424 File Offset: 0x00033624 private static void dmStfrlMdlCtrlBodyProcBodyMain(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.DMS_STFRL_BOSS_BODY_WORK dms_STFRL_BOSS_BODY_WORK = (AppMain.DMS_STFRL_BOSS_BODY_WORK)obj_work; obj_work.pos.x = 0; obj_work.pos.y = -65536; obj_work.pos.z = -81920; obj_work.dir.y = ( ushort )AppMain.AKM_DEGtoA16(300); if (dms_STFRL_BOSS_BODY_WORK.timer != 0) { dms_STFRL_BOSS_BODY_WORK.timer--; return; } dms_STFRL_BOSS_BODY_WORK.flag |= 2097152U; }
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); for (int index = 0; (long)index < (long)AppMain.GMD_BOSS5_LAND_LDPART_SPIN_ROT_AXIS_NUM; ++index) { AppMain.NNS_VECTOR dst_vec = new AppMain.NNS_VECTOR(); float rand_z = AppMain.MTM_MATH_CLIP((float)((double)AppMain.FX_FX32_TO_F32(AppMain.AkMathRandFx()) * 2.0 - 1.0), -1f, 1f); short rand_angle = AppMain.AKM_DEGtoA16(360f * AppMain.FX_FX32_TO_F32(AppMain.AkMathRandFx())); AppMain.AkMathGetRandomUnitVector(dst_vec, rand_z, rand_angle); AppMain.NNS_QUATERNION dst; AppMain.nnMakeRotateAxisQuaternion(out dst, dst_vec.x, dst_vec.y, dst_vec.z, AppMain.GMD_BOSS5_LAND_LDPART_SPIN_ROT_SPD_DEG); AppMain.nnMultiplyQuaternion(ref ldpart_work.rot_diff_quat, ref dst, ref ldpart_work.rot_diff_quat); } }
private static AppMain.GMS_EFFECT_3DES_WORK GmBoss4EffCommonInit( int id, AppMain.VecFx32?pos, AppMain.OBS_OBJECT_WORK parent_obj, uint type, uint flag, AppMain.GMS_BOSS4_NODE_MATRIX mtx, int link, AppMain.VecFx32?rot, uint[] ctrl_flag, uint mask) { AppMain.OBS_OBJECT_WORK work = AppMain.GMM_EFFECT_CREATE_WORK((AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_BOSS4_EFF_COMMON_WORK()), parent_obj, (ushort)0, "B04_CapOver"); AppMain.GMS_EFFECT_3DES_WORK efct_3des = (AppMain.GMS_EFFECT_3DES_WORK)work; AppMain.GMS_BOSS4_EFF_COMMON_WORK bosS4EffCommonWork = (AppMain.GMS_BOSS4_EFF_COMMON_WORK)work; AppMain.ObjObjectAction3dESEffectLoad(AppMain.GMM_BS_OBJ((object)efct_3des), efct_3des.obj_3des, AppMain.ObjDataGet(id), (string)null, 0, (AppMain.AMS_AMB_HEADER)null); AppMain.ObjObjectAction3dESTextureLoad(AppMain.GMM_BS_OBJ((object)efct_3des), efct_3des.obj_3des, AppMain.ObjDataGet(733), (string)null, 0, (AppMain.AMS_AMB_HEADER)null, false); AppMain.ObjObjectAction3dESTextureSetByDwork(work, AppMain.ObjDataGet(734)); AppMain.GmEffect3DESSetupBase(efct_3des, type, flag); if (pos.HasValue) { AppMain.VEC_Set(ref work.pos, pos.Value.x, pos.Value.y, pos.Value.z); } work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmBoss4EffMainFuncFlagLink); work.flag |= 32U; bosS4EffCommonWork.lookflag = ctrl_flag; bosS4EffCommonWork.lookmask = mask; if (bosS4EffCommonWork.lookflag != null) { bosS4EffCommonWork.lookflag[0] |= bosS4EffCommonWork.lookmask; } bosS4EffCommonWork.link = -1; if (link >= 0) { bosS4EffCommonWork.link = link; bosS4EffCommonWork.node_work = mtx; if (rot.HasValue) { AppMain.GmEffect3DESSetDispRotation(efct_3des, AppMain.AKM_DEGtoA16(AppMain.FX_FX32_TO_F32(rot.Value.x)), AppMain.AKM_DEGtoA16(AppMain.FX_FX32_TO_F32(rot.Value.y)), AppMain.AKM_DEGtoA16(AppMain.FX_FX32_TO_F32(rot.Value.z))); } if (pos.HasValue) { AppMain.GmEffect3DESAddDispOffset(efct_3des, AppMain.FX_FX32_TO_F32(pos.Value.x), AppMain.FX_FX32_TO_F32(pos.Value.y), AppMain.FX_FX32_TO_F32(pos.Value.z)); } } return(efct_3des); }
public static void gmEneTStarAttackInit(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_ENE_T_STAR_WORK gmsEneTStarWork = (AppMain.GMS_ENE_T_STAR_WORK)obj_work; AppMain.NNS_MATRIX nnsMatrix1 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.NNS_MATRIX nnsMatrix2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.nnMakeUnitMatrix(nnsMatrix1); AppMain.nnMakeUnitMatrix(nnsMatrix2); AppMain.nnMakeRotateZMatrix(nnsMatrix2, AppMain.AKM_DEGtoA32(72)); AppMain.NNS_VECTOR nnsVector = new AppMain.NNS_VECTOR(); for (int index = 0; index < 5; ++index) { AppMain.OBS_OBJECT_WORK parent_obj = AppMain.GmEventMgrLocalEventBirth((ushort)308, obj_work.pos.x, obj_work.pos.y, (ushort)0, (sbyte)0, (sbyte)0, (byte)0, (byte)0, (byte)0); parent_obj.parent_obj = obj_work; parent_obj.dir.y = (ushort)49152; parent_obj.dir.z = (ushort)AppMain.AKM_DEGtoA16(-72 * index); nnsVector.x = nnsMatrix1.M01; nnsVector.y = nnsMatrix1.M11; nnsVector.z = 0.0f; parent_obj.spd.x = AppMain.FX_F32_TO_FX32(nnsVector.x * 4f); parent_obj.spd.y = -AppMain.FX_F32_TO_FX32(nnsVector.y * 4f); parent_obj.pos.x += AppMain.FX_F32_TO_FX32(nnsVector.x * 10f); parent_obj.pos.y += -AppMain.FX_F32_TO_FX32(nnsVector.y * 10f); AppMain.nnMultiplyMatrix(nnsMatrix1, nnsMatrix1, nnsMatrix2); ((AppMain.GMS_ENEMY_3D_WORK)parent_obj).ene_com.enemy_flag |= 32768U; AppMain.GmEfctEneEsCreate(parent_obj, 10).efct_com.obj_work.dir.z = (ushort)AppMain.AKM_DEGtoA16(-72 * index); } //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector); obj_work.disp_flag |= 32U; obj_work.disp_flag |= 4U; obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmEneTStarAttackMain); obj_work.move_flag &= 4294967291U; obj_work.spd.x = 0; obj_work.spd.y = 0; gmsEneTStarWork.timer = 300; AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)obj_work; gmsEnemy3DWork.ene_com.rect_work[1].flag &= 4294967291U; gmsEnemy3DWork.ene_com.rect_work[0].flag &= 4294967291U; gmsEnemy3DWork.ene_com.rect_work[2].flag &= 4294967291U; AppMain.GmSoundPlaySE(AppMain.GMD_ENE_KAMA_SE_BOMB); gmsEnemy3DWork.ene_com.enemy_flag |= 65536U; AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix1); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix2); }
// 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)) { AppMain.NNS_VECTOR nns_VECTOR = AppMain.GlobalPool <AppMain.NNS_VECTOR> .Alloc(); float num2 = AppMain.FX_FX32_TO_F32(AppMain.AkMathRandFx()) * 2f - 1f; num2 = AppMain.MTM_MATH_CLIP(num2, -1f, 1f); short rand_angle = AppMain.AKM_DEGtoA16(360f * AppMain.FX_FX32_TO_F32(AppMain.AkMathRandFx())); AppMain.AkMathGetRandomUnitVector(nns_VECTOR, num2, rand_angle); AppMain.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++; } }
private static void gmBoss1EffScatterSetPartParam( AppMain.GMS_BOSS1_EFF_SCT_PART_NDC_WORK sct_part_ndc, bool is_ironball) { AppMain.GMS_BS_CMN_NODE_CTRL_OBJECT cmnNodeCtrlObject = (AppMain.GMS_BS_CMN_NODE_CTRL_OBJECT)sct_part_ndc; int ang; if (is_ironball) { sct_part_ndc.is_ironball = true; cmnNodeCtrlObject.user_ofst.y = 32f; ang = AppMain.GMD_BOSS1_EFF_SCT_PART_IBALL_SPIN_SPD_DEG; } else { sct_part_ndc.is_ironball = false; cmnNodeCtrlObject.user_ofst.y = 8f; ang = AppMain.GMD_BOSS1_EFF_SCT_PART_RING_SPIN_SPD_DEG; } AppMain.nnMakeUnitQuaternion(ref sct_part_ndc.spin_quat); for (int index = 0; index < 2; ++index) { AppMain.NNS_VECTOR dst_vec = new AppMain.NNS_VECTOR(); AppMain.NNS_QUATERNION dst = new AppMain.NNS_QUATERNION(); float rand_z = AppMain.MTM_MATH_CLIP((float)((double)AppMain.FX_FX32_TO_F32(AppMain.AkMathRandFx()) * 2.0 - 1.0), -1f, 1f); short rand_angle = AppMain.AKM_DEGtoA16(360f * AppMain.FX_FX32_TO_F32(AppMain.AkMathRandFx())); AppMain.AkMathGetRandomUnitVector(dst_vec, rand_z, rand_angle); AppMain.nnMakeRotateAxisQuaternion(out dst, dst_vec.x, dst_vec.y, dst_vec.z, ang); AppMain.nnMultiplyQuaternion(ref sct_part_ndc.spin_quat, ref dst, ref sct_part_ndc.spin_quat); //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(dst_vec); } if (is_ironball) { AppMain.ObjObjectFieldRectSet(AppMain.GMM_BS_OBJ((object)cmnNodeCtrlObject), (short)-24, (short)-24, (short)24, (short)24); } else { AppMain.ObjObjectFieldRectSet(AppMain.GMM_BS_OBJ((object)cmnNodeCtrlObject), (short)-8, (short)-8, (short)8, (short)8); } }
// Token: 0x060002AF RID: 687 RVA: 0x00016764 File Offset: 0x00014964 private static AppMain.GMS_EFFECT_3DES_WORK GmBoss4EffCommonInit(int id, AppMain.VecFx32?pos, AppMain.OBS_OBJECT_WORK parent_obj, uint type, uint flag, AppMain.GMS_BOSS4_NODE_MATRIX mtx, int link, AppMain.VecFx32?rot, uint[] ctrl_flag, uint mask) { AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_EFFECT_CREATE_WORK(() => new AppMain.GMS_BOSS4_EFF_COMMON_WORK(), parent_obj, 0, "B04_CapOver"); AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = (AppMain.GMS_EFFECT_3DES_WORK)obs_OBJECT_WORK; AppMain.GMS_BOSS4_EFF_COMMON_WORK gms_BOSS4_EFF_COMMON_WORK = (AppMain.GMS_BOSS4_EFF_COMMON_WORK)obs_OBJECT_WORK; AppMain.ObjObjectAction3dESEffectLoad(AppMain.GMM_BS_OBJ(gms_EFFECT_3DES_WORK), gms_EFFECT_3DES_WORK.obj_3des, AppMain.ObjDataGet(id), null, 0, null); AppMain.ObjObjectAction3dESTextureLoad(AppMain.GMM_BS_OBJ(gms_EFFECT_3DES_WORK), gms_EFFECT_3DES_WORK.obj_3des, AppMain.ObjDataGet(733), null, 0, null, false); AppMain.ObjObjectAction3dESTextureSetByDwork(obs_OBJECT_WORK, AppMain.ObjDataGet(734)); AppMain.GmEffect3DESSetupBase(gms_EFFECT_3DES_WORK, type, flag); if (pos != null) { AppMain.VEC_Set(ref obs_OBJECT_WORK.pos, pos.Value.x, pos.Value.y, pos.Value.z); } obs_OBJECT_WORK.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmBoss4EffMainFuncFlagLink); obs_OBJECT_WORK.flag |= 32U; gms_BOSS4_EFF_COMMON_WORK.lookflag = ctrl_flag; gms_BOSS4_EFF_COMMON_WORK.lookmask = mask; if (gms_BOSS4_EFF_COMMON_WORK.lookflag != null) { gms_BOSS4_EFF_COMMON_WORK.lookflag[0] |= gms_BOSS4_EFF_COMMON_WORK.lookmask; } gms_BOSS4_EFF_COMMON_WORK.link = -1; if (link >= 0) { gms_BOSS4_EFF_COMMON_WORK.link = link; gms_BOSS4_EFF_COMMON_WORK.node_work = mtx; if (rot != null) { AppMain.GmEffect3DESSetDispRotation(gms_EFFECT_3DES_WORK, AppMain.AKM_DEGtoA16(AppMain.FX_FX32_TO_F32(rot.Value.x)), AppMain.AKM_DEGtoA16(AppMain.FX_FX32_TO_F32(rot.Value.y)), AppMain.AKM_DEGtoA16(AppMain.FX_FX32_TO_F32(rot.Value.z))); } if (pos != null) { AppMain.GmEffect3DESAddDispOffset(gms_EFFECT_3DES_WORK, AppMain.FX_FX32_TO_F32(pos.Value.x), AppMain.FX_FX32_TO_F32(pos.Value.y), AppMain.FX_FX32_TO_F32(pos.Value.z)); } } return(gms_EFFECT_3DES_WORK); }
// Token: 0x0600093C RID: 2364 RVA: 0x00052F4C File Offset: 0x0005114C private static AppMain.OBS_OBJECT_WORK GmEneKamaInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type) { AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_ENE_KAMA_WORK(), "ENE_KAMA"); AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK; AppMain.GMS_ENE_KAMA_WORK gms_ENE_KAMA_WORK = (AppMain.GMS_ENE_KAMA_WORK)obs_OBJECT_WORK; AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_ene_kama_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d); AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, true, AppMain.ObjDataGet(701), null, 0, null); AppMain.ObjDrawObjectSetToon(obs_OBJECT_WORK); obs_OBJECT_WORK.pos.z = 0; AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[1]; AppMain.ObjRectWorkSet(obs_RECT_WORK, -11, -24, 11, 0); obs_RECT_WORK.flag |= 4U; obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[0]; AppMain.ObjRectWorkSet(obs_RECT_WORK, -19, -32, 19, 0); obs_RECT_WORK.flag |= 4U; gms_ENEMY_3D_WORK.ene_com.rect_work[2].flag &= 4294967291U; obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[2]; AppMain.ObjRectWorkSet(obs_RECT_WORK, -19, -32, 19, 0); obs_RECT_WORK.flag &= 4294967291U; AppMain.ObjObjectFieldRectSet(obs_OBJECT_WORK, -4, -8, 4, 0); obs_OBJECT_WORK.move_flag |= 128U; if ((eve_rec.flag & 1) == 0) { obs_OBJECT_WORK.disp_flag |= 1U; } if ((eve_rec.flag & 2) != 0) { obs_OBJECT_WORK.disp_flag |= 2U; obs_OBJECT_WORK.move_flag &= 4294967167U; obs_OBJECT_WORK.dir.z = ( ushort )AppMain.AKM_DEGtoA16(180); obs_OBJECT_WORK.disp_flag ^= 1U; } gms_ENE_KAMA_WORK.atk_wait = 0; if ((eve_rec.flag & 4) != 0) { gms_ENE_KAMA_WORK.atk_wait += 10; } if ((eve_rec.flag & 8) != 0) { gms_ENE_KAMA_WORK.atk_wait += 20; } if ((eve_rec.flag & 16) != 0) { gms_ENE_KAMA_WORK.atk_wait += 30; } gms_ENE_KAMA_WORK.walk_s = 0; if ((eve_rec.flag & 32) != 0) { gms_ENE_KAMA_WORK.walk_s = 1; } obs_OBJECT_WORK.user_work = ( uint )(obs_OBJECT_WORK.pos.x + (( int )eve_rec.left << 12)); obs_OBJECT_WORK.user_flag = ( uint )(obs_OBJECT_WORK.pos.x + (( int )(eve_rec.left + ( sbyte )eve_rec.width) << 12)); gms_ENE_KAMA_WORK.spd_dec = 102; gms_ENE_KAMA_WORK.spd_dec_dist = 20480; AppMain.gmEneKamaWalkInit(obs_OBJECT_WORK); gms_ENE_KAMA_WORK.attack = 0; AppMain.GmEneUtilInitNodeMatrix(gms_ENE_KAMA_WORK.node_work, obs_OBJECT_WORK, 32); AppMain.mtTaskChangeTcbDestructor(obs_OBJECT_WORK.tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.gmEneKamaExit)); AppMain.GmEneUtilGetNodeMatrix(gms_ENE_KAMA_WORK.node_work, 9); AppMain.GmEneUtilGetNodeMatrix(gms_ENE_KAMA_WORK.node_work, 6); AppMain.OBS_OBJECT_WORK obs_OBJECT_WORK2 = AppMain.GmEventMgrLocalEventBirth(311, obs_OBJECT_WORK.pos.x, obs_OBJECT_WORK.pos.y, 0, 0, 0, 0, 0, 0); obs_OBJECT_WORK2.parent_obj = obs_OBJECT_WORK; obs_OBJECT_WORK2 = AppMain.GmEventMgrLocalEventBirth(312, obs_OBJECT_WORK.pos.x, obs_OBJECT_WORK.pos.y, 0, 0, 0, 0, 0, 0); obs_OBJECT_WORK2.parent_obj = obs_OBJECT_WORK; obs_OBJECT_WORK.obj_3d.use_light_flag &= 4294967294U; obs_OBJECT_WORK.obj_3d.use_light_flag |= 64U; obs_OBJECT_WORK.flag |= 1073741824U; return(obs_OBJECT_WORK); }
private static AppMain.OBS_OBJECT_WORK GmEneKamaInit( AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type) { AppMain.OBS_OBJECT_WORK work = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_ENE_KAMA_WORK()), "ENE_KAMA"); AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)work; AppMain.GMS_ENE_KAMA_WORK gmsEneKamaWork = (AppMain.GMS_ENE_KAMA_WORK)work; AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_ene_kama_obj_3d_list[0], gmsEnemy3DWork.obj_3d); AppMain.ObjObjectAction3dNNMotionLoad(work, 0, true, AppMain.ObjDataGet(701), (string)null, 0, (AppMain.AMS_AMB_HEADER)null); AppMain.ObjDrawObjectSetToon(work); work.pos.z = 0; AppMain.OBS_RECT_WORK pRec1 = gmsEnemy3DWork.ene_com.rect_work[1]; AppMain.ObjRectWorkSet(pRec1, (short)-11, (short)-24, (short)11, (short)0); pRec1.flag |= 4U; AppMain.OBS_RECT_WORK pRec2 = gmsEnemy3DWork.ene_com.rect_work[0]; AppMain.ObjRectWorkSet(pRec2, (short)-19, (short)-32, (short)19, (short)0); pRec2.flag |= 4U; gmsEnemy3DWork.ene_com.rect_work[2].flag &= 4294967291U; AppMain.OBS_RECT_WORK pRec3 = gmsEnemy3DWork.ene_com.rect_work[2]; AppMain.ObjRectWorkSet(pRec3, (short)-19, (short)-32, (short)19, (short)0); pRec3.flag &= 4294967291U; AppMain.ObjObjectFieldRectSet(work, (short)-4, (short)-8, (short)4, (short)0); work.move_flag |= 128U; if (((int)eve_rec.flag & 1) == 0) { work.disp_flag |= 1U; } if (((int)eve_rec.flag & 2) != 0) { work.disp_flag |= 2U; work.move_flag &= 4294967167U; work.dir.z = (ushort)AppMain.AKM_DEGtoA16(180); work.disp_flag ^= 1U; } gmsEneKamaWork.atk_wait = 0; if (((int)eve_rec.flag & 4) != 0) { gmsEneKamaWork.atk_wait += 10; } if (((int)eve_rec.flag & 8) != 0) { gmsEneKamaWork.atk_wait += 20; } if (((int)eve_rec.flag & 16) != 0) { gmsEneKamaWork.atk_wait += 30; } gmsEneKamaWork.walk_s = 0; if (((int)eve_rec.flag & 32) != 0) { gmsEneKamaWork.walk_s = 1; } work.user_work = (uint)(work.pos.x + ((int)eve_rec.left << 12)); work.user_flag = (uint)(work.pos.x + ((int)eve_rec.left + (int)eve_rec.width << 12)); gmsEneKamaWork.spd_dec = 102; gmsEneKamaWork.spd_dec_dist = 20480; AppMain.gmEneKamaWalkInit(work); gmsEneKamaWork.attack = 0; AppMain.GmEneUtilInitNodeMatrix(gmsEneKamaWork.node_work, work, 32); AppMain.mtTaskChangeTcbDestructor(work.tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.gmEneKamaExit)); AppMain.GmEneUtilGetNodeMatrix(gmsEneKamaWork.node_work, 9); AppMain.GmEneUtilGetNodeMatrix(gmsEneKamaWork.node_work, 6); AppMain.GmEventMgrLocalEventBirth((ushort)311, work.pos.x, work.pos.y, (ushort)0, (sbyte)0, (sbyte)0, (byte)0, (byte)0, (byte)0).parent_obj = work; AppMain.GmEventMgrLocalEventBirth((ushort)312, work.pos.x, work.pos.y, (ushort)0, (sbyte)0, (sbyte)0, (byte)0, (byte)0, (byte)0).parent_obj = work; work.obj_3d.use_light_flag &= 4294967294U; work.obj_3d.use_light_flag |= 64U; work.flag |= 1073741824U; return(work); }