libmsx
C library for MSX
Loading...
Searching...
No Matches

APIs for looking up a resource in banked memory by name. More...

+ Collaboration diagram for Find a resource in banked memory.:

Data Structures

struct  ResourceIndex
 Index record of an embedded resource. More...
 

Typedefs

typedef struct ResourceIndex ResourceIndex
 Index record of an embedded resource.
 

Functions

const ResourceIndexresource_find (const char *path)
 Find an embedded resource by name.
 

Detailed Description

APIs for looking up a resource in banked memory by name.

Banked memory is treated as a ROM with one large address space, and as storage of named embedded resources.


Data Structure Documentation

◆ ResourceIndex

struct ResourceIndex

Index record of an embedded resource.

Definition at line 45 of file resources.h.

Data Fields
bmemptr_t offset Address of the resource in banked memory.
uint32_t size Size of the resource.
const char * path Path / file name of the resource.

Typedef Documentation

◆ ResourceIndex

typedef struct ResourceIndex ResourceIndex

Index record of an embedded resource.

Function Documentation

◆ resource_find()

const ResourceIndex * resource_find ( const char *  path)

Find an embedded resource by name.

Parameters
pathpath/file name of the resource.
Returns
a pointer to the ResourceIndex if found, otherwise NULL.