From 9f088f40bb17dd6d669c758aa561fbf7b5296990 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 16 Nov 2023 01:25:29 -0800 Subject: [PATCH] Add Mega Barrier states --- src/deh_tables.c | 5 +++++ src/info.c | 33 +++++++++++++++++++++++++++++++++ src/info.h | 8 ++++++++ 3 files changed, 46 insertions(+) diff --git a/src/deh_tables.c b/src/deh_tables.c index 7175b7a35..4fd9a3449 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4787,6 +4787,10 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_BLENDEYE_PUYO_SHOCK", "S_BLENDEYE_PUYO_DIE", "S_BLENDEYE_PUYO_DUST", + + "S_MEGABARRIER1", + "S_MEGABARRIER2", + "S_MEGABARRIER3", }; // RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1", @@ -5994,6 +5998,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t "MT_BLENDEYE_PUYO", "MT_BLENDEYE_PUYO_DUST", "MT_BLENDEYE_PUYO_DUST_COFFEE", + "MT_MEGABARRIER", }; const char *const MOBJFLAG_LIST[] = { diff --git a/src/info.c b/src/info.c index 71644da80..b1bc6060b 100644 --- a/src/info.c +++ b/src/info.c @@ -966,6 +966,8 @@ char sprnames[NUMSPRITES + 1][5] = "PUYD", "PUYE", + "MGSH", // Mega Barrier + // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later "VIEW", }; @@ -5613,6 +5615,10 @@ state_t states[NUMSTATES] = {SPR_PUYA, 3, -1, {A_BlendEyePuyoHack}, 0, 0, S_NULL}, // S_BLENDEYE_PUYO_SHOCK, {SPR_PUYA, 4|FF_ANIMATE, 5, {A_BlendEyePuyoHack}, 2, 2, S_NULL}, // S_BLENDEYE_PUYO_DIE, {SPR_PUYA, 5, 2, {A_BlendEyePuyoHack}, 0, 0, S_BLENDEYE_PUYO_DIE}, // S_BLENDEYE_PUYO_DUST, + + {SPR_MGSH, 2|FF_PAPERSPRITE|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_MEGABARRIER1, + {SPR_MGSH, 1|FF_PAPERSPRITE|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_MEGABARRIER2, + {SPR_MGSH, 0|FF_PAPERSPRITE|FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL}, // S_MEGABARRIER3, }; mobjinfo_t mobjinfo[NUMMOBJTYPES] = @@ -31738,6 +31744,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SCENERY|MF_NOCLIPTHING|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags S_NULL // raisestate }, + + { // MT_MEGABARRIER + -1, // doomednum + S_MEGABARRIER1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 0, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 0, // radius + 0, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_SCENERY|MF_NOSQUISH, // flags + S_NULL // raisestate + } }; diff --git a/src/info.h b/src/info.h index 3d83aebed..90f80efcf 100644 --- a/src/info.h +++ b/src/info.h @@ -1520,6 +1520,8 @@ typedef enum sprite SPR_PUYD, SPR_PUYE, + SPR_MGSH, // Mega Barrier + // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later SPR_VIEW, @@ -6038,6 +6040,10 @@ typedef enum state S_BLENDEYE_PUYO_DIE, S_BLENDEYE_PUYO_DUST, + S_MEGABARRIER1, + S_MEGABARRIER2, + S_MEGABARRIER3, + S_FIRSTFREESLOT, S_LASTFREESLOT = S_FIRSTFREESLOT + NUMSTATEFREESLOTS - 1, NUMSTATES @@ -7264,6 +7270,8 @@ typedef enum mobj_type MT_BLENDEYE_PUYO_DUST, MT_BLENDEYE_PUYO_DUST_COFFEE, + MT_MEGABARRIER, + MT_FIRSTFREESLOT, MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1, NUMMOBJTYPES