public void setModel(Nsbmd model, Boolean mode) { modelList.Add(model); //if (model.actualTex != null) //{ if (polyval > 1) { if (mode) { //MapEditor.Console.AppendText("\nStart texturing(Singular mode)"); MakeTexture(model.getMDL0at(0), model.getMaterials(), idActualMaterial, true); } else { //MapEditor.Console.AppendText("\nStart texturing(Normal map)"); MakeTexture(model.getMDL0at(0), model.getMaterials(), polMatList); } } else if (polyval == 0) { //MapEditor.Console.AppendText("\nStart texturing (One polygon map)"); MakeTexture(model.getMDL0at(0), model.getMaterials(), 0, true); } }
private void LoadGenericNSBMD(BinaryReader reader) { PkmnMapDemuxer demuxer; Nsbmd nsbmd; List <NsbmdModel.MatTexPalStruct> list; Nsbtx.type = NSBMD_MODEL; demuxer = new PkmnMapDemuxer(reader, 1); PkmnMapHeader map = new PkmnMapHeader(); streamNSBMD = new ClosableMemoryStream(); new BinaryWriter(streamNSBMD).Write(demuxer.DemuxBMDBytes(map, 1)); nsbmd = new Nsbmd(); var reader2 = new BinaryReader(streamNSBMD); nsbmd.LoadBMD0(reader2, 0); actualModel = nsbmd; list = null; list = nsbmd.getMaterials(); if (actualModel.actualTex != null) { nsbmd.MatchTextures(); } }