Updated arookas library
Now it uses the public repository, making syncing updates much easier.
This commit is contained in:
parent
7af004c617
commit
a4e0af193e
4 changed files with 10 additions and 11 deletions
|
@ -8,7 +8,7 @@ namespace arookas
|
|||
static class SSC {
|
||||
static void Main(string[] args) {
|
||||
Message("ssc v0.1 arookas\n");
|
||||
var cmd = new CommandLine(args);
|
||||
var cmd = new aCommandLine(args);
|
||||
if (cmd.Count == 0) {
|
||||
Message("Usage: ssc -input <input.sun> [-output <output.sb>]\n");
|
||||
Pause();
|
||||
|
@ -58,7 +58,7 @@ namespace arookas
|
|||
}
|
||||
|
||||
// command-line
|
||||
static void ReadCmdLine(CommandLine cmd, out string inputFile, out string outputFile) {
|
||||
static void ReadCmdLine(aCommandLine cmd, out string inputFile, out string outputFile) {
|
||||
inputFile = null;
|
||||
outputFile = null;
|
||||
foreach (var prm in cmd) {
|
||||
|
@ -76,7 +76,7 @@ namespace arookas
|
|||
outputFile = Path.ChangeExtension(inputFile, ".sb");
|
||||
}
|
||||
}
|
||||
static void GetInput(CommandLineParameter prm, ref string inputFile) {
|
||||
static void GetInput(aCommandLineParameter prm, ref string inputFile) {
|
||||
if (inputFile != null) {
|
||||
Error("Only one -input option is allowed.\n");
|
||||
Pause();
|
||||
|
@ -89,7 +89,7 @@ namespace arookas
|
|||
}
|
||||
inputFile = prm[0];
|
||||
}
|
||||
static void GetOutput(CommandLineParameter prm, ref string outputFile) {
|
||||
static void GetOutput(aCommandLineParameter prm, ref string outputFile) {
|
||||
if (outputFile != null) {
|
||||
Error("Only one -output option is allowed.\n");
|
||||
Pause();
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace arookas {
|
|||
|
||||
static void ReadCommandLine(string[] args) {
|
||||
Console.WriteLine("Reading command line...");
|
||||
sSettings = new CommandLineSettings(new CommandLine(args));
|
||||
sSettings = new CommandLineSettings(new aCommandLine(args));
|
||||
}
|
||||
static void CreateReader(Stream stream) {
|
||||
Console.WriteLine("Creating binary reader...");
|
||||
|
@ -240,7 +240,7 @@ namespace arookas {
|
|||
static string FetchDataValue(uint ofs) {
|
||||
sReader.Keep();
|
||||
sReader.Goto(sDataOffset + (4 * sDataCount) + ofs);
|
||||
var data = sReader.ReadString(aBinaryStringFormat.NullTerminated);
|
||||
var data = sReader.ReadString<aZSTR>();
|
||||
sReader.Back();
|
||||
return data;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ namespace arookas {
|
|||
static string FetchSymbolName(Symbol symbol) {
|
||||
sReader.Keep();
|
||||
sReader.Goto(sDynsymOffset + (20 * sDynsymCount) + symbol.StringOffset);
|
||||
var name = sReader.ReadString(aBinaryStringFormat.NullTerminated);
|
||||
var name = sReader.ReadString<aZSTR>();
|
||||
sReader.Back();
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace arookas {
|
|||
public bool OutputDynsym { get { return mOutputDynsym; } }
|
||||
public bool OutputBss { get { return mOutputBss; } }
|
||||
|
||||
public CommandLineSettings(CommandLine cmd) {
|
||||
public CommandLineSettings(aCommandLine cmd) {
|
||||
if (cmd == null) {
|
||||
throw new ArgumentNullException("cmd");
|
||||
}
|
||||
|
|
|
@ -466,7 +466,7 @@ namespace arookas {
|
|||
throw new ArgumentNullException("data");
|
||||
}
|
||||
mData.Writer.Write32(mDataString.Size);
|
||||
mDataString.Writer.WriteString(data, aBinaryStringFormat.NullTerminated);
|
||||
mDataString.Writer.WriteString<aZSTR>(data);
|
||||
++mDataCount;
|
||||
}
|
||||
|
||||
|
@ -477,7 +477,7 @@ namespace arookas {
|
|||
mSymbol.Writer.Write32(data);
|
||||
mSymbol.Writer.Write32(0u); // runtime field (hash)
|
||||
mSymbol.Writer.Write32(0u); // runtime field (funcptr)
|
||||
mSymbolString.Writer.WriteString(name, aBinaryStringFormat.NullTerminated);
|
||||
mSymbolString.Writer.WriteString<aZSTR>(name);
|
||||
++mSymbolCount;
|
||||
if (type == sunSymbolType.Variable) {
|
||||
++mVarCount;
|
||||
|
@ -508,7 +508,6 @@ namespace arookas {
|
|||
}
|
||||
|
||||
public void Dispose() {
|
||||
mWriter.Dispose();
|
||||
mStream.Dispose();
|
||||
}
|
||||
public void Copy(aBinaryWriter writer) {
|
||||
|
|
Loading…
Reference in a new issue