You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Added config option for previewable blue coins (#507)
* Added config option for previewable blue coins * Clean up previewable blue coin implementation to only be a couple lines --------- Co-authored-by: Colin Tong <tongcolin@live.ca>
This commit is contained in:
@@ -24,6 +24,11 @@
|
||||
*/
|
||||
// #define BLUE_COIN_SWITCH_RETRY
|
||||
|
||||
/**
|
||||
* Allow previewing blue coin locations from a blue coin switch when Mario is standing on the blue coin switch.
|
||||
*/
|
||||
// #define BLUE_COIN_SWITCH_PREVIEW
|
||||
|
||||
/****************
|
||||
* -- GOOMBA --
|
||||
****************/
|
||||
|
||||
@@ -34,15 +34,20 @@ void bhv_hidden_blue_coin_loop(void) {
|
||||
o->oAction = HIDDEN_BLUE_COIN_ACT_ACTIVE;
|
||||
}
|
||||
|
||||
#ifdef BLUE_COIN_SWITCH_PREVIEW
|
||||
if (gMarioObject->platform == blueCoinSwitch) {
|
||||
cur_obj_enable_rendering();
|
||||
} else {
|
||||
cur_obj_disable_rendering();
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
||||
case HIDDEN_BLUE_COIN_ACT_ACTIVE:
|
||||
// Become tangible
|
||||
cur_obj_enable_rendering();
|
||||
cur_obj_become_tangible();
|
||||
#ifdef BLUE_COIN_SWITCH_RETRY
|
||||
o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||
#endif
|
||||
|
||||
// Delete the coin once collected
|
||||
if (o->oInteractStatus & INT_STATUS_INTERACTED) {
|
||||
@@ -55,6 +60,7 @@ void bhv_hidden_blue_coin_loop(void) {
|
||||
if (cur_obj_wait_then_blink(200, 20)) {
|
||||
#ifdef BLUE_COIN_SWITCH_RETRY
|
||||
o->oAction = HIDDEN_BLUE_COIN_ACT_INACTIVE;
|
||||
o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||
#else
|
||||
obj_mark_for_deletion(o);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user