public override void OnRebuild(VoidPtr address, int length, bool force) { PAT0Node node = (PAT0Node)Parent.Parent.Parent; PAT0Texture *header = (PAT0Texture *)address; header->_key = _frame; header->_texFileIndex = ((PAT0TextureNode)Parent)._hasTex && !String.IsNullOrEmpty(_tex) ? _texFileIndex : (ushort)0; header->_pltFileIndex = ((PAT0TextureNode)Parent)._hasPlt && !String.IsNullOrEmpty(_plt) ? _pltFileIndex : (ushort)0; }
public override void OnPopulate() { if (!_texFlags.HasFlag(PAT0Flags.FixedTexture)) { PAT0Texture *current = Header->Textures; for (int i = 0; i < textureCount; i++, current++) { new PAT0TextureEntryNode().Initialize(this, new DataSource(current, PAT0Texture.Size)); } } }
protected internal override void OnRebuild(VoidPtr address, int length, bool force) { if (Children.Count > 1) { PAT0TextureTable *table = (PAT0TextureTable *)address; table->_textureCount = (short)Children.Count; table->_frameScale = 1.0f / (Children[Children.Count - 1] as PAT0TextureEntryNode).key; table->_pad = 0; PAT0Texture *entry = table->Textures; foreach (PAT0TextureEntryNode n in Children) { n.Rebuild(entry++, PAT0Texture.Size, true); } } }
public override void OnRebuild(VoidPtr address, int length, bool force) { if (Children.Count > 1) { PAT0TextureTable *table = (PAT0TextureTable *)address; table->_textureCount = (short)Children.Count; float f = (Children[Children.Count - 1] as PAT0TextureEntryNode)._frame; table->_frameScale = f == 0 ? 0 : 1.0f / f; table->_pad = 0; PAT0Texture *entry = table->Textures; foreach (PAT0TextureEntryNode n in Children) { n.Rebuild(entry++, PAT0Texture.Size, true); } } }
protected internal override void OnRebuild(VoidPtr address, int length, bool force) { PAT0Node node = (PAT0Node)Parent.Parent.Parent; PAT0Texture *header = (PAT0Texture *)address; header->_key = key; short i = 0; if (((PAT0TextureNode)Parent).hasTex && !String.IsNullOrEmpty(Texture)) { i = (short)node._textureFiles.IndexOf(Texture); } if (i < 0) { texFileIndex = 0; } else { texFileIndex = (ushort)i; } header->_texFileIndex = texFileIndex; i = 0; if (((PAT0TextureNode)Parent).hasPlt && !String.IsNullOrEmpty(Palette)) { i = (short)node._paletteFiles.IndexOf(Palette); } if (i < 0) { pltFileIndex = 0; } else { pltFileIndex = (ushort)i; } header->_pltFileIndex = pltFileIndex; }