diff options
| author | cadmic <cadmic24@gmail.com> | 2025-01-08 07:33:49 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 10:33:49 -0500 |
| commit | f329507f97c30a040ff1ea020ed9ff6249360561 (patch) | |
| tree | dee8cec92b7e65d71b02db7f1e4a281dbd9848fd /src/code | |
| parent | a3c3c38fead604508fef7626fa8ae494d67df52c (diff) | |
[iQue] Create/update macros for printing debug strings (#2398)
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/game.c | 8 | ||||
| -rw-r--r-- | src/code/graph.c | 4 | ||||
| -rw-r--r-- | src/code/irqmgr.c | 4 | ||||
| -rw-r--r-- | src/code/main.c | 4 | ||||
| -rw-r--r-- | src/code/padmgr.c | 4 | ||||
| -rw-r--r-- | src/code/speed_meter.c | 4 | ||||
| -rw-r--r-- | src/code/sys_math3d.c | 12 | ||||
| -rw-r--r-- | src/code/z_DLF.c | 4 | ||||
| -rw-r--r-- | src/code/z_actor.c | 8 | ||||
| -rw-r--r-- | src/code/z_bg_collect.c | 4 | ||||
| -rw-r--r-- | src/code/z_bgcheck.c | 48 | ||||
| -rw-r--r-- | src/code/z_collision_check.c | 20 | ||||
| -rw-r--r-- | src/code/z_eff_shield_particle.c | 4 | ||||
| -rw-r--r-- | src/code/z_effect_soft_sprite.c | 18 | ||||
| -rw-r--r-- | src/code/z_horse.c | 8 | ||||
| -rw-r--r-- | src/code/z_jpeg.c | 4 | ||||
| -rw-r--r-- | src/code/z_kaleido_manager.c | 12 | ||||
| -rw-r--r-- | src/code/z_kaleido_scope_call.c | 20 | ||||
| -rw-r--r-- | src/code/z_map_exp.c | 20 | ||||
| -rw-r--r-- | src/code/z_message.c | 44 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 36 | ||||
| -rw-r--r-- | src/code/z_room.c | 4 | ||||
| -rw-r--r-- | src/code/z_scene.c | 8 | ||||
| -rw-r--r-- | src/code/z_skelanime.c | 40 | ||||
| -rw-r--r-- | src/code/z_skin_matrix.c | 4 | ||||
| -rw-r--r-- | src/code/z_sram.c | 16 | ||||
| -rw-r--r-- | src/code/z_view.c | 4 | ||||
| -rw-r--r-- | src/code/z_vr_box.c | 4 |
28 files changed, 185 insertions, 185 deletions
diff --git a/src/code/game.c b/src/code/game.c index ee29c8449..436783952 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -409,12 +409,12 @@ void GameState_Realloc(GameState* gameState, size_t size) { SystemArena_GetSizes(&systemMaxFree, &systemFree, &systemAlloc); if ((systemMaxFree - 0x10) < size) { PRINTF("%c", BEL); - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("メモリが足りません。ハイラルサイズを可能な最大値に変更します\n", "Not enough memory. Change Hyrule size to maximum possible value\n")); PRINTF("(hyral=%08x max=%08x free=%08x alloc=%08x)\n", size, systemMaxFree, systemFree, systemAlloc); - PRINTF(VT_RST); + PRINTF_RST(); size = systemMaxFree - 0x10; } @@ -557,9 +557,9 @@ void* GameState_Alloc(GameState* gameState, size_t size, const char* file, int l } } if (ret != NULL) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("game_alloc(%08x) %08x-%08x [%s:%d]\n", size, ret, (uintptr_t)ret + size, file, line); - PRINTF(VT_RST); + PRINTF_RST(); } return ret; } diff --git a/src/code/graph.c b/src/code/graph.c index 091c80bae..348fe4bf9 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -188,9 +188,9 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) { if (msg == (OSMesg)666) { #if DEBUG_FEATURES - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("RCPが帰ってきませんでした。", "RCP did not return.")); - PRINTF(VT_RST); + PRINTF_RST(); LogUtils_LogHexDump((void*)PHYS_TO_K1(SP_BASE_REG), 0x20); LogUtils_LogHexDump((void*)PHYS_TO_K1(DPC_BASE_REG), 0x20); diff --git a/src/code/irqmgr.c b/src/code/irqmgr.c index 3a1e3cdf5..59d7a41cf 100644 --- a/src/code/irqmgr.c +++ b/src/code/irqmgr.c @@ -185,11 +185,11 @@ void IrqMgr_CheckStacks(void) { PRINTF(T("スタックは大丈夫みたいです\n", "The stack looks ok\n")); } else { PRINTF("%c", BEL); - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("スタックがオーバーフローしたか危険な状態です\n", "Stack overflow or dangerous\n")); PRINTF(T("早々にスタックサイズを増やすか、スタックを消費しないようにしてください\n", "Increase stack size early or don't consume stack\n")); - PRINTF(VT_RST); + PRINTF_RST(); } } diff --git a/src/code/main.c b/src/code/main.c index 8ad00b52b..bffc9565a 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -59,11 +59,11 @@ OSMesg sSerialMsgBuf[1]; #if DEBUG_FEATURES void Main_LogSystemHeap(void) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF( T("システムヒープサイズ %08x(%dKB) 開始アドレス %08x\n", "System heap size %08x (%dKB) Start address %08x\n"), gSystemHeapSize, gSystemHeapSize / 1024, _buffersSegmentEnd); - PRINTF(VT_RST); + PRINTF_RST(); } #endif diff --git a/src/code/padmgr.c b/src/code/padmgr.c index 33a505663..373d4e905 100644 --- a/src/code/padmgr.c +++ b/src/code/padmgr.c @@ -35,9 +35,9 @@ #define PADMGR_LOG(controllerNum, msg) \ if (DEBUG_FEATURES) { \ - PRINTF(VT_FGCOL(YELLOW)); \ + PRINTF_COLOR_YELLOW(); \ PRINTF(T("padmgr: %dコン: %s\n", "padmgr: Controller %d: %s\n"), (controllerNum) + 1, (msg)); \ - PRINTF(VT_RST); \ + PRINTF_RST(); \ } \ (void)0 diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index d325099a8..d282e3495 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -185,9 +185,9 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC Gfx* gfx; if (this->maxval == 0) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); LOG_NUM("this->maxval", this->maxval, "../speed_meter.c", 313); - PRINTF(VT_RST); + PRINTF_RST(); } else { OPEN_DISPS(gfxCtx, "../speed_meter.c", 318); diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index 082c62fc7..203b9f2e2 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -127,11 +127,11 @@ void Math3D_LineClosestToPoint(InfiniteLine* line, Vec3f* pos, Vec3f* closestPoi dirVectorLengthSq = Math3D_Vec3fMagnitudeSq(&line->dir); if (IS_ZERO(dirVectorLengthSq)) { - PRINTF(VT_COL(YELLOW, BLACK)); + PRINTF_COLOR_WARNING(); PRINTF(T("Math3D_lineVsPosSuisenCross():直線の長さがありません\n", "Math3D_lineVsPosSuisenCross(): No straight line length\n")); PRINTF(T("cross = pos を返します。\n", "Returns cross = pos.\n")); - PRINTF(VT_RST); + PRINTF_RST(); Math_Vec3f_Copy(closestPoint, pos); //! @bug Missing early return } @@ -930,11 +930,11 @@ f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane) { */ f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) { if (DEBUG_FEATURES && IS_ZERO(sqrtf(SQ(nx) + SQ(ny) + SQ(nz)))) { - PRINTF(VT_COL(YELLOW, BLACK)); + PRINTF_COLOR_WARNING(); PRINTF(T("Math3DLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n", "Math3DLengthPlaneAndPos(): Normal size is near zero %f %f %f\n"), nx, ny, nz); - PRINTF(VT_RST); + PRINTF_RST(); return 0.0f; } return fabsf(Math3D_DistPlaneToPos(nx, ny, nz, originDist, p)); @@ -949,11 +949,11 @@ f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p) { normMagnitude = sqrtf(SQ(nx) + SQ(ny) + SQ(nz)); if (IS_ZERO(normMagnitude)) { - PRINTF(VT_COL(YELLOW, BLACK)); + PRINTF_COLOR_WARNING(); PRINTF(T("Math3DSignedLengthPlaneAndPos():法線size がゼロ近いです%f %f %f\n", "Math3DSignedLengthPlaneAndPos(): Normal size is close to zero %f %f %f\n"), nx, ny, nz); - PRINTF(VT_RST); + PRINTF_RST(); return 0.0f; } return Math3D_Planef(nx, ny, nz, originDist, p) / normMagnitude; diff --git a/src/code/z_DLF.c b/src/code/z_DLF.c index 547dc4bbb..f56fcc742 100644 --- a/src/code/z_DLF.c +++ b/src/code/z_DLF.c @@ -18,12 +18,12 @@ void Overlay_LoadGameState(GameStateOverlay* overlayEntry) { return; } - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("OVL(d):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", overlayEntry->vramStart, overlayEntry->vramEnd, overlayEntry->loadedRamAddr, (u32)overlayEntry->loadedRamAddr + (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart, (u32)overlayEntry->vramStart - (u32)overlayEntry->loadedRamAddr, ""); - PRINTF(VT_RST); + PRINTF_RST(); if (overlayEntry->unk_14 != NULL) { overlayEntry->unk_14 = (void*)((u32)overlayEntry->unk_14 - diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 487b4749b..c0633747f 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3057,7 +3057,7 @@ Actor* Actor_RemoveFromCategory(PlayState* play, ActorContext* actorCtx, Actor* } void Actor_FreeOverlay(ActorOverlay* actorOverlay) { - PRINTF(VT_FGCOL(CYAN)); + PRINTF_COLOR_CYAN(); if (actorOverlay->numLoaded == 0) { ACTOR_DEBUG_PRINTF(T("アクタークライアントが0になりました\n", "Actor clients are now 0\n")); @@ -3080,7 +3080,7 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) { actorOverlay->numLoaded); } - PRINTF(VT_RST); + PRINTF_RST(); } Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, @@ -3146,13 +3146,13 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos Overlay_Load(overlayEntry->file.vromStart, overlayEntry->file.vromEnd, overlayEntry->vramStart, overlayEntry->vramEnd, overlayEntry->loadedRamAddr); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("OVL(a):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", overlayEntry->vramStart, overlayEntry->vramEnd, overlayEntry->loadedRamAddr, (uintptr_t)overlayEntry->loadedRamAddr + (uintptr_t)overlayEntry->vramEnd - (uintptr_t)overlayEntry->vramStart, (uintptr_t)overlayEntry->vramStart - (uintptr_t)overlayEntry->loadedRamAddr, name); - PRINTF(VT_RST); + PRINTF_RST(); overlayEntry->numLoaded = 0; } diff --git a/src/code/z_bg_collect.c b/src/code/z_bg_collect.c index 2bdfc6bcd..bd349765d 100644 --- a/src/code/z_bg_collect.c +++ b/src/code/z_bg_collect.c @@ -40,14 +40,14 @@ void DynaPolyActor_UpdateCarriedActorPos(CollisionContext* colCtx, s32 bgId, Act if (BGCHECK_XYZ_ABSMAX <= pos.x || pos.x <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.y || pos.y <= -BGCHECK_XYZ_ABSMAX || BGCHECK_XYZ_ABSMAX <= pos.z || pos.z <= -BGCHECK_XYZ_ABSMAX) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); //! @bug file and line are not passed to PRINTF PRINTF(T("BGCheckCollection_typicalActorPos():位置が妥当ではありません。\n" "pos (%f,%f,%f) file:%s line:%d\n", "BGCheckCollection_typicalActorPos(): Position is not valid. \n" "pos (%f,%f,%f) file:%s line:%d\n"), pos.x, pos.y, pos.z); - PRINTF(VT_RST); + PRINTF_RST(); } #endif } diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index c8b0e491d..4310d1d9c 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -89,11 +89,11 @@ u16 sSurfaceMaterialToSfxOffset[SURFACE_MATERIAL_MAX] = { s32 BgCheck_PosErrorCheck(Vec3f* pos, const char* file, int line) { if (pos->x >= BGCHECK_XYZ_ABSMAX || pos->x <= -BGCHECK_XYZ_ABSMAX || pos->y >= BGCHECK_XYZ_ABSMAX || pos->y <= -BGCHECK_XYZ_ABSMAX || pos->z >= BGCHECK_XYZ_ABSMAX || pos->z <= -BGCHECK_XYZ_ABSMAX) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("T_BGCheck_PosErrorCheck():位置が妥当ではありません。pos (%f,%f,%f) file:%s line:%d\n", "T_BGCheck_PosErrorCheck(): Position is invalid. pos (%f,%f,%f) file:%s line:%d\n"), pos->x, pos->y, pos->z, file, line); - PRINTF(VT_RST); + PRINTF_RST(); return true; } return false; @@ -307,11 +307,11 @@ void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionCon Vec3s* vtxList; if (poly == NULL || bgId > BG_ACTOR_MAX || dest == NULL) { - PRINTF(VT_COL(RED, WHITE)); + PRINTF_COLOR_ERROR(); PRINTF(T("T_Polygon_GetVertex_bg_ai(): Error %d %d %d 引数が適切ではありません。処理を終了します。\n", "T_Polygon_GetVertex_bg_ai(): Error %d %d %d Argument not appropriate. Processing terminated.\n"), poly == NULL, bgId > BG_ACTOR_MAX, dest == NULL); - PRINTF(VT_RST); + PRINTF_RST(); if (dest != NULL) { //! @bug: dest[2] x and y are not set to 0 @@ -1648,10 +1648,10 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader SSNodeList_Alloc(play, &colCtx->polyNodes, tblMax, colCtx->colHeader->numPolygons); lookupTblMemSize = BgCheck_InitializeStaticLookup(colCtx, play, colCtx->lookupTbl); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("/*---結局 BG使用サイズ %dbyte---*/\n", "/*---BG size used in the end %dbyte---*/\n"), memSize + lookupTblMemSize); - PRINTF(VT_RST); + PRINTF_RST(); DynaPoly_Init(play, &colCtx->dyna); DynaPoly_Alloc(play, &colCtx->dyna); @@ -1669,10 +1669,10 @@ CollisionHeader* BgCheck_GetCollisionHeader(CollisionContext* colCtx, s32 bgId) return NULL; } if (!(colCtx->dyna.bgActorFlags[bgId] & BGACTOR_IN_USE)) { - PRINTF(VT_COL(YELLOW, BLACK)); + PRINTF_COLOR_WARNING(); PRINTF(T("T_BGCheck_getBGDataInfo():そのbg_actor_indexは使われておりません。index=%d\n", "T_BGCheck_getBGDataInfo(): That bg_actor_index is not in use. index=%d\n")); - PRINTF(VT_RST); + PRINTF_RST(); return NULL; } return colCtx->dyna.bgActors[bgId].colHeader; @@ -2738,10 +2738,10 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto } if (!foundSlot) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("DynaPolyInfo_setActor():ダイナミックポリゴン 空きインデックスはありません\n", "DynaPolyInfo_setActor(): Dynamic polygon no free indexes\n")); - PRINTF(VT_RST); + PRINTF_RST(); return BG_ACTOR_MAX; } @@ -2749,9 +2749,9 @@ s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* acto dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP; dyna->bgActorFlags[bgId] &= ~BGACTOR_1; - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("DynaPolyInfo_setActor():index %d\n", bgId); - PRINTF(VT_RST); + PRINTF_RST(); return bgId; } @@ -2801,27 +2801,27 @@ void DynaPoly_EnableCeilingCollision(PlayState* play, DynaCollisionContext* dyna void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgId) { DynaPolyActor* actor; - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("DynaPolyInfo_delReserve():index %d\n", bgId); - PRINTF(VT_RST); + PRINTF_RST(); if (!DynaPoly_IsBgIdBgActor(bgId)) { #if DEBUG_FEATURES if (bgId == -1) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("DynaPolyInfo_delReserve():削除されているはずの(?)\n" "インデックス(== -1)のため,処理を中止します。\n", "DynaPolyInfo_delReserve():The index that should have been deleted(?)\n" " was(== -1), processing aborted.\n")); - PRINTF(VT_RST); + PRINTF_RST(); } else { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("DynaPolyInfo_delReserve():" "確保していない/出来なかったインデックスの解放のため、処理を中止します。index == %d\n", "DynaPolyInfo_delReserve():" " Unable to deallocate index / index unallocated, processing aborted. index == %d\n"), bgId); - PRINTF(VT_RST); + PRINTF_RST(); } #endif @@ -2880,14 +2880,14 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3 #if DEBUG_FEATURES if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n", "DynaPolyInfo_expandSRT():polygon over do not use if %d exceeds %d\n"), *polyStartIndex + pbgdata->numPolygons, dyna->polyListMax); } if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n", "DynaPolyInfo_expandSRT():vertex over do not use if %d exceeds %d\n"), *vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax); @@ -3067,9 +3067,9 @@ void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) { for (i = 0; i < BG_ACTOR_MAX; i++) { if (dyna->bgActorFlags[i] & BGACTOR_1) { // Initialize BgActor - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("DynaPolyInfo_setup():削除 index=%d\n", "DynaPolyInfo_setup(): Delete index=%d\n"), i); - PRINTF(VT_RST); + PRINTF_RST(); dyna->bgActorFlags[i] = 0; BgActor_Initialize(play, &dyna->bgActors[i]); @@ -3077,9 +3077,9 @@ void DynaPoly_UpdateContext(PlayState* play, DynaCollisionContext* dyna) { } if (dyna->bgActors[i].actor != NULL && dyna->bgActors[i].actor->update == NULL) { // Delete BgActor - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("DynaPolyInfo_setup():削除 index=%d\n", "DynaPolyInfo_setup(): Delete index=%d\n"), i); - PRINTF(VT_RST); + PRINTF_RST(); actor = DynaPoly_GetActor(&play->colCtx, i); if (actor == NULL) { return; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 0567fd15a..aa83c5e53 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -367,9 +367,9 @@ s32 Collider_SetJntSphToActor(PlayState* play, ColliderJntSph* dest, ColliderJnt if (dest->elements == NULL) { dest->count = 0; - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("ClObjJntSph_set():zelda_malloc()出来ません。\n", "ClObjJntSph_set():zelda_malloc() Can not.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return false; } @@ -395,9 +395,9 @@ s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* a if (dest->elements == NULL) { dest->count = 0; - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("ClObjJntSph_set3():zelda_malloc_出来ません。\n", "ClObjJntSph_set3():zelda_malloc_ Can not.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return false; } @@ -423,9 +423,9 @@ s32 Collider_SetJntSphAlloc(PlayState* play, ColliderJntSph* dest, Actor* actor, if (dest->elements == NULL) { dest->count = 0; - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("ClObjJntSph_set5():zelda_malloc出来ません\n", "ClObjJntSph_set5():zelda_malloc Can not\n")); - PRINTF(VT_RST); + PRINTF_RST(); return false; } for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count; @@ -729,9 +729,9 @@ s32 Collider_SetTrisAllocType1(PlayState* play, ColliderTris* dest, Actor* actor dest->elements = ZELDA_ARENA_MALLOC(dest->count * sizeof(ColliderTrisElement), "../z_collision_check.c", 2156); if (dest->elements == NULL) { dest->count = 0; - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("ClObjTris_set3():zelda_malloc()出来ません\n", "ClObjTris_set3():zelda_malloc() Can not\n")); - PRINTF(VT_RST); + PRINTF_RST(); return false; } for (destElem = dest->elements, srcElem = src->elements; destElem < dest->elements + dest->count; @@ -755,9 +755,9 @@ s32 Collider_SetTrisAlloc(PlayState* play, ColliderTris* dest, Actor* actor, Col dest->elements = ZELDA_ARENA_MALLOC(dest->count * sizeof(ColliderTrisElement), "../z_collision_check.c", 2207); if (dest->elements == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("ClObjTris_set5():zelda_malloc出来ません\n", "ClObjTris_set5():zelda_malloc Can not\n")); - PRINTF(VT_RST); + PRINTF_RST(); dest->count = 0; return false; } diff --git a/src/code/z_eff_shield_particle.c b/src/code/z_eff_shield_particle.c index c66934a4f..74cd6a435 100644 --- a/src/code/z_eff_shield_particle.c +++ b/src/code/z_eff_shield_particle.c @@ -18,10 +18,10 @@ void EffectShieldParticle_Init(void* thisx, void* initParamsx) { if ((this != NULL) && (initParams != NULL)) { this->numElements = initParams->numElements; if (this->numElements > ARRAY_COUNT(this->elements)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("EffectShieldParticle_ct():パーティクル数がオーバしてます。\n", "EffectShieldParticle_ct(): Number of particles exceeded.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return; } diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c index 4041426b4..9a3df7eef 100644 --- a/src/code/z_effect_soft_sprite.c +++ b/src/code/z_effect_soft_sprite.c @@ -197,7 +197,7 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) { overlayEntry->loadedRamAddr = ZELDA_ARENA_MALLOC_R(overlaySize, "../z_effect_soft_sprite.c", 585); if (overlayEntry->loadedRamAddr == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("EffectSoftSprite2_makeEffect():zelda_malloc_r()により,%dbyteのメモリ確保ができま\n" "せん。そのため、プログラムのロードも\n" "出来ません。ただいま危険な状態です!\n" @@ -207,18 +207,18 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) { "cannot be loaded. What a dangerous situation!\n" "Naturally, effects will not be produced either.\n"), overlaySize); - PRINTF(VT_RST); + PRINTF_RST(); return; } Overlay_Load(overlayEntry->file.vromStart, overlayEntry->file.vromEnd, overlayEntry->vramStart, overlayEntry->vramEnd, overlayEntry->loadedRamAddr); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("EFFECT SS OVL:SegRom %08x %08x, Seg %08x %08x, RamStart %08x, type: %d\n", overlayEntry->file.vromStart, overlayEntry->file.vromEnd, overlayEntry->vramStart, overlayEntry->vramEnd, overlayEntry->loadedRamAddr, type); - PRINTF(VT_RST); + PRINTF_RST(); } profile = (void*)(uintptr_t)((overlayEntry->profile != NULL) @@ -246,14 +246,14 @@ void EffectSs_Spawn(PlayState* play, s32 type, s32 priority, void* initParams) { sEffectSsInfo.table[index].priority = priority; if (profile->init(play, index, &sEffectSsInfo.table[index], initParams) == 0) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("EffectSoftSprite2_makeEffect():" "何らかの理由でコンストラクト失敗。コンストラクターがエラーを返しました。" "エフェクトの追加を中止します。\n", "EffectSoftSprite2_makeEffect(): " "Construction failed for some reason. The constructor returned an error. " "Ceasing effect addition.\n")); - PRINTF(VT_RST); + PRINTF_RST(); EffectSs_Reset(&sEffectSsInfo.table[index]); } } @@ -313,7 +313,7 @@ void EffectSs_DrawAll(PlayState* play) { if ((sEffectSsInfo.table[i].pos.x > 32000.0f) || (sEffectSsInfo.table[i].pos.x < -32000.0f) || (sEffectSsInfo.table[i].pos.y > 32000.0f) || (sEffectSsInfo.table[i].pos.y < -32000.0f) || (sEffectSsInfo.table[i].pos.z > 32000.0f) || (sEffectSsInfo.table[i].pos.z < -32000.0f)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("EffectSoftSprite2_disp():位置が領域外のため " "削除します。エフェクトラベルNo.%d:プログラムの方で対応をお願いします。ここです ==> " "pos(%f, %f, %f)で、ラベルはz_effect_soft_sprite_dlftbls.declにあります。\n", @@ -322,10 +322,10 @@ void EffectSs_DrawAll(PlayState* play) { "pos(%f, %f, %f) and the label is in z_effect_soft_sprite_dlftbls.decl.\n"), sEffectSsInfo.table[i].type, sEffectSsInfo.table[i].pos.x, sEffectSsInfo.table[i].pos.y, sEffectSsInfo.table[i].pos.z); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("もし、posを別のことに使っている場合相談に応じます。\n", "If you are using pos for something else, consult me.\n")); - PRINTF(VT_RST); + PRINTF_RST(); EffectSs_Delete(&sEffectSsInfo.table[i]); } else { diff --git a/src/code/z_horse.c b/src/code/z_horse.c index 2935a66f8..f6f55c9d0 100644 --- a/src/code/z_horse.c +++ b/src/code/z_horse.c @@ -115,11 +115,11 @@ void Horse_SetupInGameplay(PlayState* play, Player* player) { horseActor->room = -1; } } else { - PRINTF(VT_COL(RED, WHITE)); + PRINTF_COLOR_ERROR(); PRINTF( T("Horse_SetNormal():%d セットスポットまずいです。\n", "Horse_SetNormal():%d set spot is no good.\n"), gSaveContext.save.info.horseData.sceneId); - PRINTF(VT_RST); + PRINTF_RST(); Horse_ResetHorseData(play); } } else if ((play->sceneId == SCENE_LON_LON_RANCH) && @@ -291,11 +291,11 @@ void Horse_SetupInCutscene(PlayState* play, Player* player) { void Horse_InitPlayerHorse(PlayState* play, Player* player) { if (LINK_IS_ADULT) { if (!Horse_CanSpawn(gSaveContext.save.info.horseData.sceneId)) { - PRINTF(VT_COL(RED, WHITE)); + PRINTF_COLOR_ERROR(); PRINTF( T("Horse_Set_Check():%d セットスポットまずいです。\n", "Horse_Set_Check():%d set spot is no good.\n"), gSaveContext.save.info.horseData.sceneId); - PRINTF(VT_RST); + PRINTF_RST(); Horse_ResetHorseData(play); } diff --git a/src/code/z_jpeg.c b/src/code/z_jpeg.c index 83ec5aafd..86a97183a 100644 --- a/src/code/z_jpeg.c +++ b/src/code/z_jpeg.c @@ -337,9 +337,9 @@ s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize) { x = y = 0; for (i = 0; i < 300; i += 4) { if (JpegDecoder_Decode(&decoder, (u16*)workBuff->data, 4, i != 0, &state)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF("Error : Can't decode jpeg\n"); - PRINTF(VT_RST); + PRINTF_RST(); } else { Jpeg_ScheduleDecoderTask(&ctx); osInvalDCache(&workBuff->data, sizeof(workBuff->data[0])); diff --git a/src/code/z_kaleido_manager.c b/src/code/z_kaleido_manager.c index 761d1fb9e..42ec59fd0 100644 --- a/src/code/z_kaleido_manager.c +++ b/src/code/z_kaleido_manager.c @@ -19,11 +19,11 @@ void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl) { ovl->loadedRamAddr = sKaleidoAreaPtr; Overlay_Load(ovl->file.vromStart, ovl->file.vromEnd, ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("OVL(k):Seg:%08x-%08x Ram:%08x-%08x Off:%08x %s\n", ovl->vramStart, ovl->vramEnd, ovl->loadedRamAddr, (uintptr_t)ovl->loadedRamAddr + (uintptr_t)ovl->vramEnd - (uintptr_t)ovl->vramStart, (uintptr_t)ovl->vramStart - (uintptr_t)ovl->loadedRamAddr, ovl->name); - PRINTF(VT_RST); + PRINTF_RST(); ovl->offset = (uintptr_t)ovl->loadedRamAddr - (uintptr_t)ovl->vramStart; gKaleidoMgrCurOvl = ovl; @@ -50,17 +50,17 @@ void KaleidoManager_Init(PlayState* play) { } } - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("KaleidoArea の最大サイズは %d バイトを確保します\n", "The maximum size of KaleidoArea is %d bytes\n"), largestSize); - PRINTF(VT_RST); + PRINTF_RST(); sKaleidoAreaPtr = GAME_STATE_ALLOC(&play->state, largestSize, "../z_kaleido_manager.c", 150); LOG_UTILS_CHECK_NULL_POINTER("KaleidoArea_allocp", sKaleidoAreaPtr, "../z_kaleido_manager.c", 151); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("KaleidoArea %08x - %08x\n", sKaleidoAreaPtr, (uintptr_t)sKaleidoAreaPtr + largestSize); - PRINTF(VT_RST); + PRINTF_RST(); gKaleidoMgrCurOvl = NULL; } diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c index 69d2b2d9b..5dd08566d 100644 --- a/src/code/z_kaleido_scope_call.c +++ b/src/code/z_kaleido_scope_call.c @@ -18,16 +18,16 @@ void KaleidoScopeCall_LoadPlayer(void) { if (gKaleidoMgrCurOvl != playerActorOvl) { if (gKaleidoMgrCurOvl != NULL) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("カレイド領域 強制排除\n", "Kaleido area forced exclusion\n")); - PRINTF(VT_RST); + PRINTF_RST(); KaleidoManager_ClearOvl(gKaleidoMgrCurOvl); } - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("プレイヤーアクター搬入\n", "Player actor import\n")); - PRINTF(VT_RST); + PRINTF_RST(); KaleidoManager_LoadOvl(playerActorOvl); } @@ -90,16 +90,16 @@ void KaleidoScopeCall_Update(PlayState* play) { } else if (pauseCtx->state != PAUSE_STATE_OFF) { if (gKaleidoMgrCurOvl != kaleidoScopeOvl) { if (gKaleidoMgrCurOvl != NULL) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("カレイド領域 プレイヤー 強制排除\n", "Kaleido area Player Forced Elimination\n")); - PRINTF(VT_RST); + PRINTF_RST(); KaleidoManager_ClearOvl(gKaleidoMgrCurOvl); } - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("カレイド領域 カレイドスコープ搬入\n", "Kaleido area Kaleidoscope loading\n")); - PRINTF(VT_RST); + PRINTF_RST(); KaleidoManager_LoadOvl(kaleidoScopeOvl); } @@ -108,9 +108,9 @@ void KaleidoScopeCall_Update(PlayState* play) { sKaleidoScopeUpdateFunc(play); if (!IS_PAUSED(&play->pauseCtx)) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("カレイド領域 カレイドスコープ排出\n", "Kaleido area Kaleidoscope Emission\n")); - PRINTF(VT_RST); + PRINTF_RST(); KaleidoManager_ClearOvl(kaleidoScopeOvl); KaleidoScopeCall_LoadPlayer(); diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 52e88c1f6..c658775da 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -30,12 +30,12 @@ void Map_SetPaletteData(PlayState* play, s16 room) { interfaceCtx->mapPaletteIndex = paletteIndex; } - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("PALETEセット 【 i=%x : room=%x 】Room_Inf[%d][4]=%x ( map_palete_no = %d )\n", "PALETE Set 【 i=%x : room=%x 】Room_Inf[%d][4]=%x ( map_palete_no = %d )\n"), paletteIndex, room, mapIndex, gSaveContext.save.info.sceneFlags[mapIndex].rooms, interfaceCtx->mapPaletteIndex); - PRINTF(VT_RST); + PRINTF_RST(); interfaceCtx->mapPalette[paletteIndex * 2] = 2; interfaceCtx->mapPalette[paletteIndex * 2 + 1] = 0xBF; @@ -130,9 +130,9 @@ void Map_InitData(PlayState* play, s16 room) { extendedMapIndex = 0x17; } } - PRINTF(VT_FGCOL(BLUE)); + PRINTF_COLOR_BLUE(); PRINTF("KKK=%d\n", extendedMapIndex); - PRINTF(VT_RST); + PRINTF_RST(); sEntranceIconMapIndex = extendedMapIndex; DMA_REQUEST_SYNC(interfaceCtx->mapSegment, (uintptr_t)_map_grand_staticSegmentRomStart + @@ -158,11 +158,11 @@ void Map_InitData(PlayState* play, s16 room) { case SCENE_WATER_TEMPLE_BOSS: case SCENE_SPIRIT_TEMPLE_BOSS: case SCENE_SHADOW_TEMPLE_BOSS: - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("デクの樹ダンジョンMAP テクスチャDMA(%x) scene_id_offset=%d VREG(30)=%d\n", "Deku Tree Dungeon MAP Texture DMA(%x) scene_id_offset=%d VREG(30)=%d\n"), room, mapIndex, VREG(30)); - PRINTF(VT_RST); + PRINTF_RST(); #if PLATFORM_N64 if ((B_80121220 != NULL) && (B_80121220->unk_28 != NULL) && B_80121220->unk_28(play)) { @@ -219,9 +219,9 @@ void Map_InitRoomData(PlayState* play, s16 room) { interfaceCtx->mapRoomNum = room; interfaceCtx->unk_25A = mapIndex; Map_SetPaletteData(play, room); - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("部屋部屋=%d\n", "Room Room = %d\n"), room); - PRINTF(VT_RST); + PRINTF_RST(); Map_InitData(play, room); break; } @@ -600,9 +600,9 @@ void Map_Update(PlayState* play) { if ((interfaceCtx->mapRoomNum == gMapData->switchFromRoom[mapIndex][i]) && (floor == gMapData->switchFromFloor[mapIndex][i])) { interfaceCtx->mapRoomNum = gMapData->switchToRoom[mapIndex][i]; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("階層切替=%x\n", "Layer switching = %x\n"), interfaceCtx->mapRoomNum); - PRINTF(VT_RST); + PRINTF_RST(); Map_InitData(play, interfaceCtx->mapRoomNum); gSaveContext.sunsSongState = SUNSSONG_INACTIVE; Map_SavePlayerInitialInfo(play); diff --git a/src/code/z_message.c b/src/code/z_message.c index e17b5f3aa..bfef10aa5 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -2515,9 +2515,9 @@ void Message_OpenText(PlayState* play, u16 textId) { msgCtx->textId = textId; if (textId == 0x2030) { // Talking to Ingo as adult in Lon Lon Ranch for the first time before freeing Epona - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("???????????????? z_message.c ??????????????????\n"); - PRINTF(VT_RST); + PRINTF_RST(); gSaveContext.eventInf[0] = gSaveContext.eventInf[1] = gSaveContext.eventInf[2] = gSaveContext.eventInf[3] = 0; } @@ -2657,9 +2657,9 @@ void Message_OpenText(PlayState* play, u16 textId) { void Message_StartTextbox(PlayState* play, u16 textId, Actor* actor) { MessageContext* msgCtx = &play->msgCtx; - PRINTF(VT_FGCOL(BLUE)); + PRINTF_COLOR_BLUE(); PRINTF(T("めっせーじ=%x(%d)\n", "Message=%x(%d)\n"), textId, actor); - PRINTF(VT_RST); + PRINTF_RST(); msgCtx->ocarinaAction = 0xFFFF; Message_OpenText(play, textId); @@ -2677,9 +2677,9 @@ void Message_ContinueTextbox(PlayState* play, u16 textId) { s32 pad2[3]; #endif - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("めっせーじ=%x message->msg_data\n", "Message=%x message->msg_data\n"), textId, msgCtx->msgLength); - PRINTF(VT_RST); + PRINTF_RST(); msgCtx->msgLength = 0; Message_OpenText(play, textId); @@ -2719,7 +2719,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) { s16 noStopDoAction; s32 k; - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); for (i = sOcarinaSongBitFlags = 0; i <= (QUEST_SONG_STORMS - QUEST_SONG_MINUET); i++) { if (CHECK_QUEST_ITEM(QUEST_SONG_MINUET + i)) { @@ -2731,7 +2731,7 @@ void Message_StartOcarinaImpl(PlayState* play, u16 ocarinaActionId) { sOcarinaSongBitFlags |= (1 << OCARINA_SONG_SCARECROW_SPAWN); } PRINTF("ocarina_bit = %x\n", sOcarinaSongBitFlags); - PRINTF(VT_RST); + PRINTF_RST(); sHasSunsSong = CHECK_QUEST_ITEM(QUEST_SONG_SUN); msgCtx->ocarinaStaff = AudioOcarina_GetRecordingStaff(); @@ -3352,11 +3352,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) { msgCtx->stateTimer--; if (msgCtx->stateTimer == 0) { AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("Na_StopOcarinaMode();\n"); PRINTF("Na_StopOcarinaMode();\n"); PRINTF("Na_StopOcarinaMode();\n"); - PRINTF(VT_RST); + PRINTF_RST(); Message_Decode(play); msgCtx->msgMode = MSGMODE_SETUP_DISPLAY_SONG_PLAYED; msgCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff(); @@ -3456,7 +3456,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) { if (msgCtx->lastPlayedSong == OCARINA_SONG_EPONAS) { R_EPONAS_SONG_PLAYED = true; } - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("☆☆☆ocarina=%d message->ocarina_no=%d ", msgCtx->lastPlayedSong, msgCtx->ocarinaAction); if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY_DONE) { @@ -3465,7 +3465,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) { play->msgCtx.ocarinaMode = OCARINA_MODE_0B; } } else if (msgCtx->ocarinaAction >= OCARINA_ACTION_CHECK_MINUET) { - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("Ocarina_PC_Wind=%d(%d) ☆☆☆ ", OCARINA_ACTION_CHECK_MINUET, msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET); if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_CHECK_MINUET)) { @@ -3474,7 +3474,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) { play->msgCtx.ocarinaMode = msgCtx->lastPlayedSong - 1; } } else { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("Ocarina_C_Wind=%d(%d) ☆☆☆ ", OCARINA_ACTION_PLAYBACK_MINUET, msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET); if (msgCtx->lastPlayedSong == (msgCtx->ocarinaAction - OCARINA_ACTION_PLAYBACK_MINUET)) { @@ -3483,7 +3483,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) { play->msgCtx.ocarinaMode = OCARINA_MODE_04; } } - PRINTF(VT_RST); + PRINTF_RST(); PRINTF("→ OCARINA_MODE=%d\n", play->msgCtx.ocarinaMode); } } @@ -3529,10 +3529,10 @@ void Message_DrawMain(PlayState* play, Gfx** p) { msgCtx->lastPlayedSong = msgCtx->ocarinaStaff->state; msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_SUCCESS; Item_Give(play, ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state]); - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("z_message.c 取得メロディ=%d\n", "z_message.c Song Acquired = %d\n"), ITEM_SONG_MINUET + msgCtx->ocarinaStaff->state); - PRINTF(VT_RST); + PRINTF_RST(); msgCtx->stateTimer = 20; Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); @@ -3600,14 +3600,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) { Message_CloseTextbox(play); PRINTF( T("録音終了!!!!!!!!!録音終了\n", "Recording complete!!!!!!!!! Recording Complete\n")); - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("\n====================================================================\n"); MemCpy(gSaveContext.save.info.scarecrowLongSong, gScarecrowLongSongPtr, sizeof(gSaveContext.save.info.scarecrowLongSong)); for (i = 0; i < ARRAY_COUNT(gSaveContext.save.info.scarecrowLongSong); i++) { PRINTF("%d, ", gSaveContext.save.info.scarecrowLongSong[i]); } - PRINTF(VT_RST); + PRINTF_RST(); PRINTF("\n====================================================================\n"); } DRAW_TEXT(play, &gfx, false); @@ -3665,14 +3665,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) { msgCtx->msgMode = MSGMODE_SCARECROW_SPAWN_RECORDING_DONE; Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("\n====================================================================\n"); MemCpy(gSaveContext.save.info.scarecrowSpawnSong, gScarecrowSpawnSongPtr, sizeof(gSaveContext.save.info.scarecrowSpawnSong)); for (i = 0; i < ARRAY_COUNT(gSaveContext.save.info.scarecrowSpawnSong); i++) { PRINTF("%d, ", gSaveContext.save.info.scarecrowSpawnSong[i]); } - PRINTF(VT_RST); + PRINTF_RST(); PRINTF("\n====================================================================\n"); } else if (msgCtx->ocarinaStaff->state == OCARINA_RECORD_REJECTED || CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B)) { @@ -4289,7 +4289,7 @@ void Message_Update(PlayState* play) { gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL; } if (play->csCtx.state == 0) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("day_time=%x active_camera=%d ", gSaveContext.save.cutsceneIndex, play->activeCamId); if (msgCtx->textId != 0x2061 && msgCtx->textId != 0x2025 && msgCtx->textId != 0x208C && @@ -4307,7 +4307,7 @@ void Message_Update(PlayState* play) { } } } - PRINTF(VT_RST); + PRINTF_RST(); msgCtx->msgLength = 0; msgCtx->msgMode = MSGMODE_NONE; interfaceCtx->unk_1FA = interfaceCtx->unk_1FC = 0; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 7987cccd1..7bd399d1e 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1135,7 +1135,7 @@ void Interface_SetSceneRestrictions(PlayState* play) { interfaceCtx->restrictions.dinsNayrus = (sRestrictionFlags[i].flags3 & 0x0C) >> 2; interfaceCtx->restrictions.all = (sRestrictionFlags[i].flags3 & 0x03) >> 0; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("parameter->button_status = %x,%x,%x\n", sRestrictionFlags[i].flags1, sRestrictionFlags[i].flags2, sRestrictionFlags[i].flags3); PRINTF("h_gage=%d, b_button=%d, a_button=%d, c_bottle=%d\n", interfaceCtx->restrictions.hGauge, @@ -1147,7 +1147,7 @@ void Interface_SetSceneRestrictions(PlayState* play) { PRINTF("c_sunmoon=%d, m_wind=%d, m_magic=%d, another=%d\n", interfaceCtx->restrictions.sunsSong, interfaceCtx->restrictions.farores, interfaceCtx->restrictions.dinsNayrus, interfaceCtx->restrictions.all); - PRINTF(VT_RST); + PRINTF_RST(); return; } i++; @@ -1376,16 +1376,16 @@ u8 Item_Give(PlayState* play, u8 item) { slot = SLOT(sExtraItemBases[item - ITEM_DEKU_STICKS_5]); } - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("item_get_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.save.info.inventory.items[slot]); - PRINTF(VT_RST); + PRINTF_RST(); if ((item >= ITEM_MEDALLION_FOREST) && (item <= ITEM_MEDALLION_LIGHT)) { gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_MEDALLION_FOREST + QUEST_MEDALLION_FOREST]; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("封印 = %x\n", "Seals = %x\n"), gSaveContext.save.info.inventory.questItems); - PRINTF(VT_RST); + PRINTF_RST(); if (item == ITEM_MEDALLION_WATER) { Horse_FixLakeHyliaPosition(play); @@ -1395,38 +1395,38 @@ u8 Item_Give(PlayState* play, u8 item) { } else if ((item >= ITEM_SONG_MINUET) && (item <= ITEM_SONG_STORMS)) { gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_SONG_MINUET + QUEST_SONG_MINUET]; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("楽譜 = %x\n", "Musical scores = %x\n"), gSaveContext.save.info.inventory.questItems); PRINTF(T("楽譜 = %x (%x) (%x)\n", "Musical scores = %x (%x) (%x)\n"), gSaveContext.save.info.inventory.questItems, gBitFlags[item - ITEM_SONG_MINUET + QUEST_SONG_MINUET], gBitFlags[item - ITEM_SONG_MINUET]); - PRINTF(VT_RST); + PRINTF_RST(); return ITEM_NONE; } else if ((item >= ITEM_KOKIRI_EMERALD) && (item <= ITEM_ZORA_SAPPHIRE)) { gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_KOKIRI_EMERALD + QUEST_KOKIRI_EMERALD]; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("精霊石 = %x\n", "Spiritual Stones = %x\n"), gSaveContext.save.info.inventory.questItems); - PRINTF(VT_RST); + PRINTF_RST(); return ITEM_NONE; } else if ((item == ITEM_STONE_OF_AGONY) || (item == ITEM_GERUDOS_CARD)) { gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_STONE_OF_AGONY + QUEST_STONE_OF_AGONY]; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("アイテム = %x\n", "Items = %x\n"), gSaveContext.save.info.inventory.questItems); - PRINTF(VT_RST); + PRINTF_RST(); return ITEM_NONE; } else if (item == ITEM_SKULL_TOKEN) { gSaveContext.save.info.inventory.questItems |= gBitFlags[item - ITEM_SKULL_TOKEN + QUEST_SKULL_TOKEN]; gSaveContext.save.info.inventory.gsTokens++; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("Nコイン = %x(%d)\n", "N Coins = %x(%d)\n"), gSaveContext.save.info.inventory.questItems, gSaveContext.save.info.inventory.gsTokens); - PRINTF(VT_RST); + PRINTF_RST(); return ITEM_NONE; } else if ((item >= ITEM_SWORD_KOKIRI) && (item <= ITEM_SWORD_BIGGORON)) { @@ -1869,9 +1869,9 @@ u8 Item_CheckObtainability(u8 item) { slot = SLOT(sExtraItemBases[item - ITEM_DEKU_STICKS_5]); } - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("item_get_non_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.save.info.inventory.items[slot]); - PRINTF(VT_RST); + PRINTF_RST(); if ((item >= ITEM_MEDALLION_FOREST) && (item <= ITEM_MEDALLION_LIGHT)) { return ITEM_NONE; @@ -4277,13 +4277,13 @@ void Interface_Update(PlayState* play) { if (gSaveContext.save.info.playerData.isMagicAcquired && (gSaveContext.save.info.playerData.magicLevel == 0)) { gSaveContext.save.info.playerData.magicLevel = gSaveContext.save.info.playerData.isDoubleMagicAcquired + 1; gSaveContext.magicState = MAGIC_STATE_STEP_CAPACITY; - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("魔法スター─────ト!!!!!!!!!\n", "Magic Start!!!!!!!!!\n")); PRINTF("MAGIC_MAX=%d\n", gSaveContext.save.info.playerData.magicLevel); PRINTF("MAGIC_NOW=%d\n", gSaveContext.save.info.playerData.magic); PRINTF("Z_MAGIC_NOW_NOW=%d\n", gSaveContext.magicFillTarget); PRINTF("Z_MAGIC_NOW_MAX=%d\n", gSaveContext.magicCapacity); - PRINTF(VT_RST); + PRINTF_RST(); } Magic_Update(play); diff --git a/src/code/z_room.c b/src/code/z_room.c index 2612e2450..0c5d37f55 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -611,14 +611,14 @@ u32 Room_SetupFirstRoom(PlayState* play, RoomContext* roomCtx) { } } - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF(T("部屋バッファサイズ=%08x(%5.1fK)\n", "Room buffer size=%08x(%5.1fK)\n"), roomBufferSize, roomBufferSize / 1024.0f); roomCtx->bufPtrs[0] = GAME_STATE_ALLOC(&play->state, roomBufferSize, "../z_room.c", 946); PRINTF(T("部屋バッファ開始ポインタ=%08x\n", "Room buffer initial pointer=%08x\n"), roomCtx->bufPtrs[0]); roomCtx->bufPtrs[1] = (void*)((uintptr_t)roomCtx->bufPtrs[0] + roomBufferSize); PRINTF(T("部屋バッファ終了ポインタ=%08x\n", "Room buffer end pointer=%08x\n"), roomCtx->bufPtrs[1]); - PRINTF(VT_RST); + PRINTF_RST(); roomCtx->activeBufPage = 0; roomCtx->status = 0; diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 22d99dda9..e285587d9 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -87,9 +87,9 @@ void Object_InitContext(PlayState* play, ObjectContext* objectCtx) { objectCtx->slots[i].id = OBJECT_INVALID; } - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF(T("オブジェクト入れ替えバンク情報 %8.3fKB\n", "Object exchange bank data %8.3fKB\n"), spaceSize / 1024.0f); - PRINTF(VT_RST); + PRINTF_RST(); objectCtx->spaceStart = objectCtx->slots[0].segment = GAME_STATE_ALLOC(&play->state, spaceSize, "../z_scene.c", 219); @@ -195,9 +195,9 @@ s32 Scene_ExecuteCommands(PlayState* play, SceneCmd* sceneCmd) { if (cmdCode < ARRAY_COUNT(sSceneCmdHandlers)) { sSceneCmdHandlers[cmdCode](play, sceneCmd); } else { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("code の値が異常です\n", "code variable is abnormal\n")); - PRINTF(VT_RST); + PRINTF_RST(); } sceneCmd++; diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index d21981510..49502f4ec 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -71,9 +71,9 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, Over Vec3s rot; if (skeleton == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Si2_Lod_draw():skelがNULLです。\n", "Si2_Lod_draw(): skel is NULL.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return; } @@ -184,9 +184,9 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable, Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, dListCount * sizeof(Mtx)); if (skeleton == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Si2_Lod_draw_SV():skelがNULLです。\n", "Si2_Lod_draw_SV(): skel is NULL.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return; } @@ -287,9 +287,9 @@ void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, Over Vec3s rot; if (skeleton == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Si2_draw():skelがNULLです。\n", "Si2_draw(): skel is NULL.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return; } @@ -400,9 +400,9 @@ void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable, Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, dListCount * sizeof(Mtx)); if (skeleton == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Si2_draw_SV():skelがNULLです。\n", "Si2_draw_SV(): skel is NULL.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return; } @@ -553,9 +553,9 @@ Gfx* SkelAnime_Draw(PlayState* play, void** skeleton, Vec3s* jointTable, Overrid Vec3s rot; if (skeleton == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Si2_draw2():skelがNULLです。NULLを返します。\n", "Si2_draw2(): skel is NULL. Returns NULL.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return NULL; } @@ -661,9 +661,9 @@ Gfx* SkelAnime_DrawFlex(PlayState* play, void** skeleton, Vec3s* jointTable, s32 Mtx* mtx = GRAPH_ALLOC(play->state.gfxCtx, dListCount * sizeof(*mtx)); if (skeleton == NULL) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Si2_draw2_SV():skelがNULLです。NULLを返します。\n", "Si2_draw2_SV(): skel is NULL. Returns NULL.\n")); - PRINTF(VT_RST); + PRINTF_RST(); return NULL; } @@ -1129,10 +1129,10 @@ void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeade } if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n", "Skeleton_Info_Rom_SV_ct Memory allocation error\n")); - PRINTF(VT_RST); + PRINTF_RST(); } LinkAnimation_Change(play, skelAnime, animation, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f); @@ -1443,9 +1443,9 @@ BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHe skelAnime->morphTable = morphTable; } if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Skeleton_Info2_ct メモリアロケーションエラー\n", "Skeleton_Info2_ct Memory allocation error\n")); - PRINTF(VT_RST); + PRINTF_RST(); } if (animation != NULL) { @@ -1476,10 +1476,10 @@ BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSk skelAnime->morphTable = morphTable; } if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Skeleton_Info_Rom_SV_ct メモリアロケーションエラー\n", "Skeleton_Info_Rom_SV_ct Memory allocation error\n")); - PRINTF(VT_RST); + PRINTF_RST(); } if (animation != NULL) { @@ -1501,10 +1501,10 @@ BAD_RETURN(s32) SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, Skelet skelAnime->morphTable = ZELDA_ARENA_MALLOC(skelAnime->limbCount * sizeof(*skelAnime->morphTable), "../z_skelanime.c", 3121); if ((skelAnime->jointTable == NULL) || (skelAnime->morphTable == NULL)) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("Skeleton_Info2_skin2_ct メモリアロケーションエラー\n", "Skeleton_Info2_skin2_ct Memory allocation error\n")); - PRINTF(VT_RST); + PRINTF_RST(); } if (animation != NULL) { diff --git a/src/code/z_skin_matrix.c b/src/code/z_skin_matrix.c index e5d0dfe99..689fe6710 100644 --- a/src/code/z_skin_matrix.c +++ b/src/code/z_skin_matrix.c @@ -252,10 +252,10 @@ s32 SkinMatrix_Invert(MtxF* src, MtxF* dest) { // Reaching row = 4 means the column is either all 0 or a duplicate column. // Therefore src is a singular matrix (0 determinant). - PRINTF(VT_COL(YELLOW, BLACK)); + PRINTF_COLOR_WARNING(); PRINTF(T("Skin_Matrix_InverseMatrix():逆行列つくれません\n", "Skin_Matrix_InverseMatrix(): Cannot create inverse matrix\n")); - PRINTF(VT_RST); + PRINTF_RST(); return 2; } diff --git a/src/code/z_sram.c b/src/code/z_sram.c index cd3a2f13e..22d9cc07c 100644 --- a/src/code/z_sram.c +++ b/src/code/z_sram.c @@ -392,7 +392,7 @@ void Sram_OpenSave(SramContext* sramCtx) { MemCpy(&gSaveContext, sramCtx->readBuff + i, sizeof(Save)); - PRINTF(VT_FGCOL(YELLOW)); + PRINTF_COLOR_YELLOW(); PRINTF("SCENE_DATA_ID = %d SceneNo = %d\n", gSaveContext.save.info.playerData.savedSceneId, ((void)0, gSaveContext.save.entranceIndex)); @@ -465,14 +465,14 @@ void Sram_OpenSave(SramContext* sramCtx) { } PRINTF("scene_no = %d\n", gSaveContext.save.entranceIndex); - PRINTF(VT_RST); + PRINTF_RST(); if (gSaveContext.save.info.playerData.health < 0x30) { gSaveContext.save.info.playerData.health = 0x30; } if (gSaveContext.save.info.scarecrowLongSongSet) { - PRINTF(VT_FGCOL(BLUE)); + PRINTF_COLOR_BLUE(); PRINTF("\n====================================================================\n"); MemCpy(gScarecrowLongSongPtr, gSaveContext.save.info.scarecrowLongSong, @@ -484,11 +484,11 @@ void Sram_OpenSave(SramContext* sramCtx) { } PRINTF("\n====================================================================\n"); - PRINTF(VT_RST); + PRINTF_RST(); } if (gSaveContext.save.info.scarecrowSpawnSongSet) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); PRINTF("\n====================================================================\n"); MemCpy(gScarecrowSpawnSongPtr, gSaveContext.save.info.scarecrowSpawnSong, @@ -500,7 +500,7 @@ void Sram_OpenSave(SramContext* sramCtx) { } PRINTF("\n====================================================================\n"); - PRINTF(VT_RST); + PRINTF_RST(); } // if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter @@ -993,11 +993,11 @@ void Sram_InitSram(GameState* gameState, SramContext* sramCtx) { PRINTF(T("GOOD!GOOD! サイズ=%d + %d = %d\n", "GOOD! GOOD! Size = %d + %d = %d\n"), sizeof(SaveInfo), 4, sizeof(SaveInfo) + 4); - PRINTF(VT_FGCOL(BLUE)); + PRINTF_COLOR_BLUE(); PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); PRINTF("Na_SetSoundOutputMode = %d\n", gSaveContext.audioSetting); - PRINTF(VT_RST); + PRINTF_RST(); func_800F6700(gSaveContext.audioSetting); } diff --git a/src/code/z_view.c b/src/code/z_view.c index 37e8ac9b0..5b68f00bf 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -647,11 +647,11 @@ s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ) { } if (error != 0) { - PRINTF(VT_FGCOL(RED)); + PRINTF_COLOR_RED(); PRINTF(T("eye が大きすぎます eye=[%8.3f %8.3f %8.3f] error=%d\n", "eye is too large eye=[%8.3f %8.3f %8.3f] error=%d\n"), eyeX, eyeY, eyeZ, error); - PRINTF(VT_RST); + PRINTF_RST(); } return error; diff --git a/src/code/z_vr_box.c b/src/code/z_vr_box.c index d2aac8c1f..2e7953362 100644 --- a/src/code/z_vr_box.c +++ b/src/code/z_vr_box.c @@ -1030,7 +1030,7 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) { // Precompute vertices and display lists for drawing the skybox if (skyboxId != SKYBOX_NONE) { - PRINTF(VT_FGCOL(GREEN)); + PRINTF_COLOR_GREEN(); if (skyboxCtx->drawType != SKYBOX_DRAW_128) { skyboxCtx->dListBuf = GAME_STATE_ALLOC(state, 8 * 150 * sizeof(Gfx), "../z_vr_box.c", 1636); @@ -1056,6 +1056,6 @@ void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId) { Skybox_Calculate128(skyboxCtx, 5); // compute 5 faces, excludes the bottom face } } - PRINTF(VT_RST); + PRINTF_RST(); } } |
