Files
dusk/src/duskpsp/asset/assetpbp.h
T

47 lines
1.0 KiB
C

/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "error/error.h"
#include "asset/assetfile.h"
#define ASSET_PBP_SIGNATURE_SIZE 4
#define ASSET_PBP_SIGNATURE "\0PBP"
#define ASSET_PBP_PATH_MAX FILENAME_MAX
typedef struct {
char_t signature[ASSET_PBP_SIGNATURE_SIZE];
uint32_t version;
uint32_t sfoOffset;
uint32_t icon0Offset;
uint32_t icon1Offset;
uint32_t pic0Offset;
uint32_t pic1Offset;
uint32_t snd0Offset;
uint32_t pspOffset;
uint32_t psarOffset;
} assetpbpheader_t;
typedef struct {
assetpbpheader_t pbpHeader;
} assetpbp_t;
/**
* Initializes the PBP style asset system.
*
* @param pbpPath The file path to the PBP file to read.
* @returns An errorret_t indicating success or failure of the operation.
*/
errorret_t assetInitPBP(const char_t *pbpPath);
/**
* Disposes the PBP style asset system.
*
* @returns An errorret_t indicating success or failure of the operation.
*/
errorret_t assetDisposePBP(void);