mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(Create): use localized strings.
This commit is contained in:
@@ -85,14 +85,13 @@ namespace GameRes.Formats
|
|||||||
writer.Write (dir_size);
|
writer.Write (dir_size);
|
||||||
writer.Write (list_size);
|
writer.Write (list_size);
|
||||||
|
|
||||||
var encoding = Encodings.cp932.Clone() as Encoding;
|
var encoding = Encodings.cp932.WithFatalFallback();
|
||||||
encoding.EncoderFallback = EncoderFallback.ExceptionFallback;
|
|
||||||
|
|
||||||
byte[] name_buf = new byte[32];
|
byte[] name_buf = new byte[32];
|
||||||
int callback_count = 0;
|
int callback_count = 0;
|
||||||
|
|
||||||
if (null != callback)
|
if (null != callback)
|
||||||
callback (callback_count++, null, "Writing index...");
|
callback (callback_count++, null, arcStrings.MsgWritingIndex);
|
||||||
|
|
||||||
// first, write names only
|
// first, write names only
|
||||||
foreach (var entry in list)
|
foreach (var entry in list)
|
||||||
@@ -121,7 +120,7 @@ namespace GameRes.Formats
|
|||||||
foreach (var entry in list)
|
foreach (var entry in list)
|
||||||
{
|
{
|
||||||
if (null != callback)
|
if (null != callback)
|
||||||
callback (callback_count++, entry, "Adding file");
|
callback (callback_count++, entry, arcStrings.MsgAddingFile);
|
||||||
|
|
||||||
entry.Offset = current_offset;
|
entry.Offset = current_offset;
|
||||||
using (var input = File.Open (entry.Name, FileMode.Open, FileAccess.Read))
|
using (var input = File.Open (entry.Name, FileMode.Open, FileAccess.Read))
|
||||||
@@ -136,7 +135,7 @@ namespace GameRes.Formats
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (null != callback)
|
if (null != callback)
|
||||||
callback (callback_count++, null, "Updating index...");
|
callback (callback_count++, null, arcStrings.MsgUpdatingIndex);
|
||||||
|
|
||||||
// at last, go back to directory and write offset/sizes
|
// at last, go back to directory and write offset/sizes
|
||||||
long dir_offset = 12+32;
|
long dir_offset = 12+32;
|
||||||
|
|||||||
Reference in New Issue
Block a user