C# Класс WF.Player.Core.Formats.GWS

A parser and generator of Wherigo save files.
Показать файл Открыть проект

Открытые методы

Метод Описание
Load ( Stream stream ) : Metadata

Loads a save game for the current cartridge from a stream.

LoadMetadata ( Stream stream ) : Metadata

Loads the metadata of a GWS file stream.

Save ( Stream stream, string saveName = "UI initiated sync" ) : void

Saves the current cartridge to a GWS file.

Приватные методы

Метод Описание
GWS ( Cartridge cart, Character player, IPlatformHelper platformHelper, LuaDataFactory dataFactory ) : System
LoadMetadata ( BinaryReader input ) : Metadata
ReadCString ( BinaryReader input ) : string

Reads a null terminated string from binary stream.

SetField ( LuaDataContainer obj, object key, object value, IDataProvider rawset ) : void
readByteArray ( BinaryReader input ) : byte[]

Reads a byte array from binary reader. First four bytes are the length, the next length bytes are the array.

readString ( BinaryReader input ) : string

Reads a string from binary reader. First four bytes are the length, the next length bytes are the string.

readTable ( BinaryReader input, LuaDataContainer obj ) : void
toArray ( string str ) : byte[]

Convert string to byte array.

writeByteArray ( BinaryWriter output, byte b ) : void

Writes a byte array to a binary writer. First four bytes are the length, the next length bytes are the array.

writeCString ( BinaryWriter output, string str ) : int

Writes a null terminated string to binary stream.

writeString ( BinaryWriter output, string str ) : void

Writes a string to a binary writer. First four bytes are the length, the next length bytes are the string.

writeTable ( BinaryWriter output, LuaDataContainer obj ) : void

Write the table obj to the binary writer output.

Описание методов

Load() публичный Метод

Loads a save game for the current cartridge from a stream.
public Load ( Stream stream ) : Metadata
stream Stream Stream to load the game from.
Результат Metadata

LoadMetadata() публичный статический Метод

Loads the metadata of a GWS file stream.
public static LoadMetadata ( Stream stream ) : Metadata
stream Stream Stream of a GWS file, set at the beginning of the GWS /// file.
Результат Metadata

Save() публичный Метод

Saves the current cartridge to a GWS file.
public Save ( Stream stream, string saveName = "UI initiated sync" ) : void
stream Stream Stream to write the data to.
saveName string Description for the save file, which is put into the file.
Результат void