Update StarSpawn to StarCloudData (#578)

* Update StarSpawn to StarCloudData

Add and better specify the struct used to control how stars and
 clouds are handled in various courses.
This commit is contained in:
Tyler McGavran
2024-03-04 21:28:31 -05:00
committed by GitHub
parent 0ac8284fb2
commit 6f4decf6b3
9 changed files with 474 additions and 536 deletions
+16 -7
View File
@@ -289,13 +289,6 @@ extern Vec3s gHedgehogPatrolPoints[];
*/
extern s32 indexObjectList2[];
// This struct is used by a lot of different objects
// Stars, clouds, exahust smoke (I think?)
typedef struct {
Vec3su pos;
u16 id;
} StarSpawn;
#define NUM_BOOS 0xA
#define NUM_FIRE_BREATHS 4
@@ -407,6 +400,22 @@ extern s32 gLeafParticle[];
//! Next free spot in gLeafParticle? Wraps back around to 0 if it gets bigger than gLeafParticle_SIZE
extern s32 gNextFreeLeafParticle;
// Struct used for clouds and stars
// See `func_80070328` and `func_80070250` for cloud initialization
// See `func_800704A0` and `func_800703E0` for star initialization
typedef struct {
// rotY and posY seem relative to the camera.
// See `func_800788F8` to see how rotY is used to decide whether and where to display clouds/stars
// See `func_80078A44` and `func_800789AC` to see how stars and clouds (respectively) are looped over
/* 0x00 */ u16 rotY;
/* 0x02 */ u16 posY;
// Can be bigger than 100!
/* 0x04 */ u16 scalePercent;
// There are a couple different cloud shapes, this decides which one is used
// For stars, this is always 0 since they don't have multiple textures
/* 0x06 */ u16 subType;
} StarData, CloudData; // size = 0x8
#define D_8018CC80_SIZE 0x64
/**