mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-05-23 06:54:33 -04:00
Add debug set time hook
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "../patches/input.h"
|
||||
|
||||
std::atomic<uint16_t> pending_warp = 0xFFFF;
|
||||
std::atomic<uint16_t> pending_set_time = 0xFFFF;
|
||||
|
||||
void recomp::do_warp(int area, int scene, int entrance) {
|
||||
const recomp::SceneWarps game_scene = recomp::game_warps[area].scenes[scene];
|
||||
@@ -15,3 +16,12 @@ extern "C" void recomp_get_pending_warp(uint8_t* rdram, recomp_context* ctx) {
|
||||
// Return the current warp value and reset it.
|
||||
_return(ctx, pending_warp.exchange(0xFFFF));
|
||||
}
|
||||
|
||||
void recomp::set_time(uint8_t hour, uint8_t minute) {
|
||||
pending_set_time.store((uint16_t(hour) << 8) | minute);
|
||||
}
|
||||
|
||||
extern "C" void recomp_get_pending_set_time(uint8_t* rdram, recomp_context* ctx) {
|
||||
// Return the current set time value and reset it.
|
||||
_return(ctx, pending_set_time.exchange(0xFFFF));
|
||||
}
|
||||
Reference in New Issue
Block a user