mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 01:34:18 +00:00
Documentation for fault.c and fault_drawer.c (#1106)
* Mostly document fault and fault_drawer * FaultDrawer printf functions return s32 * Review Suggestions for comments Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Some further review suggestions * Further changes from suggestions * Fix Fault_AddClient doc comment * Bug comment for memdump overrun, add more to Fault_PadCallback bug comment * mb -> MB, comment about bss above externs * Fix color codes Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
This commit is contained in:
parent
cd1d08d34f
commit
c8f4d66b00
42 changed files with 1010 additions and 767 deletions
|
@ -9,10 +9,10 @@
|
|||
|
||||
.balign 16
|
||||
|
||||
glabel sFaultStructPtr
|
||||
glabel sFaultInstance
|
||||
.space 4
|
||||
|
||||
glabel sFaultIsWaitingForInput
|
||||
glabel sFaultAwaitingInput
|
||||
.space 4
|
||||
|
||||
glabel sFaultStack
|
||||
|
@ -21,5 +21,5 @@ glabel sFaultStack
|
|||
glabel sFaultThreadInfo
|
||||
.space 0x20
|
||||
|
||||
glabel gFaultStruct
|
||||
glabel gFaultMgr
|
||||
.space 0x850
|
||||
|
|
92
include/fault.h
Normal file
92
include/fault.h
Normal file
|
@ -0,0 +1,92 @@
|
|||
#ifndef FAULT_H
|
||||
#define FAULT_H
|
||||
|
||||
#include "padmgr.h"
|
||||
|
||||
// These are the same as the 3-bit ansi color codes
|
||||
#define FAULT_COLOR_BLACK 0
|
||||
#define FAULT_COLOR_RED 1
|
||||
#define FAULT_COLOR_GREEN 2
|
||||
#define FAULT_COLOR_YELLOW 3
|
||||
#define FAULT_COLOR_BLUE 4
|
||||
#define FAULT_COLOR_MAGENTA 5
|
||||
#define FAULT_COLOR_CYAN 6
|
||||
#define FAULT_COLOR_WHITE 7
|
||||
// Additional color codes
|
||||
#define FAULT_COLOR_DARK_GRAY 8
|
||||
#define FAULT_COLOR_LIGHT_GRAY 9
|
||||
|
||||
#define FAULT_COLOR_STRINGIFY(s) #s
|
||||
#define FAULT_COLOR_EXPAND_AND_STRINGIFY(s) FAULT_COLOR_STRINGIFY(s)
|
||||
|
||||
#define FAULT_ESC '\x1A'
|
||||
#define FAULT_COLOR(n) "\x1A" FAULT_COLOR_EXPAND_AND_STRINGIFY(FAULT_COLOR_ ## n)
|
||||
|
||||
typedef struct FaultClient {
|
||||
/* 0x00 */ struct FaultClient* next;
|
||||
/* 0x04 */ void* callback;
|
||||
/* 0x08 */ void* arg0;
|
||||
/* 0x0C */ void* arg1;
|
||||
} FaultClient; // size = 0x10
|
||||
|
||||
typedef struct FaultAddrConvClient {
|
||||
/* 0x00 */ struct FaultAddrConvClient* next;
|
||||
/* 0x04 */ void* callback;
|
||||
/* 0x08 */ void* arg;
|
||||
} FaultAddrConvClient; // size = 0xC
|
||||
|
||||
// Initialization
|
||||
|
||||
void Fault_Init(void);
|
||||
|
||||
// Fatal Errors
|
||||
|
||||
void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2);
|
||||
void Fault_AddHungupAndCrash(const char* file, s32 line);
|
||||
|
||||
// Client Registration
|
||||
|
||||
void Fault_AddClient(FaultClient* client, void* callback, void* arg0, void* arg1);
|
||||
void Fault_RemoveClient(FaultClient* client);
|
||||
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient* client, void* callback, void* arg);
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client);
|
||||
|
||||
// For use in Fault Client callbacks
|
||||
|
||||
void Fault_WaitForInput(void);
|
||||
void Fault_FillScreenBlack(void);
|
||||
void Fault_SetFrameBuffer(void* fb, u16 w, u16 h);
|
||||
|
||||
void FaultDrawer_SetForeColor(u16 color);
|
||||
void FaultDrawer_SetBackColor(u16 color);
|
||||
void FaultDrawer_SetFontColor(u16 color);
|
||||
void FaultDrawer_SetCharPad(s8 padW, s8 padH);
|
||||
void FaultDrawer_SetCursor(s32 x, s32 y);
|
||||
s32 FaultDrawer_VPrintf(const char* fmt, va_list args);
|
||||
s32 FaultDrawer_Printf(const char* fmt, ...);
|
||||
void FaultDrawer_DrawText(s32 x, s32 y, const char* fmt, ...);
|
||||
|
||||
typedef struct FaultMgr {
|
||||
/* 0x000 */ OSThread thread;
|
||||
/* 0x1B0 */ u8 unk_1B0[0x600];
|
||||
/* 0x7B0 */ OSMesgQueue queue;
|
||||
/* 0x7C8 */ OSMesg msg;
|
||||
/* 0x7CC */ u8 exit;
|
||||
/* 0x7CD */ u8 msgId;
|
||||
/* 0x7CE */ u8 faultHandlerEnabled;
|
||||
/* 0x7CF */ u8 autoScroll;
|
||||
/* 0x7D0 */ OSThread* faultedThread;
|
||||
/* 0x7D4 */ void (*padCallback)(Input*);
|
||||
/* 0x7D8 */ FaultClient* clients;
|
||||
/* 0x7DC */ FaultAddrConvClient* addrConvClients;
|
||||
/* 0x7E0 */ u8 unk_7E0[4];
|
||||
/* 0x7E4 */ Input padInput;
|
||||
/* 0x7FC */ u16 colors[36];
|
||||
/* 0x844 */ void* fb;
|
||||
/* 0x848 */ void* clientThreadSp;
|
||||
} FaultMgr; // size = 0x850
|
||||
|
||||
extern FaultMgr gFaultMgr;
|
||||
|
||||
#endif
|
|
@ -1809,66 +1809,6 @@ void DebugArena_Check(void);
|
|||
void DebugArena_Init(void* start, u32 size);
|
||||
void DebugArena_Cleanup(void);
|
||||
u8 DebugArena_IsInitalized(void);
|
||||
void Fault_SleepImpl(u32);
|
||||
void Fault_ClientProcessThread(void* arg);
|
||||
void Fault_ProcessClientContext(FaultClientContext*);
|
||||
u32 Fault_ProcessClient(u32, u32, u32);
|
||||
void Fault_AddClient(FaultClient*, void*, void*, void*);
|
||||
void Fault_RemoveClient(FaultClient*);
|
||||
void Fault_AddAddrConvClient(FaultAddrConvClient*, void*, void*);
|
||||
void Fault_RemoveAddrConvClient(FaultAddrConvClient*);
|
||||
u32 Fault_ConvertAddress(FaultAddrConvClient*);
|
||||
void Fault_Sleep(u32);
|
||||
void Fault_PadCallback(Input*);
|
||||
void Fault_UpdatePadImpl();
|
||||
u32 Fault_WaitForInputImpl();
|
||||
void Fault_WaitForInput();
|
||||
void Fault_DrawRec(s32, s32, s32, s32, u16);
|
||||
void Fault_FillScreenBlack();
|
||||
void Fault_FillScreenRed();
|
||||
void Fault_DrawCornerRec(u16);
|
||||
void Fault_PrintFReg(s32, f32*);
|
||||
void Fault_LogFReg(s32, f32*);
|
||||
void Fault_PrintFPCR(u32);
|
||||
void Fault_LogFPCR(u32);
|
||||
void Fault_PrintThreadContext(OSThread*);
|
||||
void Fault_LogThreadContext(OSThread*);
|
||||
OSThread* Fault_FindFaultedThread();
|
||||
void Fault_Wait5Seconds();
|
||||
void Fault_WaitForButtonCombo();
|
||||
void Fault_DrawMemDumpPage(const char*, u32*, u32);
|
||||
void Fault_DrawMemDump(u32, u32, u32, u32);
|
||||
void Fault_WalkStack(u32* spPtr, u32* pcPtr, u32* raPtr);
|
||||
void Fault_DrawStackTrace(OSThread* thread, s32 x, s32 y, s32 height);
|
||||
void Fault_LogStackTrace(OSThread* thread, s32 height);
|
||||
void Fault_ResumeThread(OSThread*);
|
||||
void Fault_CommitFB();
|
||||
void Fault_ProcessClients();
|
||||
void Fault_UpdatePad();
|
||||
void Fault_ThreadEntry(void*);
|
||||
void Fault_SetFB(void*, u16, u16);
|
||||
void Fault_Init(void);
|
||||
void Fault_HangupFaultClient(const char*, const char*);
|
||||
void Fault_AddHungupAndCrashImpl(const char*, const char*);
|
||||
void Fault_AddHungupAndCrash(const char*, u32);
|
||||
void FaultDrawer_SetOsSyncPrintfEnabled(u32);
|
||||
void FaultDrawer_DrawRecImpl(s32, s32, s32, s32, u16);
|
||||
void FaultDrawer_DrawChar(char);
|
||||
s32 FaultDrawer_ColorToPrintColor(u16);
|
||||
void FaultDrawer_UpdatePrintColor();
|
||||
void FaultDrawer_SetForeColor(u16);
|
||||
void FaultDrawer_SetBackColor(u16);
|
||||
void FaultDrawer_SetFontColor(u16);
|
||||
void FaultDrawer_SetCharPad(s8, s8);
|
||||
void FaultDrawer_SetCursor(s32, s32);
|
||||
void FaultDrawer_FillScreen();
|
||||
void* FaultDrawer_FormatStringFunc(void*, const char*, u32);
|
||||
void FaultDrawer_VPrintf(const char*, char*);
|
||||
void FaultDrawer_Printf(const char*, ...);
|
||||
void FaultDrawer_DrawText(s32, s32, const char*, ...);
|
||||
void FaultDrawer_SetDrawerFB(void*, u16, u16);
|
||||
void FaultDrawer_SetInputCallback(void (*)());
|
||||
void FaultDrawer_SetDefault();
|
||||
// ? UCodeDisas_TranslateAddr(?);
|
||||
// ? UCodeDisas_ParseCombineColor(?);
|
||||
// ? UCodeDisas_ParseCombineAlpha(?);
|
||||
|
|
30
include/irqmgr.h
Normal file
30
include/irqmgr.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef IRQMGR_H
|
||||
#define IRQMGR_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 type;
|
||||
/* 0x02 */ char misc[0x1E];
|
||||
} OSScMsg; // size = 0x20
|
||||
|
||||
typedef struct IrqMgrClient {
|
||||
/* 0x00 */ struct IrqMgrClient* prev;
|
||||
/* 0x04 */ OSMesgQueue* queue;
|
||||
} IrqMgrClient;
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ OSScMsg retraceMsg; // this apparently got moved from OSSched
|
||||
/* 0x020 */ OSScMsg prenmiMsg; // this apparently got moved from OSSched
|
||||
/* 0x040 */ OSScMsg nmiMsg;
|
||||
/* 0x060 */ OSMesgQueue queue;
|
||||
/* 0x078 */ OSMesg msgBuf[8];
|
||||
/* 0x098 */ OSThread thread;
|
||||
/* 0x248 */ IrqMgrClient* clients;
|
||||
/* 0x24C */ u8 resetStatus;
|
||||
/* 0x250 */ OSTime resetTime;
|
||||
/* 0x258 */ OSTimer timer;
|
||||
/* 0x278 */ OSTime retraceTime;
|
||||
} IrqMgr; // size = 0x280
|
||||
|
||||
#endif
|
|
@ -5,4 +5,6 @@
|
|||
|
||||
typedef unsigned long size_t;
|
||||
|
||||
typedef unsigned int uintptr_t;
|
||||
|
||||
#endif
|
||||
|
|
40
include/padmgr.h
Normal file
40
include/padmgr.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef PADMGR_H
|
||||
#define PADMGR_H
|
||||
|
||||
#include "irqmgr.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
/* 0x12 */ OSContPad rel; // X/Y store adjusted
|
||||
} Input; // size = 0x18
|
||||
|
||||
typedef struct PadMgr {
|
||||
/* 0x0000 */ OSContStatus padStatus[4];
|
||||
/* 0x0010 */ OSMesg serialMsgBuf[1];
|
||||
/* 0x0014 */ OSMesg lockMsgBuf[1];
|
||||
/* 0x0018 */ OSMesg interruptMsgBuf[4];
|
||||
/* 0x0028 */ OSMesgQueue serialMsgQ;
|
||||
/* 0x0040 */ OSMesgQueue lockMsgQ;
|
||||
/* 0x0058 */ OSMesgQueue interruptMsgQ;
|
||||
/* 0x0070 */ IrqMgrClient irqClient;
|
||||
/* 0x0078 */ IrqMgr* irqMgr;
|
||||
/* 0x0080 */ OSThread thread;
|
||||
/* 0x0230 */ Input inputs[4];
|
||||
/* 0x0290 */ OSContPad pads[4];
|
||||
/* 0x02A8 */ vu8 validCtrlrsMask;
|
||||
/* 0x02A9 */ u8 nControllers;
|
||||
/* 0x02AA */ u8 ctrlrIsConnected[4]; // "Key_switch" originally
|
||||
/* 0x02AE */ u8 pakType[4]; // 1 if rumble pack, 2 if mempak?
|
||||
/* 0x02B2 */ vu8 rumbleEnable[4];
|
||||
/* 0x02B6 */ u8 rumbleCounter[4]; // not clear exact meaning
|
||||
/* 0x02BC */ OSPfs pfs[4];
|
||||
/* 0x045C */ vu8 rumbleOffFrames;
|
||||
/* 0x045D */ vu8 rumbleOnFrames;
|
||||
/* 0x045E */ u8 preNMIShutdown;
|
||||
/* 0x0460 */ void (*retraceCallback)(struct PadMgr* padmgr, s32 unk464);
|
||||
/* 0x0464 */ u32 retraceCallbackValue;
|
||||
} PadMgr; // size = 0x468
|
||||
|
||||
#endif
|
|
@ -15,4 +15,6 @@
|
|||
#define OS_PHYSICAL_TO_K0(x) (void*)(((u32)(x)+0x80000000))
|
||||
#define OS_PHYSICAL_TO_K1(x) (void*)(((u32)(x)+0xA0000000))
|
||||
|
||||
#define OS_SEC_TO_CYCLES(n) OS_USEC_TO_CYCLES((n) * 1000 * 1000)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#define OS_PRIORITY_APPMAX 127
|
||||
#define OS_PRIORITY_IDLE 0
|
||||
|
||||
#define OS_PRIORITY_THREADTAIL -1
|
||||
|
||||
#define OS_STATE_STOPPED 1
|
||||
#define OS_STATE_RUNNABLE 2
|
||||
#define OS_STATE_RUNNING 4
|
||||
|
|
|
@ -208,7 +208,6 @@ extern volatile OSTime gRSPAudioTotalTime;
|
|||
extern volatile OSTime gRSPGFXTotalTime;
|
||||
extern volatile OSTime gRSPOtherTotalTime;
|
||||
extern volatile OSTime gRDPTotalTime;
|
||||
extern FaultThreadStruct gFaultStruct;
|
||||
|
||||
extern ActiveSound gActiveSounds[7][MAX_CHANNELS_PER_BANK]; // total size = 0xA8
|
||||
extern u8 gSoundBankMuted[];
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
#ifndef VT_H
|
||||
#define VT_H
|
||||
|
||||
// 3-bit color codes
|
||||
#define VT_COLOR_BLACK 0
|
||||
#define VT_COLOR_RED 1
|
||||
#define VT_COLOR_GREEN 2
|
||||
#define VT_COLOR_YELLOW 3
|
||||
#define VT_COLOR_BLUE 4
|
||||
#define VT_COLOR_PURPLE 5
|
||||
#define VT_COLOR_MAGENTA 5
|
||||
#define VT_COLOR_CYAN 6
|
||||
#define VT_COLOR_WHITE 7
|
||||
#define VT_COLOR_LIGHTGRAY 8
|
||||
#define VT_COLOR_DARKGRAY 9
|
||||
|
||||
#define VT_COLOR_FOREGROUND 3
|
||||
#define VT_COLOR_BACKGROUND 4
|
||||
|
|
128
include/z64.h
128
include/z64.h
|
@ -29,6 +29,9 @@
|
|||
#include "color.h"
|
||||
#include "ichain.h"
|
||||
#include "regs.h"
|
||||
#include "irqmgr.h"
|
||||
#include "padmgr.h"
|
||||
#include "fault.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
@ -145,13 +148,6 @@ typedef struct GraphicsContext {
|
|||
/* 0x02FC */ char unk_2FC[0x04];
|
||||
} GraphicsContext; // size = 0x300
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ OSContPad cur;
|
||||
/* 0x06 */ OSContPad prev;
|
||||
/* 0x0C */ OSContPad press; // X/Y store delta from last frame
|
||||
/* 0x12 */ OSContPad rel; // X/Y store adjusted
|
||||
} Input; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ s32 topY; // uly (upper left y)
|
||||
/* 0x0004 */ s32 bottomY; // lry (lower right y)
|
||||
|
@ -1452,73 +1448,6 @@ typedef enum {
|
|||
MTXMODE_APPLY // applies transformation to the current matrix
|
||||
} MatrixMode;
|
||||
|
||||
typedef struct FaultClient {
|
||||
/* 0x00 */ struct FaultClient* next;
|
||||
/* 0x04 */ u32 callback;
|
||||
/* 0x08 */ u32 param1;
|
||||
/* 0x0C */ u32 param2;
|
||||
} FaultClient; // size = 0x10
|
||||
|
||||
typedef struct FaultAddrConvClient {
|
||||
/* 0x00 */ struct FaultAddrConvClient* next;
|
||||
/* 0x04 */ u32 callback;
|
||||
/* 0x08 */ u32 param;
|
||||
} FaultAddrConvClient; // size = 0xC
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 (*callback)(u32, u32);
|
||||
/* 0x04 */ u32 param0;
|
||||
/* 0x08 */ u32 param1;
|
||||
/* 0x0C */ u32 ret;
|
||||
/* 0x10 */ OSMesgQueue* queue;
|
||||
/* 0x14 */ OSMesg msg;
|
||||
} FaultClientContext; // size = 0x18
|
||||
|
||||
typedef struct FaultThreadStruct {
|
||||
/* 0x000 */ OSThread thread;
|
||||
/* 0x1B0 */ u8 unk_1B0[0x600];
|
||||
/* 0x7B0 */ OSMesgQueue queue;
|
||||
/* 0x7C8 */ OSMesg msg;
|
||||
/* 0x7CC */ u8 exitDebugger;
|
||||
/* 0x7CD */ u8 msgId;
|
||||
/* 0x7CE */ u8 faultHandlerEnabled;
|
||||
/* 0x7CF */ u8 faultActive;
|
||||
/* 0x7D0 */ OSThread* faultedThread;
|
||||
/* 0x7D4 */ void(*padCallback)(Input*);
|
||||
/* 0x7D8 */ FaultClient* clients;
|
||||
/* 0x7DC */ FaultAddrConvClient* addrConvClients;
|
||||
/* 0x7E0 */ u8 unk_7E0[4];
|
||||
/* 0x7E4 */ Input padInput;
|
||||
/* 0x7FC */ u16 colors[36];
|
||||
/* 0x844 */ void* fb;
|
||||
/* 0x848 */ u32 currClientThreadSp;
|
||||
/* 0x84C */ u8 unk_84C[4];
|
||||
} FaultThreadStruct; // size = 0x850
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16* fb;
|
||||
/* 0x04 */ u16 w;
|
||||
/* 0x08 */ u16 h;
|
||||
/* 0x0A */ u16 yStart;
|
||||
/* 0x0C */ u16 yEnd;
|
||||
/* 0x0E */ u16 xStart;
|
||||
/* 0x10 */ u16 xEnd;
|
||||
/* 0x12 */ u16 foreColor;
|
||||
/* 0x14 */ u16 backColor;
|
||||
/* 0x14 */ u16 cursorX;
|
||||
/* 0x16 */ u16 cursorY;
|
||||
/* 0x18 */ const u32* fontData;
|
||||
/* 0x1C */ u8 charW;
|
||||
/* 0x1D */ u8 charH;
|
||||
/* 0x1E */ s8 charWPad;
|
||||
/* 0x1F */ s8 charHPad;
|
||||
/* 0x20 */ u16 printColors[10];
|
||||
/* 0x34 */ u8 escCode; // bool
|
||||
/* 0x35 */ u8 osSyncPrintfEnabled;
|
||||
/* 0x38 */ void(*inputCallback)();
|
||||
} FaultDrawer; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ PrintCallback callback;
|
||||
/* 0x04 */ Gfx* dList;
|
||||
|
@ -1595,57 +1524,6 @@ typedef struct {
|
|||
/* 0x10 */ u32 data[1];
|
||||
} Yaz0Header; // size = 0x10 ("data" is not part of the header)
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 type;
|
||||
/* 0x02 */ char misc[0x1E];
|
||||
} OSScMsg; // size = 0x20
|
||||
|
||||
typedef struct IrqMgrClient {
|
||||
/* 0x00 */ struct IrqMgrClient* prev;
|
||||
/* 0x04 */ OSMesgQueue* queue;
|
||||
} IrqMgrClient;
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ OSScMsg retraceMsg; // this apparently got moved from OSSched
|
||||
/* 0x020 */ OSScMsg prenmiMsg; // this apparently got moved from OSSched
|
||||
/* 0x040 */ OSScMsg nmiMsg;
|
||||
/* 0x060 */ OSMesgQueue queue;
|
||||
/* 0x078 */ OSMesg msgBuf[8];
|
||||
/* 0x098 */ OSThread thread;
|
||||
/* 0x248 */ IrqMgrClient* clients;
|
||||
/* 0x24C */ u8 resetStatus;
|
||||
/* 0x250 */ OSTime resetTime;
|
||||
/* 0x258 */ OSTimer timer;
|
||||
/* 0x278 */ OSTime retraceTime;
|
||||
} IrqMgr; // size = 0x280
|
||||
|
||||
typedef struct PadMgr {
|
||||
/* 0x0000 */ OSContStatus padStatus[4];
|
||||
/* 0x0010 */ OSMesg serialMsgBuf[1];
|
||||
/* 0x0014 */ OSMesg lockMsgBuf[1];
|
||||
/* 0x0018 */ OSMesg interruptMsgBuf[4];
|
||||
/* 0x0028 */ OSMesgQueue serialMsgQ;
|
||||
/* 0x0040 */ OSMesgQueue lockMsgQ;
|
||||
/* 0x0058 */ OSMesgQueue interruptMsgQ;
|
||||
/* 0x0070 */ IrqMgrClient irqClient;
|
||||
/* 0x0078 */ IrqMgr* irqMgr;
|
||||
/* 0x0080 */ OSThread thread;
|
||||
/* 0x0230 */ Input inputs[4];
|
||||
/* 0x0290 */ OSContPad pads[4];
|
||||
/* 0x02A8 */ vu8 validCtrlrsMask;
|
||||
/* 0x02A9 */ u8 nControllers;
|
||||
/* 0x02AA */ u8 ctrlrIsConnected[4]; // "Key_switch" originally
|
||||
/* 0x02AE */ u8 pakType[4]; // 1 if rumble pack, 2 if mempak?
|
||||
/* 0x02B2 */ vu8 rumbleEnable[4];
|
||||
/* 0x02B6 */ u8 rumbleCounter[4]; // not clear exact meaning
|
||||
/* 0x02BC */ OSPfs pfs[4];
|
||||
/* 0x045C */ vu8 rumbleOffFrames;
|
||||
/* 0x045D */ vu8 rumbleOnFrames;
|
||||
/* 0x045E */ u8 preNMIShutdown;
|
||||
/* 0x0460 */ void (*retraceCallback)(struct PadMgr* padmgr, s32 unk464);
|
||||
/* 0x0464 */ u32 retraceCallbackValue;
|
||||
} PadMgr; // size = 0x468
|
||||
|
||||
// == Previously sched.h
|
||||
|
||||
#define OS_SC_NEEDS_RDP 0x0001
|
||||
|
|
|
@ -989,7 +989,7 @@ void AudioHeap_Init(void) {
|
|||
AudioLoad_InitAsyncLoads();
|
||||
gAudioContext.unk_4 = 0x1000;
|
||||
AudioLoad_LoadPermanentSamples();
|
||||
intMask = osSetIntMask(1);
|
||||
intMask = osSetIntMask(OS_IM_NONE);
|
||||
osWritebackDCacheAll();
|
||||
osSetIntMask(intMask);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include "global.h"
|
||||
|
||||
void Audio_InvalDCache(void* buf, s32 size) {
|
||||
OSIntMask prevMask = osSetIntMask(1);
|
||||
OSIntMask prevMask = osSetIntMask(OS_IM_NONE);
|
||||
|
||||
osInvalDCache(buf, size);
|
||||
osSetIntMask(prevMask);
|
||||
}
|
||||
|
||||
void Audio_WritebackDCache(void* buf, s32 size) {
|
||||
OSIntMask prevMask = osSetIntMask(1);
|
||||
OSIntMask prevMask = osSetIntMask(OS_IM_NONE);
|
||||
|
||||
osWritebackDCache(buf, size);
|
||||
osSetIntMask(prevMask);
|
||||
|
|
1025
src/code/fault.c
1025
src/code/fault.c
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,35 @@
|
|||
/**
|
||||
* @file fault_drawer.c
|
||||
*
|
||||
* Implements routines for drawing text with a fixed font directly to a framebuffer, used in displaying
|
||||
* the crash screen implemented by fault.c
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
// rodata
|
||||
typedef struct {
|
||||
/* 0x00 */ u16* fb;
|
||||
/* 0x04 */ u16 w;
|
||||
/* 0x08 */ u16 h;
|
||||
/* 0x0A */ u16 yStart;
|
||||
/* 0x0C */ u16 yEnd;
|
||||
/* 0x0E */ u16 xStart;
|
||||
/* 0x10 */ u16 xEnd;
|
||||
/* 0x12 */ u16 foreColor;
|
||||
/* 0x14 */ u16 backColor;
|
||||
/* 0x14 */ u16 cursorX;
|
||||
/* 0x16 */ u16 cursorY;
|
||||
/* 0x18 */ const u32* fontData;
|
||||
/* 0x1C */ u8 charW;
|
||||
/* 0x1D */ u8 charH;
|
||||
/* 0x1E */ s8 charWPad;
|
||||
/* 0x1F */ s8 charHPad;
|
||||
/* 0x20 */ u16 printColors[10];
|
||||
/* 0x34 */ u8 escCode; // bool
|
||||
/* 0x35 */ u8 osSyncPrintfEnabled;
|
||||
/* 0x38 */ void (*inputCallback)(void);
|
||||
} FaultDrawer; // size = 0x3C
|
||||
|
||||
const u32 sFaultDrawerFont[] = {
|
||||
0x00DFFD00, 0x0AEEFFA0, 0x0DF22DD0, 0x06611DC0, 0x01122DD0, 0x06719900, 0x011EED10, 0x077EF700, 0x01562990,
|
||||
0x05589760, 0x0DD22990, 0x05599770, 0x04DFFD40, 0x026EF700, 0x00000000, 0x00000000, 0x08BFFB00, 0x0EFFFFC0,
|
||||
|
@ -34,25 +62,27 @@ const u32 sFaultDrawerFont[] = {
|
|||
0x05546F50, 0x00A99800, 0x02222080, 0x02001888,
|
||||
};
|
||||
|
||||
#define FAULT_DRAWER_CURSOR_X 22
|
||||
#define FAULT_DRAWER_CURSOR_Y 16
|
||||
|
||||
FaultDrawer sFaultDrawerDefault = {
|
||||
(u16*)(0x80400000 - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])), // fb
|
||||
SCREEN_WIDTH, // w
|
||||
SCREEN_HEIGHT, // h
|
||||
16, // yStart
|
||||
223, // yEnd
|
||||
22, // xStart
|
||||
297, // xEnd
|
||||
GPACK_RGBA5551(255, 255, 255, 255), // foreColor
|
||||
GPACK_RGBA5551(0, 0, 0, 0), // backColor
|
||||
22, // cursorX
|
||||
16, // cursorY
|
||||
sFaultDrawerFont, // font
|
||||
(u16*)(PHYS_TO_K0(0x400000) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])),
|
||||
SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT,
|
||||
FAULT_DRAWER_CURSOR_Y,
|
||||
SCREEN_HEIGHT - FAULT_DRAWER_CURSOR_Y - 1,
|
||||
FAULT_DRAWER_CURSOR_X,
|
||||
SCREEN_WIDTH - FAULT_DRAWER_CURSOR_X - 1,
|
||||
GPACK_RGBA5551(255, 255, 255, 1),
|
||||
GPACK_RGBA5551(0, 0, 0, 0),
|
||||
FAULT_DRAWER_CURSOR_X,
|
||||
FAULT_DRAWER_CURSOR_Y,
|
||||
sFaultDrawerFont,
|
||||
8,
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
{
|
||||
// printColors
|
||||
GPACK_RGBA5551(0, 0, 0, 1),
|
||||
GPACK_RGBA5551(255, 0, 0, 1),
|
||||
GPACK_RGBA5551(0, 255, 0, 1),
|
||||
|
@ -64,23 +94,23 @@ FaultDrawer sFaultDrawerDefault = {
|
|||
GPACK_RGBA5551(120, 120, 120, 1),
|
||||
GPACK_RGBA5551(176, 176, 176, 1),
|
||||
},
|
||||
0, // escCode
|
||||
0, // osSyncPrintfEnabled
|
||||
NULL, // inputCallback
|
||||
false,
|
||||
false,
|
||||
NULL,
|
||||
};
|
||||
|
||||
FaultDrawer sFaultDrawerStruct;
|
||||
FaultDrawer sFaultDrawer;
|
||||
char D_8016B6C0[0x20];
|
||||
|
||||
void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled) {
|
||||
sFaultDrawerStruct.osSyncPrintfEnabled = enabled;
|
||||
sFaultDrawer.osSyncPrintfEnabled = enabled;
|
||||
}
|
||||
|
||||
void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 color) {
|
||||
u16* fb;
|
||||
s32 x, y;
|
||||
s32 xDiff = sFaultDrawerStruct.w - xStart;
|
||||
s32 yDiff = sFaultDrawerStruct.h - yStart;
|
||||
s32 xDiff = sFaultDrawer.w - xStart;
|
||||
s32 yDiff = sFaultDrawer.h - yStart;
|
||||
s32 xSize = xEnd - xStart + 1;
|
||||
s32 ySize = yEnd - yStart + 1;
|
||||
|
||||
|
@ -93,12 +123,12 @@ void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 col
|
|||
ySize = yDiff;
|
||||
}
|
||||
|
||||
fb = sFaultDrawerStruct.fb + sFaultDrawerStruct.w * yStart + xStart;
|
||||
fb = sFaultDrawer.fb + sFaultDrawer.w * yStart + xStart;
|
||||
for (y = 0; y < ySize; y++) {
|
||||
for (x = 0; x < xSize; x++) {
|
||||
*fb++ = color;
|
||||
}
|
||||
fb += sFaultDrawerStruct.w - xSize;
|
||||
fb += sFaultDrawer.w - xSize;
|
||||
}
|
||||
|
||||
osWritebackDCacheAll();
|
||||
|
@ -110,31 +140,29 @@ void FaultDrawer_DrawChar(char c) {
|
|||
s32 x, y;
|
||||
const u32* dataPtr;
|
||||
u32 data;
|
||||
s32 cursorX = sFaultDrawerStruct.cursorX;
|
||||
s32 cursorY = sFaultDrawerStruct.cursorY;
|
||||
const u32** fontData = &sFaultDrawerStruct.fontData;
|
||||
s32 cursorX = sFaultDrawer.cursorX;
|
||||
s32 cursorY = sFaultDrawer.cursorY;
|
||||
const u32** fontData = &sFaultDrawer.fontData;
|
||||
s32 shift = c % 4;
|
||||
|
||||
dataPtr = &fontData[0][(((c / 8) * 16) + ((c & 4) >> 2))];
|
||||
fb = sFaultDrawerStruct.fb + (sFaultDrawerStruct.w * cursorY) + cursorX;
|
||||
fb = sFaultDrawer.fb + (sFaultDrawer.w * cursorY) + cursorX;
|
||||
|
||||
if ((sFaultDrawerStruct.xStart <= cursorX) &&
|
||||
((sFaultDrawerStruct.charW + cursorX - 1) <= sFaultDrawerStruct.xEnd) &&
|
||||
(sFaultDrawerStruct.yStart <= cursorY) &&
|
||||
((sFaultDrawerStruct.charH + cursorY - 1) <= sFaultDrawerStruct.yEnd)) {
|
||||
for (y = 0; y < sFaultDrawerStruct.charH; y++) {
|
||||
if ((sFaultDrawer.xStart <= cursorX) && ((sFaultDrawer.charW + cursorX - 1) <= sFaultDrawer.xEnd) &&
|
||||
(sFaultDrawer.yStart <= cursorY) && ((sFaultDrawer.charH + cursorY - 1) <= sFaultDrawer.yEnd)) {
|
||||
for (y = 0; y < sFaultDrawer.charH; y++) {
|
||||
u32 mask = 0x10000000 << shift;
|
||||
|
||||
data = *dataPtr;
|
||||
for (x = 0; x < sFaultDrawerStruct.charW; x++) {
|
||||
for (x = 0; x < sFaultDrawer.charW; x++) {
|
||||
if (mask & data) {
|
||||
fb[x] = sFaultDrawerStruct.foreColor;
|
||||
} else if (sFaultDrawerStruct.backColor & 1) {
|
||||
fb[x] = sFaultDrawerStruct.backColor;
|
||||
fb[x] = sFaultDrawer.foreColor;
|
||||
} else if (sFaultDrawer.backColor & 1) {
|
||||
fb[x] = sFaultDrawer.backColor;
|
||||
}
|
||||
mask >>= 4;
|
||||
}
|
||||
fb += sFaultDrawerStruct.w;
|
||||
fb += sFaultDrawer.w;
|
||||
dataPtr += 2;
|
||||
}
|
||||
}
|
||||
|
@ -142,37 +170,40 @@ void FaultDrawer_DrawChar(char c) {
|
|||
|
||||
s32 FaultDrawer_ColorToPrintColor(u16 color) {
|
||||
s32 i;
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (color == sFaultDrawerStruct.printColors[i]) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sFaultDrawer.printColors); i++) {
|
||||
if (color == sFaultDrawer.printColors[i]) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void FaultDrawer_UpdatePrintColor() {
|
||||
void FaultDrawer_UpdatePrintColor(void) {
|
||||
s32 idx;
|
||||
|
||||
if (sFaultDrawerStruct.osSyncPrintfEnabled) {
|
||||
if (sFaultDrawer.osSyncPrintfEnabled) {
|
||||
osSyncPrintf(VT_RST);
|
||||
idx = FaultDrawer_ColorToPrintColor(sFaultDrawerStruct.foreColor);
|
||||
if (idx >= 0 && idx < 8) {
|
||||
|
||||
idx = FaultDrawer_ColorToPrintColor(sFaultDrawer.foreColor);
|
||||
if (idx >= 0 && idx < ARRAY_COUNT(sFaultDrawer.printColors) - 2) {
|
||||
osSyncPrintf(VT_SGR("3%d"), idx);
|
||||
}
|
||||
idx = FaultDrawer_ColorToPrintColor(sFaultDrawerStruct.backColor);
|
||||
if (idx >= 0 && idx < 8) {
|
||||
|
||||
idx = FaultDrawer_ColorToPrintColor(sFaultDrawer.backColor);
|
||||
if (idx >= 0 && idx < ARRAY_COUNT(sFaultDrawer.printColors) - 2) {
|
||||
osSyncPrintf(VT_SGR("4%d"), idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FaultDrawer_SetForeColor(u16 color) {
|
||||
sFaultDrawerStruct.foreColor = color;
|
||||
sFaultDrawer.foreColor = color;
|
||||
FaultDrawer_UpdatePrintColor();
|
||||
}
|
||||
|
||||
void FaultDrawer_SetBackColor(u16 color) {
|
||||
sFaultDrawerStruct.backColor = color;
|
||||
sFaultDrawer.backColor = color;
|
||||
FaultDrawer_UpdatePrintColor();
|
||||
}
|
||||
|
||||
|
@ -181,101 +212,102 @@ void FaultDrawer_SetFontColor(u16 color) {
|
|||
}
|
||||
|
||||
void FaultDrawer_SetCharPad(s8 padW, s8 padH) {
|
||||
sFaultDrawerStruct.charWPad = padW;
|
||||
sFaultDrawerStruct.charHPad = padH;
|
||||
sFaultDrawer.charWPad = padW;
|
||||
sFaultDrawer.charHPad = padH;
|
||||
}
|
||||
|
||||
void FaultDrawer_SetCursor(s32 x, s32 y) {
|
||||
if (sFaultDrawerStruct.osSyncPrintfEnabled) {
|
||||
osSyncPrintf(VT_CUP("%d", "%d"),
|
||||
(y - sFaultDrawerStruct.yStart) / (sFaultDrawerStruct.charH + sFaultDrawerStruct.charHPad),
|
||||
(x - sFaultDrawerStruct.xStart) / (sFaultDrawerStruct.charW + sFaultDrawerStruct.charWPad));
|
||||
if (sFaultDrawer.osSyncPrintfEnabled) {
|
||||
osSyncPrintf(VT_CUP("%d", "%d"), (y - sFaultDrawer.yStart) / (sFaultDrawer.charH + sFaultDrawer.charHPad),
|
||||
(x - sFaultDrawer.xStart) / (sFaultDrawer.charW + sFaultDrawer.charWPad));
|
||||
}
|
||||
sFaultDrawerStruct.cursorX = x;
|
||||
sFaultDrawerStruct.cursorY = y;
|
||||
sFaultDrawer.cursorX = x;
|
||||
sFaultDrawer.cursorY = y;
|
||||
}
|
||||
|
||||
void FaultDrawer_FillScreen() {
|
||||
if (sFaultDrawerStruct.osSyncPrintfEnabled) {
|
||||
void FaultDrawer_FillScreen(void) {
|
||||
if (sFaultDrawer.osSyncPrintfEnabled) {
|
||||
osSyncPrintf(VT_CLS);
|
||||
}
|
||||
|
||||
FaultDrawer_DrawRecImpl(sFaultDrawerStruct.xStart, sFaultDrawerStruct.yStart, sFaultDrawerStruct.xEnd,
|
||||
sFaultDrawerStruct.yEnd, sFaultDrawerStruct.backColor | 1);
|
||||
FaultDrawer_SetCursor(sFaultDrawerStruct.xStart, sFaultDrawerStruct.yStart);
|
||||
FaultDrawer_DrawRecImpl(sFaultDrawer.xStart, sFaultDrawer.yStart, sFaultDrawer.xEnd, sFaultDrawer.yEnd,
|
||||
sFaultDrawer.backColor | 1);
|
||||
FaultDrawer_SetCursor(sFaultDrawer.xStart, sFaultDrawer.yStart);
|
||||
}
|
||||
|
||||
void* FaultDrawer_FormatStringFunc(void* arg, const char* str, u32 count) {
|
||||
void* FaultDrawer_PrintCallback(void* arg, const char* str, u32 count) {
|
||||
for (; count != 0; count--, str++) {
|
||||
s32 curXStart;
|
||||
s32 curXEnd;
|
||||
|
||||
if (sFaultDrawerStruct.escCode) {
|
||||
sFaultDrawerStruct.escCode = false;
|
||||
if (*str > 0x30 && *str < 0x3A) {
|
||||
FaultDrawer_SetForeColor(sFaultDrawerStruct.printColors[*str - 0x30]);
|
||||
if (sFaultDrawer.escCode) {
|
||||
sFaultDrawer.escCode = false;
|
||||
if (*str > '0' && *str <= '9') {
|
||||
FaultDrawer_SetForeColor(sFaultDrawer.printColors[*str - '0']);
|
||||
}
|
||||
|
||||
curXStart = sFaultDrawerStruct.cursorX;
|
||||
curXEnd = sFaultDrawerStruct.xEnd - sFaultDrawerStruct.charW;
|
||||
curXStart = sFaultDrawer.cursorX;
|
||||
curXEnd = sFaultDrawer.xEnd - sFaultDrawer.charW;
|
||||
} else {
|
||||
switch (*str) {
|
||||
case '\n':
|
||||
if (sFaultDrawerStruct.osSyncPrintfEnabled) {
|
||||
if (sFaultDrawer.osSyncPrintfEnabled) {
|
||||
osSyncPrintf("\n");
|
||||
}
|
||||
|
||||
sFaultDrawerStruct.cursorX = sFaultDrawerStruct.w;
|
||||
curXStart = sFaultDrawerStruct.cursorX;
|
||||
curXEnd = sFaultDrawerStruct.xEnd - sFaultDrawerStruct.charW;
|
||||
sFaultDrawer.cursorX = sFaultDrawer.w;
|
||||
curXStart = sFaultDrawer.cursorX;
|
||||
curXEnd = sFaultDrawer.xEnd - sFaultDrawer.charW;
|
||||
break;
|
||||
case '\x1A':
|
||||
sFaultDrawerStruct.escCode = true;
|
||||
curXStart = sFaultDrawerStruct.cursorX;
|
||||
curXEnd = sFaultDrawerStruct.xEnd - sFaultDrawerStruct.charW;
|
||||
case FAULT_ESC:
|
||||
sFaultDrawer.escCode = true;
|
||||
curXStart = sFaultDrawer.cursorX;
|
||||
curXEnd = sFaultDrawer.xEnd - sFaultDrawer.charW;
|
||||
break;
|
||||
default:
|
||||
if (sFaultDrawerStruct.osSyncPrintfEnabled) {
|
||||
if (sFaultDrawer.osSyncPrintfEnabled) {
|
||||
osSyncPrintf("%c", *str);
|
||||
}
|
||||
|
||||
FaultDrawer_DrawChar(*str);
|
||||
sFaultDrawerStruct.cursorX += sFaultDrawerStruct.charW + sFaultDrawerStruct.charWPad;
|
||||
sFaultDrawer.cursorX += sFaultDrawer.charW + sFaultDrawer.charWPad;
|
||||
|
||||
curXStart = sFaultDrawerStruct.cursorX;
|
||||
curXEnd = sFaultDrawerStruct.xEnd - sFaultDrawerStruct.charW;
|
||||
curXStart = sFaultDrawer.cursorX;
|
||||
curXEnd = sFaultDrawer.xEnd - sFaultDrawer.charW;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (curXEnd <= curXStart) {
|
||||
sFaultDrawerStruct.cursorX = sFaultDrawerStruct.xStart;
|
||||
sFaultDrawerStruct.cursorY += sFaultDrawerStruct.charH + sFaultDrawerStruct.charHPad;
|
||||
if (sFaultDrawerStruct.yEnd - sFaultDrawerStruct.charH <= sFaultDrawerStruct.cursorY) {
|
||||
if (sFaultDrawerStruct.inputCallback) {
|
||||
sFaultDrawerStruct.inputCallback();
|
||||
sFaultDrawer.cursorX = sFaultDrawer.xStart;
|
||||
sFaultDrawer.cursorY += sFaultDrawer.charH + sFaultDrawer.charHPad;
|
||||
if (sFaultDrawer.yEnd - sFaultDrawer.charH <= sFaultDrawer.cursorY) {
|
||||
if (sFaultDrawer.inputCallback) {
|
||||
sFaultDrawer.inputCallback();
|
||||
FaultDrawer_FillScreen();
|
||||
}
|
||||
sFaultDrawerStruct.cursorY = sFaultDrawerStruct.yStart;
|
||||
sFaultDrawer.cursorY = sFaultDrawer.yStart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
osWritebackDCacheAll();
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
void FaultDrawer_VPrintf(const char* str, char* args) { // va_list
|
||||
_Printf(FaultDrawer_FormatStringFunc, (char*)&sFaultDrawerStruct, str, args);
|
||||
s32 FaultDrawer_VPrintf(const char* fmt, va_list args) {
|
||||
return _Printf(FaultDrawer_PrintCallback, &sFaultDrawer, fmt, args);
|
||||
}
|
||||
|
||||
void FaultDrawer_Printf(const char* fmt, ...) {
|
||||
s32 FaultDrawer_Printf(const char* fmt, ...) {
|
||||
s32 ret;
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
FaultDrawer_VPrintf(fmt, args);
|
||||
ret = FaultDrawer_VPrintf(fmt, args);
|
||||
|
||||
va_end(args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void FaultDrawer_DrawText(s32 x, s32 y, const char* fmt, ...) {
|
||||
|
@ -289,20 +321,20 @@ void FaultDrawer_DrawText(s32 x, s32 y, const char* fmt, ...) {
|
|||
}
|
||||
|
||||
void FaultDrawer_SetDrawerFB(void* fb, u16 w, u16 h) {
|
||||
sFaultDrawerStruct.fb = fb;
|
||||
sFaultDrawerStruct.w = w;
|
||||
sFaultDrawerStruct.h = h;
|
||||
sFaultDrawer.fb = fb;
|
||||
sFaultDrawer.w = w;
|
||||
sFaultDrawer.h = h;
|
||||
}
|
||||
|
||||
void FaultDrawer_SetInputCallback(void (*callback)()) {
|
||||
sFaultDrawerStruct.inputCallback = callback;
|
||||
void FaultDrawer_SetInputCallback(void (*callback)(void)) {
|
||||
sFaultDrawer.inputCallback = callback;
|
||||
}
|
||||
|
||||
void FaultDrawer_WritebackFBDCache() {
|
||||
osWritebackDCache(sFaultDrawerStruct.fb, sFaultDrawerStruct.w * sFaultDrawerStruct.h * 2);
|
||||
void FaultDrawer_WritebackFBDCache(void) {
|
||||
osWritebackDCache(sFaultDrawer.fb, sFaultDrawer.w * sFaultDrawer.h * sizeof(u16));
|
||||
}
|
||||
|
||||
void FaultDrawer_SetDefault() {
|
||||
bcopy(&sFaultDrawerDefault, &sFaultDrawerStruct, sizeof(FaultDrawer));
|
||||
sFaultDrawerStruct.fb = (u16*)((osMemSize | 0x80000000) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH]));
|
||||
void FaultDrawer_Init(void) {
|
||||
bcopy(&sFaultDrawerDefault, &sFaultDrawer, sizeof(FaultDrawer));
|
||||
sFaultDrawer.fb = (u16*)(PHYS_TO_K0(osMemSize) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH]));
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ void GameState_FaultPrint(void) {
|
|||
FaultDrawer_DrawText(120, 180, "%08x", sLastButtonPressed);
|
||||
for (i = 0; i < ARRAY_COUNT(sBtnChars); i++) {
|
||||
if (sLastButtonPressed & (1 << i)) {
|
||||
FaultDrawer_DrawText((i * 8) + 0x78, 0xBE, "%c", sBtnChars[i]);
|
||||
FaultDrawer_DrawText((i * 8) + 120, 190, "%c", sBtnChars[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ void Graph_Init(GraphicsContext* gfxCtx) {
|
|||
gfxCtx->yScale = gViConfigYScale;
|
||||
osCreateMesgQueue(&gfxCtx->queue, gfxCtx->msgBuff, ARRAY_COUNT(gfxCtx->msgBuff));
|
||||
func_800D31F0();
|
||||
Fault_AddClient(&sGraphFaultClient, Graph_FaultClient, 0, 0);
|
||||
Fault_AddClient(&sGraphFaultClient, Graph_FaultClient, NULL, NULL);
|
||||
}
|
||||
|
||||
void Graph_Destroy(GraphicsContext* gfxCtx) {
|
||||
|
|
|
@ -23,7 +23,7 @@ void IrqMgr_AddClient(IrqMgr* this, IrqMgrClient* c, OSMesgQueue* msgQ) {
|
|||
LogUtils_CheckNullPointer("c", c, "../irqmgr.c", 97);
|
||||
LogUtils_CheckNullPointer("msgQ", msgQ, "../irqmgr.c", 98);
|
||||
|
||||
prevInt = osSetIntMask(1);
|
||||
prevInt = osSetIntMask(OS_IM_NONE);
|
||||
|
||||
c->queue = msgQ;
|
||||
c->prev = this->clients;
|
||||
|
@ -48,7 +48,7 @@ void IrqMgr_RemoveClient(IrqMgr* this, IrqMgrClient* c) {
|
|||
LogUtils_CheckNullPointer("this", this, "../irqmgr.c", 129);
|
||||
LogUtils_CheckNullPointer("c", c, "../irqmgr.c", 130);
|
||||
|
||||
prevInt = osSetIntMask(1);
|
||||
prevInt = osSetIntMask(OS_IM_NONE);
|
||||
|
||||
while (iter != NULL) {
|
||||
if (iter == c) {
|
||||
|
|
|
@ -165,7 +165,7 @@ void PadMgr_RumbleStop(PadMgr* padMgr) {
|
|||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (osMotorInit(ctrlrQ, &padMgr->pfs[i], i) == 0) {
|
||||
if ((gFaultStruct.msgId == 0) && (padMgr->rumbleOnFrames != 0)) {
|
||||
if ((gFaultMgr.msgId == 0) && (padMgr->rumbleOnFrames != 0)) {
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
// "Stop vibration pack"
|
||||
osSyncPrintf("padmgr: %dコン: %s\n", i + 1, "振動パック 停止");
|
||||
|
@ -297,7 +297,7 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
|
|||
}
|
||||
padMgr->validCtrlrsMask = mask;
|
||||
|
||||
if (gFaultStruct.msgId) {
|
||||
if (gFaultMgr.msgId != 0) {
|
||||
PadMgr_RumbleStop(padMgr);
|
||||
} else if (padMgr->rumbleOffFrames > 0) {
|
||||
--padMgr->rumbleOffFrames;
|
||||
|
|
|
@ -26,7 +26,7 @@ void Sched_SwapFrameBuffer(CfbInfo* cfbInfo) {
|
|||
(cfbInfo != NULL ? cfbInfo->swapBuffer : NULL));
|
||||
}
|
||||
width = cfbInfo->viMode != NULL ? cfbInfo->viMode->comRegs.width : (u32)gScreenWidth;
|
||||
Fault_SetFB(cfbInfo->swapBuffer, width, 0x10);
|
||||
Fault_SetFrameBuffer(cfbInfo->swapBuffer, width, 0x10);
|
||||
|
||||
if (HREG(80) == 0xD && HREG(95) != 0xD) {
|
||||
HREG(81) = 0;
|
||||
|
|
|
@ -1318,7 +1318,7 @@ s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor) {
|
|||
|
||||
// If the previous attention cutscene has an actor in the same category, skip this actor.
|
||||
if (actor->category == vLastHigherCat) {
|
||||
osSyncPrintf("→ " VT_FGCOL(PURPLE) "×" VT_RST " (%d)\n", actor->id);
|
||||
osSyncPrintf("→ " VT_FGCOL(MAGENTA) "×" VT_RST " (%d)\n", actor->id);
|
||||
return SUBCAM_NONE;
|
||||
}
|
||||
osSyncPrintf("→ " VT_FGCOL(BLUE) "○" VT_RST " (%d)\n", actor->id);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "global.h"
|
||||
|
||||
OSThread* __osThreadTail[2] = { NULL, (OSThread*)-1 };
|
||||
OSThread* __osThreadTail[2] = { NULL, (OSThread*)OS_PRIORITY_THREADTAIL };
|
||||
OSThread* __osRunQueue = (OSThread*)__osThreadTail;
|
||||
OSThread* __osActiveQueue = (OSThread*)__osThreadTail;
|
||||
OSThread* __osRunningThread = NULL;
|
||||
|
|
|
@ -16,7 +16,7 @@ void osDestroyThread(OSThread* thread) {
|
|||
__osActiveQueue = __osActiveQueue->tlnext;
|
||||
} else {
|
||||
s1 = __osActiveQueue;
|
||||
while (s1->priority != -1) {
|
||||
while (s1->priority != OS_PRIORITY_THREADTAIL) {
|
||||
s2 = s1->tlnext;
|
||||
if (s2 == thread) {
|
||||
s1->tlnext = thread->tlnext;
|
||||
|
|
|
@ -244,7 +244,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
|
|||
case FAIRY_UPGRADE_HALF_DAMAGE:
|
||||
if (!gSaveContext.doubleDefense) {
|
||||
// "Damage halved"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST);
|
||||
this->givingSpell = true;
|
||||
givingReward = true;
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
this->gameResult = 1; // Won
|
||||
this->bowlPit->status = 0;
|
||||
// "Center HIT!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 中央HIT!!!! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 中央HIT!!!! ☆☆☆☆☆ \n" VT_RST);
|
||||
}
|
||||
|
||||
if ((globalCtx->bombchuBowlingStatus == -1) &&
|
||||
|
@ -244,7 +244,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, GlobalContext* globalCtx) {
|
|||
(this->wallStatus[0] != 1) && (this->wallStatus[1] != 1)) {
|
||||
this->gameResult = 2; // Lost
|
||||
// "Bombchu lost"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ ボムチュウ消化 ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ボムチュウ消化 ☆☆☆☆☆ \n" VT_RST);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -156,13 +156,13 @@ void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
|
||||
if (this->leftChest != NULL) {
|
||||
// "Left treasure generation (what does it contain?)"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 左宝発生(ナニがはいってるの?) ☆☆☆☆☆ %x\n" VT_RST, leftChestParams);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 左宝発生(ナニがはいってるの?) ☆☆☆☆☆ %x\n" VT_RST, leftChestParams);
|
||||
// "What is the room number?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 部屋番号は? %x\n" VT_RST, globalCtx->roomCtx.curRoom.num);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 部屋番号は? %x\n" VT_RST, globalCtx->roomCtx.curRoom.num);
|
||||
// "What is the bit?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ ビットはなぁに? %x\n" VT_RST, this->rightChestNum);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ビットはなぁに? %x\n" VT_RST, this->rightChestNum);
|
||||
// "Sukesuke-kun" (something to do with being invisible)
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ すけすけ君? %x\n" VT_RST, rightChestItem);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ すけすけ君? %x\n" VT_RST, rightChestItem);
|
||||
osSyncPrintf("\n\n");
|
||||
if (this->roomChestsOpened) {
|
||||
Flags_SetTreasure(globalCtx, this->leftChestNum & 0x1F);
|
||||
|
|
|
@ -196,7 +196,7 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
// "This is dangerous!"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ ヤバいよこれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
maskIdx = Rand_ZeroFloat(7.99f);
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
|
|||
// "What kind of evaluation?"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ どういう評価? ☆☆☆☆☆☆ %d\n" VT_RST, reaction);
|
||||
// "What kind of action?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ どういうアクション? ☆☆☆ %d\n" VT_RST, this->action);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ どういうアクション? ☆☆☆ %d\n" VT_RST, this->action);
|
||||
osSyncPrintf("\n\n");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ void EnDntNomal_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->objIndex < 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
// "What?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " なにみの? %d\n" VT_RST "\n", this->objIndex);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " なにみの? %d\n" VT_RST "\n", this->objIndex);
|
||||
// "Bank is funny"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
|
||||
return;
|
||||
|
|
|
@ -57,7 +57,7 @@ void EnEncount1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "Type"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 種類\t\t ☆☆☆☆☆ %d\n" VT_RST, this->spawnType);
|
||||
// "Maximum number of simultaneous spawns"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 最大同時発生数 ☆☆☆☆☆ %d\n" VT_RST, this->maxCurSpawns);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 最大同時発生数 ☆☆☆☆☆ %d\n" VT_RST, this->maxCurSpawns);
|
||||
// "Maximum number of spawns"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 最大発生数 \t ☆☆☆☆☆ %d\n" VT_RST, this->maxTotalSpawns);
|
||||
// "Spawn check range"
|
||||
|
|
|
@ -110,7 +110,7 @@ void EnExItem_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "What?"
|
||||
osSyncPrintf("なにみの? %d\n", this->actor.params);
|
||||
// "bank is funny"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
|
||||
return;
|
||||
}
|
||||
this->actionFunc = EnExItem_WaitForObject;
|
||||
|
@ -125,7 +125,7 @@ void EnExItem_WaitForObject(EnExItem* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params, this);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params, this);
|
||||
osSyncPrintf(VT_FGCOL(BLUE) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params, this);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params, this);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params, this);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 転送終了 ☆☆☆☆☆ %d\n\n" VT_RST, this->actor.params, this);
|
||||
this->actor.objBankIndex = this->objectIdx;
|
||||
this->actor.draw = EnExItem_Draw;
|
||||
|
|
|
@ -96,7 +96,7 @@ void EnGSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->silverCount = this->actor.params >> 6;
|
||||
this->silverCount &= 0x3F;
|
||||
// "maximum number of checks"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 最大チェック数 ☆☆☆☆☆ %d\n" VT_RST, this->silverCount);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 最大チェック数 ☆☆☆☆☆ %d\n" VT_RST, this->silverCount);
|
||||
osSyncPrintf("\n\n");
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
// This is a reference to Hokuto no Ken
|
||||
|
@ -141,7 +141,7 @@ void EnGSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (this->objIndex < 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
// "what?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " なにみの? %d\n" VT_RST "\n", this->objIndex);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " なにみの? %d\n" VT_RST "\n", this->objIndex);
|
||||
// "bank is funny"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) " バンクおかしいしぞ!%d\n" VT_RST "\n", this->actor.params);
|
||||
}
|
||||
|
|
|
@ -84,21 +84,21 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(GREEN) " 種類☆☆☆☆☆☆☆☆☆☆☆☆☆ %d\n" VT_RST, this->type);
|
||||
// "path data"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " れえるでぇたぁ☆☆☆☆☆☆☆☆ %d\n" VT_RST, this->path);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " anime_frame_speed ☆☆☆☆☆☆ %f\n" VT_RST, this->animSpeed);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " anime_frame_speed ☆☆☆☆☆☆ %f\n" VT_RST, this->animSpeed);
|
||||
// "interpolation frame"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " 補間フレーム☆☆☆☆☆☆☆☆☆ %f\n" VT_RST, this->transitionRate);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " 補間フレーム☆☆☆☆☆☆☆☆☆ %f\n" VT_RST, this->transitionRate);
|
||||
// "targeted movement speed value between points"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " point間の移動スピード目標値 ☆ %f\n" VT_RST, this->moveSpeedTarget);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " point間の移動スピード目標値 ☆ %f\n" VT_RST, this->moveSpeedTarget);
|
||||
// "maximum movement speed value between points"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " point間の移動スピード最大 ☆☆ %f\n" VT_RST, this->moveSpeedMax);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " point間の移動スピード最大 ☆☆ %f\n" VT_RST, this->moveSpeedMax);
|
||||
// "(body) targeted turning angle speed value"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " (体)反転アングルスピード目標値 %f\n" VT_RST, this->bodyTurnSpeedTarget);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " (体)反転アングルスピード目標値 %f\n" VT_RST, this->bodyTurnSpeedTarget);
|
||||
// "(body) maximum turning angle speed"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " (体)反転アングルスピード最大☆ %f\n" VT_RST, this->bodyTurnSpeedMax);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " (体)反転アングルスピード最大☆ %f\n" VT_RST, this->bodyTurnSpeedMax);
|
||||
// "(head) targeted turning angle speed value"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " (頭)反転アングルスピード加算値 %f\n" VT_RST, this->headTurnSpeedScale);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " (頭)反転アングルスピード加算値 %f\n" VT_RST, this->headTurnSpeedScale);
|
||||
// "(head) maximum turning angle speed"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " (頭)反転アングルスピード最大☆ %f\n" VT_RST, this->headTurnSpeedMax);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " (頭)反転アングルスピード最大☆ %f\n" VT_RST, this->headTurnSpeedMax);
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " 今時間 %d\n" VT_RST, ((void)0, gSaveContext.dayTime)); // "current time"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " チェック時間 %d\n" VT_RST, 0xBAAA); // "check time"
|
||||
osSyncPrintf("\n\n");
|
||||
|
|
|
@ -100,7 +100,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
osSyncPrintf("\n\n");
|
||||
// "No, I'm completely disappointed" (message for when shooting guard window in courtyard)
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ いやー ついうっかり ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ いやー ついうっかり ☆☆☆☆☆ \n" VT_RST);
|
||||
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
|
||||
|
@ -155,7 +155,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "Identification Completed!"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type);
|
||||
// "Message completed!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (this->actor.params >> 8) & 0xF);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (this->actor.params >> 8) & 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,12 +211,12 @@ void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
} else if (gSaveContext.eventChkInf[1] & 4) {
|
||||
if (this->unk_30E == 0) {
|
||||
// "Start under the first sleeve!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 1回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.textId = 0x7071;
|
||||
this->unk_30E = 1;
|
||||
} else {
|
||||
// "Start under the second sleeve!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ 2回目袖の下開始! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.textId = 0x7072;
|
||||
}
|
||||
this->unk_300 = TEXT_STATE_CHOICE;
|
||||
|
@ -298,7 +298,7 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
// "I've come!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, actor->dyna.actor.next);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, actor->dyna.actor.next);
|
||||
this->actionFunc = func_80A5372C;
|
||||
}
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ void func_80A5399C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = func_80A5475C;
|
||||
} else {
|
||||
// "I don't know"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ とおしゃしねぇちゅーの ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ とおしゃしねぇちゅーの ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actionFunc = func_80A53AD4;
|
||||
}
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ void func_80A53D0C(EnHeishi2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
// "I've come!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, gate->dyna.actor.next);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆ きたきたきたぁ! ☆☆☆ %x\n" VT_RST, gate->dyna.actor.next);
|
||||
this->actionFunc = func_80A53DF8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
osSyncPrintf("\n\n");
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n" VT_RST, thisx->params);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了!\t ☆☆☆☆☆ %d\n" VT_RST, this->type);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (thisx->params >> 8) & 0xF);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (thisx->params >> 8) & 0xF);
|
||||
osSyncPrintf("\n\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ void func_80A918E4(EnKakasi3* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (BREG(3) != 0) {
|
||||
// "No way!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ まさか! ☆☆☆☆☆ %d\n" VT_RST, globalCtx->msgCtx.ocarinaMode);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ まさか! ☆☆☆☆☆ %d\n" VT_RST, globalCtx->msgCtx.ocarinaMode);
|
||||
}
|
||||
if ((globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04 ||
|
||||
(globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_05 && globalCtx->msgCtx.ocarinaMode < OCARINA_MODE_0B)) &&
|
||||
|
|
|
@ -67,7 +67,7 @@ void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "Type index"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 種類インデックス ☆☆☆☆☆ %d\n" VT_RST, this->type);
|
||||
// "Correct answer information"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 正解情報\t ☆☆☆☆☆ %d\n" VT_RST, this->ocarinaSong);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 正解情報\t ☆☆☆☆☆ %d\n" VT_RST, this->ocarinaSong);
|
||||
// "Range information"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 範囲情報\t ☆☆☆☆☆ %d\n" VT_RST, this->actor.world.rot.z);
|
||||
// "Processing range information"
|
||||
|
@ -301,7 +301,7 @@ void func_80ABF708(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||
// "Open sesame sesame!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 開けゴマゴマゴマ! ☆☆☆☆☆ %d\n" VT_RST, Message_GetState(&globalCtx->msgCtx));
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 開けゴマゴマゴマ! ☆☆☆☆☆ %d\n" VT_RST, Message_GetState(&globalCtx->msgCtx));
|
||||
|
||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||
Message_CloseTextbox(globalCtx);
|
||||
|
|
|
@ -51,7 +51,7 @@ void EnTakaraMan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
sTakaraIsInitialized = true;
|
||||
osSyncPrintf("\n\n");
|
||||
// "Bun! %x" (needs a better translation)
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ ばぅん! ☆☆☆☆☆ %x\n" VT_RST, globalCtx->actorCtx.flags.chest);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ ばぅん! ☆☆☆☆☆ %x\n" VT_RST, globalCtx->actorCtx.flags.chest);
|
||||
globalCtx->actorCtx.flags.chest = 0;
|
||||
gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex] = -1;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ts_Skel_004FE0, &object_ts_Anim_000498, this->jointTable,
|
||||
|
|
|
@ -129,7 +129,7 @@ void EnWallTubo_SetWallFall(EnWallTubo* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆ やった原! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆ やった原! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(BLUE) "☆☆☆☆ やった原! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆ やった原! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆ やった原! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆ やった原! ☆☆☆☆☆ \n" VT_RST);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void func_80B391CC(EnWonderTalk* this, GlobalContext* globalCtx) {
|
|||
this->height = 0.0f;
|
||||
this->unk_15C = 80.0f;
|
||||
// "Attention coordinates"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->actor.textId = 0x7040;
|
||||
// "Children"
|
||||
|
@ -88,7 +88,7 @@ void func_80B391CC(EnWonderTalk* this, GlobalContext* globalCtx) {
|
|||
this->height = 30.0f;
|
||||
this->unk_15C = 40.0f;
|
||||
// "Attention coordinates"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 30.0f);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 30.0f);
|
||||
break;
|
||||
case 3:
|
||||
this->actor.textId = 0x501E;
|
||||
|
@ -96,14 +96,14 @@ void func_80B391CC(EnWonderTalk* this, GlobalContext* globalCtx) {
|
|||
this->height = 0.0f;
|
||||
this->unk_15C = 110.0f;
|
||||
// "Attention coordinates"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
break;
|
||||
case 4:
|
||||
this->actor.textId = 0x5020;
|
||||
this->unk_156 = TEXT_STATE_DONE;
|
||||
this->height = 0.0f;
|
||||
// "Attention coordinates"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
this->unk_15C = 120.0f;
|
||||
if (gSaveContext.eventChkInf[1] & 0x2000) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -115,7 +115,7 @@ void func_80B391CC(EnWonderTalk* this, GlobalContext* globalCtx) {
|
|||
this->height = 0.0f;
|
||||
this->unk_15C = 110.0f;
|
||||
// "Attention coordinates"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 注目座標\t \t☆☆☆☆☆ %f\n" VT_RST, 0.0f);
|
||||
break;
|
||||
default:
|
||||
this->actor.textId = 0x7072;
|
||||
|
@ -158,7 +158,7 @@ void func_80B3943C(EnWonderTalk* this, GlobalContext* globalCtx) {
|
|||
// "Save information"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ情報\t\t☆☆☆☆☆ %d\n" VT_RST, this->switchFlag);
|
||||
// "Type index"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 種類インデックス\t☆☆☆☆☆ %d\n" VT_RST, this->unk_150);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 種類インデックス\t☆☆☆☆☆ %d\n" VT_RST, this->unk_150);
|
||||
// "Actual message type"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 実質メッセージ種類 %x\n" VT_RST, this->actor.textId);
|
||||
// "Specified range"
|
||||
|
@ -198,7 +198,7 @@ void func_80B395F0(EnWonderTalk* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
case 1:
|
||||
// "Out!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ はずれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆☆☆☆ はずれ! ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.textId = 0x5004;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
// "originally?"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 元は? ☆☆☆☆☆ %d\n" VT_RST, this->actor.world.rot.z);
|
||||
// "The range is?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ レンジは? ☆☆☆☆☆ %d\n" VT_RST, this->actor.targetMode);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ レンジは? ☆☆☆☆☆ %d\n" VT_RST, this->actor.targetMode);
|
||||
// "Is the range?"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ は、範囲わ? ☆☆☆☆☆ %f\n" VT_RST, this->triggerRange);
|
||||
osSyncPrintf("\n\n");
|
||||
|
@ -121,7 +121,7 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
if ((this->switchFlag >= 0) && (this->talkMode != 2)) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
// "I saved it! All of it!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
|
||||
}
|
||||
|
||||
this->actionFunc = func_80B3A10C;
|
||||
|
@ -137,7 +137,7 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
// "Save Information"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ情報 \t %x\n" VT_RST, this->switchFlag);
|
||||
// "Specified message type"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->baseMsgId);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->baseMsgId);
|
||||
// "Actual message type"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 実質メッセージ種類 %x\n" VT_RST, this->actor.textId);
|
||||
// "Specified range"
|
||||
|
@ -147,15 +147,15 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
switch (this->talkMode) {
|
||||
case 0:
|
||||
// "Normal"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ 通常 ☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆ 通常 ☆☆ \n" VT_RST);
|
||||
break;
|
||||
case 2:
|
||||
// "Check only"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ チェックのみ ☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆ チェックのみ ☆☆ \n" VT_RST);
|
||||
break;
|
||||
case 3:
|
||||
// "Lock only"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ ロックのみ ☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆ ロックのみ ☆☆ \n" VT_RST);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
||||
if (BREG(2) != 0) {
|
||||
// "Oh"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ わー %d\n" VT_RST, Message_GetState(&globalCtx->msgCtx));
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ わー %d\n" VT_RST, Message_GetState(&globalCtx->msgCtx));
|
||||
}
|
||||
|
||||
switch (Message_GetState(&globalCtx->msgCtx)) {
|
||||
|
@ -186,7 +186,7 @@ void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
if ((this->switchFlag >= 0) && (this->talkMode != 4)) {
|
||||
Flags_SetSwitch(globalCtx, this->switchFlag);
|
||||
// "(Forced) I saved it! All of it!"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ (強制)セーブしたよ!おもいっきり! %x\n" VT_RST, this->switchFlag);
|
||||
}
|
||||
|
||||
if (this->talkMode == 4) {
|
||||
|
@ -213,7 +213,7 @@ void func_80B3A4F8(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
} else if ((this->talkMode != 4) || !this->unk_15A) {
|
||||
if (BREG(2) != 0) {
|
||||
// "distance"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ きょり %f\n" VT_RST, this->actor.xzDistToPlayer);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ きょり %f\n" VT_RST, this->actor.xzDistToPlayer);
|
||||
}
|
||||
if (((this->actor.xzDistToPlayer < (40.0f + this->triggerRange)) &&
|
||||
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 100.0f)) &&
|
||||
|
@ -225,7 +225,7 @@ void func_80B3A4F8(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
// "Save Information"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ セーブ情報 \t %x\n" VT_RST, this->switchFlag);
|
||||
// "Specified message type"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->baseMsgId);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 指定メッセージ種類 %x\n" VT_RST, this->baseMsgId);
|
||||
// "Real message type"
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ 実質メッセージ種類 %x\n" VT_RST, this->actor.textId);
|
||||
// "Specified range"
|
||||
|
@ -233,13 +233,13 @@ void func_80B3A4F8(EnWonderTalk2* this, GlobalContext* globalCtx) {
|
|||
// "Processing range"
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ 処理範囲 %f\n" VT_RST, this->triggerRange);
|
||||
// "What is your range?"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ レンジは? \t\t %d\n" VT_RST, this->actor.targetMode);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ レンジは? \t\t %d\n" VT_RST, this->actor.targetMode);
|
||||
osSyncPrintf("\n\n");
|
||||
osSyncPrintf("\n\n");
|
||||
switch (this->talkMode) {
|
||||
case 1:
|
||||
// "Compulsion"
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆ 強制 ☆☆ \n" VT_RST);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) " ☆☆ 強制 ☆☆ \n" VT_RST);
|
||||
break;
|
||||
case 4:
|
||||
// "Gerudo Training Grounds Forced Check Only"
|
||||
|
|
|
@ -109,7 +109,7 @@ void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 種類 ☆☆☆☆☆ %d\n" VT_RST, this->typeIndex);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 種類 ☆☆☆☆☆ %d\n" VT_RST, this->typeIndex);
|
||||
osSyncPrintf(VT_FGCOL(CYAN) "☆☆☆☆☆ さらに分類 ☆☆☆☆☆ %d\n" VT_RST, this->subTypeIndex);
|
||||
this->actionFunc = func_80B42F74;
|
||||
}
|
||||
|
@ -166,9 +166,9 @@ void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hitX ☆☆☆☆☆ %f\n" VT_RST, sTargetPos[this->subTypeIndex].x);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hitY ☆☆☆☆☆ %f\n" VT_RST, sTargetPos[this->subTypeIndex].y);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hitZ ☆☆☆☆☆ %f\n" VT_RST, sTargetPos[this->subTypeIndex].z);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 小 ☆☆☆☆☆ %f\n" VT_RST, scoreDistance100);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ 大 ☆☆☆☆☆ %f\n" VT_RST, scoreDistance60);
|
||||
osSyncPrintf(VT_FGCOL(PURPLE) "☆☆☆☆☆ point ☆☆☆☆☆ %d\n" VT_RST, scoreIndex);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 小 ☆☆☆☆☆ %f\n" VT_RST, scoreDistance100);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ 大 ☆☆☆☆☆ %f\n" VT_RST, scoreDistance60);
|
||||
osSyncPrintf(VT_FGCOL(MAGENTA) "☆☆☆☆☆ point ☆☆☆☆☆ %d\n" VT_RST, scoreIndex);
|
||||
osSyncPrintf("\n\n");
|
||||
|
||||
if (scoreIndex == 2) {
|
||||
|
|
|
@ -15,8 +15,6 @@ COLORS = [
|
|||
'PURPLE',
|
||||
'CYAN',
|
||||
'WHITE',
|
||||
'LIGHTGRAY',
|
||||
'DARKGRAY',
|
||||
]
|
||||
|
||||
def re_match(exp, text):
|
||||
|
@ -39,11 +37,11 @@ def vt_fmt(text):
|
|||
code = text[i:text.find('m', i)]
|
||||
i += len(code)
|
||||
|
||||
if re_match('^4[0-9];3[0-9]$', code):
|
||||
if re_match('^4[0-7];3[0-7]$', code):
|
||||
chars += 'VT_COL(' + COLORS[int(code[1])] + ', ' + COLORS[int(code[4])] + ')'
|
||||
elif re_match('^4[0-9]$', code):
|
||||
elif re_match('^4[0-7]$', code):
|
||||
chars += 'VT_BGCOL(' + COLORS[int(code[1])] + ')'
|
||||
elif re_match('^3[0-9]$', code):
|
||||
elif re_match('^3[0-7]$', code):
|
||||
chars += 'VT_FGCOL(' + COLORS[int(code[1])] + ')'
|
||||
elif len(code) == 0:
|
||||
chars += 'VT_RST'
|
||||
|
|
Loading…
Reference in a new issue