* Properly handles an illegal frame # sent to sp_frame instead of crashing
- Versioned to 2.75 git-svn-id: svn://rtsoft.com/rtsvn/projects/RTDink@1492 353e56fe-9613-0410-8469-b96ad8e6f29c
This commit is contained in:
parent
1adfda0aab
commit
79e8424266
4 changed files with 35 additions and 7 deletions
|
@ -125,3 +125,6 @@ www.rtsoft.com
|
||||||
* Fixed some issues related to dynamic 8 bit to 32 bit surface changes (this can happen if you turn on the new shadows after starting to play or the game suddenly hits a 32 bit image)
|
* Fixed some issues related to dynamic 8 bit to 32 bit surface changes (this can happen if you turn on the new shadows after starting to play or the game suddenly hits a 32 bit image)
|
||||||
- Note: Just to be safe, save state version has changed, so old save states won't load
|
- Note: Just to be safe, save state version has changed, so old save states won't load
|
||||||
|
|
||||||
|
------ Change log for 1.7.5 ----------
|
||||||
|
|
||||||
|
* Properly handles an illegal frame # sent to sp_frame instead of crashing
|
|
@ -180,8 +180,8 @@ App::App()
|
||||||
m_bDidPostInit = false;
|
m_bDidPostInit = false;
|
||||||
m_bHasDMODSupport = true;
|
m_bHasDMODSupport = true;
|
||||||
//for mobiles
|
//for mobiles
|
||||||
m_version = 1.74f;
|
m_version = 1.75f;
|
||||||
m_versionString = "V1.7.4";
|
m_versionString = "V1.7.5";
|
||||||
m_build = 1;
|
m_build = 1;
|
||||||
m_bCheatsEnabled = false;
|
m_bCheatsEnabled = false;
|
||||||
|
|
||||||
|
|
|
@ -3836,7 +3836,8 @@ bool get_parms(char proc_name[20], int32 script, char *h, int32 p[10])
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
LogMsg("Procedure %s does not take %d parms in %s, offset %d. (%s?)", proc_name, i+1, g_scriptInstance[script]->name, g_scriptInstance[script]->current, h);
|
LogMsg("Procedure %s does not take %d parms in %s, offset %d. (%s?)", proc_name, i+1, g_scriptInstance[script]->name, g_scriptInstance[script]->current, h);
|
||||||
|
//set it to zero to be "safe"?
|
||||||
|
//(p[i]
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4014,7 +4015,14 @@ bool check_pic_status(int picID)
|
||||||
{
|
{
|
||||||
if (picID == 0) return true;
|
if (picID == 0) return true;
|
||||||
|
|
||||||
assert(g_dglos.g_picInfo[picID].m_parentSeq != 0);
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
if (g_dglos.g_picInfo[picID].m_parentSeq == 0)
|
||||||
|
{
|
||||||
|
LogMsg("Huh, this should have a parent..");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if (g_pSpriteSurface[picID]) return true;
|
if (g_pSpriteSurface[picID]) return true;
|
||||||
|
|
||||||
|
@ -4038,7 +4046,17 @@ LogMsg("Seq %d missing?", seq);
|
||||||
{
|
{
|
||||||
//LogMsg("Woah!");
|
//LogMsg("Woah!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
if (frame < 0 || frame >= C_MAX_SPRITE_FRAMES)
|
||||||
|
{
|
||||||
|
//invalid!
|
||||||
|
assert(!"Illegal sprite frame. Track where it came from!");
|
||||||
|
return true; //avoid crash
|
||||||
|
}
|
||||||
|
|
||||||
if (frame != 0)
|
if (frame != 0)
|
||||||
{
|
{
|
||||||
if (g_pSpriteSurface[g_dglos.g_seq[seq].frame[frame]]) return true;
|
if (g_pSpriteSurface[g_dglos.g_seq[seq].frame[frame]]) return true;
|
||||||
|
@ -5045,7 +5063,7 @@ void draw_sprite_game(LPDIRECTDRAWSURFACE lpdest,int h)
|
||||||
{
|
{
|
||||||
int pic = getpic(h);
|
int pic = getpic(h);
|
||||||
|
|
||||||
assert(!"The hell?");
|
LogMsg("Debug: Bad pic here");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -9017,7 +9035,15 @@ pass:
|
||||||
int32 p[20] = {1,1,0,0,0,0,0,0,0,0};
|
int32 p[20] = {1,1,0,0,0,0,0,0,0,0};
|
||||||
if (get_parms(ev[1], script, h, p))
|
if (get_parms(ev[1], script, h, p))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (g_nlist[1] < 0 || g_nlist[1] >= C_MAX_SPRITE_FRAMES)
|
||||||
|
{
|
||||||
|
LogMsg("sp_frame trying to set something to frame %d? Illegal, forcing to 1.", g_nlist[1]);
|
||||||
|
g_nlist[1] = 1;
|
||||||
|
}
|
||||||
g_dglos.g_returnint = change_sprite(g_nlist[0], g_nlist[1], &g_sprite[g_nlist[0]].frame);
|
g_dglos.g_returnint = change_sprite(g_nlist[0], g_nlist[1], &g_sprite[g_nlist[0]].frame);
|
||||||
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
g_dglos.g_returnint = -1;
|
g_dglos.g_returnint = -1;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug GL|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug GL|Win32'">
|
||||||
<LocalDebuggerWorkingDirectory>$(ProjectDir)</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>$(ProjectDir)</LocalDebuggerWorkingDirectory>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
<LocalDebuggerCommandArguments>
|
<LocalDebuggerCommandArguments>-game dmods/init</LocalDebuggerCommandArguments>
|
||||||
</LocalDebuggerCommandArguments>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue