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

Replace most osSyncPrintf calls with PRINTF macro (#1598)

* Replace most osSyncPrintf calls with PRINTF macro

* DEBUG -> OOT_DEBUG
This commit is contained in:
cadmic 2024-01-12 07:38:13 -08:00 committed by GitHub
parent 6eb3bf401c
commit 324db1d578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
297 changed files with 2642 additions and 2679 deletions

View file

@ -27,11 +27,11 @@ void Map_SetPaletteData(PlayState* play, s16 room) {
interfaceCtx->mapPaletteIndex = paletteIndex;
}
osSyncPrintf(VT_FGCOL(YELLOW));
PRINTF(VT_FGCOL(YELLOW));
// "PALETE Set"
osSyncPrintf("PALETEセット 【 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);
osSyncPrintf(VT_RST);
PRINTF("PALETEセット 【 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);
interfaceCtx->mapPalette[paletteIndex * 2] = 2;
interfaceCtx->mapPalette[paletteIndex * 2 + 1] = 0xBF;
@ -126,9 +126,9 @@ void Map_InitData(PlayState* play, s16 room) {
extendedMapIndex = 0x17;
}
}
osSyncPrintf(VT_FGCOL(BLUE));
osSyncPrintf("%d\n", extendedMapIndex);
osSyncPrintf(VT_RST);
PRINTF(VT_FGCOL(BLUE));
PRINTF("%d\n", extendedMapIndex);
PRINTF(VT_RST);
sEntranceIconMapIndex = extendedMapIndex;
DMA_REQUEST_SYNC(interfaceCtx->mapSegment,
(uintptr_t)_map_grand_staticSegmentRomStart +
@ -154,11 +154,11 @@ void Map_InitData(PlayState* play, s16 room) {
case SCENE_WATER_TEMPLE_BOSS:
case SCENE_SPIRIT_TEMPLE_BOSS:
case SCENE_SHADOW_TEMPLE_BOSS:
osSyncPrintf(VT_FGCOL(YELLOW));
PRINTF(VT_FGCOL(YELLOW));
// "Deku Tree Dungeon MAP Texture DMA"
osSyncPrintf("デクの樹ダンジョンMAP テクスチャDMA(%x) scene_id_offset=%d VREG(30)=%d\n", room,
mapIndex, VREG(30));
osSyncPrintf(VT_RST);
PRINTF("デクの樹ダンジョンMAP テクスチャDMA(%x) scene_id_offset=%d VREG(30)=%d\n", room, mapIndex,
VREG(30));
PRINTF(VT_RST);
DMA_REQUEST_SYNC(play->interfaceCtx.mapSegment,
(uintptr_t)_map_i_staticSegmentRomStart +
((gMapData->dgnMinimapTexIndexOffset[mapIndex] + room) * MAP_I_TEX_SIZE),
@ -166,7 +166,7 @@ void Map_InitData(PlayState* play, s16 room) {
R_COMPASS_OFFSET_X = gMapData->roomCompassOffsetX[mapIndex][room];
R_COMPASS_OFFSET_Y = gMapData->roomCompassOffsetY[mapIndex][room];
Map_SetFloorPalettesData(play, VREG(30));
osSyncPrintf(" 各階ONチェック\n"); // "MAP Individual Floor ON Check"
PRINTF(" 各階ONチェック\n"); // "MAP Individual Floor ON Check"
break;
}
}
@ -175,8 +175,8 @@ void Map_InitRoomData(PlayState* play, s16 room) {
s32 mapIndex = gSaveContext.mapIndex;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
osSyncPrintf("\n\nroom_no=%d (%d)(%d)\n\n\n", room,
mapIndex, play->sceneId);
PRINTF("\n\nroom_no=%d (%d)(%d)\n\n\n", room, mapIndex,
play->sceneId);
if (room >= 0) {
switch (play->sceneId) {
@ -199,13 +199,13 @@ void Map_InitRoomData(PlayState* play, s16 room) {
case SCENE_SPIRIT_TEMPLE_BOSS:
case SCENE_SHADOW_TEMPLE_BOSS:
gSaveContext.save.info.sceneFlags[mapIndex].rooms |= gBitFlags[room];
osSyncPrintf("_%d\n", gSaveContext.save.info.sceneFlags[mapIndex].rooms);
PRINTF("_%d\n", gSaveContext.save.info.sceneFlags[mapIndex].rooms);
interfaceCtx->mapRoomNum = room;
interfaceCtx->unk_25A = mapIndex;
Map_SetPaletteData(play, room);
osSyncPrintf(VT_FGCOL(YELLOW));
osSyncPrintf("部屋部屋=%d\n", room); // "Room Room = %d"
osSyncPrintf(VT_RST);
PRINTF(VT_FGCOL(YELLOW));
PRINTF("部屋部屋=%d\n", room); // "Room Room = %d"
PRINTF(VT_RST);
Map_InitData(play, room);
break;
}
@ -234,8 +234,8 @@ void Map_Init(PlayState* play) {
interfaceCtx->mapSegment = GAME_STATE_ALLOC(&play->state, 0x1000, "../z_map_exp.c", 457);
// " texture initialization scene_data_ID=%d mapSegment=%x"
osSyncPrintf("\n\n\n テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneId,
interfaceCtx->mapSegment, play);
PRINTF("\n\n\n テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneId,
interfaceCtx->mapSegment, play);
ASSERT(interfaceCtx->mapSegment != NULL, "parameter->mapSegment != NULL", "../z_map_exp.c", 459);
switch (play->sceneId) {
@ -404,7 +404,7 @@ void Minimap_Draw(PlayState* play) {
}
if (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_L) && !Play_InCsMode(play)) {
osSyncPrintf("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
PRINTF("Game_play_demo_mode_check=%d\n", Play_InCsMode(play));
// clang-format off
if (!R_MINIMAP_DISABLED) { Audio_PlaySfxGeneral(NA_SE_SY_CAMERA_ZOOM_UP, &gSfxDefaultPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
@ -556,8 +556,8 @@ void Map_Update(PlayState* play) {
if (interfaceCtx->mapRoomNum != sLastRoomNum) {
// "Current floor = %d Current room = %x Number of rooms = %d"
osSyncPrintf("現在階=%d 現在部屋=%x 部屋数=%d\n", floor, interfaceCtx->mapRoomNum,
gMapData->switchEntryCount[mapIndex]);
PRINTF("現在階=%d 現在部屋=%x 部屋数=%d\n", floor, interfaceCtx->mapRoomNum,
gMapData->switchEntryCount[mapIndex]);
sLastRoomNum = interfaceCtx->mapRoomNum;
}
@ -565,10 +565,10 @@ void Map_Update(PlayState* play) {
if ((interfaceCtx->mapRoomNum == gMapData->switchFromRoom[mapIndex][i]) &&
(floor == gMapData->switchFromFloor[mapIndex][i])) {
interfaceCtx->mapRoomNum = gMapData->switchToRoom[mapIndex][i];
osSyncPrintf(VT_FGCOL(YELLOW));
PRINTF(VT_FGCOL(YELLOW));
// "Layer switching = %x"
osSyncPrintf("階層切替=%x\n", interfaceCtx->mapRoomNum);
osSyncPrintf(VT_RST);
PRINTF("階層切替=%x\n", interfaceCtx->mapRoomNum);
PRINTF(VT_RST);
Map_InitData(play, interfaceCtx->mapRoomNum);
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
Map_SavePlayerInitialInfo(play);