C# Class Ohana3DS_Transfigured.Ohana.IOUtils

Afficher le fichier Open project: Quibilia/Ohana3DS-Transfigured

Méthodes publiques

Méthode Description
endianSwap ( uint value ) : uint

Converts a value from Little to Big or Big to Little endian.

readString ( BinaryReader input, uint address, bool advancePosition = false ) : string

Read an ASCII String from a given Reader at a given address. Note that the text MUST end with a Null Terminator (0x0). It doesn't advances the position after reading.

readString ( BinaryReader input, uint address, uint count ) : string

Read an ASCII String from a given Reader at a given address with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.

readStringWithLength ( BinaryReader input, uint count ) : string

Read an ASCII String from a given Reader with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.

signExtend ( int value, int bits ) : int

Sign extends the value, so it will keep the sign flag.

signExtend ( uint value, int bits ) : int

Sign extends the value, so it will keep the sign flag.

Method Details

endianSwap() public static méthode

Converts a value from Little to Big or Big to Little endian.
public static endianSwap ( uint value ) : uint
value uint The value to be swapped
Résultat uint

readString() public static méthode

Read an ASCII String from a given Reader at a given address. Note that the text MUST end with a Null Terminator (0x0). It doesn't advances the position after reading.
public static readString ( BinaryReader input, uint address, bool advancePosition = false ) : string
input System.IO.BinaryReader The Reader of the File Stream
address uint Address where the text begins
advancePosition bool
Résultat string

readString() public static méthode

Read an ASCII String from a given Reader at a given address with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.
public static readString ( BinaryReader input, uint address, uint count ) : string
input System.IO.BinaryReader The Reader of the File Stream
address uint Address where the text begins
count uint Number of bytes that the text have
Résultat string

readStringWithLength() public static méthode

Read an ASCII String from a given Reader with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.
public static readStringWithLength ( BinaryReader input, uint count ) : string
input System.IO.BinaryReader The Reader of the File Stream
count uint Number of bytes that the text have
Résultat string

signExtend() public static méthode

Sign extends the value, so it will keep the sign flag.
public static signExtend ( int value, int bits ) : int
value int The value that should be sign-extended
bits int Number of bits that the value have
Résultat int

signExtend() public static méthode

Sign extends the value, so it will keep the sign flag.
public static signExtend ( uint value, int bits ) : int
value uint The value that should be sign-extended
bits int Number of bits that the value have
Résultat int