You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Unlock all define, to open every vanilla locked thing
This commit is contained in:
@@ -129,6 +129,8 @@
|
||||
#define AREA_COUNT 8
|
||||
// Lightweight directional lighting engine by Fazana. Intended for giving proximity and positional pointlights to small objects.
|
||||
//#define PUPPYLIGHTS
|
||||
// Open all courses and doors. Used for debugging purposes to unlock all content.
|
||||
//#define UNLOCK_ALL
|
||||
|
||||
// BUG/GAME QOL FIXES
|
||||
// Fix instant warp offset not working when warping across different areas
|
||||
|
||||
@@ -85,10 +85,12 @@ static s32 boo_should_be_active(void) {
|
||||
void bhv_courtyard_boo_triplet_init(void) {
|
||||
s32 i;
|
||||
struct Object *boo;
|
||||
|
||||
#ifndef UNLOCK_ALL
|
||||
if (gHudDisplay.stars < 12) {
|
||||
obj_mark_for_deletion(o);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
for (i = 0; i < 3; i++) {
|
||||
boo = spawn_object_relative(
|
||||
0x01,
|
||||
@@ -725,10 +727,12 @@ static void boo_with_cage_act_3(void) {
|
||||
|
||||
void bhv_boo_with_cage_init(void) {
|
||||
struct Object* cage;
|
||||
|
||||
#ifndef UNLOCK_ALL
|
||||
if (gHudDisplay.stars < 12) {
|
||||
obj_mark_for_deletion(o);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
cage = spawn_object(o, MODEL_HAUNTED_CAGE, bhvBooCage);
|
||||
cage->oBehParams = o->oBehParams;
|
||||
}
|
||||
@@ -809,11 +813,11 @@ void bhv_boo_in_castle_loop(void) {
|
||||
|
||||
if (o->oAction == 0) {
|
||||
cur_obj_hide();
|
||||
|
||||
#ifndef UNLOCK_ALL
|
||||
if (gHudDisplay.stars < 12) {
|
||||
obj_mark_for_deletion(o);
|
||||
}
|
||||
|
||||
#endif
|
||||
if (gMarioCurrentRoom == 1) {
|
||||
o->oAction++;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
// ddd_warp.c.inc
|
||||
|
||||
void bhv_ddd_warp_loop(void) {
|
||||
#ifndef UNLOCK_ALL
|
||||
if (gDddPaintingStatus & BOWSERS_SUB_BEATEN)
|
||||
#endif
|
||||
o->collisionData = segmented_to_virtual(inside_castle_seg7_collision_ddd_warp_2);
|
||||
#ifndef UNLOCK_ALL
|
||||
else
|
||||
o->collisionData = segmented_to_virtual(inside_castle_seg7_collision_ddd_warp);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -915,6 +915,7 @@ u32 interact_warp_door(struct MarioState *m, UNUSED u32 interactType, struct Obj
|
||||
u32 actionArg;
|
||||
|
||||
if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) {
|
||||
#ifndef UNLOCK_ALL
|
||||
if (warpDoorId == 1 && !(saveFlags & SAVE_FLAG_UNLOCKED_UPSTAIRS_DOOR)) {
|
||||
if (!(saveFlags & SAVE_FLAG_HAVE_KEY_2)) {
|
||||
if (!sDisplayingDoorText) {
|
||||
@@ -943,6 +944,7 @@ u32 interact_warp_door(struct MarioState *m, UNUSED u32 interactType, struct Obj
|
||||
|
||||
doorAction = ACT_UNLOCKING_KEY_DOOR;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) {
|
||||
actionArg = should_push_or_pull_door(m, o) + 0x00000004;
|
||||
@@ -1009,7 +1011,9 @@ u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *
|
||||
s16 numStars = save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1);
|
||||
|
||||
if (m->action == ACT_WALKING || m->action == ACT_DECELERATING) {
|
||||
#ifndef UNLOCK_ALL
|
||||
if (numStars >= requiredNumStars) {
|
||||
#endif
|
||||
u32 actionArg = should_push_or_pull_door(m, o);
|
||||
u32 enterDoorAction;
|
||||
u32 doorSaveFileFlag;
|
||||
@@ -1028,11 +1032,13 @@ u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *
|
||||
enterDoorAction = ACT_ENTERING_STAR_DOOR;
|
||||
}
|
||||
|
||||
#ifndef UNLOCK_ALL
|
||||
if (doorSaveFileFlag != 0 && !(save_file_get_flags() & doorSaveFileFlag)) {
|
||||
enterDoorAction = ACT_UNLOCKING_STAR_DOOR;
|
||||
}
|
||||
|
||||
#endif
|
||||
return set_mario_action(m, enterDoorAction, actionArg);
|
||||
#ifndef UNLOCK_ALL
|
||||
} else if (!sDisplayingDoorText) {
|
||||
u32 text = DIALOG_022 << 16;
|
||||
|
||||
@@ -1062,6 +1068,7 @@ u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *
|
||||
sDisplayingDoorText = TRUE;
|
||||
return set_mario_action(m, ACT_READING_AUTOMATIC_DIALOG, text);
|
||||
}
|
||||
#endif
|
||||
} else if (m->action == ACT_IDLE && sDisplayingDoorText == TRUE && requiredNumStars == 70) {
|
||||
m->interactObj = o;
|
||||
m->usedObj = o;
|
||||
|
||||
Reference in New Issue
Block a user