So for whatever reason it's still giving me a warning about functions in i_threads having duplicate definitions, even though they clearly do not.

I'm completely stumped so I'm just gonna mess with my compile setup....... in the mean time, if anyone else could try to compile it, I'd appreciate it, so we know if it's just my end or if its something else
This commit is contained in:
Sally Coolatta 2020-08-15 08:32:56 -04:00
parent 0dc21106e5
commit 631f698432
19 changed files with 70 additions and 313 deletions

View file

@ -431,7 +431,7 @@ static void D_Display(void)
break;
case GS_CONTINUING:
F_ContinueDrawer();
//F_ContinueDrawer();
break;
case GS_CREDITS:
@ -990,12 +990,14 @@ void D_StartTitle(void)
V_SetPaletteLump("PLAYPAL");
// The title screen is obviously not a tutorial! (Unless I'm mistaken)
/*
if (tutorialmode && tutorialgcs)
{
G_CopyControls(gamecontrol[0], gamecontroldefault[0][gcs_custom], gcl_full, num_gcl_full); // using gcs_custom as temp storage
M_StartMessage("Do you want to \x82save the recommended \x82movement controls?\x80\n\nPress 'Y' or 'Enter' to confirm\nPress 'N' or any key to keep \nyour current controls",
M_TutorialSaveControlResponse, MM_YESNO);
}
*/
tutorialmode = false;
}

View file

@ -524,7 +524,9 @@ INT16 gametype = GT_RACE;
UINT32 gametyperules = 0;
INT16 gametypecount = GT_FIRSTFREESLOT;
boolean forceresetplayers = false;
boolean deferencoremode = false;
UINT8 splitscreen = 0;
boolean circuitmap = false;
INT32 adminplayers[MAXPLAYERS];

View file

@ -1511,15 +1511,11 @@ static void readgametype(MYFILE *f, char *gtname)
UINT32 newgttol = 0;
INT32 newgtpointlimit = 0;
INT32 newgttimelimit = 0;
UINT8 newgtleftcolor = 0;
UINT8 newgtrightcolor = 0;
INT16 newgtrankingstype = -1;
int newgtinttype = 0;
char gtdescription[441];
char gtconst[MAXLINELEN];
// Empty strings.
gtdescription[0] = '\0';
gtconst[0] = '\0';
do
@ -1535,44 +1531,6 @@ static void readgametype(MYFILE *f, char *gtname)
else
break;
if (fastcmp(word, "DESCRIPTION"))
{
char *descr = NULL;
for (i = 0; i < MAXLINELEN-3; i++)
{
if (s[i] == '=')
{
descr = &s[i+2];
break;
}
}
if (descr)
{
strcpy(gtdescription, descr);
strcat(gtdescription, myhashfgets(descr, sizeof (gtdescription), f));
}
else
strcpy(gtdescription, "");
// For some reason, cutting the string did not work above. Most likely due to strcpy or strcat...
// It works down here, though.
{
INT32 numline = 0;
for (i = 0; (size_t)i < sizeof(gtdescription)-1; i++)
{
if (numline < 20 && gtdescription[i] == '\n')
numline++;
if (numline >= 20 || gtdescription[i] == '\0' || gtdescription[i] == '#')
break;
}
}
gtdescription[strlen(gtdescription)-1] = '\0';
gtdescription[i] = '\0';
continue;
}
word2 = strtok(NULL, " = ");
if (word2)
{
@ -1605,13 +1563,6 @@ static void readgametype(MYFILE *f, char *gtname)
newgtpointlimit = (INT32)i;
else if (fastcmp(word, "DEFAULTTIMELIMIT"))
newgttimelimit = (INT32)i;
// Level platter
else if (fastcmp(word, "HEADERCOLOR") || fastcmp(word, "HEADERCOLOUR"))
newgtleftcolor = newgtrightcolor = (UINT8)get_number(word2);
else if (fastcmp(word, "HEADERLEFTCOLOR") || fastcmp(word, "HEADERLEFTCOLOUR"))
newgtleftcolor = (UINT8)get_number(word2);
else if (fastcmp(word, "HEADERRIGHTCOLOR") || fastcmp(word, "HEADERRIGHTCOLOUR"))
newgtrightcolor = (UINT8)get_number(word2);
// Rankings type
else if (fastcmp(word, "RANKINGTYPE"))
{
@ -1679,7 +1630,6 @@ static void readgametype(MYFILE *f, char *gtname)
// Add the new gametype
newgtidx = G_AddGametype(newgtrules);
G_AddGametypeTOL(newgtidx, newgttol);
G_SetGametypeDescription(newgtidx, gtdescription, newgtleftcolor, newgtrightcolor);
// Not covered by G_AddGametype alone.
if (newgtrankingstype == -1)
@ -4370,32 +4320,6 @@ static void readmaincfg(MYFILE *f)
ttmode = TTMODE_OLD;
titlechanged = true;
}
else if (fastcmp(word, "TITLEPICSSCALE"))
{
ttscale = max(1, min(8, (UINT8)get_number(word2)));
titlechanged = true;
}
else if (fastcmp(word, "TITLEPICSSCALESAVAILABLE"))
{
// SPECIAL CASE for Alacroix: Comma-separated list of resolutions that are available
// for gfx loading.
ttavailable[0] = ttavailable[1] = ttavailable[2] = ttavailable[3] =\
ttavailable[4] = ttavailable[5] = false;
if (strstr(word2, "1") != NULL)
ttavailable[0] = true;
if (strstr(word2, "2") != NULL)
ttavailable[1] = true;
if (strstr(word2, "3") != NULL)
ttavailable[2] = true;
if (strstr(word2, "4") != NULL)
ttavailable[3] = true;
if (strstr(word2, "5") != NULL)
ttavailable[4] = true;
if (strstr(word2, "6") != NULL)
ttavailable[5] = true;
titlechanged = true;
}
else if (fastcmp(word, "TITLEPICSNAME"))
{
strncpy(ttname, word2, 9);

View file

@ -1702,9 +1702,9 @@ void F_InitMenuPresValues(void)
curtttics = tttics;
// Find current presentation values
M_SetMenuCurBackground((gamestate == GS_TIMEATTACK) ? "RECATTBG" : "TITLESKY");
M_SetMenuCurFadeValue(16);
M_SetMenuCurTitlePics();
//M_SetMenuCurBackground((gamestate == GS_TIMEATTACK) ? "RECATTBG" : "TITLESKY");
//M_SetMenuCurFadeValue(16);
//M_SetMenuCurTitlePics();
}
//

View file

@ -73,11 +73,6 @@ void F_StartTitleScreen(void);
void F_StartEnding(void);
void F_StartCredits(void);
boolean F_ContinueResponder(event_t *event);
void F_StartContinue(void);
void F_ContinueTicker(void);
void F_ContinueDrawer(void);
extern INT32 finalecount;
extern INT32 titlescrollxspeed;
extern INT32 titlescrollyspeed;

View file

@ -1430,7 +1430,6 @@ boolean G_Responder(event_t *ev)
}
else if (gamestate == GS_CONTINUING)
{
if (F_ContinueResponder(ev))
return true;
}
// Demo End
@ -1961,8 +1960,6 @@ void G_Ticker(boolean run)
break;
case GS_CONTINUING:
if (run)
F_ContinueTicker();
break;
case GS_CREDITS:
@ -2961,20 +2958,6 @@ void G_UpdateGametypeSelections(void)
gametype_cons_t[NUMGAMETYPES].strvalue = NULL;
}
//
// G_SetGametypeDescription
//
// Set a description for the specified gametype.
// (Level platter)
//
void G_SetGametypeDescription(INT16 gtype, char *descriptiontext, UINT8 leftcolor, UINT8 rightcolor)
{
if (descriptiontext != NULL)
strncpy(gametypedesc[gtype].notes, descriptiontext, 441);
gametypedesc[gtype].col[0] = leftcolor;
gametypedesc[gtype].col[1] = rightcolor;
}
// Gametype rankings
INT16 gametyperankings[NUMGAMETYPES] =
{
@ -3760,7 +3743,7 @@ static void G_DoStartContinue(void)
legitimateexit = false;
G_PlayerFinishLevel(consoleplayer); // take away cards and stuff
F_StartContinue();
//F_StartContinue();
gameaction = ga_nothing;
}

View file

@ -187,7 +187,7 @@ void G_AddGametypeConstant(INT16 gtype, const char *newgtconst);
void G_UpdateGametypeSelections(void);
void G_AddTOL(UINT32 newtol, const char *tolname);
void G_AddGametypeTOL(INT16 gtype, UINT32 newtol);
void G_SetGametypeDescription(INT16 gtype, char *descriptiontext, UINT8 leftcolor, UINT8 rightcolor);
//void G_SetGametypeDescription(INT16 gtype, char *descriptiontext, UINT8 leftcolor, UINT8 rightcolor);
INT32 G_GetGametypeByName(const char *gametypestr);
boolean G_IsSpecialStage(INT32 mapnum);
boolean G_GametypeUsesLives(void);
@ -195,7 +195,6 @@ boolean G_GametypeHasTeams(void);
boolean G_GametypeHasSpectators(void);
INT16 G_SometimesGetDifferentGametype(void);
UINT8 G_GetGametypeColor(INT16 gt);
boolean G_EnoughPlayersFinished(void);
void G_ExitLevel(void);
void G_NextLevel(void);
void G_Continue(void);

View file

@ -324,10 +324,6 @@ const char *I_LocateWad(void);
*/
void I_GetJoystickEvents(UINT8 index);
/** \brief Mouses events
*/
void I_GetMouseEvents(void);
/** \brief Checks if the mouse needs to be grabbed
*/
void I_UpdateMouseGrab(void);

View file

@ -28,6 +28,7 @@
#include "lua_hud.h" // For Lua hud checks
#include "lua_hook.h" // For MobjDamage and ShouldDamage
#include "m_cheat.h" // objectplacing
#include "p_spec.h"
#include "k_waypoint.h"
#include "k_bot.h"

View file

@ -769,16 +769,6 @@ static int lib_pGetMobjGravity(lua_State *L)
return 1;
}
static int lib_pWeaponOrPanel(lua_State *L)
{
mobjtype_t type = luaL_checkinteger(L, 1);
//HUDSAFE
if (type >= NUMMOBJTYPES)
return luaL_error(L, "mobj type %d out of range (0 - %d)", type, NUMMOBJTYPES-1);
lua_pushboolean(L, P_WeaponOrPanel(type));
return 1;
}
static int lib_pFlashPal(lua_State *L)
{
player_t *pl = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -1013,29 +1003,6 @@ static int lib_pAddPlayerScore(lua_State *L)
return 0;
}
static int lib_pStealPlayerScore(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
UINT32 amount = (UINT32)luaL_checkinteger(L, 2);
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
P_StealPlayerScore(player, amount);
return 0;
}
static int lib_pGetJumpFlags(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
lua_pushinteger(L, P_GetJumpFlags(player));
return 1;
}
static int lib_pPlayerInPain(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -1047,22 +1014,6 @@ static int lib_pPlayerInPain(lua_State *L)
return 1;
}
static int lib_pDoPlayerPain(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
mobj_t *source = NULL, *inflictor = NULL;
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
if (!lua_isnone(L, 2) && lua_isuserdata(L, 2))
source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
if (!lua_isnone(L, 3) && lua_isuserdata(L, 3))
inflictor = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
P_DoPlayerPain(player, source, inflictor);
return 0;
}
static int lib_pResetPlayer(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -1074,20 +1025,6 @@ static int lib_pResetPlayer(lua_State *L)
return 0;
}
static int lib_pPlayerCanDamage(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
NOHUD // was hud safe but then i added a lua hook
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
if (!thing)
return LUA_ErrInvalid(L, "mobj_t");
lua_pushboolean(L, P_PlayerCanDamage(player, thing));
return 1;
}
static int lib_pPlayerFullbright(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -1121,17 +1058,6 @@ static int lib_pIsObjectOnGround(lua_State *L)
return 1;
}
static int lib_pInSpaceSector(lua_State *L)
{
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
//HUDSAFE
INLEVEL
if (!mo)
return LUA_ErrInvalid(L, "mobj_t");
lua_pushboolean(L, P_InSpaceSector(mo));
return 1;
}
static int lib_pInQuicksand(lua_State *L)
{
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
@ -1279,31 +1205,6 @@ static int lib_pResetScore(lua_State *L)
return 0;
}
static int lib_pElementalFire(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
boolean cropcircle = lua_optboolean(L, 2);
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
P_ElementalFire(player, cropcircle);
return 0;
}
static int lib_pSpawnSkidDust(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
fixed_t radius = luaL_checkfixed(L, 2);
boolean sound = lua_optboolean(L, 3);
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
P_SpawnSkidDust(player, radius, sound);
return 0;
}
static int lib_pMovePlayer(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -1365,19 +1266,6 @@ static int lib_pReturnThrustY(lua_State *L)
return 1;
}
static int lib_pLookForEnemies(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
boolean nonenemies = lua_opttrueboolean(L, 2);
boolean bullet = lua_optboolean(L, 3);
NOHUD
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
LUA_PushUserdata(L, P_LookForEnemies(player, nonenemies, bullet), META_MOBJ);
return 1;
}
static int lib_pNukeEnemies(lua_State *L)
{
mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
@ -2905,14 +2793,11 @@ static int lib_gAddGametype(lua_State *L)
const char *gtname = NULL;
const char *gtconst = NULL;
const char *gtdescription = NULL;
INT16 newgtidx = 0;
UINT32 newgtrules = 0;
UINT32 newgttol = 0;
INT32 newgtpointlimit = 0;
INT32 newgttimelimit = 0;
UINT8 newgtleftcolor = 0;
UINT8 newgtrightcolor = 0;
INT16 newgtrankingstype = -1;
int newgtinttype = 0;
@ -2973,23 +2858,6 @@ static int lib_gAddGametype(lua_State *L)
if (!lua_isnumber(L, 3))
TYPEERROR("defaulttimelimit", LUA_TNUMBER)
newgttimelimit = (INT32)lua_tointeger(L, 3);
} else if (i == 9 || (k && fasticmp(k, "description"))) {
if (!lua_isstring(L, 3))
TYPEERROR("description", LUA_TSTRING)
gtdescription = Z_StrDup(lua_tostring(L, 3));
} else if (i == 10 || (k && fasticmp(k, "headerleftcolor"))) {
if (!lua_isnumber(L, 3))
TYPEERROR("headerleftcolor", LUA_TNUMBER)
newgtleftcolor = (UINT8)lua_tointeger(L, 3);
} else if (i == 11 || (k && fasticmp(k, "headerrightcolor"))) {
if (!lua_isnumber(L, 3))
TYPEERROR("headerrightcolor", LUA_TNUMBER)
newgtrightcolor = (UINT8)lua_tointeger(L, 3);
// Key name specified
} else if ((!i) && (k && fasticmp(k, "headercolor"))) {
if (!lua_isnumber(L, 3))
TYPEERROR("headercolor", LUA_TNUMBER)
newgtleftcolor = newgtrightcolor = (UINT8)lua_tointeger(L, 3);
}
lua_pop(L, 1);
}
@ -3003,14 +2871,10 @@ static int lib_gAddGametype(lua_State *L)
// Set defaults
if (gtname == NULL)
gtname = Z_StrDup("Unnamed gametype");
if (gtdescription == NULL)
gtdescription = Z_StrDup("???");
// Add the new gametype
newgtidx = G_AddGametype(newgtrules);
G_AddGametypeTOL(newgtidx, newgttol);
G_SetGametypeDescription(newgtidx, NULL, newgtleftcolor, newgtrightcolor);
strncpy(gametypedesc[newgtidx].notes, gtdescription, 441);
// Not covered by G_AddGametype alone.
if (newgtrankingstype == -1)
@ -3229,13 +3093,6 @@ static int lib_gSetCustomExitVars(lua_State *L)
return 0;
}
static int lib_gEnoughPlayersFinished(lua_State *L)
{
INLEVEL
lua_pushboolean(L, G_EnoughPlayersFinished());
return 1;
}
static int lib_gExitLevel(lua_State *L)
{
int n = lua_gettop(L); // Num arguments
@ -3856,7 +3713,6 @@ static luaL_Reg lib[] = {
{"P_SpawnPlayerMissile",lib_pSpawnPlayerMissile},
{"P_MobjFlip",lib_pMobjFlip},
{"P_GetMobjGravity",lib_pGetMobjGravity},
{"P_WeaponOrPanel",lib_pWeaponOrPanel},
{"P_FlashPal",lib_pFlashPal},
{"P_GetClosestAxis",lib_pGetClosestAxis},
{"P_SpawnParaloop",lib_pSpawnParaloop},
@ -3878,16 +3734,11 @@ static luaL_Reg lib[] = {
// p_user
{"P_AddPlayerScore",lib_pAddPlayerScore},
{"P_StealPlayerScore",lib_pStealPlayerScore},
{"P_GetJumpFlags",lib_pGetJumpFlags},
{"P_PlayerInPain",lib_pPlayerInPain},
{"P_DoPlayerPain",lib_pDoPlayerPain},
{"P_ResetPlayer",lib_pResetPlayer},
{"P_PlayerCanDamage",lib_pPlayerCanDamage},
{"P_PlayerFullbright",lib_pPlayerFullbright},
{"P_IsObjectInGoop",lib_pIsObjectInGoop},
{"P_IsObjectOnGround",lib_pIsObjectOnGround},
{"P_InSpaceSector",lib_pInSpaceSector},
{"P_InQuicksand",lib_pInQuicksand},
{"P_SetObjectMomZ",lib_pSetObjectMomZ},
{"P_PlayJingle",lib_pPlayJingle},
@ -3898,14 +3749,11 @@ static luaL_Reg lib[] = {
{"P_GivePlayerRings",lib_pGivePlayerRings},
{"P_GivePlayerLives",lib_pGivePlayerLives},
{"P_ResetScore",lib_pResetScore},
{"P_ElementalFire",lib_pElementalFire},
{"P_SpawnSkidDust", lib_pSpawnSkidDust},
{"P_MovePlayer",lib_pMovePlayer},
{"P_DoPlayerExit",lib_pDoPlayerExit},
{"P_InstaThrust",lib_pInstaThrust},
{"P_ReturnThrustX",lib_pReturnThrustX},
{"P_ReturnThrustY",lib_pReturnThrustY},
{"P_LookForEnemies",lib_pLookForEnemies},
{"P_NukeEnemies",lib_pNukeEnemies},
{"P_SwitchShield",lib_pSwitchShield},
@ -4024,7 +3872,6 @@ static luaL_Reg lib[] = {
{"G_FindMapByNameOrCode",lib_gFindMapByNameOrCode},
{"G_DoReborn",lib_gDoReborn},
{"G_SetCustomExitVars",lib_gSetCustomExitVars},
{"G_EnoughPlayersFinished",lib_gEnoughPlayersFinished},
{"G_ExitLevel",lib_gExitLevel},
{"G_IsSpecialStage",lib_gIsSpecialStage},
{"G_GametypeUsesLives",lib_gGametypeUsesLives},

View file

@ -178,11 +178,11 @@ extern UINT32 prevMenuId;
extern UINT32 activeMenuId;
void M_InitMenuPresTables(void);
UINT8 M_GetYoungestChildMenu(void);
void M_ChangeMenuMusic(const char *defaultmusname, boolean defaultmuslooping);
void M_SetMenuCurBackground(const char *defaultname);
void M_SetMenuCurFadeValue(UINT8 defaultvalue);
void M_SetMenuCurTitlePics(void);
//UINT8 M_GetYoungestChildMenu(void);
//void M_ChangeMenuMusic(const char *defaultmusname, boolean defaultmuslooping);
//void M_SetMenuCurBackground(const char *defaultname);
//void M_SetMenuCurFadeValue(UINT8 defaultvalue);
//void M_SetMenuCurTitlePics(void);
// Called by main loop,
// saves config file and calls I_Quit when user exits.
@ -412,12 +412,12 @@ typedef struct
// experimental level select end
// descriptions for gametype select screen
typedef struct
/*typedef struct
{
UINT8 col[2];
char notes[441];
} gtdesc_t;
extern gtdesc_t gametypedesc[NUMGAMETYPES];
extern gtdesc_t gametypedesc[NUMGAMETYPES];*/
// mode descriptions for video mode menu
typedef struct
@ -457,7 +457,7 @@ extern INT16 char_on, startchar;
#define BwehHehHe() S_StartSound(NULL, sfx_bewar1+M_RandomKey(4)) // Bweh heh he
void M_TutorialSaveControlResponse(INT32 ch);
//void M_TutorialSaveControlResponse(INT32 ch);
void M_ForceSaveSlotSelected(INT32 sslot);

View file

@ -34,6 +34,7 @@
#include "k_battle.h"
#include "k_pwrlv.h"
#include "k_grandprix.h"
#include "p_spec.h"
// CTF player names
#define CTFTEAMCODE(pl) pl->ctfteam ? (pl->ctfteam == 1 ? "\x85" : "\x84") : ""
@ -1721,7 +1722,6 @@ void P_RemoveShield(player_t *player)
{ // First layer shields
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ARMAGEDDON) // Give them what's coming to them!
{
P_BlackOw(player); // BAM!
player->pflags |= PF_JUMPDOWN;
}
else

View file

@ -135,7 +135,6 @@ extern consvar_t cv_cam_speed[MAXSPLITSCREENPLAYERS], cv_cam_rotate[MAXSPLITSCRE
extern fixed_t t_cam_dist[MAXSPLITSCREENPLAYERS], t_cam_height[MAXSPLITSCREENPLAYERS], t_cam_rotate[MAXSPLITSCREENPLAYERS];
void P_AddPlayerScore(player_t *player, UINT32 amount);
void P_StealPlayerScore(player_t *player, UINT32 amount);
void P_ResetCamera(player_t *player, camera_t *thiscam);
boolean P_TryCameraMove(fixed_t x, fixed_t y, camera_t *thiscam);
void P_SlideCameraMove(camera_t *thiscam);
@ -143,9 +142,7 @@ void P_DemoCameraMovement(camera_t *cam);
boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcalled);
void P_InitCameraCmd(void);
pflags_t P_GetJumpFlags(player_t *player);
boolean P_PlayerInPain(player_t *player);
void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor);
void P_ResetPlayer(player_t *player);
boolean P_PlayerCanDamage(player_t *player, mobj_t *thing);
@ -162,7 +159,6 @@ boolean P_IsObjectInGoop(mobj_t *mo);
boolean P_IsObjectOnGround(mobj_t *mo);
boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec);
boolean P_IsObjectOnRealGround(mobj_t *mo, sector_t *sec); // SRB2Kart
boolean P_InSpaceSector(mobj_t *mo);
boolean P_InQuicksand(mobj_t *mo);
boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff);
@ -200,7 +196,6 @@ fixed_t P_ReturnThrustY(mobj_t *mo, angle_t angle, fixed_t move);
mobj_t *P_LookForFocusTarget(player_t *player, mobj_t *exclude, SINT8 direction, UINT8 lockonflags);
mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet);
void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius);
UINT8 P_FindLowestLap(void);
@ -330,7 +325,6 @@ mobj_t *P_SPMAngle(mobj_t *source, mobjtype_t type, angle_t angle, UINT8 aimtype
void P_ColorTeamMissile(mobj_t *missile, player_t *source);
SINT8 P_MobjFlip(mobj_t *mobj);
fixed_t P_GetMobjGravity(mobj_t *mo);
FUNCMATH boolean P_WeaponOrPanel(mobjtype_t type);
void P_CalcChasePostImg(player_t *player, camera_t *thiscam);
boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled);

View file

@ -3585,6 +3585,17 @@ void P_RecalcPrecipInSector(sector_t *sector)
CalculatePrecipFloor(psecnode->m_thing);
}
//
// P_NullPrecipThinker
//
// For "Blank" precipitation
//
void P_NullPrecipThinker(precipmobj_t *mobj)
{
//(void)mobj;
mobj->precipflags &= ~PCF_THUNK;
}
void P_PrecipThinker(precipmobj_t *mobj)
{
P_CycleStateAnimation((mobj_t *)mobj);
@ -8621,7 +8632,6 @@ void P_MobjThinker(mobj_t *mobj)
|| mobj->type == MT_FLINGCOIN
|| mobj->type == MT_FLINGBLUESPHERE
|| mobj->type == MT_FLINGNIGHTSCHIP
|| P_WeaponOrPanel(mobj->type)
|| mobj->type == MT_FLINGEMERALD
|| mobj->type == MT_BIGTUMBLEWEED
|| mobj->type == MT_LITTLETUMBLEWEED
@ -9603,8 +9613,7 @@ void P_RemoveMobj(mobj_t *mobj)
|| mobj->type == MT_COIN
|| mobj->type == MT_NIGHTSSTAR
|| mobj->type == MT_REDTEAMRING
|| mobj->type == MT_BLUETEAMRING
|| P_WeaponOrPanel(mobj->type))
|| mobj->type == MT_BLUETEAMRING)
&& !(mobj->flags2 & MF2_DONTRESPAWN))
{
itemrespawnque[iquehead] = mobj->spawnpoint;
@ -11802,6 +11811,8 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t* itemtypes, UINT8 numi
angle_t angle = FixedAngle(fixedangle << FRACBITS);
angle_t fineangle = (angle >> ANGLETOFINESHIFT) & FINEMASK;
(void)bonustime;
for (r = 0; r < numitemtypes; r++)
{
dummything = *mthing;
@ -11837,8 +11848,6 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t* itemtypes, UINT8 numi
continue;
mobj->spawnpoint = NULL;
if (bonustime)
P_SetBonusTime(mobj);
}
}
@ -11860,6 +11869,8 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n
INT32 i;
TVector v, *res;
(void)bonustime;
for (i = 0; i < numitemtypes; i++)
{
dummything = *mthing;
@ -11901,8 +11912,6 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n
mobj->z -= mobj->height/2;
mobj->spawnpoint = NULL;
if (bonustime)
P_SetBonusTime(mobj);
}
}

View file

@ -512,7 +512,6 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
mobj_t *P_SpawnMapThing(mapthing_t *mthing);
void P_SpawnHoop(mapthing_t *mthing);
void P_SetBonusTime(mobj_t *mobj);
void P_SpawnItemPattern(mapthing_t *mthing, boolean bonustime);
void P_SpawnHoopOfSomething(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle);
void P_SpawnPrecipitation(void);

View file

@ -38,7 +38,8 @@
#include "f_finale.h" // control text prompt
#include "r_skins.h" // skins
#include "k_kart.h" // SRB2kart
// SRB2kart
#include "k_kart.h"
#include "console.h" // CON_LogMessage
#include "k_respawn.h"
@ -8788,3 +8789,11 @@ static void P_SpawnPushers(void)
break;
}
}
// Rudimentary function to start a earthquake.
// epicenter and radius are not yet used.
void P_StartQuake(fixed_t intensity, tic_t time)
{
quake.intensity = intensity;
quake.time = time;
}

View file

@ -1225,10 +1225,6 @@ void P_SwitchShield(player_t *player, UINT16 shieldtype)
{
boolean donthavealready;
// If you already have a bomb shield, use it!
if ((shieldtype == SH_ARMAGEDDON) && (player->powers[pw_shield] & SH_NOSTACK) == SH_ARMAGEDDON)
P_BlackOw(player);
donthavealready = (shieldtype & SH_FORCE)
? (!(player->powers[pw_shield] & SH_FORCE) || (player->powers[pw_shield] & SH_FORCEHP) < (shieldtype & ~SH_FORCE))
: ((player->powers[pw_shield] & SH_NOSTACK) != shieldtype);
@ -1709,31 +1705,11 @@ static void P_CheckBouncySectors(player_t *player)
player->mo->momx = momentum.x;
player->mo->momy = momentum.y;
player->mo->momz = momentum.z/2;
if (player->pflags & PF_SPINNING)
{
player->pflags &= ~PF_SPINNING;
player->pflags |= P_GetJumpFlags(player);
player->pflags |= PF_THOKKED;
}
}
else
{
player->mo->momx = -FixedMul(player->mo->momx,linedist);
player->mo->momy = -FixedMul(player->mo->momy,linedist);
if (player->pflags & PF_SPINNING)
{
player->pflags &= ~PF_SPINNING;
player->pflags |= P_GetJumpFlags(player);
player->pflags |= PF_THOKKED;
}
}
if ((player->pflags & PF_SPINNING) && player->speed < FixedMul(1<<FRACBITS, player->mo->scale) && player->mo->momz)
{
player->pflags &= ~PF_SPINNING;
player->pflags |= P_GetJumpFlags(player);
}
goto bouncydone;

View file

@ -1205,8 +1205,6 @@ void I_OsPolling(void)
I_GetJoystickEvents(i);
}
I_GetMouseEvents();
I_GetEvent();
mod = SDL_GetModState();

View file

@ -2111,6 +2111,29 @@ void V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colorm
} while (num);
}
// Find string width from cred_font chars
//
INT32 V_CreditStringWidth(const char *string)
{
INT32 c, w = 0;
size_t i;
// It's possible for string to be a null pointer
if (!string)
return 0;
for (i = 0; i < strlen(string); i++)
{
c = toupper(string[i]) - CRED_FONTSTART;
if (c < 0 || c >= CRED_FONTSIZE)
w += 16;
else
w += SHORT(fontv[CRED_FONT].font[c]->width);
}
return w;
}
// Draws a tallnum. Replaces two functions in y_inter and st_stuff
void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num)
{