From c799176a30c5a1389c720bdfcdf4c1c9f3b07b32 Mon Sep 17 00:00:00 2001 From: Roman971 <32455037+Roman971@users.noreply.github.com> Date: Tue, 10 May 2022 21:51:38 +0200 Subject: Various minor cleanups (#1218) * Fix assert in z_en_horse.c * Fix UB sceneFlags access in z_en_elf.c * Add Object_Spawn to public object functions This function is used externally in MM and works as a standalone, so it most likely belongs to the public interface * Fix float literals to always use lowercase e for the exponent * Remove "mininap" in one of the map data variables sDgnMinimapTexIndexBase is also used for the pause menu map so naming it for the minimap turned out to be inaccurate --- src/code/z_collision_check.c | 4 ++-- src/code/z_map_data.c | 4 ++-- src/code/z_map_exp.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/code') diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 7ccafebc4..6d63f4ffb 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -846,7 +846,7 @@ s32 Collider_InitQuadDim(GlobalContext* globalCtx, ColliderQuadDim* dim) { { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0, 0, 0 }, { 0, 0, 0 }, - 1.0E38f, + 1.0e38f, }; *dim = init; @@ -858,7 +858,7 @@ s32 Collider_DestroyQuadDim(GlobalContext* globalCtx, ColliderQuadDim* dim) { } s32 Collider_ResetQuadACDist(GlobalContext* globalCtx, ColliderQuadDim* dim) { - dim->acDistSq = 1.0E38f; + dim->acDistSq = 1.0e38f; return true; } diff --git a/src/code/z_map_data.c b/src/code/z_map_data.c index 881950c6d..24721c623 100644 --- a/src/code/z_map_data.c +++ b/src/code/z_map_data.c @@ -213,7 +213,7 @@ static s16 sOwCompassInfo[24][4] = { { 6, 6, 890, -800 }, { 13, 13, 1080, -260 }, { 11, 11, 1060, -680 }, { 9, 9, 850, -830 }, }; -static s16 sDgnMinimapTexIndexBase[10] = { +static s16 sDgnTexIndexBase[10] = { 0, 10, 14, 18, 26, 36, 44, 52, 60, 66, }; @@ -341,7 +341,7 @@ MapData gMapDataTable = { sMaxPaletteCount, sPaletteRoom, sRoomCompassOffsetX, sRoomCompassOffsetY, sDgnMinimapCount, sDgnMinimapTexIndexOffset, sOwMinimapTexSize, sOwMinimapTexOffset, sOwMinimapPosX, - sOwMinimapPosY, sOwCompassInfo, sDgnMinimapTexIndexBase, + sOwMinimapPosY, sOwCompassInfo, sDgnTexIndexBase, sDgnCompassInfo, sOwMinimapWidth, sOwMinimapHeight, sOwEntranceIconPosX, sOwEntranceIconPosY, sOwEntranceFlag, sFloorCoordY, sSwitchEntryCount, sSwitchFromRoom, diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index b641354b5..92ef5681a 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -306,7 +306,7 @@ void Map_Init(GlobalContext* globalCtx) { R_COMPASS_SCALE_Y = gMapData->dgnCompassInfo[mapIndex][1]; R_COMPASS_OFFSET_X = gMapData->dgnCompassInfo[mapIndex][2]; R_COMPASS_OFFSET_Y = gMapData->dgnCompassInfo[mapIndex][3]; - R_MAP_TEX_INDEX = R_MAP_TEX_INDEX_BASE = gMapData->dgnMinimapTexIndexBase[mapIndex]; + R_MAP_TEX_INDEX = R_MAP_TEX_INDEX_BASE = gMapData->dgnTexIndexBase[mapIndex]; Map_InitRoomData(globalCtx, globalCtx->roomCtx.curRoom.num); MapMark_Init(globalCtx); } -- cgit v1.2.3