Pink Petal Games
Game Discussion => General Discussion & Download => Topic started by: Anon21 on August 16, 2011, 03:39:20 PM
-
By the look of it that 'return' can never be reached.
void cFont::RenderText(string text, bool multi)
{
...
m_Message = 0;
if((m_Message != 0) && (text == ""))
return;
[EDIT] Also I think the next bit of code doesn't work unless / is replaced by \\
bool CSurface::DrawSurface(int x, int y, SDL_Surface* destination, SDL_Rect* clip, bool resize, bool maintainRatio)
{
double scaleX = 0;
double scaleY = 0;
/*
* bit of a kludge to stop buttons with a missing
* disabled image from spamming the log file
*/
if(m_Filename == "./Resources/Buttons/") {
return false;
}
-
By the look of it that 'return' can never be reached.
void cFont::RenderText(string text, bool multi)
{
...
m_Message = 0;
if((m_Message != 0) && (text == ""))
return;
Yep, looks like you're right
[EDIT] Also I think the next bit of code doesn't work unless / is replaced by \\
bool CSurface::DrawSurface(int x, int y, SDL_Surface* destination, SDL_Rect* clip, bool resize, bool maintainRatio)
{
double scaleX = 0;
double scaleY = 0;
/*
* bit of a kludge to stop buttons with a missing
* disabled image from spamming the log file
*/
if(m_Filename == "./Resources/Buttons/") {
return false;
}
Strictly, all paths ought to be build using DirPath and friends. That way we get code that can run on Linux and (hopefully) Macs.
And yeah, mea culpa for that one :)
-
That way we get code that can run on Linux and (hopefully) Macs.
Good point. I've broken that idea a lot so I should go redo some code now.