ScummVM API documentation
Sci::ResourcePatcher Class Reference

#include <resource_patcher.h>

Inheritance diagram for Sci::ResourcePatcher:
Sci::ResourceSource

Public Member Functions

 ResourcePatcher (const SciGameId gameId, const bool isCD, const Common::Platform platform, const Common::Language gameLanguage)
 
bool applyPatch (Resource &resource) const
 
void scanSource (ResourceManager *resMan) override
 
void loadResource (ResourceManager *resMan, Resource *res) override
 
- Public Member Functions inherited from Sci::ResourceSource
ResSourceType getSourceType () const
 
const Common::PathgetLocationName () const
 
Common::SeekableReadStreamgetVolumeFile (ResourceManager *resMan, Resource *res)
 
virtual ResourceSourcefindVolume (ResourceSource *map, int volNum)
 
virtual uint32 getAudioCompressionType () const
 

Additional Inherited Members

- Public Attributes inherited from Sci::ResourceSource
bool _scanned
 
const Common::FSNode *const _resourceFile
 
const int _volumeNumber
 
- Protected Member Functions inherited from Sci::ResourceSource
 ResourceSource (ResSourceType type, const Common::Path &name, int volNum=0, const Common::FSNode *resFile=0)
 
- Protected Attributes inherited from Sci::ResourceSource
const ResSourceType _sourceType
 
const Common::Path _name
 

Detailed Description

A basic class for generating patched resource data at runtime.

Member Function Documentation

◆ applyPatch()

bool Sci::ResourcePatcher::applyPatch ( Resource resource) const

Finds and applies a patch to the given resource.

Returns
true if a patch was applied.

◆ scanSource()

void Sci::ResourcePatcher::scanSource ( ResourceManager resMan)
overridevirtual

Adds new resources from the patch table to the resource manager. This is needed since otherwise tests for these resources via kResCheck would fail, and so they would never actually be loaded.

Reimplemented from Sci::ResourceSource.

◆ loadResource()

void Sci::ResourcePatcher::loadResource ( ResourceManager resMan,
Resource res 
)
inlineoverridevirtual

Load a resource. Since resources using this source are patched explicitly after they get loaded by any other resource source, this method does nothing.

Reimplemented from Sci::ResourceSource.


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