libmsx
C library for MSX
Loading...
Searching...
No Matches
resources.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2024 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
24#pragma once
25
26#ifndef RESOURCES_H_
27#define RESOURCES_H_
28
29#include "bmem.h"
30
45typedef struct ResourceIndex {
47 uint32_t size;
48 const char * path;
50
57const ResourceIndex * resource_find(const char * path);
58
91void resource_copy_to_vmem(const char * path, vmemptr_t dst);
92
112void resource_bload_s(const char * path);
113
116#endif // RESOURCES_H_
117
Data types and functions for accessing banked memory.
uint32_t bmemptr_t
Type of an address of banked memory.
Definition bmem.h:74
bmemptr_t offset
Address of the resource in banked memory.
Definition resources.h:46
uint32_t size
Size of the resource.
Definition resources.h:47
const char * path
Path / file name of the resource.
Definition resources.h:48
const ResourceIndex * resource_find(const char *path)
Find an embedded resource by name.
Index record of an embedded resource.
Definition resources.h:45
void resource_copy_to_vmem(const char *path, vmemptr_t dst)
Copy a resource in banked memory to VRAM.
void resource_bload_s(const char *path)
Load a BSAVE formatted binary resource in banked memory into VRAM.
uint32_t vmemptr_t
Type for VRAM address.
Definition vmem.h:42