mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2025-10-30 08:03:03 +00:00
Implement optional dependencies, fix memory slotmaps, bump version number to 1.2.1-dev
This commit is contained in:
parent
eedac66012
commit
af3ad296ea
3 changed files with 15 additions and 5 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 94b30d7061a8469f75b33e37292d828bc99528c0
|
Subproject commit 03258dbf77f05f681d0a33bc366e47b15969c848
|
||||||
|
|
@ -569,8 +569,18 @@ void recomputil_u32_slotmap_size(uint8_t* rdram, recomp_context* ctx) {
|
||||||
// memory slotmap.
|
// memory slotmap.
|
||||||
|
|
||||||
void recomputil_create_memory_slotmap(uint8_t* rdram, recomp_context* ctx) {
|
void recomputil_create_memory_slotmap(uint8_t* rdram, recomp_context* ctx) {
|
||||||
(void)rdram;
|
uint32_t element_size = _arg<0, uint32_t>(rdram, ctx);
|
||||||
_return(ctx, memory_slotmaps.create());
|
|
||||||
|
// Create the map.
|
||||||
|
uint32_t map_key = memory_slotmaps.create();
|
||||||
|
|
||||||
|
// Retrieve the map and set its element size to the provided value.
|
||||||
|
MemorySlotmap* map;
|
||||||
|
memory_slotmaps.get(map_key, &map);
|
||||||
|
map->second = element_size;
|
||||||
|
|
||||||
|
// Return the created map's key.
|
||||||
|
_return(ctx, map_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void recomputil_destroy_memory_slotmap(uint8_t* rdram, recomp_context* ctx) {
|
void recomputil_destroy_memory_slotmap(uint8_t* rdram, recomp_context* ctx) {
|
||||||
|
|
@ -628,7 +638,7 @@ void recomputil_memory_slotmap_create(uint8_t* rdram, recomp_context* ctx) {
|
||||||
// Store the allocated pointer.
|
// Store the allocated pointer.
|
||||||
PTR(void)* value_ptr;
|
PTR(void)* value_ptr;
|
||||||
map->first.get(key, &value_ptr);
|
map->first.get(key, &value_ptr);
|
||||||
MEM_W(0, *value_ptr) = addr;
|
*value_ptr = static_cast<PTR(void)>(addr);
|
||||||
|
|
||||||
// Return the key.
|
// Return the key.
|
||||||
_return(ctx, key);
|
_return(ctx, key);
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
#include "../../lib/rt64/src/contrib/stb/stb_image.h"
|
#include "../../lib/rt64/src/contrib/stb/stb_image.h"
|
||||||
|
|
||||||
const std::string version_string = "1.2.0-dev1.2.1";
|
const std::string version_string = "1.2.1-dev";
|
||||||
|
|
||||||
template<typename... Ts>
|
template<typename... Ts>
|
||||||
void exit_error(const char* str, Ts ...args) {
|
void exit_error(const char* str, Ts ...args) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue