Blamite Game Engine - blam!  00263.10.17.20.0001.blamite
The core library for the Blamite Game Engine.
Classes | Functions
Blam::Utils::Res Namespace Reference

Utilities relating to application resources. More...

Classes

struct  Resource
 Structure to bundle together resource data. More...
 

Functions

BLAM std::string GetTextResource (int res_id, const char *res_type)
 Retrieves the specified resource as a text resource. More...
 
BLAM std::string GetHTMLResource (int res_id)
 Retrieves the specified resource as an HTML resource. More...
 
BLAM HRESULT GetResource (int res_id, const char *res_type, Resource *res)
 Retrieves the specified resource as a Resource structure, containing access to the raw binary data. More...
 

Detailed Description

Utilities relating to application resources.

Function Documentation

◆ GetHTMLResource()

std::string Blam::Utils::Res::GetHTMLResource ( int  res_id)

Retrieves the specified resource as an HTML resource.

Parameters
res_id- The ID of the resource to read.
Returns
The HTML content of the resource data as a string.

◆ GetResource()

HRESULT Blam::Utils::Res::GetResource ( int  res_id,
const char *  res_type,
Resource res 
)

Retrieves the specified resource as a Resource structure, containing access to the raw binary data.

Used for anything that isn't plain text.

Parameters
res_id- The ID of the resource to read.
res_type- The type of resource being read.
res- Pointer to set to the new resource.
Returns
S_OK if the resource was read, E_FAIL if it was not.

◆ GetTextResource()

std::string Blam::Utils::Res::GetTextResource ( int  res_id,
const char *  res_type 
)

Retrieves the specified resource as a text resource.

Parameters
res_id- The ID of the resource to read.
res_type- The type of resource being read.
Returns
The text of the resource data.