mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
The lump is not needed for P_WriteThings
This commit is contained in:
parent
0bbdde2fb2
commit
37931fc253
3 changed files with 3 additions and 8 deletions
|
@ -1435,7 +1435,7 @@ void Command_Writethings_f(void)
|
||||||
REQUIRE_SINGLEPLAYER;
|
REQUIRE_SINGLEPLAYER;
|
||||||
REQUIRE_OBJECTPLACE;
|
REQUIRE_OBJECTPLACE;
|
||||||
|
|
||||||
P_WriteThings(W_GetNumForName(G_BuildMapName(gamemap)) + ML_THINGS);
|
P_WriteThings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Command_ObjectPlace_f(void)
|
void Command_ObjectPlace_f(void)
|
||||||
|
|
|
@ -904,16 +904,13 @@ static void P_SpawnMapThings(boolean spawnemblems)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Experimental groovy write function!
|
// Experimental groovy write function!
|
||||||
void P_WriteThings(lumpnum_t lumpnum)
|
void P_WriteThings(void)
|
||||||
{
|
{
|
||||||
size_t i, length;
|
size_t i, length;
|
||||||
mapthing_t *mt;
|
mapthing_t *mt;
|
||||||
UINT8 *data;
|
|
||||||
UINT8 *savebuffer, *savebuf_p;
|
UINT8 *savebuffer, *savebuf_p;
|
||||||
INT16 temp;
|
INT16 temp;
|
||||||
|
|
||||||
data = W_CacheLumpNum(lumpnum, PU_LEVEL);
|
|
||||||
|
|
||||||
savebuf_p = savebuffer = (UINT8 *)malloc(nummapthings * sizeof (mapthing_t));
|
savebuf_p = savebuffer = (UINT8 *)malloc(nummapthings * sizeof (mapthing_t));
|
||||||
|
|
||||||
if (!savebuf_p)
|
if (!savebuf_p)
|
||||||
|
@ -935,8 +932,6 @@ void P_WriteThings(lumpnum_t lumpnum)
|
||||||
WRITEUINT16(savebuf_p, mt->options);
|
WRITEUINT16(savebuf_p, mt->options);
|
||||||
}
|
}
|
||||||
|
|
||||||
Z_Free(data);
|
|
||||||
|
|
||||||
length = savebuf_p - savebuffer;
|
length = savebuf_p - savebuffer;
|
||||||
|
|
||||||
FIL_WriteFile(va("newthings%d.lmp", gamemap), savebuffer, length);
|
FIL_WriteFile(va("newthings%d.lmp", gamemap), savebuffer, length);
|
||||||
|
|
|
@ -105,7 +105,7 @@ boolean P_AddWadFile(const char *wadfilename);
|
||||||
boolean P_RunSOC(const char *socfilename);
|
boolean P_RunSOC(const char *socfilename);
|
||||||
void P_LoadSoundsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
void P_LoadSoundsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
||||||
void P_LoadMusicsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
void P_LoadMusicsRange(UINT16 wadnum, UINT16 first, UINT16 num);
|
||||||
void P_WriteThings(lumpnum_t lump);
|
void P_WriteThings(void);
|
||||||
size_t P_PrecacheLevelFlats(void);
|
size_t P_PrecacheLevelFlats(void);
|
||||||
void P_AllocMapHeader(INT16 i);
|
void P_AllocMapHeader(INT16 i);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue