ScummVM API documentation
Sword25::Resource Class Reference
Inheritance diagram for Sword25::Resource:
Sword25::AnimationResource Sword25::BitmapResource Sword25::FontResource

Public Types

enum  RESOURCE_TYPES {
  TYPE_UNKNOWN, TYPE_BITMAP, TYPE_ANIMATION, TYPE_SOUND,
  TYPE_FONT
}
 

Public Member Functions

 Resource (const Common::String &uniqueFileName, RESOURCE_TYPES type)
 
void addReference ()
 
void release ()
 
int getLockCount () const
 
const Common::StringgetFileName () const
 
uint getType () const
 

Member Function Documentation

◆ addReference()

void Sword25::Resource::addReference ( )
inline

Prevents the resource from being released.

Remarks
This method allows a resource to be locked multiple times.

◆ release()

void Sword25::Resource::release ( )

Cancels a previous lock

Remarks
The resource can still be released more times than it was 'locked', although it is not recommended.

◆ getLockCount()

int Sword25::Resource::getLockCount ( ) const
inline

Returns the current lock count for the resource

Returns
The current lock count

◆ getFileName()

const Common::String& Sword25::Resource::getFileName ( ) const
inline

Returns the absolute path of the given resource

◆ getType()

uint Sword25::Resource::getType ( ) const
inline

Returns a resource's type


The documentation for this class was generated from the following file: