// Token: 0x06000029 RID: 41 RVA: 0x000028C8 File Offset: 0x00000AC8 private static void amTrailEFUpdate(ushort handleId) { for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if (pNext.Procedure != null && (pNext.handleId & handleId) != 0 && pNext.Procedure != -1) { ((AppMain.AMTREffectProc)pNext.Procedure)(pNext); AppMain.AMS_TRAIL_PARAM work = pNext.Work; if (((int)work.state & 32768) != 0) { AppMain._amTrailEFDelete(pNext); } else { pNext.fFrame += AppMain.amEffectGetUnitFrame(); if (pNext.fEndFrame > 0f && pNext.fFrame > pNext.fEndFrame) { AppMain._amTrailEFDelete(pNext); } } } } for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if (pNext.Procedure == -1) { AppMain._amTrailEFDeleteEffectReal(pNext); } } }
// Token: 0x06000033 RID: 51 RVA: 0x00002CEC File Offset: 0x00000EEC private static void _amTrailInitNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA ams_TRAIL_PARTSDATA = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS ams_TRAIL_PARTS = ams_TRAIL_PARTSDATA.parts[0]; AppMain.AMS_TRAIL_PARTS trailTail = ams_TRAIL_PARTSDATA.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = ams_TRAIL_PARTSDATA.trailHead; ams_TRAIL_PARTSDATA.Clear(); ams_TRAIL_PARTS.pNext = trailTail; trailTail.pPrev = ams_TRAIL_PARTS; ams_TRAIL_PARTS.pPrev = trailHead; trailHead.pNext = ams_TRAIL_PARTS; if ((pEffect.flag & 1) != 0) { ams_TRAIL_PARTS.pos.x = AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.x); ams_TRAIL_PARTS.pos.y = -AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.y); ams_TRAIL_PARTS.pos.z = AppMain.AMD_FX32_TO_FLOAT(work.zBias); } else { ams_TRAIL_PARTS.pos.x = MppBitConverter.Int32ToSingle(work.trail_pos.x); ams_TRAIL_PARTS.pos.y = MppBitConverter.Int32ToSingle(work.trail_pos.y); ams_TRAIL_PARTS.pos.z = MppBitConverter.Int32ToSingle(work.trail_pos.z); } ams_TRAIL_PARTS.time = work.life; ams_TRAIL_PARTS.partsId = 0; work.trailPartsId = 1; AppMain.AMS_TRAIL_PARAM ams_TRAIL_PARAM = work; ams_TRAIL_PARAM.trailPartsNum += 1; }
// Token: 0x0600002D RID: 45 RVA: 0x00002AAC File Offset: 0x00000CAC private static void amTrailMakeEffect(AppMain.AMS_TRAIL_PARAM param, ushort handleId, short flag) { AppMain.AMS_TRAIL_INTERFACE ams_TRAIL_INTERFACE = AppMain.pTr; ams_TRAIL_INTERFACE.trailNum += 1; AppMain.AMS_TRAIL_EFFECT ams_TRAIL_EFFECT = AppMain._amTrailEFMake(handleId); if (ams_TRAIL_EFFECT == null) { return; } ams_TRAIL_EFFECT.Procedure = new AppMain.AMTREffectProc(AppMain._amTrailUpdateNormal); ams_TRAIL_EFFECT.Destractor = new AppMain.AMTREffectProc(AppMain._amTrailFinalizeNormal); ams_TRAIL_EFFECT.fEndFrame = -1f; ams_TRAIL_EFFECT.flag = flag; AppMain.AMS_TRAIL_PARAM ams_TRAIL_PARAM = ams_TRAIL_EFFECT.Work; ams_TRAIL_PARAM = ams_TRAIL_PARAM.Assign(param); ams_TRAIL_PARAM.time = ams_TRAIL_PARAM.life * AppMain.amEffectGetUnitFrame(); ams_TRAIL_PARAM.trailId = AppMain.pTr.trailId; if (AppMain.pTr.trailEffect[(int)ams_TRAIL_PARAM.trailId] != null) { AppMain._amTrailEFDelete(AppMain.pTr.trailEffect[(int)ams_TRAIL_PARAM.trailId]); } AppMain.pTr.trailEffect[(int)ams_TRAIL_PARAM.trailId] = ams_TRAIL_EFFECT; AppMain._amTrailInitNormal(ams_TRAIL_EFFECT); AppMain.AMS_TRAIL_INTERFACE ams_TRAIL_INTERFACE2 = AppMain.pTr; ams_TRAIL_INTERFACE2.trailId += 1; if (AppMain.pTr.trailId >= 8) { AppMain.pTr.trailId = 0; } }
private static void amTrailEFUpdate(ushort handleId) { for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if (pNext.Procedure != (DoubleType <AppMain.AMTREffectProc, int>)(AppMain.AMTREffectProc) null&& ((int)pNext.handleId & (int)handleId) != 0 && pNext.Procedure != (DoubleType <AppMain.AMTREffectProc, int>)(-1)) { int num = ((AppMain.AMTREffectProc)pNext.Procedure)(pNext); if (((int)pNext.Work.state & 32768) != 0) { AppMain._amTrailEFDelete(pNext); } else { pNext.fFrame += AppMain.amEffectGetUnitFrame(); if ((double)pNext.fEndFrame > 0.0 && (double)pNext.fFrame > (double)pNext.fEndFrame) { AppMain._amTrailEFDelete(pNext); } } } } for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if (pNext.Procedure == (DoubleType <AppMain.AMTREffectProc, int>)(-1)) { AppMain._amTrailEFDeleteEffectReal(pNext); } } }
private static void _amTrailInitNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA amsTrailPartsdata = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS part = amsTrailPartsdata.parts[0]; AppMain.AMS_TRAIL_PARTS trailTail = amsTrailPartsdata.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = amsTrailPartsdata.trailHead; amsTrailPartsdata.Clear(); part.pNext = trailTail; trailTail.pPrev = part; part.pPrev = trailHead; trailHead.pNext = part; if (((int)pEffect.flag & 1) != 0) { part.pos.x = AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.x); part.pos.y = -AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.y); part.pos.z = AppMain.AMD_FX32_TO_FLOAT(work.zBias); } else { part.pos.x = MppBitConverter.Int32ToSingle(work.trail_pos.x); part.pos.y = MppBitConverter.Int32ToSingle(work.trail_pos.y); part.pos.z = MppBitConverter.Int32ToSingle(work.trail_pos.z); } part.time = work.life; part.partsId = (short)0; work.trailPartsId = (short)1; ++work.trailPartsNum; }
private static void amTrailMakeEffect(AppMain.AMS_TRAIL_PARAM param, ushort handleId, short flag) { ++AppMain.pTr.trailNum; AppMain.AMS_TRAIL_EFFECT pEffect = AppMain._amTrailEFMake(handleId); if (pEffect == null) { return; } pEffect.Procedure = (DoubleType <AppMain.AMTREffectProc, int>) new AppMain.AMTREffectProc(AppMain._amTrailUpdateNormal); pEffect.Destractor = (DoubleType <AppMain.AMTREffectProc, int>) new AppMain.AMTREffectProc(AppMain._amTrailFinalizeNormal); pEffect.fEndFrame = -1f; pEffect.flag = flag; AppMain.AMS_TRAIL_PARAM amsTrailParam = pEffect.Work.Assign(param); amsTrailParam.time = amsTrailParam.life * AppMain.amEffectGetUnitFrame(); amsTrailParam.trailId = AppMain.pTr.trailId; if (AppMain.pTr.trailEffect[(int)amsTrailParam.trailId] != null) { AppMain._amTrailEFDelete(AppMain.pTr.trailEffect[(int)amsTrailParam.trailId]); } AppMain.pTr.trailEffect[(int)amsTrailParam.trailId] = pEffect; AppMain._amTrailInitNormal(pEffect); ++AppMain.pTr.trailId; if (AppMain.pTr.trailId < (short)8) { return; } AppMain.pTr.trailId = (short)0; }
// Token: 0x0600002E RID: 46 RVA: 0x00002BB4 File Offset: 0x00000DB4 private static void _amTrailEFDelete(AppMain.AMS_TRAIL_EFFECT pEffect) { pEffect.Procedure = -1; if (pEffect.Destractor != null && pEffect.Destractor != -1) { ((AMTREffectProc)pEffect.Destractor)(pEffect); } }
// Token: 0x06000031 RID: 49 RVA: 0x00002C9A File Offset: 0x00000E9A private static void _amTrailEFFree(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain._amTrailEF_ref[AppMain._amTrailEF_free] = pEffect; AppMain._amTrailEF_free++; if (AppMain._amTrailEF_free >= 8) { AppMain._amTrailEF_free = 0; } }
private static void _amTrailEFDelete(AppMain.AMS_TRAIL_EFFECT pEffect) { pEffect.Procedure = ((DoubleType <AppMain.AMTREffectProc, int>)(-1)); if (!(pEffect.Destractor != (DoubleType <AppMain.AMTREffectProc, int>)(AppMain.AMTREffectProc) null) || !(pEffect.Destractor != ((DoubleType <AppMain.AMTREffectProc, int>)(-1)))) { return; } int num = ((AppMain.AMTREffectProc)pEffect.Destractor)(pEffect); }
private static void _amTrailEFFree(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain._amTrailEF_ref[AppMain._amTrailEF_free] = pEffect; ++AppMain._amTrailEF_free; if (AppMain._amTrailEF_free < 8) { return; } AppMain._amTrailEF_free = 0; }
// Token: 0x0600002B RID: 43 RVA: 0x00002A34 File Offset: 0x00000C34 private static void amTrailEFDeleteGroup(ushort handleId) { for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if ((pNext.handleId & handleId) != 0) { AppMain._amTrailEFDelete(pNext); } } }
// Token: 0x0600002C RID: 44 RVA: 0x00002A70 File Offset: 0x00000C70 private static void amTrailEFOffsetPos(ushort handleId, NNS_VECTOR offset) { for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if ((pNext.handleId & handleId) != 0) { AppMain._amTrailAddPosition(pNext, offset); } } }
// Token: 0x06000030 RID: 48 RVA: 0x00002C60 File Offset: 0x00000E60 private static AppMain.AMS_TRAIL_EFFECT _amTrailEFAlloc() { AppMain.AMS_TRAIL_EFFECT ams_TRAIL_EFFECT = AppMain._amTrailEF_ref[AppMain._amTrailEF_alloc]; AppMain._amTrailEF_alloc++; if (AppMain._amTrailEF_alloc >= 8) { AppMain._amTrailEF_alloc = 0; } ams_TRAIL_EFFECT.Clear(); return(ams_TRAIL_EFFECT); }
private static AppMain.AMS_TRAIL_EFFECT _amTrailEFAlloc() { AppMain.AMS_TRAIL_EFFECT amsTrailEffect = AppMain._amTrailEF_ref[AppMain._amTrailEF_alloc]; ++AppMain._amTrailEF_alloc; if (AppMain._amTrailEF_alloc >= 8) { AppMain._amTrailEF_alloc = 0; } amsTrailEffect.Clear(); return(amsTrailEffect); }
public void Clear() { this.pNext = (AppMain.AMS_TRAIL_EFFECT)null; this.pPrev = (AppMain.AMS_TRAIL_EFFECT)null; this.Procedure = (DoubleType <AppMain.AMTREffectProc, int>)(AppMain.AMTREffectProc) null; this.Destractor = (DoubleType <AppMain.AMTREffectProc, int>)(AppMain.AMTREffectProc) null; this.fFrame = this.fEndFrame = 0.0f; this.drawState = 0U; this.handleId = (ushort)0; this.flag = (short)0; this.Work.Clear(); }
private static void amTrailEFDraw(ushort handleId, AppMain.NNS_TEXLIST texlist, uint state) { for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if (pNext.Procedure != (DoubleType <AppMain.AMTREffectProc, int>)(AppMain.AMTREffectProc) null&& ((int)pNext.handleId & (int)handleId) != 0 && pNext.Procedure != (DoubleType <AppMain.AMTREffectProc, int>)(-1)) { pNext.drawState = state; pNext.Work.texlist = texlist; AppMain._amTrailDrawNormal(pNext); } } }
// Token: 0x0600002A RID: 42 RVA: 0x000029C0 File Offset: 0x00000BC0 private static void amTrailEFDraw(ushort handleId, AppMain.NNS_TEXLIST texlist, uint state) { for (AppMain.AMS_TRAIL_EFFECT pNext = AppMain._amTrailEF_head.pNext; pNext != AppMain._amTrailEF_tail; pNext = pNext.pNext) { if (pNext.Procedure != null && (pNext.handleId & handleId) != 0 && pNext.Procedure != -1) { pNext.drawState = state; AppMain.AMS_TRAIL_PARAM work = pNext.Work; work.texlist = texlist; AppMain._amTrailDrawNormal(pNext); } } }
// Token: 0x06000035 RID: 53 RVA: 0x00002E90 File Offset: 0x00001090 private static int _amTrailUpdateNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA ams_TRAIL_PARTSDATA = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS ams_TRAIL_PARTS = ams_TRAIL_PARTSDATA.parts[(int)work.trailPartsId]; AppMain.AMS_TRAIL_PARTS trailTail = ams_TRAIL_PARTSDATA.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = ams_TRAIL_PARTSDATA.trailHead; if ((work.state & -32768) != 0) { return(1); } AppMain.AMS_TRAIL_PARTS pPrev = trailTail.pPrev; if (ams_TRAIL_PARTS.pNext != null && ams_TRAIL_PARTS == trailHead.pNext) { trailHead.pNext.pNext.pPrev = trailHead; trailHead.pNext = trailHead.pNext.pNext; } ams_TRAIL_PARTS.Clear(); ams_TRAIL_PARTS.pNext = trailTail; ams_TRAIL_PARTS.pPrev = trailTail.pPrev; trailTail.pPrev = ams_TRAIL_PARTS; ams_TRAIL_PARTS.pPrev.pNext = ams_TRAIL_PARTS; if ((pEffect.flag & 1) != 0) { ams_TRAIL_PARTS.pos.x = AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.x); ams_TRAIL_PARTS.pos.y = -AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.y); ams_TRAIL_PARTS.pos.z = AppMain.AMD_FX32_TO_FLOAT(work.zBias); } else { ams_TRAIL_PARTS.pos.x = MppBitConverter.Int32ToSingle(work.trail_pos.x); ams_TRAIL_PARTS.pos.y = MppBitConverter.Int32ToSingle(work.trail_pos.y); ams_TRAIL_PARTS.pos.z = MppBitConverter.Int32ToSingle(work.trail_pos.z); } AppMain.nnSubtractVector(ams_TRAIL_PARTS.dir, ams_TRAIL_PARTS.pos, ams_TRAIL_PARTS.pPrev.pos); if (AppMain.amIsZerof(ams_TRAIL_PARTS.dir.x) && AppMain.amIsZerof(ams_TRAIL_PARTS.dir.y) && AppMain.amIsZerof(ams_TRAIL_PARTS.dir.z)) { ams_TRAIL_PARTS.dir.x = 1f; } AppMain._amTrailAddParts(ams_TRAIL_PARTS, work); ams_TRAIL_PARTS.m_Flag |= 1U; work.time -= AppMain.amEffectGetUnitFrame(); if (work.time < 0f) { work.time = 0f; AppMain.AMS_TRAIL_PARAM ams_TRAIL_PARAM = work; ams_TRAIL_PARAM.state |= short.MinValue; } return(0); }
private static int _amTrailFinalizeNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; if (AppMain.pTr.trailNum > (short)0) { --AppMain.pTr.trailNum; if (AppMain.pTr.trailNum == (short)0) { AppMain.pTr.trailState &= short.MaxValue; } } AppMain.pTr.trailEffect[(int)work.trailId] = (AppMain.AMS_TRAIL_EFFECT)null; return(0); }
// Token: 0x0600002F RID: 47 RVA: 0x00002C08 File Offset: 0x00000E08 private static AppMain.AMS_TRAIL_EFFECT _amTrailEFMake(ushort handleId) { AppMain.AMS_TRAIL_EFFECT ams_TRAIL_EFFECT = AppMain._amTrailEFAlloc(); if (ams_TRAIL_EFFECT == null) { return(null); } AppMain._amTrailEF_tail.pPrev.pNext = ams_TRAIL_EFFECT; ams_TRAIL_EFFECT.pPrev = AppMain._amTrailEF_tail.pPrev; AppMain._amTrailEF_tail.pPrev = ams_TRAIL_EFFECT; ams_TRAIL_EFFECT.pNext = AppMain._amTrailEF_tail; ams_TRAIL_EFFECT.handleId = handleId; return(ams_TRAIL_EFFECT); }
private static int _amTrailUpdateNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA amsTrailPartsdata = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS part = amsTrailPartsdata.parts[(int)work.trailPartsId]; AppMain.AMS_TRAIL_PARTS trailTail = amsTrailPartsdata.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = amsTrailPartsdata.trailHead; if (((int)work.state & (int)short.MinValue) != 0) { return(1); } AppMain.AMS_TRAIL_PARTS pPrev = trailTail.pPrev; if (part.pNext != null && part == trailHead.pNext) { trailHead.pNext.pNext.pPrev = trailHead; trailHead.pNext = trailHead.pNext.pNext; } part.Clear(); part.pNext = trailTail; part.pPrev = trailTail.pPrev; trailTail.pPrev = part; part.pPrev.pNext = part; if (((int)pEffect.flag & 1) != 0) { part.pos.x = AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.x); part.pos.y = -AppMain.AMD_FX32_TO_FLOAT(work.trail_pos.y); part.pos.z = AppMain.AMD_FX32_TO_FLOAT(work.zBias); } else { part.pos.x = MppBitConverter.Int32ToSingle(work.trail_pos.x); part.pos.y = MppBitConverter.Int32ToSingle(work.trail_pos.y); part.pos.z = MppBitConverter.Int32ToSingle(work.trail_pos.z); } AppMain.nnSubtractVector(part.dir, part.pos, part.pPrev.pos); if (AppMain.amIsZerof(part.dir.x) && AppMain.amIsZerof(part.dir.y) && AppMain.amIsZerof(part.dir.z)) { part.dir.x = 1f; } AppMain._amTrailAddParts(part, work); part.m_Flag |= 1U; work.time -= AppMain.amEffectGetUnitFrame(); if ((double)work.time < 0.0) { work.time = 0.0f; work.state |= short.MinValue; } return(0); }
// Token: 0x06000034 RID: 52 RVA: 0x00002E24 File Offset: 0x00001024 private static int _amTrailFinalizeNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; if (AppMain.pTr.trailNum > 0) { AppMain.AMS_TRAIL_INTERFACE ams_TRAIL_INTERFACE = AppMain.pTr; ams_TRAIL_INTERFACE.trailNum -= 1; if (AppMain.pTr.trailNum == 0) { AppMain.AMS_TRAIL_INTERFACE ams_TRAIL_INTERFACE2 = AppMain.pTr; ams_TRAIL_INTERFACE2.trailState &= short.MaxValue; } } AppMain.pTr.trailEffect[(int)work.trailId] = null; return(0); }
private static void _amTrailAddPosition( AppMain.AMS_TRAIL_EFFECT pEffect, AppMain.NNS_VECTOR offset) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA amsTrailPartsdata = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS trailTail = amsTrailPartsdata.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = amsTrailPartsdata.trailHead; AppMain.AMS_TRAIL_PARTS pPrev = trailTail.pPrev; if (trailTail.pPrev.pPrev == trailHead || (double)work.time <= 0.0) { return; } for (; pPrev != trailHead; pPrev = pPrev.pPrev) { AppMain.nnAddVector(pPrev.pos, pPrev.pos, offset); } }
// Token: 0x0600003A RID: 58 RVA: 0x00003F70 File Offset: 0x00002170 private static void _amTrailAddPosition(AppMain.AMS_TRAIL_EFFECT pEffect, NNS_VECTOR offset) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA ams_TRAIL_PARTSDATA = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS trailTail = ams_TRAIL_PARTSDATA.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = ams_TRAIL_PARTSDATA.trailHead; AppMain.AMS_TRAIL_PARTS pPrev = trailTail.pPrev; if (trailTail.pPrev.pPrev == trailHead) { return; } if (work.time <= 0f) { return; } while (pPrev != trailHead) { AppMain.nnAddVector(pPrev.pos, pPrev.pos, offset); pPrev = pPrev.pPrev; } }
// Token: 0x06000036 RID: 54 RVA: 0x000030B0 File Offset: 0x000012B0 private static void _amTrailDrawNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA ams_TRAIL_PARTSDATA = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS trailTail = ams_TRAIL_PARTSDATA.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = ams_TRAIL_PARTSDATA.trailHead; AppMain.AMS_TRAIL_PARTS pPrev = trailTail.pPrev; if (trailTail.pPrev.pPrev == trailHead) { return; } if (work.time <= 0f) { return; } NNS_RGBA startColor = work.startColor; NNS_RGBA ptclColor = work.ptclColor; NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc(); NNS_VECTOR nns_VECTOR2 = GlobalPool <NNS_VECTOR> .Alloc(); NNS_VECTOR nns_VECTOR3 = GlobalPool <NNS_VECTOR> .Alloc(); float num = 1f; AppMain.AMS_PARAM_DRAW_PRIMITIVE ams_PARAM_DRAW_PRIMITIVE = GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Alloc(); int ablend = 1; AppMain.amDrawGetPrimBlendParam((int)work.blendType, ams_PARAM_DRAW_PRIMITIVE); if (work.zTest != 0) { ams_PARAM_DRAW_PRIMITIVE.zTest = 1; } if (work.zMask != 0) { ams_PARAM_DRAW_PRIMITIVE.zMask = 1; } AppMain.amVectorSet(nns_VECTOR3, 0f, 0f, 1f); if (work.time < work.vanish_time) { num = work.time / work.vanish_time; } work.vanish_rate = num; startColor.a = work.startColor.a * num; ptclColor.a = work.ptclColor.a * num; float startSize = work.startSize; float ptclSize = work.ptclSize; if (work.ptclFlag != 0 && work.ptclTexId != -1) { AppMain.NNS_PRIM3D_PCT_ARRAY nns_PRIM3D_PCT_ARRAY = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(6); AppMain.NNS_PRIM3D_PCT[] buffer = nns_PRIM3D_PCT_ARRAY.buffer; int offset = nns_PRIM3D_PCT_ARRAY.offset; float sortZ = AppMain.nnDistanceVector(pPrev.pos, AppMain._am_ef_camPos); AppMain.mppAssertNotImpl(); buffer[offset].Col = AppMain.AMD_FCOLTORGBA8888(ptclColor.r, ptclColor.g, ptclColor.b, ptclColor.a); buffer[offset + 1].Col = (buffer[offset + 2].Col = (buffer[offset + 5].Col = buffer[offset].Col)); buffer[offset].Tex.u = 0f; buffer[offset].Tex.v = 0f; buffer[offset + 1].Tex.u = 1f; buffer[offset + 1].Tex.v = 0f; buffer[offset + 2].Tex.u = 0f; buffer[offset + 2].Tex.v = 1f; buffer[offset + 5].Tex.u = 1f; buffer[offset + 5].Tex.v = 1f; buffer[offset + 3] = buffer[offset + 1]; buffer[offset + 4] = buffer[offset + 2]; ams_PARAM_DRAW_PRIMITIVE.format3D = 4; ams_PARAM_DRAW_PRIMITIVE.type = 0; ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = nns_PRIM3D_PCT_ARRAY; ams_PARAM_DRAW_PRIMITIVE.texlist = work.texlist; ams_PARAM_DRAW_PRIMITIVE.texId = (int)work.ptclTexId; ams_PARAM_DRAW_PRIMITIVE.count = 6; ams_PARAM_DRAW_PRIMITIVE.ablend = ablend; ams_PARAM_DRAW_PRIMITIVE.sortZ = sortZ; AppMain.amDrawPrimitive3D(pEffect.drawState, ams_PARAM_DRAW_PRIMITIVE); } if (work.trailPartsNum < 3) { return; } if (work.texlist == null || work.texId == -1) { AppMain.NNS_PRIM3D_PC[] array = AppMain.amDrawAlloc_NNS_PRIM3D_PC((int)(6 * (work.trailPartsNum - 1))); AppMain.NNS_PRIM3D_PC[] vtxPC3D = array; int num2 = 0; float sortZ = AppMain.nnDistanceVector(pPrev.pos, AppMain._am_ef_camPos); AppMain.nnCrossProductVector(nns_VECTOR, nns_VECTOR3, pPrev.dir); AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR); AppMain.nnScaleVector(nns_VECTOR2, nns_VECTOR, startSize); AppMain.nnAddVector(ref array[0].Pos, pPrev.pos, nns_VECTOR2); AppMain.nnAddVector(ref array[1].Pos, pPrev.pPrev.pos, nns_VECTOR2); AppMain.nnSubtractVector(ref array[2].Pos, pPrev.pos, nns_VECTOR2); AppMain.nnSubtractVector(ref array[5].Pos, pPrev.pPrev.pos, nns_VECTOR2); array[5].Col = AppMain.AMD_FCOLTORGBA8888(startColor.r, startColor.g, startColor.b, startColor.a); array[0].Col = (array[1].Col = (array[2].Col = array[5].Col)); array[3] = array[1]; array[4] = array[2]; num2 += 6; pPrev = pPrev.pPrev; work.list_no = 1; while (pPrev != trailHead.pNext) { AppMain.mppAssertNotImpl(); pPrev.m_Flag &= 4294967293U; AppMain.AMS_TRAIL_PARAM ams_TRAIL_PARAM = work; ams_TRAIL_PARAM.list_no += 1; AppMain._amTrailDrawPartsNormal(pPrev, work, array, num2); pPrev = pPrev.pPrev; num2 += 6; } ams_PARAM_DRAW_PRIMITIVE.format3D = 2; ams_PARAM_DRAW_PRIMITIVE.type = 0; ams_PARAM_DRAW_PRIMITIVE.vtxPC3D = vtxPC3D; ams_PARAM_DRAW_PRIMITIVE.texlist = work.texlist; ams_PARAM_DRAW_PRIMITIVE.texId = work.texId; ams_PARAM_DRAW_PRIMITIVE.count = (int)(6 * (work.trailPartsNum - 1)); ams_PARAM_DRAW_PRIMITIVE.ablend = ablend; ams_PARAM_DRAW_PRIMITIVE.sortZ = sortZ; AppMain.amDrawPrimitive3D(pEffect.drawState, ams_PARAM_DRAW_PRIMITIVE); } else { AppMain.NNS_PRIM3D_PCT_ARRAY nns_PRIM3D_PCT_ARRAY2 = AppMain.amDrawAlloc_NNS_PRIM3D_PCT((int)(6 * (work.trailPartsNum - 1))); AppMain.NNS_PRIM3D_PCT[] buffer2 = nns_PRIM3D_PCT_ARRAY2.buffer; int offset2 = nns_PRIM3D_PCT_ARRAY2.offset; int num3 = offset2; float num4 = (float)(work.trailPartsNum - 1) / (float)work.trailPartsNum; num4 *= work.vanish_rate; float sortZ = AppMain.nnDistanceVector(pPrev.pos, AppMain._am_ef_camPos); AppMain.nnCrossProductVector(nns_VECTOR, nns_VECTOR3, pPrev.dir); AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR); AppMain.nnScaleVector(nns_VECTOR2, nns_VECTOR, startSize); AppMain.nnAddVector(ref buffer2[offset2].Pos, pPrev.pos, nns_VECTOR2); AppMain.nnAddVector(ref buffer2[offset2 + 1].Pos, pPrev.pPrev.pos, nns_VECTOR2); AppMain.nnSubtractVector(ref buffer2[offset2 + 2].Pos, pPrev.pos, nns_VECTOR2); AppMain.nnSubtractVector(ref buffer2[offset2 + 5].Pos, pPrev.pPrev.pos, nns_VECTOR2); buffer2[offset2 + 5].Col = AppMain.AMD_FCOLTORGBA8888(startColor.r, startColor.g, startColor.b, startColor.a); buffer2[offset2].Col = (buffer2[offset2 + 1].Col = (buffer2[offset2 + 2].Col = buffer2[offset2 + 5].Col)); buffer2[offset2].Tex.u = 1f; buffer2[offset2].Tex.v = 0f; buffer2[offset2 + 1].Tex.u = num4; buffer2[offset2 + 1].Tex.v = 0f; buffer2[offset2 + 2].Tex.u = 1f; buffer2[offset2 + 2].Tex.v = 1f; buffer2[offset2 + 5].Tex.u = num4; buffer2[offset2 + 5].Tex.v = 1f; buffer2[offset2 + 3] = buffer2[offset2 + 1]; buffer2[offset2 + 4] = buffer2[offset2 + 2]; num3 += 6; pPrev = pPrev.pPrev; work.list_no = 1; while (pPrev != trailHead.pNext) { pPrev.m_Flag &= 4294967293U; AppMain.AMS_TRAIL_PARAM ams_TRAIL_PARAM2 = work; ams_TRAIL_PARAM2.list_no += 1; AppMain._amTrailDrawPartsNormalTex(pPrev, work, buffer2, num3); pPrev = pPrev.pPrev; num3 += 6; } ams_PARAM_DRAW_PRIMITIVE.format3D = 4; ams_PARAM_DRAW_PRIMITIVE.type = 0; ams_PARAM_DRAW_PRIMITIVE.vtxPCT3D = nns_PRIM3D_PCT_ARRAY2; ams_PARAM_DRAW_PRIMITIVE.texlist = work.texlist; ams_PARAM_DRAW_PRIMITIVE.texId = work.texId; ams_PARAM_DRAW_PRIMITIVE.count = (int)(6 * (work.trailPartsNum - 1)); ams_PARAM_DRAW_PRIMITIVE.ablend = ablend; ams_PARAM_DRAW_PRIMITIVE.sortZ = sortZ; AppMain.amDrawPrimitive3D(pEffect.drawState, ams_PARAM_DRAW_PRIMITIVE); } GlobalPool <NNS_VECTOR> .Release(nns_VECTOR); GlobalPool <NNS_VECTOR> .Release(nns_VECTOR2); GlobalPool <NNS_VECTOR> .Release(nns_VECTOR3); }
// Token: 0x06000032 RID: 50 RVA: 0x00002CC2 File Offset: 0x00000EC2 private static void _amTrailEFDeleteEffectReal(AppMain.AMS_TRAIL_EFFECT pEffect) { pEffect.pPrev.pNext = pEffect.pNext; pEffect.pNext.pPrev = pEffect.pPrev; AppMain._amTrailEFFree(pEffect); }
private static void _amTrailDrawNormal(AppMain.AMS_TRAIL_EFFECT pEffect) { AppMain.AMS_TRAIL_PARAM work = pEffect.Work; AppMain.AMS_TRAIL_PARTSDATA amsTrailPartsdata = AppMain.pTr.trailData[(int)work.trailId]; AppMain.AMS_TRAIL_PARTS trailTail = amsTrailPartsdata.trailTail; AppMain.AMS_TRAIL_PARTS trailHead = amsTrailPartsdata.trailHead; AppMain.AMS_TRAIL_PARTS pPrev1 = trailTail.pPrev; if (trailTail.pPrev.pPrev == trailHead || (double)work.time <= 0.0) { return; } AppMain.NNS_RGBA startColor = work.startColor; AppMain.NNS_RGBA ptclColor = work.ptclColor; AppMain.NNS_VECTOR nnsVector1 = new AppMain.NNS_VECTOR(); AppMain.NNS_VECTOR nnsVector2 = new AppMain.NNS_VECTOR(); AppMain.NNS_VECTOR nnsVector3 = new AppMain.NNS_VECTOR(); float num1 = 1f; AppMain.AMS_PARAM_DRAW_PRIMITIVE setParam = AppMain.GlobalPool <AppMain.AMS_PARAM_DRAW_PRIMITIVE> .Alloc(); int num2 = 1; AppMain.amDrawGetPrimBlendParam((int)work.blendType, setParam); if (work.zTest != (short)0) { setParam.zTest = (short)1; } if (work.zMask != (short)0) { setParam.zMask = (short)1; } AppMain.amVectorSet(nnsVector3, 0.0f, 0.0f, 1f); if ((double)work.time < (double)work.vanish_time) { num1 = work.time / work.vanish_time; } work.vanish_rate = num1; startColor.a = work.startColor.a * num1; ptclColor.a = work.ptclColor.a * num1; float startSize = work.startSize; float ptclSize = work.ptclSize; if (work.ptclFlag != (short)0 && work.ptclTexId != (short)-1) { AppMain.NNS_PRIM3D_PCT_ARRAY nnsPriM3DPctArray = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(6); AppMain.NNS_PRIM3D_PCT[] buffer = nnsPriM3DPctArray.buffer; int offset = nnsPriM3DPctArray.offset; float num3 = AppMain.nnDistanceVector(pPrev1.pos, AppMain._am_ef_camPos); AppMain.mppAssertNotImpl(); buffer[offset].Col = AppMain.AMD_FCOLTORGBA8888(ptclColor.r, ptclColor.g, ptclColor.b, ptclColor.a); buffer[offset + 1].Col = buffer[offset + 2].Col = buffer[offset + 5].Col = buffer[offset].Col; buffer[offset].Tex.u = 0.0f; buffer[offset].Tex.v = 0.0f; buffer[offset + 1].Tex.u = 1f; buffer[offset + 1].Tex.v = 0.0f; buffer[offset + 2].Tex.u = 0.0f; buffer[offset + 2].Tex.v = 1f; buffer[offset + 5].Tex.u = 1f; buffer[offset + 5].Tex.v = 1f; buffer[offset + 3] = buffer[offset + 1]; buffer[offset + 4] = buffer[offset + 2]; setParam.format3D = 4; setParam.type = 0; setParam.vtxPCT3D = nnsPriM3DPctArray; setParam.texlist = work.texlist; setParam.texId = (int)work.ptclTexId; setParam.count = 6; setParam.ablend = num2; setParam.sortZ = num3; AppMain.amDrawPrimitive3D(pEffect.drawState, setParam); } if (work.trailPartsNum < (short)3) { return; } if (work.texlist == null || work.texId == -1) { AppMain.NNS_PRIM3D_PC[] _pv = AppMain.amDrawAlloc_NNS_PRIM3D_PC(6 * ((int)work.trailPartsNum - 1)); AppMain.NNS_PRIM3D_PC[] nnsPriM3DPcArray = _pv; int num3 = 0; float num4 = AppMain.nnDistanceVector(pPrev1.pos, AppMain._am_ef_camPos); AppMain.nnCrossProductVector(nnsVector1, nnsVector3, pPrev1.dir); AppMain.nnNormalizeVector(nnsVector1, nnsVector1); AppMain.nnScaleVector(nnsVector2, nnsVector1, startSize); AppMain.nnAddVector(ref _pv[0].Pos, pPrev1.pos, nnsVector2); AppMain.nnAddVector(ref _pv[1].Pos, pPrev1.pPrev.pos, nnsVector2); AppMain.nnSubtractVector(ref _pv[2].Pos, pPrev1.pos, nnsVector2); AppMain.nnSubtractVector(ref _pv[5].Pos, pPrev1.pPrev.pos, nnsVector2); _pv[5].Col = AppMain.AMD_FCOLTORGBA8888(startColor.r, startColor.g, startColor.b, startColor.a); _pv[0].Col = _pv[1].Col = _pv[2].Col = _pv[5].Col; _pv[3] = _pv[1]; _pv[4] = _pv[2]; int pv = num3 + 6; AppMain.AMS_TRAIL_PARTS pPrev2 = pPrev1.pPrev; work.list_no = (short)1; while (pPrev2 != trailHead.pNext) { AppMain.mppAssertNotImpl(); pPrev2.m_Flag &= 4294967293U; ++work.list_no; AppMain._amTrailDrawPartsNormal(pPrev2, work, _pv, pv); pPrev2 = pPrev2.pPrev; pv += 6; } setParam.format3D = 2; setParam.type = 0; setParam.vtxPC3D = nnsPriM3DPcArray; setParam.texlist = work.texlist; setParam.texId = work.texId; setParam.count = 6 * ((int)work.trailPartsNum - 1); setParam.ablend = num2; setParam.sortZ = num4; AppMain.amDrawPrimitive3D(pEffect.drawState, setParam); } else { AppMain.NNS_PRIM3D_PCT_ARRAY nnsPriM3DPctArray = AppMain.amDrawAlloc_NNS_PRIM3D_PCT(6 * ((int)work.trailPartsNum - 1)); AppMain.NNS_PRIM3D_PCT[] buffer = nnsPriM3DPctArray.buffer; int offset = nnsPriM3DPctArray.offset; int num3 = offset; float num4 = (float)((int)work.trailPartsNum - 1) / (float)work.trailPartsNum * work.vanish_rate; float num5 = AppMain.nnDistanceVector(pPrev1.pos, AppMain._am_ef_camPos); AppMain.nnCrossProductVector(nnsVector1, nnsVector3, pPrev1.dir); AppMain.nnNormalizeVector(nnsVector1, nnsVector1); AppMain.nnScaleVector(nnsVector2, nnsVector1, startSize); AppMain.nnAddVector(ref buffer[offset].Pos, pPrev1.pos, nnsVector2); AppMain.nnAddVector(ref buffer[offset + 1].Pos, pPrev1.pPrev.pos, nnsVector2); AppMain.nnSubtractVector(ref buffer[offset + 2].Pos, pPrev1.pos, nnsVector2); AppMain.nnSubtractVector(ref buffer[offset + 5].Pos, pPrev1.pPrev.pos, nnsVector2); buffer[offset + 5].Col = AppMain.AMD_FCOLTORGBA8888(startColor.r, startColor.g, startColor.b, startColor.a); buffer[offset].Col = buffer[offset + 1].Col = buffer[offset + 2].Col = buffer[offset + 5].Col; buffer[offset].Tex.u = 1f; buffer[offset].Tex.v = 0.0f; buffer[offset + 1].Tex.u = num4; buffer[offset + 1].Tex.v = 0.0f; buffer[offset + 2].Tex.u = 1f; buffer[offset + 2].Tex.v = 1f; buffer[offset + 5].Tex.u = num4; buffer[offset + 5].Tex.v = 1f; buffer[offset + 3] = buffer[offset + 1]; buffer[offset + 4] = buffer[offset + 2]; int pv = num3 + 6; AppMain.AMS_TRAIL_PARTS pPrev2 = pPrev1.pPrev; work.list_no = (short)1; while (pPrev2 != trailHead.pNext) { pPrev2.m_Flag &= 4294967293U; ++work.list_no; AppMain._amTrailDrawPartsNormalTex(pPrev2, work, buffer, pv); pPrev2 = pPrev2.pPrev; pv += 6; } setParam.format3D = 4; setParam.type = 0; setParam.vtxPCT3D = nnsPriM3DPctArray; setParam.texlist = work.texlist; setParam.texId = work.texId; setParam.count = 6 * ((int)work.trailPartsNum - 1); setParam.ablend = num2; setParam.sortZ = num5; AppMain.amDrawPrimitive3D(pEffect.drawState, setParam); } //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector1); //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector2); //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector3); }