public void LoadFonts() { ArchiveWorker aw = new ArchiveWorker(Memory.Archives.A_MENU); string sysfntTdwFilepath = aw.GetListOfFiles().First(x => x.ToLower().Contains("sysfnt.tdw")); string sysfntFilepath = aw.GetListOfFiles().First(x => x.ToLower().Contains("sysfnt.tex")); TEX tex = new TEX(ArchiveWorker.GetBinaryFile(Memory.Archives.A_MENU, sysfntFilepath)); sysfnt = tex.GetTexture((int)ColorID.White); sysfntbig = TextureHandler.Create("sysfld{0:00}.tex", tex, 2, 1, (int)ColorID.White); TDW tim = new TDW(ArchiveWorker.GetBinaryFile(Memory.Archives.A_MENU, sysfntTdwFilepath), 0); charWidths = tim.CharWidths; menuFont = tim.GetTexture((ushort)ColorID.White); }
public void LoadFonts() { Memory.Log.WriteLine($"{nameof(Font)} :: {nameof(LoadFonts)} "); var aw = ArchiveWorker.Load(Memory.Archives.A_MENU); var bufferTex = aw.GetBinaryFile("sysfnt.tex"); var tex = new TEX(bufferTex); sysfnt = tex.GetTexture((int)ColorID.White); sysfntbig = TextureHandler.Create("sysfld{0:00}.tex", tex, 2, 1, (int)ColorID.White); var bufferTDW = aw.GetBinaryFile("sysfnt.tdw"); var tim = new TDW(bufferTDW); charWidths = tim.CharWidths; menuFont = tim.GetTexture((ushort)ColorID.White); }
public void LoadFonts() { Memory.Log.WriteLine($"{nameof(Font)} :: {nameof(LoadFonts)} "); ArchiveWorker aw = new ArchiveWorker(Memory.Archives.A_MENU); string[] filelist = aw.GetListOfFiles(); if (filelist != null) { string sysfntTdwFilepath = filelist.First(x => x.ToLower().Contains("sysfnt.tdw")); string sysfntFilepath = filelist.First(x => x.ToLower().Contains("sysfnt.tex")); TEX tex = new TEX(ArchiveWorker.GetBinaryFile(Memory.Archives.A_MENU, sysfntFilepath)); sysfnt = tex.GetTexture((int)ColorID.White); sysfntbig = TextureHandler.Create("sysfld{0:00}.tex", tex, 2, 1, (int)ColorID.White); TDW tim = new TDW(ArchiveWorker.GetBinaryFile(Memory.Archives.A_MENU, sysfntTdwFilepath), 0); charWidths = tim.CharWidths; menuFont = tim.GetTexture((ushort)ColorID.White); } }