Vita builds for the first time
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2026 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${DUSK_LIBRARY_TARGET_NAME}
|
||||
PUBLIC
|
||||
assetvita.c
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "assetvita.h"
|
||||
|
||||
typedef assetvita_t assetplatform_t;
|
||||
#define assetInitPlatform assetInitVita
|
||||
#define assetDisposePlatform assetDisposeVita
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "asset/asset.h"
|
||||
#include "assert/assert.h"
|
||||
|
||||
errorret_t assetInitVita(void) {
|
||||
int32_t error;
|
||||
ASSET.zip = zip_open(ASSET_VITA_DSK_PATH, ZIP_RDONLY, &error);
|
||||
if(ASSET.zip == NULL) {
|
||||
errorThrow("Failed to open asset file: " ASSET_VITA_DSK_PATH);
|
||||
}
|
||||
errorOk();
|
||||
}
|
||||
|
||||
errorret_t assetDisposeVita(void) {
|
||||
errorOk();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2026 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "error/error.h"
|
||||
|
||||
// dusk.dsk is packaged at the root of the VPK and accessible via app0:/
|
||||
#define ASSET_VITA_DSK_PATH "app0:/" ASSET_FILE_NAME
|
||||
|
||||
typedef struct {
|
||||
uint8_t _unused;
|
||||
} assetvita_t;
|
||||
|
||||
/**
|
||||
* Initializes the Vita asset system, opening dusk.dsk from the VPK mount.
|
||||
*
|
||||
* @returns An errorret_t indicating success or failure.
|
||||
*/
|
||||
errorret_t assetInitVita(void);
|
||||
|
||||
/**
|
||||
* Disposes the Vita asset system.
|
||||
*
|
||||
* @returns An errorret_t indicating success or failure.
|
||||
*/
|
||||
errorret_t assetDisposeVita(void);
|
||||
Reference in New Issue
Block a user