mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 13:10:55 +00:00
Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_new_spriteframe_angle
This commit is contained in:
commit
aa89eadac4
3 changed files with 12 additions and 6 deletions
|
@ -1060,10 +1060,11 @@ void D_SRB2Main(void)
|
||||||
if (M_CheckParm("-warp") && M_IsNextParm())
|
if (M_CheckParm("-warp") && M_IsNextParm())
|
||||||
{
|
{
|
||||||
const char *word = M_GetNextParm();
|
const char *word = M_GetNextParm();
|
||||||
if (fastncmp(word, "MAP", 3))
|
char ch; // use this with sscanf to catch non-digits with
|
||||||
|
if (fastncmp(word, "MAP", 3)) // MAPxx name
|
||||||
pstartmap = M_MapNumber(word[3], word[4]);
|
pstartmap = M_MapNumber(word[3], word[4]);
|
||||||
else
|
else if (sscanf(word, "%d%c", &pstartmap, &ch) != 1) // a plain number
|
||||||
pstartmap = atoi(word);
|
I_Error("Cannot warp to map %s (invalid map name)\n", word);
|
||||||
// Don't check if lump exists just yet because the wads haven't been loaded!
|
// Don't check if lump exists just yet because the wads haven't been loaded!
|
||||||
// Just do a basic range check here.
|
// Just do a basic range check here.
|
||||||
if (pstartmap < 1 || pstartmap > NUMMAPS)
|
if (pstartmap < 1 || pstartmap > NUMMAPS)
|
||||||
|
|
|
@ -1188,7 +1188,12 @@ INT32 P_FindSpecialLineFromTag(INT16 special, INT16 tag, INT32 start)
|
||||||
{
|
{
|
||||||
start++;
|
start++;
|
||||||
|
|
||||||
while (lines[start].special != special)
|
// This redundant check stops the compiler from complaining about function expansion
|
||||||
|
// elsewhere for some reason and everything is awful
|
||||||
|
if (start >= (INT32)numlines)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
while (start < (INT32)numlines && lines[start].special != special)
|
||||||
start++;
|
start++;
|
||||||
|
|
||||||
if (start >= (INT32)numlines)
|
if (start >= (INT32)numlines)
|
||||||
|
|
|
@ -316,7 +316,7 @@ static boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef,
|
||||||
{
|
{
|
||||||
case SRF_NONE:
|
case SRF_NONE:
|
||||||
// no rotations were found for that frame at all
|
// no rotations were found for that frame at all
|
||||||
I_Error("R_AddSingleSpriteDef: No patches found for %s frame %c", sprname, R_Frame2Char(frame));
|
I_Error("R_AddSingleSpriteDef: No patches found for %.4s frame %c", sprname, R_Frame2Char(frame));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SRF_SINGLE:
|
case SRF_SINGLE:
|
||||||
|
@ -336,7 +336,7 @@ static boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef,
|
||||||
// we test the patch lump, or the id lump whatever
|
// we test the patch lump, or the id lump whatever
|
||||||
// if it was not loaded the two are LUMPERROR
|
// if it was not loaded the two are LUMPERROR
|
||||||
if (sprtemp[frame].lumppat[rotation] == LUMPERROR)
|
if (sprtemp[frame].lumppat[rotation] == LUMPERROR)
|
||||||
I_Error("R_AddSingleSpriteDef: Sprite %s frame %c is missing rotations",
|
I_Error("R_AddSingleSpriteDef: Sprite %.4s frame %c is missing rotations",
|
||||||
sprname, R_Frame2Char(frame));
|
sprname, R_Frame2Char(frame));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue