Exemplo n.º 1
0
        private void DumpBlock(DataReader reader, Po po, bool fullWidth = false)
        {
            for (int i = 0; i < SizeBlock; i++)
            {
                if (!(JapaneseStrings.Contains(Count) || BadPointers.Contains(Count)))
                {
                    PoEntry entry = new PoEntry(); //Generate the entry on the po file

                    //Get position
                    int position = reader.ReadInt32() - 0x401600;
                    reader.Stream.PushToPosition(position);

                    //Get the text
                    DumpText(reader);

                    //Normalize the text
                    NormalizeText(fullWidth);

                    //Return to the original position
                    reader.Stream.PopPosition();

                    //entry.Original = ReplaceText(TextNormalized, true);  //Add the string block
                    entry.Original = TextNormalized.Replace("\0", "");
                    entry.Context  = Count.ToString(); //Context
                    po.Add(entry);

                    //Clear the text
                    TextNormalized = "";
                }
                else
                {
                    reader.Stream.Position += 4;
                }

                Count++;
            }
        }