Convert oBehParams to be unsigned, and fix GLOBAL_STAR_IDS to support more than 128 stars (#503)
This commit is contained in:
1 parent
68f09d34ea
commit
6291c77a18
4 files changed
+9
-5
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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))) {
|
||||
|
||||
Reference in new issue
Block a user