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
|
--- @field public yaw integer
|
||||||
|
|
||||||
--- @class LevelValues
|
--- @class LevelValues
|
||||||
|
--- @field public bubbleOnDeathBarrierInCapStages boolean
|
||||||
--- @field public cellHeightLimit integer
|
--- @field public cellHeightLimit integer
|
||||||
--- @field public coinsRequiredForCoinStar integer
|
--- @field public coinsRequiredForCoinStar integer
|
||||||
--- @field public disableActs boolean
|
--- @field public disableActs boolean
|
||||||
|
|
|
@ -948,6 +948,7 @@
|
||||||
|
|
||||||
| Field | Type | Access |
|
| Field | Type | Access |
|
||||||
| ----- | ---- | ------ |
|
| ----- | ---- | ------ |
|
||||||
|
| bubbleOnDeathBarrierInCapStages | `boolean` | |
|
||||||
| cellHeightLimit | `integer` | |
|
| cellHeightLimit | `integer` | |
|
||||||
| coinsRequiredForCoinStar | `integer` | |
|
| coinsRequiredForCoinStar | `integer` | |
|
||||||
| disableActs | `boolean` | |
|
| disableActs | `boolean` | |
|
||||||
|
|
|
@ -117,7 +117,8 @@ struct LevelValues gDefaultLevelValues = {
|
||||||
.wingCapLookUpReq = 10,
|
.wingCapLookUpReq = 10,
|
||||||
.maxLives = 100,
|
.maxLives = 100,
|
||||||
.maxCoins = 999,
|
.maxCoins = 999,
|
||||||
.numCoinsToLife = 50
|
.numCoinsToLife = 50,
|
||||||
|
.bubbleOnDeathBarrierInCapStages = false
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LevelValues gLevelValues = { 0 };
|
struct LevelValues gLevelValues = { 0 };
|
||||||
|
|
|
@ -85,6 +85,7 @@ struct LevelValues {
|
||||||
u16 maxLives;
|
u16 maxLives;
|
||||||
u16 maxCoins;
|
u16 maxCoins;
|
||||||
u16 numCoinsToLife;
|
u16 numCoinsToLife;
|
||||||
|
bool bubbleOnDeathBarrierInCapStages;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct LevelValues gLevelValues;
|
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_TOTWC: // (21) Tower of the Wing Cap
|
||||||
case COURSE_VCUTM: // (22) Vanish Cap Under the Moat
|
case COURSE_VCUTM: // (22) Vanish Cap Under the Moat
|
||||||
case COURSE_WMOTR: // (23) Winged Mario over the Rainbow
|
case COURSE_WMOTR: // (23) Winged Mario over the Rainbow
|
||||||
break;
|
if (!gLevelValues.bubbleOnDeathBarrierInCapStages){
|
||||||
default:
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
mario_set_bubbled(m);
|
mario_set_bubbled(m);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -446,8 +446,8 @@ void mario_set_bubbled(struct MarioState* m) {
|
||||||
|
|
||||||
gLocalBubbleCounter = 20;
|
gLocalBubbleCounter = 20;
|
||||||
|
|
||||||
set_mario_action(m, ACT_BUBBLED, 0);
|
drop_and_set_mario_action(m, ACT_BUBBLED, 0);
|
||||||
if (m->numLives != -1) {
|
if (m->numLives > -1) {
|
||||||
m->numLives--;
|
m->numLives--;
|
||||||
}
|
}
|
||||||
m->healCounter = 0;
|
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 },
|
{ "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] = {
|
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 },
|
{ "cellHeightLimit", LVT_S16, offsetof(struct LevelValues, cellHeightLimit), false, LOT_NONE },
|
||||||
{ "coinsRequiredForCoinStar", LVT_S16, offsetof(struct LevelValues, coinsRequiredForCoinStar), false, LOT_NONE },
|
{ "coinsRequiredForCoinStar", LVT_S16, offsetof(struct LevelValues, coinsRequiredForCoinStar), false, LOT_NONE },
|
||||||
{ "disableActs", LVT_BOOL, offsetof(struct LevelValues, disableActs), false, LOT_NONE },
|
{ "disableActs", LVT_BOOL, offsetof(struct LevelValues, disableActs), false, LOT_NONE },
|
||||||
|
|
Loading…
Reference in New Issue