Add gLevelValues.bubbleOnDeathBarrierInCapStages (#449)
Also add a few smaller fixes with bubbles
This commit is contained in:
parent
2c4ff40a23
commit
e97f8e6632
|
@ -642,6 +642,7 @@
|
|||
--- @field public yaw integer
|
||||
|
||||
--- @class LevelValues
|
||||
--- @field public bubbleOnDeathBarrierInCapStages boolean
|
||||
--- @field public cellHeightLimit integer
|
||||
--- @field public coinsRequiredForCoinStar integer
|
||||
--- @field public disableActs boolean
|
||||
|
|
|
@ -948,6 +948,7 @@
|
|||
|
||||
| Field | Type | Access |
|
||||
| ----- | ---- | ------ |
|
||||
| bubbleOnDeathBarrierInCapStages | `boolean` | |
|
||||
| cellHeightLimit | `integer` | |
|
||||
| coinsRequiredForCoinStar | `integer` | |
|
||||
| disableActs | `boolean` | |
|
||||
|
|
|
@ -117,7 +117,8 @@ struct LevelValues gDefaultLevelValues = {
|
|||
.wingCapLookUpReq = 10,
|
||||
.maxLives = 100,
|
||||
.maxCoins = 999,
|
||||
.numCoinsToLife = 50
|
||||
.numCoinsToLife = 50,
|
||||
.bubbleOnDeathBarrierInCapStages = false
|
||||
};
|
||||
|
||||
struct LevelValues gLevelValues = { 0 };
|
||||
|
|
|
@ -85,6 +85,7 @@ struct LevelValues {
|
|||
u16 maxLives;
|
||||
u16 maxCoins;
|
||||
u16 numCoinsToLife;
|
||||
bool bubbleOnDeathBarrierInCapStages;
|
||||
};
|
||||
|
||||
extern struct LevelValues gLevelValues;
|
||||
|
|
|
@ -2372,8 +2372,10 @@ void check_death_barrier(struct MarioState *m) {
|
|||
case COURSE_TOTWC: // (21) Tower of the Wing Cap
|
||||
case COURSE_VCUTM: // (22) Vanish Cap Under the Moat
|
||||
case COURSE_WMOTR: // (23) Winged Mario over the Rainbow
|
||||
break;
|
||||
default:
|
||||
if (!gLevelValues.bubbleOnDeathBarrierInCapStages){
|
||||
break;
|
||||
}
|
||||
default:
|
||||
mario_set_bubbled(m);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -446,8 +446,8 @@ void mario_set_bubbled(struct MarioState* m) {
|
|||
|
||||
gLocalBubbleCounter = 20;
|
||||
|
||||
set_mario_action(m, ACT_BUBBLED, 0);
|
||||
if (m->numLives != -1) {
|
||||
drop_and_set_mario_action(m, ACT_BUBBLED, 0);
|
||||
if (m->numLives > -1) {
|
||||
m->numLives--;
|
||||
}
|
||||
m->healCounter = 0;
|
||||
|
|
|
@ -743,8 +743,9 @@ static struct LuaObjectField sLakituStateFields[LUA_LAKITU_STATE_FIELD_COUNT] =
|
|||
{ "yaw", LVT_S16, offsetof(struct LakituState, yaw), false, LOT_NONE },
|
||||
};
|
||||
|
||||
#define LUA_LEVEL_VALUES_FIELD_COUNT 45
|
||||
#define LUA_LEVEL_VALUES_FIELD_COUNT 46
|
||||
static struct LuaObjectField sLevelValuesFields[LUA_LEVEL_VALUES_FIELD_COUNT] = {
|
||||
{ "bubbleOnDeathBarrierInCapStages", LVT_BOOL, offsetof(struct LevelValues, bubbleOnDeathBarrierInCapStages), false, LOT_NONE },
|
||||
{ "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE },
|
||||
{ "coinsRequiredForCoinStar", LVT_S16, offsetof(struct LevelValues, coinsRequiredForCoinStar), false, LOT_NONE },
|
||||
{ "disableActs", LVT_BOOL, offsetof(struct LevelValues, disableActs), false, LOT_NONE },
|
||||
|
|
Loading…
Reference in New Issue