You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Convert oBehParams to be unsigned, and fix GLOBAL_STAR_IDS to support more than 128 stars (#503)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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