1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 06:54:33 +00:00

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
This commit is contained in:
Roman971 2022-05-10 21:51:38 +02:00 committed by GitHub
parent 2efd00863a
commit c799176a30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 38 deletions

View file

@ -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;
}

View file

@ -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,

View file

@ -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);
}