C# Class Files.Manager.FileManager

Provides access to all of the game's files. Also takes care of loading archives.
显示文件 Open project: Afr0Games/Project-Dollhouse

Private Properties

Property Type Description
AddItem void
AddItem void
FileManager System
GenerateHash byte[]
GetFileList IEnumerable
GrabItem Stream
GrabItem Stream
GrabItem object
IsBMP bool
IsUTK bool
LoadAllArchives void

Public Methods

Method Description
GetAnimation ( ulong AssetID ) : Anim

Gets a Anim instance from the FileManager.

GetAppearance ( ulong AssetID ) : Appearance

Gets an Appearance instance from the FileManager.

GetBinding ( ulong AssetID ) : Binding

Gets an Binding instance from the FileManager.

GetBindings ( List BindingIDs ) : Binding[]

Gets an array of Binding instances.

GetCollection ( ulong AssetID ) : Collection

Gets an Collection instance from the FileManager.

GetHLS ( uint ID ) : HLS

Gets an HLS instance from the FileManager.

GetHandgroup ( ulong AssetID ) : HandGroup

Gets an Handgroup instance from the FileManager.

GetIFF ( string Filename ) : Iff

Gets an IFF instance from the FileManager.

GetMesh ( ulong AssetID ) : Mesh

Gets a Mesh instance from the FileManager.

GetOutfit ( ulong AssetID ) : Outfit

Gets an Outfit instance from the FileManager.

GetPurchasableOutfit ( ulong AssetID ) : PurchasableOutfit

Gets an PurchasableOutfit instance from the FileManager.

GetSkeleton ( ulong AssetID ) : Skeleton

Gets an Skeleton instance from the FileManager.

GetSound ( uint ID ) : ISoundCodec

Gets a sound (XA or UTK) from the FileManager.

GetTRK ( uint ID ) : TRK

Gets an TRK instance from the FileManager.

GetTexture ( ulong AssetID, bool IsTGA = false ) : Microsoft.Xna.Framework.Graphics.Texture2D

Gets an Texture2D instance from the FileManager.

Initialize ( Microsoft.Xna.Framework.Game G, string StartupDir ) : void

Initializes the FileManager.

TrackExists ( uint ID ) : bool

Attempts to figure out if a track exists in the FileManager.

Private Methods

Method Description
AddItem ( string Filename, Asset Item ) : void

Adds an asset to the FileManager's cache. This method should not be used directly.

AddItem ( ulong ID, Asset Item ) : void
FileManager ( ) : System
GenerateHash ( string Filename ) : byte[]
GetFileList ( string fileSearchPattern, string rootFolderPath ) : IEnumerable
GrabItem ( string Filename ) : Stream

Returns a Stream instance with data from the specified item.

GrabItem ( ulong ID, FAR3TypeIDs TypeID ) : Stream

Returns a Stream instance with data from the specified item.

GrabItem ( uint ID, TypeIDs TypeID ) : object

Returns a Stream instance with data from the specified item.

IsBMP ( Stream Data ) : bool

Checks if the supplied data is a BMP.

IsUTK ( Stream Data ) : bool

Checks if the supplied data is a BMP.

LoadAllArchives ( ) : void

Loads all archives into memory.

Method Details

GetAnimation() public static method

Gets a Anim instance from the FileManager.
public static GetAnimation ( ulong AssetID ) : Anim
AssetID ulong The FileID/InstanceID of the animation to get.
return Files.Vitaboy.Anim

GetAppearance() public static method

Gets an Appearance instance from the FileManager.
public static GetAppearance ( ulong AssetID ) : Appearance
AssetID ulong The FileID/InstanceID of the Appearance to get.
return Files.Vitaboy.Appearance

GetBinding() public static method

Gets an Binding instance from the FileManager.
public static GetBinding ( ulong AssetID ) : Binding
AssetID ulong The FileID/InstanceID of the Binding to get.
return Binding

GetBindings() public static method

Gets an array of Binding instances.
public static GetBindings ( List BindingIDs ) : Binding[]
BindingIDs List A List<> of IDs of bindings.
return Binding[]

GetCollection() public static method

Gets an Collection instance from the FileManager.
public static GetCollection ( ulong AssetID ) : Collection
AssetID ulong The FileID/InstanceID of the Collection to get.
return Files.Vitaboy.Collection

GetHLS() public static method

Gets an HLS instance from the FileManager.
public static GetHLS ( uint ID ) : HLS
ID uint The FileID/InstanceID of the hitlist to get.
return Files.AudioLogic.HLS

GetHandgroup() public static method

Gets an Handgroup instance from the FileManager.
public static GetHandgroup ( ulong AssetID ) : HandGroup
AssetID ulong The FileID/InstanceID of the Handgroup to get.
return Files.Vitaboy.HandGroup

GetIFF() public static method

Gets an IFF instance from the FileManager.
public static GetIFF ( string Filename ) : Iff
Filename string The FileID/InstanceID of the IFF to get.
return Files.IFF.Iff

GetMesh() public static method

Gets a Mesh instance from the FileManager.
public static GetMesh ( ulong AssetID ) : Mesh
AssetID ulong The FileID/InstanceID of the mesh to get.
return Files.Vitaboy.Mesh

GetOutfit() public static method

Gets an Outfit instance from the FileManager.
public static GetOutfit ( ulong AssetID ) : Outfit
AssetID ulong ID of the outfit to get.
return Files.Vitaboy.Outfit

GetPurchasableOutfit() public static method

Gets an PurchasableOutfit instance from the FileManager.
public static GetPurchasableOutfit ( ulong AssetID ) : PurchasableOutfit
AssetID ulong ID of the outfit to get.
return Files.Vitaboy.PurchasableOutfit

GetSkeleton() public static method

Gets an Skeleton instance from the FileManager.
public static GetSkeleton ( ulong AssetID ) : Skeleton
AssetID ulong The FileID/InstanceID of the skeleton to get.
return Files.Vitaboy.Skeleton

GetSound() public static method

Gets a sound (XA or UTK) from the FileManager.
public static GetSound ( uint ID ) : ISoundCodec
ID uint The FileID/InstanceID of the sound to get.
return ISoundCodec

GetTRK() public static method

Gets an TRK instance from the FileManager.
public static GetTRK ( uint ID ) : TRK
ID uint The FileID/InstanceID of the track to get.
return Files.AudioLogic.TRK

GetTexture() public static method

Gets an Texture2D instance from the FileManager.
public static GetTexture ( ulong AssetID, bool IsTGA = false ) : Microsoft.Xna.Framework.Graphics.Texture2D
AssetID ulong The FileID/InstanceID of the texture to get.
IsTGA bool Do you know ahead of time that the resource is a TGA? /// Set this to true to avoid a lot of try/catch branches.
return Microsoft.Xna.Framework.Graphics.Texture2D

Initialize() public static method

Initializes the FileManager.
public static Initialize ( Microsoft.Xna.Framework.Game G, string StartupDir ) : void
G Microsoft.Xna.Framework.Game A Game instance.
StartupDir string Path of the directory where game has its resources.
return void

TrackExists() public static method

Attempts to figure out if a track exists in the FileManager.
public static TrackExists ( uint ID ) : bool
ID uint ID of the track.
return bool