1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 07:07:09 +00:00
* typo

* rename 800636C0 to gameinfo_init

* fix incorrect casing in cup button

* some constants

* add item00_none enum value

* rename 80009460 to gdmaverbose

* fix typos

* Revert "some constants"

This reverts commit 27a07204d7.

* rename gdmaverbose to gdmamgrverbose

* Revert "rename 800636C0 to gameinfo_init"

This reverts commit c74e255929.

* Revert "fix incorrect casing in cup button"

This reverts commit ac313b3965.

* a couple of typos

* minor changes based on clang-format
This commit is contained in:
playerskel 2022-03-10 21:21:46 +01:00 committed by GitHub
parent c55a8530ee
commit a160fb96c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 77 additions and 270 deletions

View file

@ -15,7 +15,7 @@ extern u8 osAppNmiBuffer[0x40];
extern u8 D_80009320[];
extern u8 D_800093F0[];
extern s8 D_80009430;
extern u32 D_80009460;
extern u32 gDmaMgrVerbose;
extern u32 gDmaMgrDmaBuffSize;
extern vu8 gViConfigUseDefault;
extern u8 gViConfigAdditionalScanLines;

View file

@ -265,7 +265,8 @@ typedef enum {
/* 0x16 */ ITEM00_SHIELD_HYLIAN,
/* 0x17 */ ITEM00_TUNIC_ZORA,
/* 0x18 */ ITEM00_TUNIC_GORON,
/* 0x19 */ ITEM00_BOMBS_SPECIAL
/* 0x19 */ ITEM00_BOMBS_SPECIAL,
/* 0xFF */ ITEM00_NONE = 0xFF
} Item00Type;
struct EnItem00;

View file

@ -87,7 +87,7 @@ typedef struct {
/* 0x003F */ u8 ocarinaGameRoundNum;
/* 0x0040 */ ItemEquips childEquips;
/* 0x004A */ ItemEquips adultEquips;
/* 0x0054 */ u32 unk_54; // this may be incorrect, currently used for alignement
/* 0x0054 */ u32 unk_54; // this may be incorrect, currently used for alignment
/* 0x0058 */ char unk_58[0x0E];
/* 0x0066 */ s16 savedSceneNum;
/* 0x0068 */ ItemEquips equips;

View file

@ -9,7 +9,7 @@ STACK(sDmaMgrStack, 0x500);
const char* sDmaMgrCurFileName;
s32 sDmaMgrCurFileLine;
u32 D_80009460 = 0;
u32 gDmaMgrVerbose = 0;
u32 gDmaMgrDmaBuffSize = 0x2000;
u32 sDmaMgrIsRomCompressed = false;
@ -68,7 +68,7 @@ s32 DmaMgr_DmaRomToRam(u32 rom, u32 ram, u32 size) {
ioMsg.dramAddr = (void*)ram;
ioMsg.size = buffSize;
if (D_80009460 == 10) {
if (gDmaMgrVerbose == 10) {
osSyncPrintf("%10lld ノーマルDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), ioMsg.dramAddr,
ioMsg.devAddr, ioMsg.size, gPiMgrCmdQ.validCount);
}
@ -78,12 +78,12 @@ s32 DmaMgr_DmaRomToRam(u32 rom, u32 ram, u32 size) {
goto end;
}
if (D_80009460 == 10) {
if (gDmaMgrVerbose == 10) {
osSyncPrintf("%10lld ノーマルDMA START (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), gPiMgrCmdQ.validCount);
}
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
if (D_80009460 == 10) {
if (gDmaMgrVerbose == 10) {
osSyncPrintf("%10lld ノーマルDMA END (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), gPiMgrCmdQ.validCount);
}
@ -100,7 +100,7 @@ s32 DmaMgr_DmaRomToRam(u32 rom, u32 ram, u32 size) {
ioMsg.dramAddr = (void*)ram;
ioMsg.size = size;
if (D_80009460 == 10) {
if (gDmaMgrVerbose == 10) {
osSyncPrintf("%10lld ノーマルDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), ioMsg.dramAddr,
ioMsg.devAddr, ioMsg.size, gPiMgrCmdQ.validCount);
}
@ -111,7 +111,7 @@ s32 DmaMgr_DmaRomToRam(u32 rom, u32 ram, u32 size) {
}
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
if (D_80009460 == 10) {
if (gDmaMgrVerbose == 10) {
osSyncPrintf("%10lld ノーマルDMA END (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), gPiMgrCmdQ.validCount);
}
@ -129,7 +129,7 @@ s32 DmaMgr_DmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
ASSERT(direction == OS_READ, "direction == OS_READ", "../z_std_dma.c", 531);
ASSERT(mb != NULL, "mb != NULL", "../z_std_dma.c", 532);
if (D_80009460 == 10) {
if (gDmaMgrVerbose == 10) {
osSyncPrintf("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr,
mb->devAddr, mb->size, gPiMgrCmdQ.validCount);
}

View file

@ -88,7 +88,7 @@ void func_800C4344(GameState* gameState) {
func_8006390C(&gameState->input[1]);
}
D_80009460 = HREG(60);
gDmaMgrVerbose = HREG(60);
gDmaMgrDmaBuffSize = SREG(21) != 0 ? ALIGN16(SREG(21)) : 0x2000;
gSystemArenaLogSeverity = HREG(61);
gZeldaArenaLogSeverity = HREG(62);

View file

@ -239,7 +239,7 @@ f32 Math3D_Cos(Vec3f* a, Vec3f* b) {
}
/**
* Calculates the cosine between bectors `a` and `b` and places the result in `ret`
* Calculates the cosine between vectors `a` and `b` and places the result in `ret`
* returns true if the cosine cannot be calculated because the product of the magnitudes is zero
*/
s32 Math3D_CosOut(Vec3f* a, Vec3f* b, f32* dst) {
@ -876,9 +876,9 @@ void Math3D_RotateXZPlane(Vec3f* pointOnPlane, s16 angle, f32* a, f32* c, f32* d
}
/*
* Defines a plane from verticies `va`, `vb`, and `vc`. Normal components are output to
* Defines a plane from vertices `va`, `vb`, and `vc`. Normal components are output to
* `nx`, `ny`, and `nz`. Distance from the origin is output to `originDist`
* Satisifes the plane equation NxVx + NyVy + NzVz + D = 0
* Satisfies the plane equation NxVx + NyVy + NzVz + D = 0
*/
void Math3D_DefPlane(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, f32* originDist) {
static Vec3f normal;
@ -1340,7 +1340,7 @@ s32 Math3D_LineSegFindPlaneIntersect(f32 pointADist, f32 pointBDist, Vec3f* poin
}
/**
* Determines if the line segement from `linePointA` to `linePointB` crosses the plane
* Determines if the line segment from `linePointA` to `linePointB` crosses the plane
* from `nx` + `ny` + `nz` + `originDist` = 0. If fromFront is set, then detection will only
* be true if point A crosses from the front of the plane
*/
@ -1366,7 +1366,7 @@ s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePoi
}
/*
* Determines if the line formed by `linePiontA` and `linePointB` intersect with Triangle formed from
* Determines if the line formed by `linePointA` and `linePointB` intersect with Triangle formed from
* vertices `v0`, `v1`, and `v2` with normal vector `nx`, `ny`, and `nz` with plane distance from origin
* `originDist` Outputs the intersection point at to `intersect`
* Returns 1 if the line intersects with the triangle, 0 otherwise
@ -1404,7 +1404,6 @@ void Math3D_TriNorm(TriNorm* tri, Vec3f* va, Vec3f* vb, Vec3f* vc) {
* Determines if point `point` lies within `sphere`
*/
s32 Math3D_PointInSph(Sphere16* sphere, Vec3f* point) {
if (Math3D_DistXYZ16toF(&sphere->center, point) < sphere->radius) {
return true;
}
@ -1412,9 +1411,9 @@ s32 Math3D_PointInSph(Sphere16* sphere, Vec3f* point) {
}
/**
* Determines the distance from point (`x0`,`y0`) to the line fromed from (`x1`,`y1`) and (`x2`,`y2`)
* Determines the distance from point (`x0`,`y0`) to the line formed from (`x1`,`y1`) and (`x2`,`y2`)
* Distance squared is output to `lineLenSq`, returns true if the point perpendicular from (`x0`,`y0`)
* is contained within the segement between (`x1`,`y1`) and (`x2`,`y2`)
* is contained within the segment between (`x1`,`y1`) and (`x2`,`y2`)
*/
s32 Math3D_PointDistToLine2D(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq) {
static Vec3f perpendicularPoint;
@ -1832,7 +1831,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
if (((tri->vtx[0].y < cylBottom) && (tri->vtx[1].y < cylBottom) && (tri->vtx[2].y < cylBottom)) ||
((cylTop < tri->vtx[0].y) && (cylTop < tri->vtx[1].y) && (cylTop < tri->vtx[2].y))) {
// If all of the verticies are below or all of the verticies are above the cylinder.
// If all of the vertices are below or all of the vertices are above the cylinder.
return false;
}
@ -1912,7 +1911,7 @@ s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri) {
}
/*
* Deteremines if two spheres are touching.
* Determines if two spheres are touching.
*/
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB) {
f32 overlapSize;
@ -2021,7 +2020,7 @@ s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace) {
/*
* returns 1 if cylinder `ca` is outside cylinder `cb`.
* Sets `xzDist` to the xz distance between the centers of the cylinders.
* Sets `deadSpace` to the mininum space between the cylinders not occupied by the other.
* Sets `deadSpace` to the minimum space between the cylinders not occupied by the other.
*/
s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist) {
static Cylinderf caf;
@ -2059,7 +2058,6 @@ s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32
* intersection is output to `intersect.
* Returns 1 is the triangles intersect, 0 otherwise
*/
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect) {
f32 dist0;
f32 dist1;

View file

@ -72,246 +72,54 @@ static void* sItemDropTex[] = {
};
static u8 sItemDropIds[] = {
ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_BLUE,
0xFF,
0xFF,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_GREEN,
ITEM00_MAGIC_SMALL,
ITEM00_HEART,
ITEM00_HEART,
0xFF,
ITEM00_MAGIC_SMALL,
ITEM00_FLEXIBLE,
ITEM00_SEEDS,
ITEM00_SEEDS,
0xFF,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_GREEN,
ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_BLUE,
ITEM00_HEART,
0xFF,
ITEM00_HEART,
0xFF,
ITEM00_FLEXIBLE,
0xFF,
ITEM00_BOMBS_A,
0xFF,
ITEM00_SEEDS,
0xFF,
0xFF,
ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_GREEN,
ITEM00_MAGIC_SMALL,
0xFF,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_HEART,
0xFF,
ITEM00_SEEDS,
ITEM00_SEEDS,
0xFF,
ITEM00_BOMBS_A,
0xFF,
ITEM00_FLEXIBLE,
ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_GREEN,
ITEM00_NUTS,
0xFF,
ITEM00_SEEDS,
ITEM00_SEEDS,
ITEM00_NUTS,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_SEEDS,
0xFF,
ITEM00_FLEXIBLE,
0xFF,
0xFF,
0xFF,
0xFF,
ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_GREEN,
ITEM00_SEEDS,
ITEM00_BOMBS_A,
ITEM00_MAGIC_SMALL,
ITEM00_BOMBS_A,
0xFF,
0xFF,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_HEART,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN,
ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN,
0xFF,
ITEM00_RUPEE_BLUE,
0xFF,
0xFF,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_HEART,
ITEM00_FLEXIBLE,
ITEM00_SEEDS,
ITEM00_SEEDS,
0xFF,
ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_BLUE,
0xFF,
ITEM00_RUPEE_GREEN,
0xFF,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_BOMBS_A,
ITEM00_ARROWS_SMALL,
0xFF,
ITEM00_ARROWS_MEDIUM,
ITEM00_MAGIC_SMALL,
ITEM00_FLEXIBLE,
0xFF,
ITEM00_MAGIC_LARGE,
ITEM00_RUPEE_GREEN,
0xFF,
ITEM00_RUPEE_BLUE,
0xFF,
ITEM00_RUPEE_GREEN,
ITEM00_HEART,
ITEM00_FLEXIBLE,
ITEM00_BOMBS_A,
ITEM00_ARROWS_SMALL,
0xFF,
0xFF,
0xFF,
ITEM00_MAGIC_SMALL,
0xFF,
0xFF,
ITEM00_MAGIC_LARGE,
ITEM00_ARROWS_LARGE,
ITEM00_ARROWS_MEDIUM,
ITEM00_ARROWS_MEDIUM,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL,
ITEM00_FLEXIBLE,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_MEDIUM,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_MEDIUM,
ITEM00_ARROWS_LARGE,
ITEM00_ARROWS_LARGE,
ITEM00_MAGIC_LARGE,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_LARGE,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_LARGE,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_LARGE,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_LARGE,
ITEM00_BOMBS_A,
0xFF,
ITEM00_BOMBS_A,
0xFF,
ITEM00_BOMBS_A,
ITEM00_FLEXIBLE,
ITEM00_BOMBS_A,
ITEM00_BOMBS_A,
ITEM00_BOMBS_A,
0xFF,
0xFF,
0xFF,
0xFF,
ITEM00_BOMBS_A,
0xFF,
ITEM00_BOMBS_A,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_HEART,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_RED,
ITEM00_RUPEE_RED,
ITEM00_SEEDS,
0xFF,
ITEM00_NUTS,
0xFF,
ITEM00_STICK,
0xFF,
0xFF,
ITEM00_SEEDS,
0xFF,
0xFF,
0xFF,
ITEM00_NUTS,
0xFF,
ITEM00_NUTS,
ITEM00_HEART,
ITEM00_SEEDS,
ITEM00_HEART,
0xFF,
ITEM00_SEEDS,
0xFF,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_HEART,
ITEM00_HEART,
0xFF,
0xFF,
ITEM00_HEART,
0xFF,
ITEM00_HEART,
ITEM00_SEEDS,
ITEM00_FLEXIBLE,
ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NONE, ITEM00_NONE, ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL, ITEM00_HEART, ITEM00_HEART, ITEM00_NONE,
ITEM00_MAGIC_SMALL, ITEM00_FLEXIBLE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NONE,
ITEM00_RUPEE_BLUE, ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE,
ITEM00_HEART, ITEM00_NONE, ITEM00_HEART, ITEM00_NONE, ITEM00_FLEXIBLE,
ITEM00_NONE, ITEM00_BOMBS_A, ITEM00_NONE, ITEM00_SEEDS, ITEM00_NONE,
ITEM00_NONE, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL,
ITEM00_NONE, ITEM00_HEART, ITEM00_NONE, ITEM00_NONE, ITEM00_HEART,
ITEM00_NONE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NONE, ITEM00_BOMBS_A,
ITEM00_NONE, ITEM00_FLEXIBLE, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_GREEN,
ITEM00_NUTS, ITEM00_NONE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NUTS,
ITEM00_HEART, ITEM00_HEART, ITEM00_SEEDS, ITEM00_NONE, ITEM00_FLEXIBLE,
ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_RUPEE_GREEN,
ITEM00_RUPEE_GREEN, ITEM00_SEEDS, ITEM00_BOMBS_A, ITEM00_MAGIC_SMALL, ITEM00_BOMBS_A,
ITEM00_NONE, ITEM00_NONE, ITEM00_HEART, ITEM00_NONE, ITEM00_NONE,
ITEM00_HEART, ITEM00_HEART, ITEM00_NONE, ITEM00_NONE, ITEM00_MAGIC_SMALL,
ITEM00_RUPEE_GREEN, ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_NONE, ITEM00_RUPEE_BLUE,
ITEM00_NONE, ITEM00_NONE, ITEM00_HEART, ITEM00_NONE, ITEM00_NONE,
ITEM00_HEART, ITEM00_FLEXIBLE, ITEM00_SEEDS, ITEM00_SEEDS, ITEM00_NONE,
ITEM00_MAGIC_SMALL, ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_NONE, ITEM00_RUPEE_GREEN,
ITEM00_NONE, ITEM00_HEART, ITEM00_NONE, ITEM00_NONE, ITEM00_BOMBS_A,
ITEM00_ARROWS_SMALL, ITEM00_NONE, ITEM00_ARROWS_MEDIUM, ITEM00_MAGIC_SMALL, ITEM00_FLEXIBLE,
ITEM00_NONE, ITEM00_MAGIC_LARGE, ITEM00_RUPEE_GREEN, ITEM00_NONE, ITEM00_RUPEE_BLUE,
ITEM00_NONE, ITEM00_RUPEE_GREEN, ITEM00_HEART, ITEM00_FLEXIBLE, ITEM00_BOMBS_A,
ITEM00_ARROWS_SMALL, ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_MAGIC_SMALL,
ITEM00_NONE, ITEM00_NONE, ITEM00_MAGIC_LARGE, ITEM00_ARROWS_LARGE, ITEM00_ARROWS_MEDIUM,
ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_SMALL, ITEM00_FLEXIBLE, ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_SMALL, ITEM00_ARROWS_SMALL,
ITEM00_ARROWS_SMALL, ITEM00_ARROWS_MEDIUM, ITEM00_ARROWS_LARGE, ITEM00_ARROWS_LARGE, ITEM00_MAGIC_LARGE,
ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE,
ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE, ITEM00_MAGIC_SMALL,
ITEM00_MAGIC_LARGE, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_SMALL, ITEM00_MAGIC_LARGE,
ITEM00_BOMBS_A, ITEM00_NONE, ITEM00_BOMBS_A, ITEM00_NONE, ITEM00_BOMBS_A,
ITEM00_FLEXIBLE, ITEM00_BOMBS_A, ITEM00_BOMBS_A, ITEM00_BOMBS_A, ITEM00_NONE,
ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_BOMBS_A, ITEM00_NONE,
ITEM00_BOMBS_A, ITEM00_HEART, ITEM00_HEART, ITEM00_HEART, ITEM00_HEART,
ITEM00_HEART, ITEM00_HEART, ITEM00_HEART, ITEM00_HEART, ITEM00_HEART,
ITEM00_HEART, ITEM00_HEART, ITEM00_HEART, ITEM00_HEART, ITEM00_HEART,
ITEM00_HEART, ITEM00_HEART, ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_BLUE,
ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED,
ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED,
ITEM00_RUPEE_RED, ITEM00_RUPEE_RED, ITEM00_RUPEE_RED, ITEM00_SEEDS, ITEM00_NONE,
ITEM00_NUTS, ITEM00_NONE, ITEM00_STICK, ITEM00_NONE, ITEM00_NONE,
ITEM00_SEEDS, ITEM00_NONE, ITEM00_NONE, ITEM00_NONE, ITEM00_NUTS,
ITEM00_NONE, ITEM00_NUTS, ITEM00_HEART, ITEM00_SEEDS, ITEM00_HEART,
ITEM00_NONE, ITEM00_SEEDS, ITEM00_NONE, ITEM00_HEART, ITEM00_NONE,
ITEM00_NONE, ITEM00_HEART, ITEM00_HEART, ITEM00_NONE, ITEM00_NONE,
ITEM00_HEART, ITEM00_NONE, ITEM00_HEART, ITEM00_SEEDS, ITEM00_FLEXIBLE,
};
static u8 sDropQuantities[] = {
@ -1297,15 +1105,15 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3
}
}
if (dropId != 0xFF) {
if (dropId != ITEM00_NONE) {
dropQuantity = sDropQuantities[params + dropTableIndex];
while (dropQuantity > 0) {
if (!param8000) {
dropId = func_8001F404(dropId);
if (dropId != 0xFF) {
if (dropId != ITEM00_NONE) {
spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ITEM00, spawnPos->x,
spawnPos->y, spawnPos->z, 0, 0, 0, dropId);
if ((spawnedActor != NULL) && (dropId != 0xFF)) {
if ((spawnedActor != NULL) && (dropId != ITEM00_NONE)) {
spawnedActor->actor.velocity.y = 8.0f;
spawnedActor->actor.speedXZ = 2.0f;
spawnedActor->actor.gravity = -0.9f;

View file

@ -153,7 +153,7 @@ static ColliderJntSphElementInit D_80B9ED44[1] = {
},
};
static ColliderJntSphInit sCyrstalJntSphereInit = {
static ColliderJntSphInit sCrystalJntSphereInit = {
{
COLTYPE_METAL,
AT_NONE,
@ -182,7 +182,7 @@ void ObjSwitch_RotateY(Vec3f* dest, Vec3f* src, s16 angle) {
dest->z = src->z * c - src->x * s;
}
void ObjSwitch_InitDynapoly(ObjSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
void ObjSwitch_InitDynaPoly(ObjSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
@ -287,7 +287,7 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
type = (this->dyna.actor.params & 7);
if (type == OBJSWITCH_TYPE_FLOOR || type == OBJSWITCH_TYPE_FLOOR_RUSTY) {
ObjSwitch_InitDynapoly(this, globalCtx, &gFloorSwitchCol, DPM_PLAYER);
ObjSwitch_InitDynaPoly(this, globalCtx, &gFloorSwitchCol, DPM_PLAYER);
}
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
@ -303,7 +303,7 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
} else if (type == OBJSWITCH_TYPE_EYE) {
ObjSwitch_InitTrisCollider(this, globalCtx, &trisColliderEye);
} else if (type == OBJSWITCH_TYPE_CRYSTAL || type == OBJSWITCH_TYPE_CRYSTAL_TARGETABLE) {
ObjSwitch_InitJntSphCollider(this, globalCtx, &sCyrstalJntSphereInit);
ObjSwitch_InitJntSphCollider(this, globalCtx, &sCrystalJntSphereInit);
}
if (type == OBJSWITCH_TYPE_CRYSTAL_TARGETABLE) {