Compare commits

...

43 Commits

Author SHA1 Message Date
Sryder 9e6980c8ae Fix a fallthrough issue that could cause thundershield to be rolled less often than intended. 2020-05-20 11:53:14 +01:00
Sally Coolatta a7c88d40db Merge branch 'master' into next 2020-05-19 20:40:12 -04:00
Sryder c70cf4806b Merge branch 'extra-travis-deploy' into 'master'
Fix Travis Deployment

See merge request KartKrew/Kart-Public!174
2020-05-19 20:10:42 -04:00
Sal e42ae1ed79 Merge branch 'freeplay-be-nice' into 'master'
Also apply HUD translucency to FREE PLAY

See merge request KartKrew/Kart-Public!161
2020-05-19 17:29:05 -04:00
Sal 1d5774fe2f Merge branch 'ghostly-luavars' into 'next'
Fix Luavars being saved into Record Attack ghosts/replays and potentially crashing

See merge request KartKrew/Kart-Public!168
2020-05-19 17:28:48 -04:00
Sal 71d2d357c1 Merge branch 'displayplayer-gonna-getcha' into 'next'
displayplayers.iterate crashes in replays, is that based?

See merge request KartKrew/Kart-Public!171
2020-05-19 17:28:14 -04:00
Sal bb7481a13e Merge branch 'mr-ogl-boostpad-fix' into 'master'
Fix wrong orientation in some boost pads in ogl

See merge request KartKrew/Kart-Public!173
2020-05-19 17:27:24 -04:00
Sryder bca1dd42a3 Use xenial to build all the versions newer than trusty
I'm not 100% sure why we can't use newer series to build the newer installers. But this seems to be what vanilla does
2020-05-19 20:45:49 +01:00
Sal cb9e6473a0 Merge branch 'use-extern-you-idiot' into 'master'
Fix GCC 10 linking errors

See merge request KartKrew/Kart-Public!170
2020-05-16 09:01:46 -04:00
Hannu Hanhi c3e1e1df26 Fix wrong orientation some boost pads in ogl 2020-05-16 13:47:21 +03:00
Sal f60d05764d Merge branch 'clearbans-please' into 'master'
Write empty file on clearbans

See merge request KartKrew/Kart-Public!156
2020-05-15 19:29:11 -04:00
Sal f0f4b7bc1e Merge branch 'nomixer-fix' into 'master'
Fix "NOMIXER" flag compiling

See merge request KartKrew/Kart-Public!159
2020-05-15 19:28:54 -04:00
Sal 43874c3a4d Merge branch 'now-we-spin-in-spinout-only' into 'master'
No more first person hyper spin

See merge request KartKrew/Kart-Public!160
2020-05-15 19:28:38 -04:00
Sal e4766bbaf1 Merge branch 'ferror-errno-yareyare' into 'master'
Fix false file error reporting

See merge request KartKrew/Kart-Public!162
2020-05-15 19:27:08 -04:00
Sal 11331b7bc5 Merge branch 'hud-is-fucked' into 'next'
HUD inconsistency in Record Attack

See merge request KartKrew/Kart-Public!164
2020-05-15 19:26:26 -04:00
Sal ffdb12ccb0 Merge branch 'fastline-identification' into 'next'
Add targets to MT_FASTLINEs that are spawned

See merge request KartKrew/Kart-Public!169
2020-05-15 19:24:35 -04:00
Sal c9c8e5f15f Merge branch 'player-dot-ping' into 'next'
player.ping for the ping in milliseconds of the player

See merge request KartKrew/Kart-Public!167
2020-05-15 19:24:21 -04:00
Sal f2a9981299 Merge branch 'alias-recursion-fix' into 'master'
Fix alias recursion never counting down

See merge request KartKrew/Kart-Public!166
2020-05-15 19:24:02 -04:00
Sryder e0aa6ef252 Use bionic to build focal version because it has GCC 4.8? 2020-05-16 00:02:33 +01:00
James R 7e0b605f34 Properly bound lua displayplayers and displayplayers.iterate to splitscreen
This is fixes crashes in replays because splitscreen displayplayers are
initialized to INT32_MAX there.
2020-05-15 14:21:25 -07:00
James R 6bd6b3f38e Add missing extern to colortranslations 2020-05-15 10:00:05 -07:00
Monster Iestyn 697c7f859e added missing extern keyword for ms_RoomId in mserv.h (the definition is already in the .c file in this case)
(cherry picked from commit 064f4bcf349e9600552a0b99bd0fbfb3cbcf0958)
2020-05-15 09:58:49 -07:00
Monster Iestyn f89400c728 turn all non-extern variables in s_sound.h into externs (and put their real definitions in the .c file)
(cherry picked from commit dab212dc56936dd92a935d0c81003ff1d35ee2ee)
2020-05-15 09:58:28 -07:00
Monster Iestyn 05c8865528 make savegamename in doomdef.h an extern, put the actual definition in d_main.c
(cherry picked from commit 89cd756cd83e4a03a34d1f16da18142d8167d889)
2020-05-15 09:52:16 -07:00
Sryder dbcbbf1ae4 Remove now unsupported distros from deployer
Add new supported distros to deployer
2020-05-14 13:16:49 +01:00
Snu 6b5eebe54a Use P_SetTarget instead of fast->target 2020-05-14 04:17:24 +01:00
Snu 3997c05988 god damnit 2020-05-14 03:23:28 +01:00
Snu f24340f46a add targets to MT_FASTLINEs spawned to tell what they're spawned from 2020-05-14 03:13:00 +01:00
Latapostrophe d949a47a70 Don't save Luavars in record attack, especially not for ghosts 2020-05-14 01:41:06 +02:00
James R 615823f024 player.ping for the ping in milliseconds of the player 2020-05-13 16:17:40 -07:00
Latapostrophe d0b4f8765d Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2020-05-14 01:04:30 +02:00
Monster Iestyn db5cb986ee Detect infinite alias self-recursion mixed with other commands, such as in the case of `alias a "echo test; a"; a`.
(Unfortunately, this does not work if "wait" is used instead of "echo", but oh well)

(cherry picked from commit 797ca99f42)
2020-05-13 16:03:26 -07:00
Latapostrophe 0c3b5d603b Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2019-11-11 22:15:30 +01:00
James R 44e59e2688 Don't hide HUD with hu_showscores in single player/Record Attack
This also makes Lua game HUD consistent with the Kart HUD.
2019-10-19 14:11:24 -07:00
James R 1d6020883c Forgot includes 2019-10-07 18:10:33 -07:00
James R abaefa05b1 ferror does not return errno, are you stupid?
Use M_FileError to return the proper error description, or "end-of-file".
2019-10-07 17:55:31 -07:00
James R 5e9082fb77 Also apply HUD translucency to FREE PLAY 2019-09-19 20:29:51 -07:00
James R 3801f93181 Let first person camera work in demos 2019-09-15 00:32:01 -07:00
filpAM fe4cbd7ba1 Fix "NOMIXER" flag compiling 2019-09-13 13:20:44 -04:00
James R 3838700f2c Save bans when cleared too
(Why doesn't it work for I_Quit?)
2019-08-22 15:18:14 -07:00
Latapostrophe 496f6bcd79 Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2019-07-02 18:24:14 +02:00
Latapostrophe 3b3a63cd90 Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart-Public 2019-04-21 15:57:03 +02:00
Latapostrophe c772b05f8c Merge branch 'master' of git.magicalgirl.moe:KartKrew/Kart 2019-04-20 10:44:17 +02:00
22 changed files with 113 additions and 81 deletions

View File

@ -439,6 +439,30 @@ matrix:
# List Ubuntu LTS, newest to oldest
# Then list non-LTS, newest to oldest
################################
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=focal
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=focal
- PACKAGE_SUBVERSION=~20.04focal
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
@ -463,6 +487,30 @@ matrix:
- PACKAGE_DISTRO=bionic
- PACKAGE_SUBVERSION=~18.04bionic
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=xenial
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=xenial
- PACKAGE_SUBVERSION=~16.04xenial
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
@ -505,59 +553,11 @@ matrix:
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=disco
- _DPL_JOB_NAME=eoan
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=disco
- PACKAGE_SUBVERSION=~19.04disco
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=cosmic
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=cosmic
- PACKAGE_SUBVERSION=~18.10cosmic
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- libcurl4-openssl-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
dist: xenial
if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1")
AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1"))
AND env(DPL_TERMINATE_MAIN) != "1"
env:
- _DPL_JOB_ENABLED=1
- _DPL_JOB_NAME=xenial
- _DPL_DPUT_TARGET=1
- _DPL_PACKAGE_SOURCE=1
- PACKAGE_DISTRO=xenial
- PACKAGE_SUBVERSION=~16.04xenial
- PACKAGE_DISTRO=eoan
- PACKAGE_SUBVERSION=~19.10eoan
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
allow_failures:
- compiler: clang-3.5

View File

@ -543,10 +543,7 @@ static void COM_ExecuteString(char *ptext)
if (!stricmp(com_argv[0], a->name))
{
if (recursion > MAX_ALIAS_RECURSION)
{
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
recursion = 0;
}
else
{
char buf[1024];
@ -578,8 +575,10 @@ static void COM_ExecuteString(char *ptext)
}
WRITESTRING(write, read);
// Monster Iestyn: keep track of how many levels of recursion we're in
recursion++;
COM_BufInsertText(buf);
recursion--;
}
return;
}

View File

@ -2449,6 +2449,7 @@ static void Command_ClearBans(void)
return;
I_ClearBans();
D_SaveBan();
reasontail = NULL;
while (reasonhead)
{

View File

@ -143,6 +143,8 @@ boolean advancedemo;
INT32 debugload = 0;
#endif
char savegamename[256];
#ifdef _arch_dreamcast
char srb2home[256] = "/cd";
char srb2path[256] = "/cd";

View File

@ -768,7 +768,7 @@ void SV_FileSendTicker(void)
if (ram)
M_Memcpy(p->data, &f->id.ram[transfer[i].position], size);
else if (fread(p->data, 1, size, transfer[i].currentfile) != size)
I_Error("SV_FileSendTicker: can't read %s byte on %s at %d because %s", sizeu1(size), f->id.filename, transfer[i].position, strerror(ferror(transfer[i].currentfile)));
I_Error("SV_FileSendTicker: can't read %s byte on %s at %d because %s", sizeu1(size), f->id.filename, transfer[i].position, M_FileError(transfer[i].currentfile));
p->position = LONG(transfer[i].position);
// Put flag so receiver knows the total size
if (transfer[i].position + size == f->size)
@ -847,7 +847,7 @@ void Got_Filetxpak(void)
// We can receive packet in the wrong order, anyway all os support gaped file
fseek(file->file, pos, SEEK_SET);
if (fwrite(netbuffer->u.filetxpak.data,size,1,file->file) != 1)
I_Error("Can't write to %s: %s\n",filename, strerror(ferror(file->file)));
I_Error("Can't write to %s: %s\n",filename, M_FileError(file->file));
file->currentsize += size;
// Finished?

View File

@ -506,7 +506,7 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...) FUNCDEBUG;
// Things that used to be in dstrings.h
#define SAVEGAMENAME "srb2sav"
char savegamename[256];
extern char savegamename[256];
// m_misc.h
#ifdef GETTEXT

View File

@ -6368,7 +6368,9 @@ void G_BeginRecording(void)
demoflags |= DF_ENCORE;
#ifdef HAVE_BLUA
demoflags |= DF_LUAVARS;
if (!modeattacking) // Ghosts don't read luavars, and you shouldn't ever need to save Lua in replays, you doof!
// SERIOUSLY THOUGH WHY WOULD YOU LOAD HOSTMOD AND RECORD A GHOST WITH IT !????
demoflags |= DF_LUAVARS;
#endif
// Setup header.
@ -6474,8 +6476,9 @@ void G_BeginRecording(void)
WRITEUINT8(demo_p, 0xFF); // Denote the end of the player listing
#ifdef HAVE_BLUA
// player lua vars, always saved even if empty
LUA_ArchiveDemo();
// player lua vars, always saved even if empty... Unless it's record attack.
if (!modeattacking)
LUA_ArchiveDemo();
#endif
memset(&oldcmd,0,sizeof(oldcmd));
@ -7543,6 +7546,7 @@ void G_DoPlayDemo(char *defdemoname)
if (!gL) // No Lua state! ...I guess we'll just start one...
LUA_ClearState();
// No modeattacking check, DF_LUAVARS won't be present here.
LUA_UnArchiveDemo();
}
#endif

View File

@ -407,7 +407,7 @@ void HWR_RenderPlane(extrasubsector_t *xsub, boolean isceiling, fixed_t fixedhei
if (angle) // Only needs to be done if there's an altered angle
{
angle = (InvAngle(angle)+ANGLE_180)>>ANGLETOFINESHIFT;
angle = InvAngle(angle)>>ANGLETOFINESHIFT;
// This needs to be done so that it scrolls in a different direction after rotation like software
/*tempxsow = FLOAT_TO_FIXED(scrollx);
@ -439,7 +439,7 @@ void HWR_RenderPlane(extrasubsector_t *xsub, boolean isceiling, fixed_t fixedhei
tempxsow = FLOAT_TO_FIXED(v3d->s);
tempytow = FLOAT_TO_FIXED(v3d->t);
v3d->s = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINECOSINE(angle)) - FixedMul(tempytow, FINESINE(angle))));
v3d->t = (FIXED_TO_FLOAT(-FixedMul(tempxsow, FINESINE(angle)) - FixedMul(tempytow, FINECOSINE(angle))));
v3d->t = (FIXED_TO_FLOAT(FixedMul(tempxsow, FINESINE(angle)) + FixedMul(tempytow, FINECOSINE(angle))));
}
//v3d->s = (float)(v3d->s - flatxref + scrollx);

View File

@ -898,6 +898,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean sp
newodds = 0;
else
POWERITEMODDS(newodds);
break;
case KITEM_HYUDORO:
if ((hyubgone > 0) || COOLDOWNONSTART)
newodds = 0;
@ -4490,6 +4491,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
fast->momx = 3*player->mo->momx/4;
fast->momy = 3*player->mo->momy/4;
fast->momz = 3*player->mo->momz/4;
P_SetTarget(&fast->target, player->mo); // easier lua access
K_MatchGenericExtraFlags(fast, player->mo);
}
@ -8634,7 +8636,7 @@ void K_drawKartFreePlay(UINT32 flashtime)
return;
V_DrawKartString((BASEVIDWIDTH - (LAPS_X+1)) - (12*9), // mirror the laps thingy
LAPS_Y+3, V_SNAPTOBOTTOM|V_SNAPTORIGHT, "FREE PLAY");
LAPS_Y+3, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_HUDTRANS, "FREE PLAY");
}
static void K_drawDistributionDebugger(void)

View File

@ -11,7 +11,7 @@
#define KART_FULLTURN 800
UINT8 colortranslations[MAXTRANSLATIONS][16];
extern UINT8 colortranslations[MAXTRANSLATIONS][16];
extern const char *KartColor_Names[MAXSKINCOLORS];
extern const UINT8 KartColor_Opposite[MAXSKINCOLORS*2];
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);

View File

@ -17,6 +17,7 @@
#include "d_player.h"
#include "g_game.h"
#include "p_local.h"
#include "d_clisrv.h"
#include "lua_script.h"
#include "lua_libs.h"
@ -118,7 +119,7 @@ static int lib_iterateDisplayplayers(lua_State *L)
for (i++; i < MAXSPLITSCREENPLAYERS; i++)
{
if (!playeringame[displayplayers[i]] || i > splitscreen)
if (i > splitscreen || !playeringame[displayplayers[i]])
return 0; // Stop! There are no more players for us to go through. There will never be a player gap in displayplayers.
if (!players[displayplayers[i]].mo)
@ -139,6 +140,8 @@ static int lib_getDisplayplayers(lua_State *L)
lua_Integer i = luaL_checkinteger(L, 2);
if (i < 0 || i >= MAXSPLITSCREENPLAYERS)
return luaL_error(L, "displayplayers[] index %d out of range (0 - %d)", i, MAXSPLITSCREENPLAYERS-1);
if (i > splitscreen)
return 0;
if (!playeringame[displayplayers[i]])
return 0;
if (!players[displayplayers[i]].mo)
@ -385,6 +388,8 @@ static int player_get(lua_State *L)
else if (fastcmp(field,"fovadd"))
lua_pushfixed(L, plr->fovadd);
#endif
else if (fastcmp(field,"ping"))
lua_pushinteger(L, playerpingtable[( plr - players )]);
else {
lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS);
I_Assert(lua_istable(L, -1));

View File

@ -16,6 +16,7 @@
#include "doomdef.h"
#include "command.h"
#include "m_argv.h"
#include "m_misc.h"
/** \brief number of arg
*/
@ -166,7 +167,7 @@ void M_FindResponseFile(void)
if (!file)
I_Error("No more free memory for the response file");
if (fread(file, size, 1, handle) != 1)
I_Error("Couldn't read response file because %s", strerror(ferror(handle)));
I_Error("Couldn't read response file because %s", M_FileError(handle));
fclose(handle);
// keep all the command line arguments following @responsefile

View File

@ -23,6 +23,8 @@
#include <unistd.h>
#endif
#include <errno.h>
// Extended map support.
#include <ctype.h>
@ -2363,3 +2365,13 @@ void M_SetupMemcpy(void)
M_Memcpy = cpu_cpy;
#endif
}
/** Return the appropriate message for a file error or end of file.
*/
const char *M_FileError(FILE *fp)
{
if (ferror(fp))
return strerror(errno);
else
return "end-of-file";
}

View File

@ -100,6 +100,8 @@ void strcatbf(char *s1, const char *s2, const char *s3);
void M_SetupMemcpy(void);
const char *M_FileError(FILE *handle);
// counting bits, for weapon ammo code, usually
FUNCMATH UINT8 M_CountBits(UINT32 num, UINT8 size);

View File

@ -68,7 +68,7 @@ extern consvar_t cv_masterserver, cv_servername;
// < 0 to not connect (usually -1) (offline mode)
// == 0 to show all rooms, not a valid hosting room
// anything else is whatever room the MS assigns to that number (online mode)
INT16 ms_RoomId;
extern INT16 ms_RoomId;
const char *GetMasterServerPort(void);
const char *GetMasterServerIP(void);

View File

@ -8517,6 +8517,7 @@ void A_SPBChase(mobj_t *actor)
//fast->momz = (3*actor->momz)/4;
fast->color = SKINCOLOR_RED;
fast->colorized = true;
P_SetTarget(&fast->target, actor); // easier lua access
K_MatchGenericExtraFlags(fast, actor);
}

View File

@ -1142,7 +1142,7 @@ void R_SetupFrame(player_t *player, boolean skybox)
aimingangle = player->aiming;
viewangle = viewmobj->angle;
if (/*!demo.playback && */player->playerstate != PST_DEAD)
if (!demo.playback && player->playerstate != PST_DEAD)
{
if (player == &players[consoleplayer])
{

View File

@ -236,7 +236,7 @@ void S_StopSoundByNum(sfxenum_t sfxnum);
#ifdef MUSICSLOT_COMPATIBILITY
// For compatibility with code/scripts relying on older versions
// This is a list of all the "special" slot names and their associated numbers
const char *compat_special_music_slots[16];
extern const char *compat_special_music_slots[16];
#endif
#endif

View File

@ -1173,7 +1173,10 @@ void I_StartupSound(void)
const char *sdrv_name = NULL;
#endif
#ifndef HAVE_MIXER
midi_disabled = digital_disabled = true;
#ifndef NO_MIDI
midi_disabled =
#endif
digital_disabled = true;
#endif
memset(channels, 0, sizeof (channels)); //Alam: Clean it

View File

@ -1435,7 +1435,7 @@ static boolean LoadSong(void *data, size_t lumplength, size_t selectpos)
if (fwrite(data, lumplength, 1, midfile) == 0)
{
CONS_Printf(M_GetText("Couldn't write music into file %s because %s\n"), tempname, strerror(ferror(midfile)));
CONS_Printf(M_GetText("Couldn't write music into file %s because %s\n"), tempname, M_FileError(midfile));
Z_Free(data);
fclose(midfile);
return false;

View File

@ -1797,10 +1797,12 @@ static void ST_doItemFinderIconsAndSound(void) // SRB2kart - unused.
//
static void ST_overlayDrawer(void)
{
/* SRB2kart doesn't need this stuff
//hu_showscores = auto hide score/time/rings when tab rankings are shown
if (!(hu_showscores && (netgame || multiplayer)))
{
K_drawKartHUD();
/* SRB2kart doesn't need this stuff
if (maptol & TOL_NIGHTS)
ST_drawNiGHTSHUD();
else
@ -1824,8 +1826,8 @@ static void ST_overlayDrawer(void)
)
ST_drawLives();
}
}
*/
}
// GAME OVER pic
/*if (G_GametypeUsesLives() && stplyr->lives <= 0 && !(hu_showscores && (netgame || multiplayer)))
@ -1845,8 +1847,6 @@ static void ST_overlayDrawer(void)
// Countdown timer for Race Mode
// ...moved to k_kart.c so we can take advantage of the LAPS_Y value
K_drawKartHUD();
/* SRB2kart doesn't need this stuff, I think
// If you are in overtime, put a big honkin' flashin' message on the screen.
if (G_BattleGametype() && cv_overtime.value

View File

@ -366,7 +366,7 @@ static lumpinfo_t* ResGetLumpsWad (FILE* handle, UINT16* nlmp, const char* filen
// read the header
if (fread(&header, 1, sizeof header, handle) < sizeof header)
{
CONS_Alert(CONS_ERROR, M_GetText("Can't read wad header because %s\n"), strerror(ferror(handle)));
CONS_Alert(CONS_ERROR, M_GetText("Can't read wad header because %s\n"), M_FileError(handle));
return NULL;
}
@ -389,7 +389,7 @@ static lumpinfo_t* ResGetLumpsWad (FILE* handle, UINT16* nlmp, const char* filen
if (fseek(handle, header.infotableofs, SEEK_SET) == -1
|| fread(fileinfo, 1, i, handle) < i)
{
CONS_Alert(CONS_ERROR, M_GetText("Corrupt wadfile directory (%s)\n"), strerror(ferror(handle)));
CONS_Alert(CONS_ERROR, M_GetText("Corrupt wadfile directory (%s)\n"), M_FileError(handle));
free(fileinfov);
return NULL;
}
@ -410,7 +410,7 @@ static lumpinfo_t* ResGetLumpsWad (FILE* handle, UINT16* nlmp, const char* filen
handle) < sizeof realsize)
{
I_Error("corrupt compressed file: %s; maybe %s", /// \todo Avoid the bailout?
filename, strerror(ferror(handle)));
filename, M_FileError(handle));
}
realsize = LONG(realsize);
if (realsize != 0)
@ -548,7 +548,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
fseek(handle, -4, SEEK_CUR);
if (fread(&zend, 1, sizeof zend, handle) < sizeof zend)
{
CONS_Alert(CONS_ERROR, "Corrupt central directory (%s)\n", strerror(ferror(handle)));
CONS_Alert(CONS_ERROR, "Corrupt central directory (%s)\n", M_FileError(handle));
return NULL;
}
numlumps = zend.entries;
@ -565,7 +565,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
if (fread(zentry, 1, sizeof(zentry_t), handle) < sizeof(zentry_t))
{
CONS_Alert(CONS_ERROR, "Failed to read central directory (%s)\n", strerror(ferror(handle)));
CONS_Alert(CONS_ERROR, "Failed to read central directory (%s)\n", M_FileError(handle));
Z_Free(lumpinfo);
free(zentry);
return NULL;
@ -585,7 +585,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
fullname = malloc(zentry->namelen + 1);
if (fgets(fullname, zentry->namelen + 1, handle) != fullname)
{
CONS_Alert(CONS_ERROR, "Unable to read lumpname (%s)\n", strerror(ferror(handle)));
CONS_Alert(CONS_ERROR, "Unable to read lumpname (%s)\n", M_FileError(handle));
Z_Free(lumpinfo);
free(zentry);
free(fullname);