mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Adjust P_AllocMapHeader and associated
- Prints with more info - No weird increment/decrement
This commit is contained in:
parent
abb567ab81
commit
077b23929b
1 changed files with 3 additions and 5 deletions
|
|
@ -359,10 +359,8 @@ void P_DeleteFlickies(INT16 i)
|
||||||
* \param i Map number to clear header for.
|
* \param i Map number to clear header for.
|
||||||
* \sa P_ClearMapHeaderInfo
|
* \sa P_ClearMapHeaderInfo
|
||||||
*/
|
*/
|
||||||
static void P_ClearSingleMapHeaderInfo(INT16 i)
|
static void P_ClearSingleMapHeaderInfo(INT16 num)
|
||||||
{
|
{
|
||||||
const INT16 num = (INT16)(i-1);
|
|
||||||
|
|
||||||
mapheaderinfo[num]->lvlttl[0] = '\0';
|
mapheaderinfo[num]->lvlttl[0] = '\0';
|
||||||
mapheaderinfo[num]->subttl[0] = '\0';
|
mapheaderinfo[num]->subttl[0] = '\0';
|
||||||
mapheaderinfo[num]->zonttl[0] = '\0';
|
mapheaderinfo[num]->zonttl[0] = '\0';
|
||||||
|
|
@ -457,7 +455,7 @@ void P_AllocMapHeader(INT16 i)
|
||||||
{
|
{
|
||||||
mapheaderinfo[i] = Z_Malloc(sizeof(mapheader_t), PU_STATIC, NULL);
|
mapheaderinfo[i] = Z_Malloc(sizeof(mapheader_t), PU_STATIC, NULL);
|
||||||
if (!mapheaderinfo[i])
|
if (!mapheaderinfo[i])
|
||||||
I_Error("P_AllocMapHeader: Not enough memory to allocate new mapheader");
|
I_Error("P_AllocMapHeader: Not enough memory to allocate new mapheader (ID %d)", i);
|
||||||
|
|
||||||
mapheaderinfo[i]->lumpnum = LUMPERROR;
|
mapheaderinfo[i]->lumpnum = LUMPERROR;
|
||||||
mapheaderinfo[i]->lumpname = NULL;
|
mapheaderinfo[i]->lumpname = NULL;
|
||||||
|
|
@ -467,7 +465,7 @@ void P_AllocMapHeader(INT16 i)
|
||||||
mapheaderinfo[i]->mainrecord = NULL;
|
mapheaderinfo[i]->mainrecord = NULL;
|
||||||
nummapheaders++;
|
nummapheaders++;
|
||||||
}
|
}
|
||||||
P_ClearSingleMapHeaderInfo(i + 1);
|
P_ClearSingleMapHeaderInfo(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue