public override void OnPopulate() { int col1 = 0; int colop1 = col1 + 16; int alpha1 = colop1 + 20; int alphaop1 = alpha1 + 16; int csel1 = alphaop1 + 20; for (int i = 0; i < 4; i++) { REFFTEVStage s = new REFFTEVStage(i); byte *p = (byte *)_drawSetting.mTevColor1.Address; { s.kcsel = p[csel1 + i]; s.kasel = p[csel1 + 4 + i]; s.cseld = p[col1 + 4 * i + 3]; s.cselc = p[col1 + 4 * i + 2]; s.cselb = p[col1 + 4 * i + 1]; s.csela = p[col1 + 4 * i + 0]; s.cop = p[colop1 + 5 * i + 0]; s.cbias = p[colop1 + 5 * i + 1]; s.cshift = p[colop1 + 5 * i + 2]; s.cclamp = p[colop1 + 5 * i + 3]; s.cdest = p[colop1 + 5 * i + 4]; s.aseld = p[alpha1 + 4 * i + 3]; s.aselc = p[alpha1 + 4 * i + 2]; s.aselb = p[alpha1 + 4 * i + 1]; s.asela = p[alpha1 + 4 * i + 0]; s.aop = p[alphaop1 + 5 * i + 0]; s.abias = p[alphaop1 + 5 * i + 1]; s.ashift = p[alphaop1 + 5 * i + 2]; s.aclamp = p[alphaop1 + 5 * i + 3]; s.adest = p[alphaop1 + 5 * i + 4]; } s.ti = 0; s.tc = 0; s.cc = 0; s.te = false; s.Parent = this; } }
public override void OnRebuild(VoidPtr address, int length, bool force) { EmitterDesc *hdr = (EmitterDesc *)address; *hdr = _desc; *(EmitterDrawSetting7 *)&hdr->_drawSetting = _drawSetting; hdr->_drawSetting.typeOption2 = typeOption2._data; int col1 = 0; int colop1 = col1 + 16; int alpha1 = colop1 + 20; int alphaop1 = alpha1 + 16; int csel1 = alphaop1 + 20; for (int i = 0; i < 4; i++) { REFFTEVStage s = (REFFTEVStage)Children[i]; byte *p = (byte *)(*(EmitterDrawSetting7 *)&hdr->_drawSetting).mTevColor1.Address; { p[csel1 + i] = (byte)s.kcsel; p[csel1 + 4 + i] = (byte)s.kasel; p[col1 + 4 * i + 3] = (byte)s.cseld; p[col1 + 4 * i + 2] = (byte)s.cselc; p[col1 + 4 * i + 1] = (byte)s.cselb; p[col1 + 4 * i + 0] = (byte)s.csela; p[colop1 + 5 * i + 0] = (byte)s.cop; p[colop1 + 5 * i + 1] = (byte)s.cbias; p[colop1 + 5 * i + 2] = (byte)s.cshift; p[colop1 + 5 * i + 3] = (byte)s.cclamp; p[colop1 + 5 * i + 4] = (byte)s.cdest; p[alpha1 + 4 * i + 3] = (byte)s.aseld; p[alpha1 + 4 * i + 2] = (byte)s.aselc; p[alpha1 + 4 * i + 1] = (byte)s.aselb; p[alpha1 + 4 * i + 0] = (byte)s.asela; p[alphaop1 + 5 * i + 0] = (byte)s.aop; p[alphaop1 + 5 * i + 1] = (byte)s.abias; p[alphaop1 + 5 * i + 2] = (byte)s.ashift; p[alphaop1 + 5 * i + 3] = (byte)s.aclamp; p[alphaop1 + 5 * i + 4] = (byte)s.adest; } } }
public override void OnPopulate() { int col1 = 0; int colop1 = col1 + 16; int alpha1 = colop1 + 20; int alphaop1 = alpha1 + 16; int csel1 = alphaop1 + 20; for (int i = 0; i < 4; i++) { REFFTEVStage s = new REFFTEVStage(i); byte* p = (byte*)drawSetting.mTevColor1.Address; { s.kcsel = p[csel1 + i]; s.kasel = p[csel1 + 4 + i]; s.cseld = p[col1 + 4 * i + 3]; s.cselc = p[col1 + 4 * i + 2]; s.cselb = p[col1 + 4 * i + 1]; s.csela = p[col1 + 4 * i + 0]; s.cop = p[colop1 + 5 * i + 0]; s.cbias = p[colop1 + 5 * i + 1]; s.cshift = p[colop1 + 5 * i + 2]; s.cclamp = p[colop1 + 5 * i + 3]; s.cdest = p[colop1 + 5 * i + 4]; s.aseld = p[alpha1 + 4 * i + 3]; s.aselc = p[alpha1 + 4 * i + 2]; s.aselb = p[alpha1 + 4 * i + 1]; s.asela = p[alpha1 + 4 * i + 0]; s.aop = p[alphaop1 + 5 * i + 0]; s.abias = p[alphaop1 + 5 * i + 1]; s.ashift = p[alphaop1 + 5 * i + 2]; s.aclamp = p[alphaop1 + 5 * i + 3]; s.adest = p[alphaop1 + 5 * i + 4]; } s.ti = 0; s.tc = 0; s.cc = 0; s.te = false; s.Parent = this; } }