diff --git a/include/object_fields.h b/include/object_fields.h index 2ee01bcd..2a17465f 100644 --- a/include/object_fields.h +++ b/include/object_fields.h @@ -153,7 +153,7 @@ #define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D) #define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E) #define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F) -#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40) +#define /*0x188*/ oBehParams OBJECT_FIELD_U32(0x40) #define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41) #define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42) #define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43) @@ -606,7 +606,7 @@ #define /*0x110*/ oIsFloomba OBJECT_FIELD_S32(0x22) #ifdef INTRO_FLOOMBAS -#define /*0x1AC*/ oZoomCounter OBJECT_FIELD_S32(0x49) +#define /*0x1AC*/ oZoomCounter OBJECT_FIELD_U32(0x49) #define /*0x1B0*/ oZoomPosZ OBJECT_FIELD_F32(0x4A) #endif #endif diff --git a/src/game/behaviors/snowman.inc.c b/src/game/behaviors/snowman.inc.c index 40824c2d..d02071be 100644 --- a/src/game/behaviors/snowman.inc.c +++ b/src/game/behaviors/snowman.inc.c @@ -155,7 +155,7 @@ void bhv_snowmans_bottom_loop(void) { void bhv_snowmans_head_init(void) { u8 starFlags = save_file_get_star_flags(gCurrSaveFileNum - 1, COURSE_NUM_TO_INDEX(gCurrCourseNum)); - s8 behParams = GET_BPARAM1(o->oBehParams); + u8 behParams = GET_BPARAM1(o->oBehParams); cur_obj_scale(0.7f); diff --git a/src/game/behaviors/sparkle_spawn_star.inc.c b/src/game/behaviors/sparkle_spawn_star.inc.c index 0774742e..feb076a7 100644 --- a/src/game/behaviors/sparkle_spawn_star.inc.c +++ b/src/game/behaviors/sparkle_spawn_star.inc.c @@ -16,8 +16,12 @@ void bhv_spawned_star_init(void) { if (!(o->oInteractionSubtype & INT_SUBTYPE_NO_EXIT)) { o->oBehParams = o->parentObj->oBehParams; } - s32 param = GET_BPARAM1(o->oBehParams); + u8 param = GET_BPARAM1(o->oBehParams); +#ifdef GLOBAL_STAR_IDS + if ((1 << (param % 7)) & save_file_get_star_flags((gCurrSaveFileNum - 1), COURSE_NUM_TO_INDEX(param / 7))) { +#else if ((1 << param) & save_file_get_star_flags((gCurrSaveFileNum - 1), COURSE_NUM_TO_INDEX(gCurrCourseNum))) { +#endif cur_obj_set_model(MODEL_TRANSPARENT_STAR); } diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 4cdfda57..f09455ba 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -13,7 +13,7 @@ static struct ObjectHitbox sCollectStarHitbox = { }; void bhv_collect_star_init(void) { - s8 starId = GET_BPARAM1(o->oBehParams); + u8 starId = GET_BPARAM1(o->oBehParams); #ifdef GLOBAL_STAR_IDS u8 currentLevelStarFlags = save_file_get_star_flags((gCurrSaveFileNum - 1), COURSE_NUM_TO_INDEX(starId / 7)); if (currentLevelStarFlags & (1 << (starId % 7))) {