1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-16 04:44:44 +00:00

Decompile sleep.c and printutils.c

- Decompile sleep.c (OK)
- Decompile printutils.c (OK)
- Fix 1 non-matching in z_room.c
- Get rid of some magic numbers
This commit is contained in:
Random 2020-04-08 18:36:15 +02:00
parent 0a25ab74c4
commit d0cf6e153b
20 changed files with 94 additions and 308 deletions

View file

@ -230,11 +230,7 @@ void func_80095D04(GlobalContext* globalCtx, Room* room, u32 flags) {
#define JPEG_MARKER 0xFFD8FFE0
#ifdef NON_MATCHING
// long multiplication by 64 doesn't quite match
s32 func_80096238(void* data) {
OSTime timeBefore;
OSTime timeAfter;
OSTime time;
if (*(u32*)data == JPEG_MARKER) {
@ -245,13 +241,12 @@ s32 func_80096238(void* data) {
// Translates to: "WORK BUFFER ADDRESS (Z BUFFER) %08x"
osSyncPrintf("ワークバッファアドレス(Zバッファ)%08x\n", gZBuffer);
timeBefore = osGetTime();
time = osGetTime();
if (!func_8006E418(data, gZBuffer, gGfxSPTaskOutputBuffer, sizeof(gGfxSPTaskOutputBuffer))) {
timeAfter = osGetTime();
time = ((timeAfter - timeBefore) * 64) / 3000;
time = osGetTime() - time;
// Translates to: "SUCCESS... I THINK. time = %6.3f ms"
osSyncPrintf("成功…だと思う。 time = %6.3f ms \n", (f64)(time / 1000.0f));
osSyncPrintf("成功…だと思う。 time = %6.3f ms \n", (f64)(OS_CYCLES_TO_USEC(time) / 1000.0f));
// Translates to: "WRITING BACK TO ORIGINAL ADDRESS FROM WORK BUFFER."
osSyncPrintf("ワークバッファから元のアドレスに書き戻します。\n");
// Translates to: "IF THE ORIGINAL BUFFER SIZE ISN'T AT LEAST 150KB, IT WILL BE OUT OF CONTROL."
@ -266,9 +261,6 @@ s32 func_80096238(void* data) {
return 0;
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_room/func_80096238.s")
#endif
#ifdef NON_MATCHING
// pointer arithmetic doesn't quite match