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:
Tharo
2022-02-02 21:43:34 +00:00
committed by GitHub
parent cd1d08d34f
commit c8f4d66b00
42 changed files with 1010 additions and 767 deletions
+1 -1
View File
@@ -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);
}
+2 -2
View File
@@ -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);
+627 -398
View File
File diff suppressed because it is too large Load Diff
+132 -100
View File
@@ -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]));
}
+1 -1
View File
@@ -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]);
}
}
}
+1 -1
View File
@@ -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) {
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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 -1
View File
@@ -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;
+1 -1
View File
@@ -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) "☆☆☆☆☆ hit ☆☆☆☆☆ %f\n" VT_RST, sTargetPos[this->subTypeIndex].x);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hit ☆☆☆☆☆ %f\n" VT_RST, sTargetPos[this->subTypeIndex].y);
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ hit ☆☆☆☆☆ %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) {