mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'textmap-parser' of https://git.magicalgirl.moe/STJr/SRB2/ into textmap-parser
This commit is contained in:
commit
e0b4921855
1 changed files with 21 additions and 19 deletions
|
|
@ -1462,13 +1462,19 @@ static void TextmapThing(UINT32 i, char *param)
|
|||
*/
|
||||
static void TextmapParse(UINT32 dataPos, size_t num, void (*parser)(UINT32, char *))
|
||||
{
|
||||
char *open;
|
||||
char *tkn;
|
||||
|
||||
M_SetTokenPos(dataPos);
|
||||
open = M_GetToken(NULL);
|
||||
if (fastcmp(open, "{"))
|
||||
tkn = M_GetToken(NULL);
|
||||
if (!fastcmp(tkn, "{"))
|
||||
{
|
||||
char *tkn = M_GetToken(NULL);
|
||||
Z_Free(tkn);
|
||||
CONS_Alert(CONS_WARNING, "Invalid UDMF data capsule!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Z_Free(tkn);
|
||||
tkn = M_GetToken(NULL);
|
||||
while (!fastcmp(tkn, "}"))
|
||||
{
|
||||
dat = NULL;
|
||||
|
|
@ -1480,15 +1486,11 @@ static void TextmapParse(UINT32 dataPos, size_t num, void (*parser)(UINT32, char
|
|||
tkn = M_GetToken(NULL);
|
||||
}
|
||||
Z_Free(tkn);
|
||||
}
|
||||
else
|
||||
CONS_Alert(CONS_WARNING, "Invalid UDMF data capsule!\n");
|
||||
Z_Free(open);
|
||||
}
|
||||
|
||||
/** Provides a fix to the flat alignment coordinate transform from standard Textmaps.
|
||||
*/
|
||||
static void TextmapFixFlatOffsets (sector_t* sec)
|
||||
static void TextmapFixFlatOffsets(sector_t *sec)
|
||||
{
|
||||
if (sec->floorpic_angle)
|
||||
{
|
||||
|
|
@ -1517,7 +1519,7 @@ static void TextmapFixFlatOffsets (sector_t* sec)
|
|||
|
||||
/** Loads the textmap data, after obtaining the elements count and allocating their respective space.
|
||||
*/
|
||||
static void P_LoadTextmap (void)
|
||||
static void P_LoadTextmap(void)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue