From 0c57902463b811afface014985914de01e1a9fe6 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 19 Nov 2023 05:36:59 -0800 Subject: [PATCH] Hardcode Gust Planet "Trees" --- src/deh_tables.c | 8 +++++ src/info.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ src/info.h | 13 +++++++ 3 files changed, 111 insertions(+) diff --git a/src/deh_tables.c b/src/deh_tables.c index 0fcf92eeb..b29e08394 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4791,6 +4791,10 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_MEGABARRIER1", "S_MEGABARRIER2", "S_MEGABARRIER3", + + "S_GPZ_TREETHING_B", + "S_GPZ_TREETHING_M", + "S_GPZ_TREETHING_S", }; // RegEx to generate this from info.h: ^\tMT_([^,]+), --> \t"MT_\1", @@ -6002,6 +6006,10 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t "MT_DLZ_SEASAW_HITBOX", "MT_GPZ_SEASAW_SPAWN", "MT_GPZ_SEASAW_HITBOX", + + "MT_GPZ_TREETHING_B", + "MT_GPZ_TREETHING_M", + "MT_GPZ_TREETHING_S", }; const char *const MOBJFLAG_LIST[] = { diff --git a/src/info.c b/src/info.c index 3edce031f..74d760f2f 100644 --- a/src/info.c +++ b/src/info.c @@ -972,6 +972,11 @@ char sprnames[NUMSPRITES + 1][5] = "GPPS", "GPZS", + // Gust Planet Trees + "GPTB", + "GPTM", + "GPTS", + // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later "VIEW", }; @@ -5623,6 +5628,10 @@ state_t states[NUMSTATES] = {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, + + {SPR_GPTB, 0, -1, {A_SetScale}, 4*FRACUNIT, 0, S_NULL}, // S_GPZ_TREETHING_B, + {SPR_GPTM, 0, -1, {A_SetScale}, 4*FRACUNIT, 0, S_NULL}, // S_GPZ_TREETHING_M, + {SPR_GPTS, 0, -1, {A_SetScale}, 4*FRACUNIT, 0, S_NULL}, // S_GPZ_TREETHING_S, }; mobjinfo_t mobjinfo[NUMMOBJTYPES] = @@ -31829,6 +31838,87 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = MF_SOLID, // flags S_NULL // raisestate }, + + { // MT_GPZ_TREETHING_B, + 3436, // doomednum + S_GPZ_TREETHING_B, // 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 + 64*FRACUNIT, // radius + 40*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags + S_NULL // raisestate + }, + + { // MT_GPZ_TREETHING_M, + 3437, // doomednum + S_GPZ_TREETHING_M, // 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 + 64*FRACUNIT, // radius + 40*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags + S_NULL // raisestate + }, + + { // MT_GPZ_TREETHING_S, + 3438, // doomednum + S_GPZ_TREETHING_M, // 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 + 64*FRACUNIT, // radius + 40*FRACUNIT, // height + 0, // display offset + 0, // mass + 0, // damage + sfx_None, // activesound + MF_NOGRAVITY|MF_RUNSPAWNFUNC, // flags + S_NULL // raisestate + }, }; diff --git a/src/info.h b/src/info.h index f043c6c3f..53a9e62fd 100644 --- a/src/info.h +++ b/src/info.h @@ -1526,6 +1526,11 @@ typedef enum sprite SPR_GPPS, SPR_GPZS, + // Gust Planet Trees + SPR_GPTB, + SPR_GPTM, + SPR_GPTS, + // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later SPR_VIEW, @@ -6048,6 +6053,10 @@ typedef enum state S_MEGABARRIER2, S_MEGABARRIER3, + S_GPZ_TREETHING_B, + S_GPZ_TREETHING_M, + S_GPZ_TREETHING_S, + S_FIRSTFREESLOT, S_LASTFREESLOT = S_FIRSTFREESLOT + NUMSTATEFREESLOTS - 1, NUMSTATES @@ -7279,6 +7288,10 @@ typedef enum mobj_type MT_GPZ_SEASAW_SPAWN, MT_GPZ_SEASAW_HITBOX, + MT_GPZ_TREETHING_B, + MT_GPZ_TREETHING_M, + MT_GPZ_TREETHING_S, + MT_FIRSTFREESLOT, MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1, NUMMOBJTYPES