mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-06-27 02:45:28 -04:00
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:
+33
-31
@@ -22,6 +22,7 @@
|
||||
#include "data/other_textures.h"
|
||||
#include "render_objects.h"
|
||||
#include "code_80091750.h"
|
||||
#include "src/data/some_data.h"
|
||||
|
||||
void init_hud(void) {
|
||||
|
||||
@@ -604,30 +605,30 @@ void init_object_list_index(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80070250(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
|
||||
void init_cloud_object(s32 objectIndex, s32 arg1, CloudData *arg2) {
|
||||
ItemWindowObjects *temp_v0;
|
||||
|
||||
init_object(objectIndex, arg1);
|
||||
temp_v0 = &gObjectList[objectIndex];
|
||||
temp_v0->unk_0D5 = arg2->id;
|
||||
temp_v0->unk_0D5 = arg2->subType;
|
||||
temp_v0->currentItem = ITEM_NONE;
|
||||
temp_v0->direction_angle[1] = arg2->pos[0];
|
||||
temp_v0->unk_09E = arg2->pos[1];
|
||||
temp_v0->sizeScaling = (f32) arg2->pos[2] / 100.0;
|
||||
temp_v0->activeTexture = &D_8018D220[arg2->id];
|
||||
temp_v0->direction_angle[1] = arg2->rotY;
|
||||
temp_v0->unk_09E = arg2->posY;
|
||||
temp_v0->sizeScaling = (f32) arg2->scalePercent / 100.0;
|
||||
temp_v0->activeTexture = &D_8018D220[arg2->subType];
|
||||
func_80073404(objectIndex, 0x40U, 0x20U, &D_0D005FB0);
|
||||
temp_v0->primAlpha = 0x00FF;
|
||||
}
|
||||
|
||||
void func_80070328(StarSpawn *arg0) {
|
||||
void init_clouds(CloudData *cloudList) {
|
||||
s32 var_s0 = 0;
|
||||
StarSpawn *test = arg0;
|
||||
CloudData *test = &cloudList[0];
|
||||
do {
|
||||
if(1) {}
|
||||
func_80070250(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test);
|
||||
init_cloud_object(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test);
|
||||
var_s0++;
|
||||
test++;
|
||||
} while (test->pos[0] != 0xFFFF);
|
||||
} while (test->rotY != 0xFFFF);
|
||||
D_8018D1F8 += var_s0;
|
||||
D_8018D1F0 = var_s0;
|
||||
D_8018D230 = 0;
|
||||
@@ -642,34 +643,34 @@ void func_80070328(StarSpawn *arg0) {
|
||||
* The stars in Wario's Stadium, Toad's Turnpike, and Rainbow Road are not part of the skybox.
|
||||
* They are instead objects that seemingly hover in the air around the player
|
||||
* They have no true x/y/z position, instead they seem to be kept in a position relative to the
|
||||
* player they hang around. There is however an x/y position for where they should be on screen
|
||||
* player they hang around. There is however an y rotation and y position for where they should be on screen
|
||||
* when they are visbile (unk_09E[0] and [1]).
|
||||
* sizeScaling is some sort of size scaling on the start texture.
|
||||
* unk_0A2 is an alpha value, used to make the star twinkle.
|
||||
**/
|
||||
void func_800703E0(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
|
||||
void init_star_object(s32 objectIndex, s32 arg1, StarData *arg2) {
|
||||
ItemWindowObjects *temp_v0;
|
||||
|
||||
init_object(objectIndex, arg1);
|
||||
temp_v0 = &gObjectList[objectIndex];
|
||||
temp_v0->unk_0D5 = arg2->id; // No idea, all 0's for stars
|
||||
temp_v0->unk_0D5 = arg2->subType;
|
||||
temp_v0->currentItem = ITEM_BANANA;
|
||||
temp_v0->direction_angle[1] = arg2->pos[0]; // No idea
|
||||
temp_v0->unk_09E = arg2->pos[1]; // screen Y position
|
||||
temp_v0->sizeScaling = (f32)arg2->pos[2] / 100.0; // some type of scaling on the texture
|
||||
temp_v0->direction_angle[1] = arg2->rotY;
|
||||
temp_v0->unk_09E = arg2->posY; // screen Y position
|
||||
temp_v0->sizeScaling = (f32) arg2->scalePercent / 100.0; // some type of scaling on the texture
|
||||
temp_v0->activeTexture = D_0D0293D8;
|
||||
func_80073404(objectIndex, 0x10U, 0x10U, common_vtx_rectangle);
|
||||
}
|
||||
|
||||
void func_800704A0(StarSpawn *arg0) {
|
||||
void init_stars(StarData *starList) {
|
||||
s32 var_s0 = 0;
|
||||
StarSpawn *test = arg0;
|
||||
StarData *test = &starList[0];
|
||||
do {
|
||||
if(1) {}
|
||||
func_800703E0(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test);
|
||||
init_star_object(find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]), 1, test);
|
||||
var_s0++;
|
||||
test++;
|
||||
} while (test->pos[0] != 0xFFFF);
|
||||
} while (test->rotY != 0xFFFF);
|
||||
D_8018D1F8 += var_s0;
|
||||
D_8018D1F0 = var_s0;
|
||||
D_8018D230 = 1;
|
||||
@@ -681,10 +682,11 @@ void func_8007055C(void) {
|
||||
|
||||
switch (gCurrentCourseId) {
|
||||
case COURSE_MARIO_RACEWAY:
|
||||
func_80070328(&D_800E6C10);
|
||||
// Uses Kalimari Desert's clouds for initialization?
|
||||
init_clouds(gKalimariDesertClouds);
|
||||
break;
|
||||
case COURSE_YOSHI_VALLEY:
|
||||
func_80070328(&D_800E6AA8);
|
||||
init_clouds(gYoshiValleyMooMooFarmClouds);
|
||||
break;
|
||||
case COURSE_FRAPPE_SNOWLAND:
|
||||
if (gPlayerCount == 1) {
|
||||
@@ -699,31 +701,31 @@ void func_8007055C(void) {
|
||||
D_8018D1F0 = var_s0;
|
||||
break;
|
||||
case COURSE_KOOPA_BEACH:
|
||||
func_80070328(D_800E6B00);
|
||||
init_clouds(gKoopaTroopaBeachClouds);
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY:
|
||||
func_80070328(D_800E6B38);
|
||||
init_clouds(gRoyalRacewayClouds);
|
||||
break;
|
||||
case COURSE_LUIGI_RACEWAY:
|
||||
func_80070328(D_800E6A38);
|
||||
init_clouds(gLuigiRacewayClouds);
|
||||
break;
|
||||
case COURSE_MOO_MOO_FARM:
|
||||
func_80070328(D_800E6AA8);
|
||||
init_clouds(gYoshiValleyMooMooFarmClouds);
|
||||
break;
|
||||
case COURSE_TOADS_TURNPIKE:
|
||||
func_800704A0(D_800E6C80);
|
||||
init_stars(gToadsTurnpikeRainbowRoadStars);
|
||||
break;
|
||||
case COURSE_KALAMARI_DESERT:
|
||||
func_80070328(D_800E6C10);
|
||||
init_clouds(gKalimariDesertClouds);
|
||||
break;
|
||||
case COURSE_SHERBET_LAND:
|
||||
func_80070328(D_800E6BA8);
|
||||
init_clouds(gSherbetLandClouds);
|
||||
break;
|
||||
case COURSE_RAINBOW_ROAD:
|
||||
func_800704A0(D_800E6C80);
|
||||
init_stars(gToadsTurnpikeRainbowRoadStars);
|
||||
break;
|
||||
case COURSE_WARIO_STADIUM:
|
||||
func_800704A0(D_800E6DE0);
|
||||
init_stars(gWarioStadiumStars);
|
||||
break;
|
||||
}
|
||||
func_8008C23C();
|
||||
|
||||
+4
-14
@@ -19,10 +19,10 @@ void func_8006F8CC(void);
|
||||
void func_8006FA94(void);
|
||||
void func_80070148(void);
|
||||
void init_object_list_index(void);
|
||||
void func_80070250(s32, s32, StarSpawn*);
|
||||
void func_80070328(StarSpawn*);
|
||||
void func_800703E0(s32, s32, StarSpawn*);
|
||||
void func_800704A0(StarSpawn*);
|
||||
void init_cloud_object(s32, s32, CloudData*);
|
||||
void init_clouds(CloudData*);
|
||||
void init_star_object(s32, s32, StarData*);
|
||||
void init_stars(StarData*);
|
||||
void func_8007055C(void);
|
||||
void func_80070714(void);
|
||||
void init_course_object(void);
|
||||
@@ -35,14 +35,4 @@ extern s16 D_800E5520[];
|
||||
extern s16 D_800E5548[];
|
||||
extern u8 *gCourseOutlineTextures[0x14]; // 800e54d0
|
||||
|
||||
// These are found in data_update_objects
|
||||
extern StarSpawn D_800E6A38[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6AA8[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6B00[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6B38[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6BA8[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6C10[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6C80[]; /* unable to generate initializer */
|
||||
extern StarSpawn D_800E6DE0[]; /* unable to generate initializer */
|
||||
|
||||
#endif
|
||||
|
||||
+167
-167
@@ -1071,187 +1071,187 @@ SplineData8 D_800E69F4 = {
|
||||
}
|
||||
};
|
||||
|
||||
StarSpawn D_800E6A38[] = {
|
||||
{{ 0x04fa, 0xfff6, 0x0096 }, 0x0000 },
|
||||
{{ 0x4718, 0x003c, 0x007d }, 0x0000 },
|
||||
{{ 0x5550, 0x0046, 0x0096 }, 0x0000 },
|
||||
{{ 0x954c, 0x002d, 0x004b }, 0x0000 },
|
||||
{{ 0xae2e, 0x0028, 0x004b }, 0x0000 },
|
||||
{{ 0x0e38, 0x001e, 0x0032 }, 0x0001 },
|
||||
{{ 0xa384, 0x0032, 0x0064 }, 0x0001 },
|
||||
{{ 0xd548, 0x001e, 0x0032 }, 0x0001 },
|
||||
{{ 0x31c4, 0x0032, 0x0064 }, 0x0002 },
|
||||
{{ 0x7ff8, 0x0037, 0x0064 }, 0x0002 },
|
||||
{{ 0xaaa0, 0x004b, 0x0096 }, 0x0002 },
|
||||
{{ 0xb8d8, 0xfff9, 0x0064 }, 0x0002 },
|
||||
{{ 0xee2a, 0x003c, 0x0050 }, 0x0002 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
CloudData gLuigiRacewayClouds[] = {
|
||||
{ 0x04fa, 0xfff6, 0x0096, 0x0000 },
|
||||
{ 0x4718, 0x003c, 0x007d, 0x0000 },
|
||||
{ 0x5550, 0x0046, 0x0096, 0x0000 },
|
||||
{ 0x954c, 0x002d, 0x004b, 0x0000 },
|
||||
{ 0xae2e, 0x0028, 0x004b, 0x0000 },
|
||||
{ 0x0e38, 0x001e, 0x0032, 0x0001 },
|
||||
{ 0xa384, 0x0032, 0x0064, 0x0001 },
|
||||
{ 0xd548, 0x001e, 0x0032, 0x0001 },
|
||||
{ 0x31c4, 0x0032, 0x0064, 0x0002 },
|
||||
{ 0x7ff8, 0x0037, 0x0064, 0x0002 },
|
||||
{ 0xaaa0, 0x004b, 0x0096, 0x0002 },
|
||||
{ 0xb8d8, 0xfff9, 0x0064, 0x0002 },
|
||||
{ 0xee2a, 0x003c, 0x0050, 0x0002 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6AA8[] = {
|
||||
{{ 0x00b6, 0x0050, 0x0041 }, 0x0000 },
|
||||
{{ 0x4718, 0x003c, 0x0064 }, 0x0000 },
|
||||
{{ 0x18e2, 0x0032, 0x004b }, 0x0000 },
|
||||
{{ 0x7ff8, 0x0037, 0x0064 }, 0x0000 },
|
||||
{{ 0x9ff6, 0x002d, 0x0032 }, 0x0000 },
|
||||
{{ 0xc710, 0x0046, 0x003c }, 0x0000 },
|
||||
{{ 0x0aaa, 0x001e, 0x0064 }, 0x0001 },
|
||||
{{ 0x5c6c, 0x0046, 0x0046 }, 0x0001 },
|
||||
{{ 0x31c4, 0x0028, 0x0050 }, 0x0002 },
|
||||
{{ 0xf1b8, 0x0028, 0x004b }, 0x0002 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
CloudData gYoshiValleyMooMooFarmClouds[] = {
|
||||
{ 0x00b6, 0x0050, 0x0041, 0x0000 },
|
||||
{ 0x4718, 0x003c, 0x0064, 0x0000 },
|
||||
{ 0x18e2, 0x0032, 0x004b, 0x0000 },
|
||||
{ 0x7ff8, 0x0037, 0x0064, 0x0000 },
|
||||
{ 0x9ff6, 0x002d, 0x0032, 0x0000 },
|
||||
{ 0xc710, 0x0046, 0x003c, 0x0000 },
|
||||
{ 0x0aaa, 0x001e, 0x0064, 0x0001 },
|
||||
{ 0x5c6c, 0x0046, 0x0046, 0x0001 },
|
||||
{ 0x31c4, 0x0028, 0x0050, 0x0002 },
|
||||
{ 0xf1b8, 0x0028, 0x004b, 0x0002 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6B00[] = {
|
||||
{{ 0x1554, 0x001e, 0x00c8 }, 0x0000 },
|
||||
{{ 0xce2c, 0x001e, 0x00c8 }, 0x0000 },
|
||||
{{ 0xa384, 0x001e, 0x00c8 }, 0x0001 },
|
||||
{{ 0x070c, 0x001e, 0x00c8 }, 0x0001 },
|
||||
{{ 0x4718, 0x001e, 0x00c8 }, 0x0002 },
|
||||
{{ 0x8714, 0x001e, 0x00c8 }, 0x0003 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
CloudData gKoopaTroopaBeachClouds[] = {
|
||||
{ 0x1554, 0x001e, 0x00c8, 0x0000 },
|
||||
{ 0xce2c, 0x001e, 0x00c8, 0x0000 },
|
||||
{ 0xa384, 0x001e, 0x00c8, 0x0001 },
|
||||
{ 0x070c, 0x001e, 0x00c8, 0x0001 },
|
||||
{ 0x4718, 0x001e, 0x00c8, 0x0002 },
|
||||
{ 0x8714, 0x001e, 0x00c8, 0x0003 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6B38[] = {
|
||||
{{ 0x60b0, 0x003c, 0x007d }, 0x0000 },
|
||||
{{ 0xb8d8, 0x0037, 0x0064 }, 0x0000 },
|
||||
{{ 0xd548, 0x000a, 0x0082 }, 0x0000 },
|
||||
{{ 0xf1b8, 0x0023, 0x0064 }, 0x0000 },
|
||||
{{ 0x04fa, 0x0046, 0x0096 }, 0x0001 },
|
||||
{{ 0x4718, 0x003c, 0x007d }, 0x0001 },
|
||||
{{ 0x954c, 0x002d, 0x004b }, 0x0001 },
|
||||
{{ 0x0e38, 0x001e, 0x0032 }, 0x0002 },
|
||||
{{ 0x8880, 0x0046, 0x0096 }, 0x0002 },
|
||||
{{ 0x31c4, 0x0032, 0x0064 }, 0x0003 },
|
||||
{{ 0x5056, 0x0028, 0x004b }, 0x0003 },
|
||||
{{ 0x7ff8, 0x0037, 0x0064 }, 0x0003 },
|
||||
{{ 0xaaa0, 0x004b, 0x0096 }, 0x0003 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
CloudData gRoyalRacewayClouds[] = {
|
||||
{ 0x60b0, 0x003c, 0x007d, 0x0000 },
|
||||
{ 0xb8d8, 0x0037, 0x0064, 0x0000 },
|
||||
{ 0xd548, 0x000a, 0x0082, 0x0000 },
|
||||
{ 0xf1b8, 0x0023, 0x0064, 0x0000 },
|
||||
{ 0x04fa, 0x0046, 0x0096, 0x0001 },
|
||||
{ 0x4718, 0x003c, 0x007d, 0x0001 },
|
||||
{ 0x954c, 0x002d, 0x004b, 0x0001 },
|
||||
{ 0x0e38, 0x001e, 0x0032, 0x0002 },
|
||||
{ 0x8880, 0x0046, 0x0096, 0x0002 },
|
||||
{ 0x31c4, 0x0032, 0x0064, 0x0003 },
|
||||
{ 0x5056, 0x0028, 0x004b, 0x0003 },
|
||||
{ 0x7ff8, 0x0037, 0x0064, 0x0003 },
|
||||
{ 0xaaa0, 0x004b, 0x0096, 0x0003 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6BA8[] = {
|
||||
{{ 0x4718, 0x003c, 0x007d }, 0x0000 },
|
||||
{{ 0x5550, 0x0046, 0x0096 }, 0x0000 },
|
||||
{{ 0x954c, 0x002d, 0x004b }, 0x0000 },
|
||||
{{ 0xf546, 0x0028, 0x004b }, 0x0000 },
|
||||
{{ 0x0e38, 0x001e, 0x0032 }, 0x0001 },
|
||||
{{ 0x0222, 0x0032, 0x0064 }, 0x0002 },
|
||||
{{ 0x1ffe, 0x0028, 0x004b }, 0x0002 },
|
||||
{{ 0x31c4, 0x0032, 0x0064 }, 0x0002 },
|
||||
{{ 0x7ff8, 0x0037, 0x0064 }, 0x0002 },
|
||||
{{ 0xaaa0, 0x004b, 0x0096 }, 0x0002 },
|
||||
{{ 0xb8d8, 0x0037, 0x0064 }, 0x0002 },
|
||||
{{ 0xdff2, 0x001e, 0x0032 }, 0x0002 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
CloudData gSherbetLandClouds[] = {
|
||||
{ 0x4718, 0x003c, 0x007d, 0x0000 },
|
||||
{ 0x5550, 0x0046, 0x0096, 0x0000 },
|
||||
{ 0x954c, 0x002d, 0x004b, 0x0000 },
|
||||
{ 0xf546, 0x0028, 0x004b, 0x0000 },
|
||||
{ 0x0e38, 0x001e, 0x0032, 0x0001 },
|
||||
{ 0x0222, 0x0032, 0x0064, 0x0002 },
|
||||
{ 0x1ffe, 0x0028, 0x004b, 0x0002 },
|
||||
{ 0x31c4, 0x0032, 0x0064, 0x0002 },
|
||||
{ 0x7ff8, 0x0037, 0x0064, 0x0002 },
|
||||
{ 0xaaa0, 0x004b, 0x0096, 0x0002 },
|
||||
{ 0xb8d8, 0x0037, 0x0064, 0x0002 },
|
||||
{ 0xdff2, 0x001e, 0x0032, 0x0002 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6C10[] = {
|
||||
{{ 0x1ffe, 0x0028, 0x004b }, 0x0000 },
|
||||
{{ 0x60b0, 0x003c, 0x007d }, 0x0000 },
|
||||
{{ 0xb8d8, 0x0037, 0x0064 }, 0x0000 },
|
||||
{{ 0x4718, 0x003c, 0x007d }, 0x0001 },
|
||||
{{ 0x954c, 0x002d, 0x004b }, 0x0001 },
|
||||
{{ 0xf546, 0x0028, 0x004b }, 0x0001 },
|
||||
{{ 0x0e38, 0x001e, 0x0032 }, 0x0002 },
|
||||
{{ 0xa384, 0x0032, 0x0064 }, 0x0002 },
|
||||
{{ 0xddd0, 0x0046, 0x0096 }, 0x0002 },
|
||||
{{ 0x0222, 0x0032, 0x0064 }, 0x0003 },
|
||||
{{ 0x31c4, 0x0032, 0x0064 }, 0x0003 },
|
||||
{{ 0x7ff8, 0x0037, 0x0064 }, 0x0003 },
|
||||
{{ 0xaaa0, 0x004b, 0x0096 }, 0x0003 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
CloudData gKalimariDesertClouds[] = {
|
||||
{ 0x1ffe, 0x0028, 0x004b, 0x0000 },
|
||||
{ 0x60b0, 0x003c, 0x007d, 0x0000 },
|
||||
{ 0xb8d8, 0x0037, 0x0064, 0x0000 },
|
||||
{ 0x4718, 0x003c, 0x007d, 0x0001 },
|
||||
{ 0x954c, 0x002d, 0x004b, 0x0001 },
|
||||
{ 0xf546, 0x0028, 0x004b, 0x0001 },
|
||||
{ 0x0e38, 0x001e, 0x0032, 0x0002 },
|
||||
{ 0xa384, 0x0032, 0x0064, 0x0002 },
|
||||
{ 0xddd0, 0x0046, 0x0096, 0x0002 },
|
||||
{ 0x0222, 0x0032, 0x0064, 0x0003 },
|
||||
{ 0x31c4, 0x0032, 0x0064, 0x0003 },
|
||||
{ 0x7ff8, 0x0037, 0x0064, 0x0003 },
|
||||
{ 0xaaa0, 0x004b, 0x0096, 0x0003 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6C80[] = {
|
||||
{{ 0x0222, 0x0032, 0x000a }, 0x0000 },
|
||||
{{ 0x04fa, 0x0046, 0x000f }, 0x0000 },
|
||||
{{ 0x093e, 0x000a, 0x0014 }, 0x0000 },
|
||||
{{ 0x0e38, 0x001e, 0x000f }, 0x0000 },
|
||||
{{ 0x11c6, 0x0028, 0x0014 }, 0x0000 },
|
||||
{{ 0x1554, 0xfff6, 0x000f }, 0x0000 },
|
||||
{{ 0x1ddc, 0x000a, 0x0011 }, 0x0000 },
|
||||
{{ 0x1ffe, 0x0030, 0x0019 }, 0x0000 },
|
||||
{{ 0x271a, 0x0046, 0x0014 }, 0x0000 },
|
||||
{{ 0x27d0, 0xfff1, 0x0016 }, 0x0000 },
|
||||
{{ 0x2c14, 0x0014, 0x000f }, 0x0000 },
|
||||
{{ 0x31c4, 0x0032, 0x0016 }, 0x0000 },
|
||||
{{ 0x327a, 0x0000, 0x000a }, 0x0000 },
|
||||
{{ 0x3a4c, 0x000f, 0x0016 }, 0x0000 },
|
||||
{{ 0x3ffc, 0x002d, 0x0011 }, 0x0000 },
|
||||
{{ 0x40b2, 0xffdd, 0x0016 }, 0x0000 },
|
||||
{{ 0x4440, 0x0037, 0x0014 }, 0x0000 },
|
||||
{{ 0x4718, 0x003c, 0x000c }, 0x0000 },
|
||||
{{ 0x4718, 0x0050, 0x000c }, 0x0000 },
|
||||
{{ 0x4aa6, 0xfff6, 0x000f }, 0x0000 },
|
||||
{{ 0x5056, 0x0028, 0x000a }, 0x0000 },
|
||||
{{ 0x5550, 0x0046, 0x000f }, 0x0000 },
|
||||
{{ 0x60b0, 0x003c, 0x0016 }, 0x0000 },
|
||||
{{ 0x6388, 0xffdd, 0x0019 }, 0x0000 },
|
||||
{{ 0x64f4, 0x0023, 0x0011 }, 0x0000 },
|
||||
{{ 0x6aa4, 0x004b, 0x0014 }, 0x0000 },
|
||||
{{ 0x7054, 0x002d, 0x0019 }, 0x0000 },
|
||||
{{ 0x7498, 0x0014, 0x0012 }, 0x0000 },
|
||||
{{ 0x7bb4, 0xfff1, 0x001b }, 0x0000 },
|
||||
{{ 0x7ff8, 0x0037, 0x000a }, 0x0000 },
|
||||
{{ 0x8386, 0x0041, 0x0014 }, 0x0000 },
|
||||
{{ 0x8880, 0x0046, 0x000f }, 0x0000 },
|
||||
{{ 0x954c, 0x002d, 0x0011 }, 0x0000 },
|
||||
{{ 0x98da, 0x003c, 0x000f }, 0x0000 },
|
||||
{{ 0x9dd4, 0x0000, 0x000a }, 0x0000 },
|
||||
{{ 0xa384, 0x0046, 0x000f }, 0x0000 },
|
||||
{{ 0xa43a, 0x0032, 0x0017 }, 0x0000 },
|
||||
{{ 0xaaa0, 0x004b, 0x000f }, 0x0000 },
|
||||
{{ 0xae2e, 0x0028, 0x0011 }, 0x0000 },
|
||||
{{ 0xb1bc, 0x0023, 0x0014 }, 0x0000 },
|
||||
{{ 0xb8d8, 0xfff1, 0x000a }, 0x0000 },
|
||||
{{ 0xbc66, 0xffe2, 0x000f }, 0x0000 },
|
||||
{{ 0xc710, 0x001e, 0x000c }, 0x0000 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
StarData gToadsTurnpikeRainbowRoadStars[] = {
|
||||
{ 0x0222, 0x0032, 0x000a, 0x0000 },
|
||||
{ 0x04fa, 0x0046, 0x000f, 0x0000 },
|
||||
{ 0x093e, 0x000a, 0x0014, 0x0000 },
|
||||
{ 0x0e38, 0x001e, 0x000f, 0x0000 },
|
||||
{ 0x11c6, 0x0028, 0x0014, 0x0000 },
|
||||
{ 0x1554, 0xfff6, 0x000f, 0x0000 },
|
||||
{ 0x1ddc, 0x000a, 0x0011, 0x0000 },
|
||||
{ 0x1ffe, 0x0030, 0x0019, 0x0000 },
|
||||
{ 0x271a, 0x0046, 0x0014, 0x0000 },
|
||||
{ 0x27d0, 0xfff1, 0x0016, 0x0000 },
|
||||
{ 0x2c14, 0x0014, 0x000f, 0x0000 },
|
||||
{ 0x31c4, 0x0032, 0x0016, 0x0000 },
|
||||
{ 0x327a, 0x0000, 0x000a, 0x0000 },
|
||||
{ 0x3a4c, 0x000f, 0x0016, 0x0000 },
|
||||
{ 0x3ffc, 0x002d, 0x0011, 0x0000 },
|
||||
{ 0x40b2, 0xffdd, 0x0016, 0x0000 },
|
||||
{ 0x4440, 0x0037, 0x0014, 0x0000 },
|
||||
{ 0x4718, 0x003c, 0x000c, 0x0000 },
|
||||
{ 0x4718, 0x0050, 0x000c, 0x0000 },
|
||||
{ 0x4aa6, 0xfff6, 0x000f, 0x0000 },
|
||||
{ 0x5056, 0x0028, 0x000a, 0x0000 },
|
||||
{ 0x5550, 0x0046, 0x000f, 0x0000 },
|
||||
{ 0x60b0, 0x003c, 0x0016, 0x0000 },
|
||||
{ 0x6388, 0xffdd, 0x0019, 0x0000 },
|
||||
{ 0x64f4, 0x0023, 0x0011, 0x0000 },
|
||||
{ 0x6aa4, 0x004b, 0x0014, 0x0000 },
|
||||
{ 0x7054, 0x002d, 0x0019, 0x0000 },
|
||||
{ 0x7498, 0x0014, 0x0012, 0x0000 },
|
||||
{ 0x7bb4, 0xfff1, 0x001b, 0x0000 },
|
||||
{ 0x7ff8, 0x0037, 0x000a, 0x0000 },
|
||||
{ 0x8386, 0x0041, 0x0014, 0x0000 },
|
||||
{ 0x8880, 0x0046, 0x000f, 0x0000 },
|
||||
{ 0x954c, 0x002d, 0x0011, 0x0000 },
|
||||
{ 0x98da, 0x003c, 0x000f, 0x0000 },
|
||||
{ 0x9dd4, 0x0000, 0x000a, 0x0000 },
|
||||
{ 0xa384, 0x0046, 0x000f, 0x0000 },
|
||||
{ 0xa43a, 0x0032, 0x0017, 0x0000 },
|
||||
{ 0xaaa0, 0x004b, 0x000f, 0x0000 },
|
||||
{ 0xae2e, 0x0028, 0x0011, 0x0000 },
|
||||
{ 0xb1bc, 0x0023, 0x0014, 0x0000 },
|
||||
{ 0xb8d8, 0xfff1, 0x000a, 0x0000 },
|
||||
{ 0xbc66, 0xffe2, 0x000f, 0x0000 },
|
||||
{ 0xc710, 0x001e, 0x000c, 0x0000 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
StarSpawn D_800E6DE0[] = {
|
||||
{{ 0x0222, 0x0050, 0x000a }, 0x0000 },
|
||||
{{ 0x04fa, 0x0064, 0x000f }, 0x0000 },
|
||||
{{ 0x093e, 0x005a, 0x0014 }, 0x0000 },
|
||||
{{ 0x0e38, 0x003c, 0x000f }, 0x0000 },
|
||||
{{ 0x11c6, 0x0046, 0x0014 }, 0x0000 },
|
||||
{{ 0x1554, 0x0078, 0x000f }, 0x0000 },
|
||||
{{ 0x1c70, 0x001e, 0x0011 }, 0x0000 },
|
||||
{{ 0x1ffe, 0x0046, 0x0011 }, 0x0000 },
|
||||
{{ 0x271a, 0x0064, 0x0014 }, 0x0000 },
|
||||
{{ 0x2c14, 0x0032, 0x000f }, 0x0000 },
|
||||
{{ 0x31c4, 0x0050, 0x000a }, 0x0000 },
|
||||
{{ 0x3996, 0x0019, 0x000c }, 0x0000 },
|
||||
{{ 0x3a4c, 0x0037, 0x0016 }, 0x0000 },
|
||||
{{ 0x3bb8, 0x0019, 0x000c }, 0x0000 },
|
||||
{{ 0x3ffc, 0x004b, 0x0011 }, 0x0000 },
|
||||
{{ 0x4440, 0x0055, 0x0014 }, 0x0000 },
|
||||
{{ 0x4718, 0x005a, 0x000c }, 0x0000 },
|
||||
{{ 0x4aa6, 0x003c, 0x000f }, 0x0000 },
|
||||
{{ 0x5056, 0x0046, 0x000a }, 0x0000 },
|
||||
{{ 0x5550, 0x0064, 0x000f }, 0x0000 },
|
||||
{{ 0x60b0, 0x005a, 0x0016 }, 0x0000 },
|
||||
{{ 0x64f4, 0x0041, 0x0014 }, 0x0000 },
|
||||
{{ 0x6aa4, 0x0069, 0x0014 }, 0x0000 },
|
||||
{{ 0x7054, 0x004b, 0x0014 }, 0x0000 },
|
||||
{{ 0x71c0, 0x0078, 0x0012 }, 0x0000 },
|
||||
{{ 0x7498, 0x003c, 0x0012 }, 0x0000 },
|
||||
{{ 0x7ff8, 0x0055, 0x000a }, 0x0000 },
|
||||
{{ 0x8714, 0x0073, 0x000a }, 0x0000 },
|
||||
{{ 0x8880, 0x0064, 0x000f }, 0x0000 },
|
||||
{{ 0x954c, 0x004b, 0x0011 }, 0x0000 },
|
||||
{{ 0x98da, 0x003c, 0x000f }, 0x0000 },
|
||||
{{ 0x9dd4, 0x0032, 0x000a }, 0x0000 },
|
||||
{{ 0xa384, 0x0050, 0x000a }, 0x0000 },
|
||||
{{ 0xa43a, 0x006e, 0x000a }, 0x0000 },
|
||||
{{ 0xaaa0, 0x0069, 0x000f }, 0x0000 },
|
||||
{{ 0xae2e, 0x0046, 0x0011 }, 0x0000 },
|
||||
{{ 0xb1bc, 0x0041, 0x0014 }, 0x0000 },
|
||||
{{ 0xb8d8, 0x0055, 0x000a }, 0x0000 },
|
||||
{{ 0xbc66, 0x003c, 0x000f }, 0x0000 },
|
||||
{{ 0xc710, 0x0064, 0x000a }, 0x0000 },
|
||||
{{ 0xffff, 0x0000, 0x0000 }, 0x0000 },
|
||||
{{ 0x0000, 0x0000, 0x0000 }, 0x0000 },
|
||||
StarData gWarioStadiumStars[] = {
|
||||
{ 0x0222, 0x0050, 0x000a, 0x0000 },
|
||||
{ 0x04fa, 0x0064, 0x000f, 0x0000 },
|
||||
{ 0x093e, 0x005a, 0x0014, 0x0000 },
|
||||
{ 0x0e38, 0x003c, 0x000f, 0x0000 },
|
||||
{ 0x11c6, 0x0046, 0x0014, 0x0000 },
|
||||
{ 0x1554, 0x0078, 0x000f, 0x0000 },
|
||||
{ 0x1c70, 0x001e, 0x0011, 0x0000 },
|
||||
{ 0x1ffe, 0x0046, 0x0011, 0x0000 },
|
||||
{ 0x271a, 0x0064, 0x0014, 0x0000 },
|
||||
{ 0x2c14, 0x0032, 0x000f, 0x0000 },
|
||||
{ 0x31c4, 0x0050, 0x000a, 0x0000 },
|
||||
{ 0x3996, 0x0019, 0x000c, 0x0000 },
|
||||
{ 0x3a4c, 0x0037, 0x0016, 0x0000 },
|
||||
{ 0x3bb8, 0x0019, 0x000c, 0x0000 },
|
||||
{ 0x3ffc, 0x004b, 0x0011, 0x0000 },
|
||||
{ 0x4440, 0x0055, 0x0014, 0x0000 },
|
||||
{ 0x4718, 0x005a, 0x000c, 0x0000 },
|
||||
{ 0x4aa6, 0x003c, 0x000f, 0x0000 },
|
||||
{ 0x5056, 0x0046, 0x000a, 0x0000 },
|
||||
{ 0x5550, 0x0064, 0x000f, 0x0000 },
|
||||
{ 0x60b0, 0x005a, 0x0016, 0x0000 },
|
||||
{ 0x64f4, 0x0041, 0x0014, 0x0000 },
|
||||
{ 0x6aa4, 0x0069, 0x0014, 0x0000 },
|
||||
{ 0x7054, 0x004b, 0x0014, 0x0000 },
|
||||
{ 0x71c0, 0x0078, 0x0012, 0x0000 },
|
||||
{ 0x7498, 0x003c, 0x0012, 0x0000 },
|
||||
{ 0x7ff8, 0x0055, 0x000a, 0x0000 },
|
||||
{ 0x8714, 0x0073, 0x000a, 0x0000 },
|
||||
{ 0x8880, 0x0064, 0x000f, 0x0000 },
|
||||
{ 0x954c, 0x004b, 0x0011, 0x0000 },
|
||||
{ 0x98da, 0x003c, 0x000f, 0x0000 },
|
||||
{ 0x9dd4, 0x0032, 0x000a, 0x0000 },
|
||||
{ 0xa384, 0x0050, 0x000a, 0x0000 },
|
||||
{ 0xa43a, 0x006e, 0x000a, 0x0000 },
|
||||
{ 0xaaa0, 0x0069, 0x000f, 0x0000 },
|
||||
{ 0xae2e, 0x0046, 0x0011, 0x0000 },
|
||||
{ 0xb1bc, 0x0041, 0x0014, 0x0000 },
|
||||
{ 0xb8d8, 0x0055, 0x000a, 0x0000 },
|
||||
{ 0xbc66, 0x003c, 0x000f, 0x0000 },
|
||||
{ 0xc710, 0x0064, 0x000a, 0x0000 },
|
||||
{ 0xffff, 0x0000, 0x0000, 0x0000 },
|
||||
{ 0x0000, 0x0000, 0x0000, 0x0000 },
|
||||
};
|
||||
|
||||
u8 D_800E6F30[][3] = {
|
||||
|
||||
@@ -76,14 +76,14 @@ extern SplineDataUnused13 D_800E68E0;
|
||||
extern SplineData12 D_800E694C;
|
||||
extern SplineData8 D_800E69B0;
|
||||
extern SplineData8 D_800E69F4;
|
||||
extern StarSpawn D_800E6A38[];
|
||||
extern StarSpawn D_800E6AA8[];
|
||||
extern StarSpawn D_800E6B00[];
|
||||
extern StarSpawn D_800E6B38[];
|
||||
extern StarSpawn D_800E6BA8[];
|
||||
extern StarSpawn D_800E6C10[];
|
||||
extern StarSpawn D_800E6C80[];
|
||||
extern StarSpawn D_800E6DE0[];
|
||||
extern CloudData gLuigiRacewayClouds[];
|
||||
extern CloudData gYoshiValleyMooMooFarmClouds[];
|
||||
extern CloudData gKoopaTroopaBeachClouds[];
|
||||
extern CloudData gRoyalRacewayClouds[];
|
||||
extern CloudData gSherbetLandClouds[];
|
||||
extern CloudData gKalimariDesertClouds[];
|
||||
extern StarData gToadsTurnpikeRainbowRoadStars[];
|
||||
extern StarData gWarioStadiumStars[];
|
||||
extern u8 D_800E6F30[][3];
|
||||
extern u8 D_800E6F48[][3];
|
||||
|
||||
|
||||
+29
-52
@@ -2741,52 +2741,28 @@ void func_800788F8(s32 objectIndex, u16 rot, Camera *camera) {
|
||||
set_object_flag_status_false(objectIndex, 0x00000010);
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Nov-13-2023
|
||||
void func_800789AC(s32 arg0, Camera *arg1, s16 (*arg2)[4]) {
|
||||
s32 *var_s1;
|
||||
s32 var_s0;
|
||||
void update_clouds(s32 arg0, Camera *arg1, CloudData *cloudList) {
|
||||
s32 cloudIndex;
|
||||
s32 objectIndex;
|
||||
CloudData *cloud;
|
||||
|
||||
var_s0 = 0;
|
||||
if (D_8018D1F0 > 0) {
|
||||
var_s1 = &D_8018CC80[arg0];
|
||||
do {
|
||||
func_800788F8(*var_s1, (u16) *arg2[var_s0], arg1);
|
||||
var_s0 += 1;
|
||||
var_s1 += 4;
|
||||
} while (var_s0 < D_8018D1F0);
|
||||
for (cloudIndex = 0; cloudIndex < D_8018D1F0; cloudIndex++) {
|
||||
cloud = &cloudList[cloudIndex];
|
||||
objectIndex = D_8018CC80[arg0 + cloudIndex];
|
||||
func_800788F8(objectIndex, cloud->rotY, arg1);
|
||||
}
|
||||
/*
|
||||
s32 var_s0;
|
||||
|
||||
for (var_s0 = 0; var_s0 < D_8018D1F0; var_s0++) {
|
||||
func_800788F8(D_8018CC80[arg0 + var_s0], arg2[0][var_s0], arg1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/update_objects/func_800789AC.s")
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
Vec3su unk0;
|
||||
u16 pad;
|
||||
Vec3su unkA;
|
||||
u16 pad2;
|
||||
} test;
|
||||
void update_stars(s32 arg0, Camera *camera, StarData *starList) {
|
||||
s32 starIndex;
|
||||
s32 objectIndex;
|
||||
StarData *star;
|
||||
|
||||
typedef u16 testA[44][4];
|
||||
|
||||
void func_80078A44(s32 arg0, Camera *camera, u16 rot[][4]) {
|
||||
s32 objectIndex;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < D_8018D1F0; i++, arg0++) {
|
||||
objectIndex = D_8018CC80[arg0];
|
||||
|
||||
// rot[i][0]
|
||||
func_800788F8(objectIndex, *(u16 *)(rot + i), camera);
|
||||
switch (i % 5U) {
|
||||
for (starIndex = 0; starIndex < D_8018D1F0; starIndex++) {
|
||||
star = &starList[starIndex];
|
||||
objectIndex = D_8018CC80[arg0 + starIndex];
|
||||
func_800788F8(objectIndex, star->rotY, camera);
|
||||
switch (starIndex % 5U) {
|
||||
case 0:
|
||||
func_80073CB0(objectIndex, &gObjectList[objectIndex].primAlpha, 0x00000028, 0x000000B4, 0x000000FF, 0, -1);
|
||||
break;
|
||||
@@ -2849,40 +2825,41 @@ void func_80078C70(s32 arg0) {
|
||||
D_8018D218 = 0xA0;
|
||||
switch (gCurrentCourseId) { /* switch 2 */
|
||||
case COURSE_MARIO_RACEWAY: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6A38);
|
||||
// Uses Luigi Raceway's clouds for display purposes?
|
||||
update_clouds(sp1C, camera, gLuigiRacewayClouds);
|
||||
break;
|
||||
case COURSE_YOSHI_VALLEY: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6AA8);
|
||||
update_clouds(sp1C, camera, gYoshiValleyMooMooFarmClouds);
|
||||
break;
|
||||
case COURSE_FRAPPE_SNOWLAND: /* switch 2 */
|
||||
func_80078170(sp1C, camera);
|
||||
break;
|
||||
case COURSE_KOOPA_BEACH: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6B00);
|
||||
update_clouds(sp1C, camera, gKoopaTroopaBeachClouds);
|
||||
break;
|
||||
case COURSE_ROYAL_RACEWAY: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6B38);
|
||||
update_clouds(sp1C, camera, gRoyalRacewayClouds);
|
||||
break;
|
||||
case COURSE_LUIGI_RACEWAY: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6A38);
|
||||
update_clouds(sp1C, camera, gLuigiRacewayClouds);
|
||||
break;
|
||||
case COURSE_MOO_MOO_FARM: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6AA8);
|
||||
update_clouds(sp1C, camera, gYoshiValleyMooMooFarmClouds);
|
||||
break;
|
||||
case COURSE_TOADS_TURNPIKE: /* switch 2 */
|
||||
func_80078A44(sp1C, camera, D_800E6C80);
|
||||
update_stars(sp1C, camera, gToadsTurnpikeRainbowRoadStars);
|
||||
break;
|
||||
case COURSE_KALAMARI_DESERT: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6C10);
|
||||
update_clouds(sp1C, camera, gKalimariDesertClouds);
|
||||
break;
|
||||
case COURSE_SHERBET_LAND: /* switch 2 */
|
||||
func_800789AC(sp1C, camera, D_800E6BA8);
|
||||
update_clouds(sp1C, camera, gSherbetLandClouds);
|
||||
break;
|
||||
case COURSE_RAINBOW_ROAD: /* switch 2 */
|
||||
func_80078A44(sp1C, camera, D_800E6C80);
|
||||
update_stars(sp1C, camera, gToadsTurnpikeRainbowRoadStars);
|
||||
break;
|
||||
case COURSE_WARIO_STADIUM: /* switch 2 */
|
||||
func_80078A44(sp1C, camera, D_800E6DE0);
|
||||
update_stars(sp1C, camera, gWarioStadiumStars);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,8 @@ void func_800786EC(s32);
|
||||
void func_80078790(void);
|
||||
void update_snowflakes(void);
|
||||
void func_800788F8(s32, u16, Camera*);
|
||||
void func_800789AC(s32, Camera*, Vec4s*);
|
||||
void update_clouds(s32, Camera*, CloudData*);
|
||||
void update_stars(s32, Camera*, StarData*);
|
||||
void func_80078C68(void);
|
||||
void func_80078C70(s32);
|
||||
void func_80078F64(void);
|
||||
|
||||
Reference in New Issue
Block a user