mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
- Refactor significantly (now has its own func, `G_GetNextMap`)
- If gametype uses cups, iterate through cups to find the current level, then grab the next valid level
- If not, get the next valid mapheader for your gametype
- SOC `nextmap`/`marathonnext` is not just deprecated but REMOVED
- Hide the NEXTMAP_ constants again, but leave support dummied out for if we have them publically accessible again
- Also get rid of a bunch of OTHER mapheader stuff we're never gonna use
- NiGHTS Grades? NOPE
- Vanilla titlecard patches? NOPE
- Boss music fadeout/replacement? NOPE
- Select Heading? NOPE
- You've been blocked.
- Don't show maps without lumps on the level select list
- this is me being petty, but making it NOTIMEATTACK in SOC instead of TIMEATTACK so we can reconsider the maps with/without them.
129 lines
3 KiB
C
129 lines
3 KiB
C
// SONIC ROBO BLAST 2
|
|
//-----------------------------------------------------------------------------
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
|
// Copyright (C) 1999-2020 by Sonic Team Junior.
|
|
//
|
|
// This program is free software distributed under the
|
|
// terms of the GNU General Public License, version 2.
|
|
// See the 'LICENSE' file for more details.
|
|
//-----------------------------------------------------------------------------
|
|
/// \file p_setup.h
|
|
/// \brief Setup a game, startup stuff
|
|
|
|
#ifndef __P_SETUP__
|
|
#define __P_SETUP__
|
|
|
|
#include "doomdata.h"
|
|
#include "doomstat.h"
|
|
#include "r_defs.h"
|
|
#include "k_terrain.h"
|
|
|
|
// map md5, sent to players via PT_SERVERINFO
|
|
extern unsigned char mapmd5[16];
|
|
|
|
// Player spawn spots for deathmatch.
|
|
#define MAX_DM_STARTS 64
|
|
extern mapthing_t *deathmatchstarts[MAX_DM_STARTS];
|
|
extern INT32 numdmstarts, numcoopstarts, numredctfstarts, numbluectfstarts;
|
|
|
|
extern boolean levelloading;
|
|
extern UINT8 levelfadecol;
|
|
|
|
extern lumpnum_t lastloadedmaplumpnum; // for comparative savegame
|
|
|
|
/* for levelflat type */
|
|
enum
|
|
{
|
|
LEVELFLAT_NONE,/* HOM time my friend */
|
|
LEVELFLAT_FLAT,
|
|
LEVELFLAT_PATCH,
|
|
LEVELFLAT_PNG,
|
|
LEVELFLAT_TEXTURE,
|
|
};
|
|
|
|
//
|
|
// MAP used flats lookup table
|
|
//
|
|
typedef struct
|
|
{
|
|
char name[9]; // resource name from wad
|
|
|
|
UINT8 type;
|
|
union
|
|
{
|
|
struct
|
|
{
|
|
lumpnum_t lumpnum; // lump number of the flat
|
|
// for flat animation
|
|
lumpnum_t baselumpnum;
|
|
}
|
|
flat;
|
|
struct
|
|
{
|
|
INT32 num;
|
|
INT32 lastnum; // texture number of the flat
|
|
// for flat animation
|
|
INT32 basenum;
|
|
}
|
|
texture;
|
|
}
|
|
u;
|
|
|
|
UINT16 width, height;
|
|
|
|
terrain_t *terrain;
|
|
|
|
// for flat animation
|
|
INT32 animseq; // start pos. in the anim sequence
|
|
INT32 numpics;
|
|
INT32 speed;
|
|
|
|
// for textures
|
|
UINT8 *picture;
|
|
#ifdef HWRENDER
|
|
void *mipmap;
|
|
void *mippic;
|
|
#endif
|
|
} levelflat_t;
|
|
|
|
extern size_t numlevelflats;
|
|
extern levelflat_t *levelflats;
|
|
INT32 P_AddLevelFlat(const char *flatname, levelflat_t *levelflat);
|
|
INT32 P_AddLevelFlatRuntime(const char *flatname);
|
|
INT32 P_CheckLevelFlat(const char *flatname);
|
|
|
|
extern size_t nummapthings;
|
|
extern mapthing_t *mapthings;
|
|
|
|
extern UINT16 p_adding_file;
|
|
|
|
void P_SetupLevelSky(const char *skytexname, boolean global);
|
|
void P_RespawnThings(void);
|
|
boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate);
|
|
#ifdef HWRENDER
|
|
void HWR_LoadLevel(void);
|
|
#endif
|
|
boolean P_AddWadFile(const char *wadfilename);
|
|
|
|
#define MAPRET_ADDED (1)
|
|
#define MAPRET_CURRENTREPLACED (1<<1)
|
|
UINT8 P_InitMapData(INT32 numexistingmapheaders);
|
|
|
|
boolean P_RunSOC(const char *socfilename);
|
|
void P_LoadSoundsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
|
void P_LoadMusicsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
|
void P_WriteThings(void);
|
|
void P_UpdateSegLightOffset(seg_t *li);
|
|
boolean P_ApplyLightOffset(UINT8 baselightnum);
|
|
boolean P_ApplyLightOffsetFine(UINT8 baselightlevel);
|
|
size_t P_PrecacheLevelFlats(void);
|
|
void P_AllocMapHeader(INT16 i);
|
|
|
|
void P_SetDemoFlickies(INT16 i);
|
|
void P_DeleteFlickies(INT16 i);
|
|
|
|
// Needed for NiGHTS
|
|
void P_ReloadRings(void);
|
|
|
|
#endif
|