mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Secret stuff. (I intend to keep candid discussion of this outside of any commits; you'll see me write up a comment describing what's going on here soon.)
This commit is contained in:
parent
96aa11c825
commit
67f5b2245f
13 changed files with 135 additions and 39 deletions
|
@ -1850,6 +1850,8 @@ static void readtextpromptpage(MYFILE *f, INT32 num, INT32 pagenum)
|
|||
}
|
||||
// end copypasta from readcutscenescene
|
||||
else if (fastcmp(word, "NAME"))
|
||||
{
|
||||
if (*word2 != '\0')
|
||||
{
|
||||
INT32 j;
|
||||
|
||||
|
@ -1870,6 +1872,9 @@ static void readtextpromptpage(MYFILE *f, INT32 num, INT32 pagenum)
|
|||
|
||||
strncpy(textprompts[num]->page[pagenum].name, name, 32);
|
||||
}
|
||||
else
|
||||
*textprompts[num]->page[pagenum].name = '\0';
|
||||
}
|
||||
else if (fastcmp(word, "ICON"))
|
||||
strncpy(textprompts[num]->page[pagenum].iconname, word2, 8);
|
||||
else if (fastcmp(word, "ICONALIGN"))
|
||||
|
@ -1901,6 +1906,7 @@ static void readtextpromptpage(MYFILE *f, INT32 num, INT32 pagenum)
|
|||
else if (i == 16 || fastcmp(word2, "BLUE")) backcolor = 16;
|
||||
else if (i == 17 || fastcmp(word2, "PURPLE")) backcolor = 17;
|
||||
else if (i == 18 || fastcmp(word2, "LAVENDER")) backcolor = 18;
|
||||
else if (i >= 256 && i < 512) backcolor = i; // non-transparent palette index
|
||||
else if (i < 0) backcolor = INT32_MAX; // CONS_BACKCOLOR user-configured
|
||||
else backcolor = 1; // default gray
|
||||
textprompts[num]->page[pagenum].backcolor = backcolor;
|
||||
|
@ -5665,6 +5671,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
// Trapgoyle Demon fire
|
||||
"S_DEMONFIRE",
|
||||
|
||||
// The letter
|
||||
"S_LETTER",
|
||||
|
||||
// GFZ flowers
|
||||
"S_GFZFLOWERA",
|
||||
"S_GFZFLOWERB",
|
||||
|
@ -7652,6 +7661,9 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
|||
"MT_ARROW", // Arrow
|
||||
"MT_DEMONFIRE", // Trapgoyle fire
|
||||
|
||||
// The letter
|
||||
"MT_LETTER",
|
||||
|
||||
// Greenflower Scenery
|
||||
"MT_GFZFLOWER1",
|
||||
"MT_GFZFLOWER2",
|
||||
|
|
|
@ -3453,6 +3453,17 @@ void F_TextPromptDrawer(void)
|
|||
V_DrawString(textr-8, chevrony + (skullAnimCounter/5), (V_SNAPTOBOTTOM|V_YELLOWMAP), "\x1B"); // down arrow
|
||||
}
|
||||
|
||||
#define nocontrolallowed(j) {\
|
||||
players[j].powers[pw_nocontrol] = 1;\
|
||||
if (players[j].mo)\
|
||||
{\
|
||||
if (players[j].mo->state == states+S_PLAY_STND && players[j].mo->tics != -1)\
|
||||
players[j].mo->tics++;\
|
||||
else if (players[j].mo->state == states+S_PLAY_WAIT)\
|
||||
P_SetPlayerMobjState(players[j].mo, S_PLAY_STND);\
|
||||
}\
|
||||
}
|
||||
|
||||
void F_TextPromptTicker(void)
|
||||
{
|
||||
INT32 i;
|
||||
|
@ -3482,10 +3493,10 @@ void F_TextPromptTicker(void)
|
|||
// But only consoleplayer can advance the prompt.
|
||||
// \todo Proper per-player splitscreen support (individual prompts)
|
||||
if (i == consoleplayer || i == secondarydisplayplayer)
|
||||
players[i].powers[pw_nocontrol] = 1;
|
||||
nocontrolallowed(i)
|
||||
}
|
||||
else if (i == consoleplayer)
|
||||
players[i].powers[pw_nocontrol] = 1;
|
||||
nocontrolallowed(i)
|
||||
|
||||
if (!splitscreen)
|
||||
break;
|
||||
|
@ -3527,7 +3538,7 @@ void F_TextPromptTicker(void)
|
|||
continue;
|
||||
}
|
||||
else if (i == consoleplayer)
|
||||
players[i].powers[pw_nocontrol] = 1;
|
||||
nocontrolallowed(i)
|
||||
else
|
||||
continue;
|
||||
|
||||
|
|
|
@ -3912,7 +3912,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
|||
}
|
||||
|
||||
if (netgame || multiplayer) // Nice try, haxor.
|
||||
ultimatemode = false;
|
||||
pultmode = false;
|
||||
|
||||
if (!demoplayback && !netgame) // Netgame sets random seed elsewhere, demo playback sets seed just before us!
|
||||
P_SetRandSeed(M_RandomizedSeed()); // Use a more "Random" random seed
|
||||
|
|
32
src/info.c
32
src/info.c
|
@ -195,6 +195,9 @@ char sprnames[NUMSPRITES + 1][5] =
|
|||
"AROW", // Arrow
|
||||
"CFIR", // Colored fire of various sorts
|
||||
|
||||
// The letter
|
||||
"LETR",
|
||||
|
||||
// Greenflower Scenery
|
||||
"FWR1",
|
||||
"FWR2", // GFZ Sunflower
|
||||
|
@ -2202,6 +2205,8 @@ state_t states[NUMSTATES] =
|
|||
|
||||
{SPR_CFIR, FF_FULLBRIGHT|FF_ANIMATE, -1, {NULL}, 5, 2, S_NULL}, // S_DEMONFIRE
|
||||
|
||||
{SPR_LETR, FF_PAPERSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_LETTER
|
||||
|
||||
// GFZ flowers
|
||||
{SPR_FWR1, FF_ANIMATE, -1, {NULL}, 7, 3, S_NULL}, // S_GFZFLOWERA
|
||||
{SPR_FWR2, FF_ANIMATE, -1, {NULL}, 19, 3, S_NULL}, // S_GFZFLOWERB
|
||||
|
@ -9909,6 +9914,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_LETTER
|
||||
-1, // doomednum
|
||||
S_LETTER, // spawnstate
|
||||
1, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // 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
|
||||
7*FRACUNIT, // radius -- heaven
|
||||
13*FRACUNIT, // height -- hell
|
||||
0, // display offset
|
||||
0, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SPECIAL|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_GFZFLOWER1
|
||||
800, // doomednum
|
||||
S_GFZFLOWERA, // spawnstate
|
||||
|
|
|
@ -451,6 +451,9 @@ typedef enum sprite
|
|||
SPR_AROW, // Arrow
|
||||
SPR_CFIR, // Colored fire of various sorts
|
||||
|
||||
// The letter
|
||||
SPR_LETR,
|
||||
|
||||
// Greenflower Scenery
|
||||
SPR_FWR1,
|
||||
SPR_FWR2, // GFZ Sunflower
|
||||
|
@ -2338,6 +2341,9 @@ typedef enum state
|
|||
// Trapgoyle Demon fire
|
||||
S_DEMONFIRE,
|
||||
|
||||
// The letter
|
||||
S_LETTER,
|
||||
|
||||
// GFZ flowers
|
||||
S_GFZFLOWERA,
|
||||
S_GFZFLOWERB,
|
||||
|
@ -4348,6 +4354,9 @@ typedef enum mobj_type
|
|||
MT_ARROW, // Arrow
|
||||
MT_DEMONFIRE, // Trapgoyle fire
|
||||
|
||||
// The letter
|
||||
MT_LETTER,
|
||||
|
||||
// Greenflower Scenery
|
||||
MT_GFZFLOWER1,
|
||||
MT_GFZFLOWER2,
|
||||
|
|
|
@ -70,7 +70,6 @@ static UINT8 cheatf_ultimate(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef REDXVI
|
||||
static UINT8 cheatf_warp(void)
|
||||
{
|
||||
if (modifiedgame)
|
||||
|
@ -83,16 +82,15 @@ static UINT8 cheatf_warp(void)
|
|||
|
||||
// Temporarily unlock stuff.
|
||||
G_SetGameModified(false);
|
||||
unlockables[2].unlocked = true; // credits
|
||||
unlockables[3].unlocked = true; // sound test
|
||||
unlockables[16].unlocked = true; // level select
|
||||
unlockables[31].unlocked = true; // credits
|
||||
unlockables[30].unlocked = true; // sound test
|
||||
unlockables[28].unlocked = true; // level select
|
||||
|
||||
// Refresh secrets menu existing.
|
||||
M_ClearMenus(true);
|
||||
M_StartControlPanel();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEVELOP
|
||||
static UINT8 cheatf_devmode(void)
|
||||
|
@ -133,20 +131,18 @@ static cheatseq_t cheat_ultimate_joy = {
|
|||
SCRAMBLE(KEY_ENTER), 0xff }
|
||||
};
|
||||
|
||||
#ifdef REDXVI
|
||||
static cheatseq_t cheat_warp = {
|
||||
0, cheatf_warp,
|
||||
{ SCRAMBLE('r'), SCRAMBLE('e'), SCRAMBLE('d'), SCRAMBLE('x'), SCRAMBLE('v'), SCRAMBLE('i'), 0xff }
|
||||
{ SCRAMBLE('c'), SCRAMBLE('a'), SCRAMBLE('s'), SCRAMBLE('h'), SCRAMBLE('r'), SCRAMBLE('i'), SCRAMBLE('d'), SCRAMBLE('a'), 0xff }
|
||||
};
|
||||
|
||||
static cheatseq_t cheat_warp_joy = {
|
||||
0, cheatf_warp,
|
||||
{ SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_UPARROW),
|
||||
SCRAMBLE(KEY_RIGHTARROW), SCRAMBLE(KEY_RIGHTARROW), SCRAMBLE(KEY_UPARROW),
|
||||
SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_UPARROW),
|
||||
{ SCRAMBLE(KEY_RIGHTARROW), SCRAMBLE(KEY_RIGHTARROW), SCRAMBLE(KEY_DOWNARROW),
|
||||
SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_DOWNARROW),
|
||||
SCRAMBLE(KEY_RIGHTARROW), SCRAMBLE(KEY_DOWNARROW),
|
||||
SCRAMBLE(KEY_ENTER), 0xff }
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef DEVELOP
|
||||
static cheatseq_t cheat_devmode = {
|
||||
|
@ -239,10 +235,8 @@ boolean cht_Responder(event_t *ev)
|
|||
|
||||
ret += cht_CheckCheat(&cheat_ultimate, (char)ch);
|
||||
ret += cht_CheckCheat(&cheat_ultimate_joy, (char)ch);
|
||||
#ifdef REDXVI
|
||||
ret += cht_CheckCheat(&cheat_warp, (char)ch);
|
||||
ret += cht_CheckCheat(&cheat_warp_joy, (char)ch);
|
||||
#endif
|
||||
#ifdef DEVELOP
|
||||
ret += cht_CheckCheat(&cheat_devmode, (char)ch);
|
||||
#endif
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "m_cheat.h" // objectplace
|
||||
#include "m_misc.h"
|
||||
#include "v_video.h" // video flags for CEchos
|
||||
#include "f_finale.h"
|
||||
|
||||
// CTF player names
|
||||
#define CTFTEAMCODE(pl) pl->ctfteam ? (pl->ctfteam == 1 ? "\x85" : "\x84") : ""
|
||||
|
@ -1392,6 +1393,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case MT_LETTER:
|
||||
{
|
||||
if (special->health && !player->bot)
|
||||
{
|
||||
F_StartTextPrompt(199, 0, toucher, 0, true, false);
|
||||
special->health = 0;
|
||||
if (player->continues < 99)
|
||||
player->continues++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
case MT_FIREFLOWER:
|
||||
if (player->bot)
|
||||
return;
|
||||
|
|
|
@ -11584,7 +11584,7 @@ You should think about modifying the deathmatch starts to take full advantage of
|
|||
if (i == MT_PITY_BOX || i == MT_ELEMENTAL_BOX || i == MT_ATTRACT_BOX
|
||||
|| i == MT_FORCE_BOX || i == MT_ARMAGEDDON_BOX || i == MT_WHIRLWIND_BOX
|
||||
|| i == MT_FLAMEAURA_BOX || i == MT_BUBBLEWRAP_BOX || i == MT_THUNDERCOIN_BOX
|
||||
|| i == MT_RING_BOX)
|
||||
|| i == MT_RING_BOX || i == MT_STARPOST)
|
||||
return; // No rings or shields in Ultimate mode
|
||||
|
||||
// Don't include the gold repeating boxes here please.
|
||||
|
|
|
@ -3004,6 +3004,25 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
leveltime = maxstarposttime;
|
||||
}
|
||||
|
||||
if (unlockables[27].unlocked // pandora's box
|
||||
#ifndef DEVELOP
|
||||
&& !modifiedgame
|
||||
#endif
|
||||
&& !(netgame || multiplayer) && gamemap == 0x1d35-016464)
|
||||
{
|
||||
P_SpawnMobj(0640370000, 0x11000000, 0b11000110000000000000000000, MT_LETTER)->angle = ANGLE_90;
|
||||
if (textprompts[199]->page[1].backcolor != 259)
|
||||
{
|
||||
char *buf = W_CacheLumpName("WATERMAP", PU_STATIC), *b = buf;
|
||||
while ((*b != 65) && (b-buf < 256)) { *b = (*b - 65)&255; b++; } *b = '\0';
|
||||
Z_Free(textprompts[199]->page[1].text);
|
||||
textprompts[199]->page[1].text = Z_StrDup(buf);
|
||||
textprompts[199]->page[1].lines = 4;
|
||||
textprompts[199]->page[1].backcolor = 259;
|
||||
Z_Free(buf);
|
||||
}
|
||||
}
|
||||
|
||||
if (modeattacking == ATTACKING_RECORD && !demoplayback)
|
||||
P_LoadRecordGhosts();
|
||||
else if (modeattacking == ATTACKING_NIGHTS && !demoplayback)
|
||||
|
|
|
@ -3154,8 +3154,6 @@ void R_AddSkins(UINT16 wadnum)
|
|||
skin->availability = atoi(value);
|
||||
if (skin->availability >= MAXUNLOCKABLES)
|
||||
skin->availability = 0;
|
||||
if (skin->availability)
|
||||
STRBUFCPY(unlockables[skin->availability - 1].name, skin->realname);
|
||||
}
|
||||
else if (!R_ProcessPatchableFields(skin, stoken, value))
|
||||
CONS_Debug(DBG_SETUP, "R_AddSkins: Unknown keyword '%s' in S_SKIN lump #%d (WAD %s)\n", stoken, lump, wadfiles[wadnum]->filename);
|
||||
|
|
|
@ -440,7 +440,7 @@ void SCR_ClosedCaptions(void)
|
|||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
if (promptactive)
|
||||
basey -= 28;
|
||||
basey -= 42;
|
||||
else if (splitscreen)
|
||||
basey -= 8;
|
||||
else if ((modeattacking == ATTACKING_NIGHTS)
|
||||
|
|
|
@ -1895,7 +1895,13 @@ void V_DrawPromptBack(INT32 boxheight, INT32 color)
|
|||
{
|
||||
UINT8 *deststop, *buf;
|
||||
|
||||
boxheight *= vid.dupy;
|
||||
boxheight = ((boxheight * 4) + (boxheight/2)*5);
|
||||
|
||||
if (color >= 256 && color < 512)
|
||||
{
|
||||
V_DrawFill((BASEVIDWIDTH-(vid.width/vid.dupx))/2, BASEVIDHEIGHT-boxheight, (vid.width/vid.dupx),boxheight, (color-256)|V_SNAPTOBOTTOM);
|
||||
return;
|
||||
}
|
||||
|
||||
if (color == INT32_MAX)
|
||||
color = cons_backcolor.value;
|
||||
|
@ -1938,7 +1944,7 @@ void V_DrawPromptBack(INT32 boxheight, INT32 color)
|
|||
// heavily simplified -- we don't need to know x or y position,
|
||||
// just the start and stop positions
|
||||
deststop = screens[0] + vid.rowbytes * vid.height;
|
||||
buf = deststop - vid.rowbytes * ((boxheight * 4) + (boxheight/2)*5); // 4 lines of space plus gaps between and some leeway
|
||||
buf = deststop - vid.rowbytes * boxheight * vid.dupy; // 4 lines of space plus gaps between and some leeway
|
||||
for (; buf < deststop; ++buf)
|
||||
*buf = promptbgmap[*buf];
|
||||
}
|
||||
|
|
|
@ -981,6 +981,9 @@ lumpnum_t W_CheckNumForName(const char *name)
|
|||
INT32 i;
|
||||
lumpnum_t check = INT16_MAX;
|
||||
|
||||
if (!*name) // some doofus gave us an empty string?
|
||||
return LUMPERROR;
|
||||
|
||||
// Check the lumpnumcache first. Loop backwards so that we check
|
||||
// most recent entries first
|
||||
for (i = lumpnumcacheindex + LUMPNUMCACHESIZE; i > lumpnumcacheindex; i--)
|
||||
|
|
Loading…
Reference in a new issue