[decomp] sky/time of day (#883)

* time of day

* goal code seems to work

* stars at wrong spot

* stars and sun work

* debugging clouds

* fix texture correction

* sky works

* cleanup, add profiler

* clean up

* final clean up

* offline tests

* missing include
This commit is contained in:
water111
2021-10-10 20:07:03 -04:00
committed by GitHub
parent d7eeddf2fc
commit b2052016e2
88 changed files with 5577 additions and 528 deletions
+12
View File
@@ -564,6 +564,9 @@ bool Debugger::get_symbol_value(const std::string& sym_name, u32* output) {
* Starts the debugger watch thread which watches the target process to see if it stops.
*/
void Debugger::start_watcher() {
if (m_watcher_running) {
stop_watcher();
}
assert(!m_watcher_running);
m_watcher_running = true;
m_watcher_should_stop = false;
@@ -609,6 +612,7 @@ void Debugger::watcher() {
break;
case xdbg::SignalInfo::DISAPPEARED:
printf("Target has disappeared. Maybe it quit or was killed.\n");
handle_disappearance();
break;
default:
printf("[Debugger] unhandled signal in watcher: %d\n", int(signal_info.kind));
@@ -629,6 +633,14 @@ void Debugger::watcher() {
}
}
void Debugger::handle_disappearance() {
m_watcher_should_stop = true;
xdbg::close_memory(m_debug_context.tid, &m_memory_handle);
xdbg::detach_and_resume(m_debug_context.tid);
m_context_valid = false;
m_attached = false;
}
Debugger::SignalInfo Debugger::pop_signal() {
{
std::unique_lock<std::mutex> lock(m_watcher_mutex);