Made variable symbols write a custom name.
This commit is contained in:
parent
684a8a3197
commit
0ab5431c5f
1 changed files with 12 additions and 0 deletions
|
@ -201,6 +201,8 @@ namespace arookas
|
||||||
public int Display { get; private set; }
|
public int Display { get; private set; }
|
||||||
public int Index { get; private set; }
|
public int Index { get; private set; }
|
||||||
|
|
||||||
|
string TableName { get { return String.Format("varsym_{0}_{1}", Display, Index); } }
|
||||||
|
|
||||||
// symbol table
|
// symbol table
|
||||||
public override sunSymbolType Type { get { return sunSymbolType.Variable; } }
|
public override sunSymbolType Type { get { return sunSymbolType.Variable; } }
|
||||||
public override uint Data { get { return (uint)Index; } }
|
public override uint Data { get { return (uint)Index; } }
|
||||||
|
@ -211,6 +213,16 @@ namespace arookas
|
||||||
Display = display;
|
Display = display;
|
||||||
Index = index;
|
Index = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override int WriteSymbolTable(aBinaryWriter writer, int ofs)
|
||||||
|
{
|
||||||
|
base.WriteSymbolTable(writer, ofs);
|
||||||
|
return writer.Encoding.GetByteCount(TableName) + 1; // include null terminator
|
||||||
|
}
|
||||||
|
public override void WriteStringTable(aBinaryWriter writer)
|
||||||
|
{
|
||||||
|
writer.WriteString(TableName, aBinaryStringFormat.NullTerminated);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum sunSymbolType
|
enum sunSymbolType
|
||||||
|
|
Loading…
Reference in a new issue