Introduce Platform::Log (#1640)

* Add Platform::Log and Platform::LogLevel

* Replace most printf calls with Platform::Log calls

* Move a brace down

* Move some log entries to one Log call

- Some implementations of Log may assume a full line

* Log the MAC address as LogLevel::Info
This commit is contained in:
Jesse Talavera-Greenberg
2023-03-23 13:04:38 -04:00
committed by GitHub
parent 19280cff2d
commit 79dfb8dc8f
50 changed files with 521 additions and 378 deletions

View File

@ -21,7 +21,10 @@
#include "NDS.h"
#include "DSi.h"
#include "AREngine.h"
#include "Platform.h"
using Platform::Log;
using Platform::LogLevel;
namespace AREngine
{
@ -271,7 +274,7 @@ void RunCheat(ARCode& arcode)
// in practice could be used for a self-modifying AR code
// could be implemented with some hackery, but, does anything even
// use it??
printf("AR: !! THE FUCKING C4000000 OPCODE. TELL ARISOTURA.\n");
Log(LogLevel::Error, "AR: !! THE FUCKING C4000000 OPCODE. TELL ARISOTURA.\n");
return;
case 0xC5: // count++ / IF (count & b.l) == b.h
@ -428,7 +431,7 @@ void RunCheat(ARCode& arcode)
break;
default:
printf("!! bad AR opcode %08X %08X\n", a, b);
Log(LogLevel::Warn, "!! bad AR opcode %08X %08X\n", a, b);
return;
}
}