mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-16 17:11:03 +00:00
fix incorrect typecasts in FS_* calls
This commit is contained in:
parent
e07294b6b1
commit
7c1d2b4219
5 changed files with 21 additions and 21 deletions
|
@ -174,7 +174,7 @@ SCR_StopCinematic(void)
|
|||
|
||||
if (cl.cinematic_file)
|
||||
{
|
||||
FS_FCloseFile((size_t)cl.cinematic_file);
|
||||
FS_FCloseFile((fileHandle_t)cl.cinematic_file);
|
||||
cl.cinematic_file = 0;
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ Huff1TableInit(void)
|
|||
memset(cin.h_used, 0, sizeof(cin.h_used));
|
||||
|
||||
/* read a row of counts */
|
||||
FS_Read(counts, sizeof(counts), (size_t)cl.cinematic_file);
|
||||
FS_Read(counts, sizeof(counts), (fileHandle_t)cl.cinematic_file);
|
||||
|
||||
for (j = 0; j < 256; j++)
|
||||
{
|
||||
|
@ -369,12 +369,12 @@ SCR_ReadNextFrame(void)
|
|||
int start, end, count;
|
||||
|
||||
/* read the next frame */
|
||||
r = FS_FRead(&command, 4, 1, (size_t)cl.cinematic_file);
|
||||
r = FS_FRead(&command, 4, 1, (fileHandle_t)cl.cinematic_file);
|
||||
|
||||
if (r == 0)
|
||||
{
|
||||
/* we'll give it one more chance */
|
||||
r = FS_FRead(&command, 4, 1, (size_t)cl.cinematic_file);
|
||||
r = FS_FRead(&command, 4, 1, (fileHandle_t)cl.cinematic_file);
|
||||
}
|
||||
|
||||
if (r != 4)
|
||||
|
@ -393,12 +393,12 @@ SCR_ReadNextFrame(void)
|
|||
{
|
||||
/* read palette */
|
||||
FS_Read(cl.cinematicpalette, sizeof(cl.cinematicpalette),
|
||||
(size_t)cl.cinematic_file);
|
||||
(fileHandle_t)cl.cinematic_file);
|
||||
cl.cinematicpalette_active = 0;
|
||||
}
|
||||
|
||||
/* decompress the next frame */
|
||||
FS_Read(&size, 4, (size_t)cl.cinematic_file);
|
||||
FS_Read(&size, 4, (fileHandle_t)cl.cinematic_file);
|
||||
size = LittleLong(size);
|
||||
|
||||
if (((unsigned long)size > sizeof(compressed)) || (size < 1))
|
||||
|
@ -406,7 +406,7 @@ SCR_ReadNextFrame(void)
|
|||
Com_Error(ERR_DROP, "Bad compressed frame size");
|
||||
}
|
||||
|
||||
FS_Read(compressed, size, (size_t)cl.cinematic_file);
|
||||
FS_Read(compressed, size, (fileHandle_t)cl.cinematic_file);
|
||||
|
||||
/* read sound */
|
||||
start = cl.cinematicframe * cin.s_rate / 14;
|
||||
|
@ -414,7 +414,7 @@ SCR_ReadNextFrame(void)
|
|||
count = end - start;
|
||||
|
||||
FS_Read(samples, count * cin.s_width * cin.s_channels,
|
||||
(size_t)cl.cinematic_file);
|
||||
(fileHandle_t)cl.cinematic_file);
|
||||
|
||||
if (cin.s_width == 2)
|
||||
{
|
||||
|
@ -625,16 +625,16 @@ SCR_PlayCinematic(char *arg)
|
|||
|
||||
cls.state = ca_active;
|
||||
|
||||
FS_Read(&width, 4, (size_t)cl.cinematic_file);
|
||||
FS_Read(&height, 4, (size_t)cl.cinematic_file);
|
||||
FS_Read(&width, 4, (fileHandle_t)cl.cinematic_file);
|
||||
FS_Read(&height, 4, (fileHandle_t)cl.cinematic_file);
|
||||
cin.width = LittleLong(width);
|
||||
cin.height = LittleLong(height);
|
||||
|
||||
FS_Read(&cin.s_rate, 4, (size_t)cl.cinematic_file);
|
||||
FS_Read(&cin.s_rate, 4, (fileHandle_t)cl.cinematic_file);
|
||||
cin.s_rate = LittleLong(cin.s_rate);
|
||||
FS_Read(&cin.s_width, 4, (size_t)cl.cinematic_file);
|
||||
FS_Read(&cin.s_width, 4, (fileHandle_t)cl.cinematic_file);
|
||||
cin.s_width = LittleLong(cin.s_width);
|
||||
FS_Read(&cin.s_channels, 4, (size_t)cl.cinematic_file);
|
||||
FS_Read(&cin.s_channels, 4, (fileHandle_t)cl.cinematic_file);
|
||||
cin.s_channels = LittleLong(cin.s_channels);
|
||||
|
||||
Huff1TableInit();
|
||||
|
|
|
@ -2214,8 +2214,8 @@ Create_Savestrings(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
FS_Read(m_savestrings[i], sizeof(m_savestrings[i]), (size_t)f);
|
||||
FS_FCloseFile((size_t)f);
|
||||
FS_Read(m_savestrings[i], sizeof(m_savestrings[i]), (fileHandle_t)f);
|
||||
FS_FCloseFile((fileHandle_t)f);
|
||||
m_savevalid[i] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ SV_SpawnServer(char *server, char *spawnpoint, server_state_t serverstate,
|
|||
|
||||
if (sv.demofile)
|
||||
{
|
||||
FS_FCloseFile((size_t)sv.demofile);
|
||||
FS_FCloseFile((fileHandle_t)sv.demofile);
|
||||
}
|
||||
|
||||
svs.spawncount++; /* any partially connected client will be restarted */
|
||||
|
|
|
@ -681,7 +681,7 @@ SV_Shutdown(char *finalmsg, qboolean reconnect)
|
|||
/* free current level */
|
||||
if (sv.demofile)
|
||||
{
|
||||
FS_FCloseFile((size_t)sv.demofile);
|
||||
FS_FCloseFile((fileHandle_t)sv.demofile);
|
||||
}
|
||||
|
||||
memset(&sv, 0, sizeof(sv));
|
||||
|
@ -700,7 +700,7 @@ SV_Shutdown(char *finalmsg, qboolean reconnect)
|
|||
|
||||
if (svs.demofile)
|
||||
{
|
||||
FS_FCloseFile((size_t)svs.demofile);
|
||||
FS_FCloseFile((fileHandle_t)svs.demofile);
|
||||
}
|
||||
|
||||
memset(&svs, 0, sizeof(svs));
|
||||
|
|
|
@ -466,7 +466,7 @@ SV_DemoCompleted(void)
|
|||
{
|
||||
if (sv.demofile)
|
||||
{
|
||||
FS_FCloseFile((size_t)sv.demofile);
|
||||
FS_FCloseFile((fileHandle_t)sv.demofile);
|
||||
sv.demofile = NULL;
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ SV_SendClientMessages(void)
|
|||
else
|
||||
{
|
||||
/* get the next message */
|
||||
r = FS_FRead(&msglen, 4, 1, (size_t)sv.demofile);
|
||||
r = FS_FRead(&msglen, 4, 1, (fileHandle_t)sv.demofile);
|
||||
|
||||
if (r != 4)
|
||||
{
|
||||
|
@ -549,7 +549,7 @@ SV_SendClientMessages(void)
|
|||
"SV_SendClientMessages: msglen > MAX_MSGLEN");
|
||||
}
|
||||
|
||||
r = FS_FRead(msgbuf, msglen, 1, (size_t)sv.demofile);
|
||||
r = FS_FRead(msgbuf, msglen, 1, (fileHandle_t)sv.demofile);
|
||||
|
||||
if (r != msglen)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue