mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Fix some minor warnings
- Fix `lib_getSkinSprite` overshadowing `sprites` global - Rename terrible result_e `ok` so it stops overshadowing crap - Remove inlining from w_wad.c since it reached the inline limit (remember kids, your compiler knows better than you these days whenever or not to inline something) - Remove unused variable in G_PlayerReborn
This commit is contained in:
parent
7c26fbf09d
commit
10a8f2d05e
5 changed files with 12 additions and 13 deletions
|
@ -2547,7 +2547,6 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
{
|
||||
player_t *p;
|
||||
INT32 score;
|
||||
INT32 recordscore;
|
||||
INT32 lives;
|
||||
INT32 continues;
|
||||
fixed_t camerascale;
|
||||
|
|
|
@ -334,13 +334,13 @@ static const char *const sprites_opt[] = {
|
|||
// skin.sprites[i] -> sprites[i]
|
||||
static int lib_getSkinSprite(lua_State *L)
|
||||
{
|
||||
spritedef_t *sprites = *(spritedef_t **)luaL_checkudata(L, 1, META_SKINSPRITES);
|
||||
spritedef_t *sksprites = *(spritedef_t **)luaL_checkudata(L, 1, META_SKINSPRITES);
|
||||
playersprite_t i = luaL_checkinteger(L, 2);
|
||||
|
||||
if (i < 0 || i >= NUMPLAYERSPRITES*2)
|
||||
return luaL_error(L, LUA_QL("skin_t") " field 'sprites' index %d out of range (0 - %d)", i, (NUMPLAYERSPRITES*2)-1);
|
||||
|
||||
LUA_PushUserdata(L, &sprites[i], META_SKINSPRITESLIST);
|
||||
LUA_PushUserdata(L, &sksprites[i], META_SKINSPRITESLIST);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ result_e T_MovePlane(sector_t *sector, fixed_t speed, fixed_t dest, boolean crus
|
|||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
return planeok;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1128,7 +1128,7 @@ void T_ThwompSector(thwomp_t *thwomp)
|
|||
thwomp->direction // direction
|
||||
);
|
||||
|
||||
if (res == ok || res == pastdest)
|
||||
if (res == planeok || res == pastdest)
|
||||
T_MovePlane
|
||||
(
|
||||
thwomp->sector, // sector
|
||||
|
@ -1160,7 +1160,7 @@ void T_ThwompSector(thwomp_t *thwomp)
|
|||
thwomp->direction // direction
|
||||
);
|
||||
|
||||
if (res == ok || res == pastdest)
|
||||
if (res == planeok || res == pastdest)
|
||||
T_MovePlane
|
||||
(
|
||||
thwomp->sector, // sector
|
||||
|
@ -1465,7 +1465,7 @@ void T_RaiseSector(raise_t *raise)
|
|||
direction // direction
|
||||
);
|
||||
|
||||
if (res == ok || res == pastdest)
|
||||
if (res == planeok || res == pastdest)
|
||||
T_MovePlane
|
||||
(
|
||||
raise->sector, // sector
|
||||
|
|
|
@ -895,7 +895,7 @@ typedef struct
|
|||
|
||||
typedef enum
|
||||
{
|
||||
ok,
|
||||
planeok,
|
||||
crushed,
|
||||
pastdest
|
||||
} result_e;
|
||||
|
|
10
src/w_wad.c
10
src/w_wad.c
|
@ -201,7 +201,7 @@ FILE *W_OpenWadFile(const char **filename, boolean useerrors)
|
|||
}
|
||||
|
||||
// Look for all DEHACKED and Lua scripts inside a PK3 archive.
|
||||
static inline void W_LoadDehackedLumpsPK3(UINT16 wadnum, boolean mainfile)
|
||||
static void W_LoadDehackedLumpsPK3(UINT16 wadnum, boolean mainfile)
|
||||
{
|
||||
UINT16 posStart, posEnd;
|
||||
|
||||
|
@ -241,7 +241,7 @@ static inline void W_LoadDehackedLumpsPK3(UINT16 wadnum, boolean mainfile)
|
|||
}
|
||||
|
||||
// search for all DEHACKED lump in all wads and load it
|
||||
static inline void W_LoadDehackedLumps(UINT16 wadnum, boolean mainfile)
|
||||
static void W_LoadDehackedLumps(UINT16 wadnum, boolean mainfile)
|
||||
{
|
||||
UINT16 lump;
|
||||
|
||||
|
@ -305,7 +305,7 @@ static inline void W_LoadDehackedLumps(UINT16 wadnum, boolean mainfile)
|
|||
* \param resblock resulting MD5 checksum
|
||||
* \return 0 if MD5 checksum was made, and is at resblock, 1 if error was found
|
||||
*/
|
||||
static inline INT32 W_MakeFileMD5(const char *filename, void *resblock)
|
||||
static INT32 W_MakeFileMD5(const char *filename, void *resblock)
|
||||
{
|
||||
#ifdef NOMD5
|
||||
(void)filename;
|
||||
|
@ -1956,7 +1956,7 @@ void *W_CacheLumpNumForce(lumpnum_t lumpnum, INT32 tag)
|
|||
// return false.
|
||||
//
|
||||
// no outside code uses the PWAD form, for now
|
||||
static inline boolean W_IsLumpCachedPWAD(UINT16 wad, UINT16 lump, void *ptr)
|
||||
static boolean W_IsLumpCachedPWAD(UINT16 wad, UINT16 lump, void *ptr)
|
||||
{
|
||||
void *lcache;
|
||||
|
||||
|
@ -1988,7 +1988,7 @@ boolean W_IsLumpCached(lumpnum_t lumpnum, void *ptr)
|
|||
// return false.
|
||||
//
|
||||
// no outside code uses the PWAD form, for now
|
||||
static inline boolean W_IsPatchCachedPWAD(UINT16 wad, UINT16 lump, void *ptr)
|
||||
static boolean W_IsPatchCachedPWAD(UINT16 wad, UINT16 lump, void *ptr)
|
||||
{
|
||||
void *lcache;
|
||||
|
||||
|
|
Loading…
Reference in a new issue