Skip to content

Commit

Permalink
[engine]Issue #116: Use debug log tag for warning header
Browse files Browse the repository at this point in the history
  • Loading branch information
Miquel Angel Quinones Garcia committed Feb 19, 2013
1 parent a99e12f commit 0a87a9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions IndieLib/common/src/IND_SurfaceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ void IND_SurfaceManager::convertImage(IND_Image* pImage ,IND_Type pType, IND_Qua
//Ignore quality specifier (we assume is IND_16)
if (IND_ALPHA == pType) {
pImage->convert(IND_RGBA, 32);
g_debug->header("Image type converted to IND_RGBA implicitly" , 4);
g_debug->header("Image type converted to IND_RGBA implicitly" , DebugApi::LogHeaderWarning);
} else {
pImage->convert(IND_RGB, 16);
g_debug->header("Image type converted to IND_RGB implicitly" , 4);
g_debug->header("Image type converted to IND_RGB implicitly" , DebugApi::LogHeaderWarning);
}
}

Expand Down Expand Up @@ -681,8 +681,8 @@ void IND_SurfaceManager::convertImage(IND_Image* pImage ,IND_Type pType, IND_Qua
}
break;
default:
g_debug->header("No good Quality specified when creating surface" , 4);
g_debug->header("Image type converted to 32-bit RGB implicitly." , 4);
g_debug->header("No good Quality specified when creating surface" , DebugApi::LogHeaderWarning);
g_debug->header("Image type converted to 32-bit RGB implicitly." , DebugApi::LogHeaderWarning);
pImage->convert(pImage->getFormatInt(), 32);
break;
}
Expand Down
8 changes: 4 additions & 4 deletions IndieLib/common/src/render/directx/DirectXTextureBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,13 @@ void DirectXTextureBuilder::getSourceAndDestinationFormat(IND_Image *pImage, D3D
*pSrcFormat = D3DFMT_R5G6B5;
} else {
*pSrcFormat = D3DFMT_UNKNOWN;
g_debug->header("Not supported format of image! texture not loaded" , 4);
g_debug->header("Not supported format of image! texture not loaded" , DebugApi::LogHeaderWarning);
}
} else if (32 == bpp) {
*pSrcFormat = D3DFMT_A8B8G8R8;
} else {
*pSrcFormat = D3DFMT_UNKNOWN;
g_debug->header("The pixel format for the image could not be resolved correctly!" , 4);
g_debug->header("The pixel format for the image could not be resolved correctly!" , DebugApi::LogHeaderWarning);
}
}
break;
Expand All @@ -354,15 +354,15 @@ void DirectXTextureBuilder::getSourceAndDestinationFormat(IND_Image *pImage, D3D
*pSrcFormat = D3DFMT_A8R8G8B8;
} else {
*pSrcFormat = D3DFMT_UNKNOWN;
g_debug->header("The pixel format for the image could not be resolved correctly!" , 4);
g_debug->header("The pixel format for the image could not be resolved correctly!" , DebugApi::LogHeaderWarning);
}

}
break;
//FIXME: IND_LUMINANCE ignored?
default: {
*pSrcFormat = D3DFMT_UNKNOWN;
g_debug->header("The pixel format for the image could not be resolved correctly!" , 4);
g_debug->header("The pixel format for the image could not be resolved correctly!" , DebugApi::LogHeaderWarning);
}
}

Expand Down
10 changes: 5 additions & 5 deletions IndieLib/common/src/render/opengl/OpenGLTextureBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void OpenGLTextureBuilder::getGLFormat(IND_Surface *pNewSurface, IND_Image* pIma
*pGLInternalFormat = GL_NONE;
*pGLFormat = GL_NONE;
*pGLType = GL_NONE;
g_debug->header("Not supported format of image! texture not loaded" , 4);
g_debug->header("Not supported format of image! texture not loaded" , DebugApi::LogHeaderWarning);
}

break;
Expand All @@ -322,7 +322,7 @@ void OpenGLTextureBuilder::getGLFormat(IND_Surface *pNewSurface, IND_Image* pIma
*pGLInternalFormat = GL_NONE;
*pGLFormat = GL_NONE;
*pGLType = GL_NONE;
g_debug->header("Not supported format of image! texture not loaded" , 4);
g_debug->header("Not supported format of image! texture not loaded" , DebugApi::LogHeaderWarning);
}
} else if (32 == bpp) {
//FreeImage loads channel order differently depending on processor endianess (24 and 32 bits).
Expand All @@ -336,7 +336,7 @@ void OpenGLTextureBuilder::getGLFormat(IND_Surface *pNewSurface, IND_Image* pIma
*pGLInternalFormat = GL_NONE;
*pGLFormat = GL_NONE;
*pGLType = GL_NONE;
g_debug->header("Not supported format of image! texture not loaded" , 4);
g_debug->header("Not supported format of image! texture not loaded" , DebugApi::LogHeaderWarning);
}
break;
case (IND_RGBA):
Expand All @@ -357,7 +357,7 @@ void OpenGLTextureBuilder::getGLFormat(IND_Surface *pNewSurface, IND_Image* pIma
*pGLInternalFormat = GL_NONE;
*pGLFormat = GL_NONE;
*pGLType = GL_NONE;
g_debug->header("Not supported format of image! texture not loaded" , 4);
g_debug->header("Not supported format of image! texture not loaded" , DebugApi::LogHeaderWarning);
}

break;
Expand All @@ -366,7 +366,7 @@ void OpenGLTextureBuilder::getGLFormat(IND_Surface *pNewSurface, IND_Image* pIma
*pGLInternalFormat = GL_NONE;
*pGLFormat = GL_NONE;
*pGLType = GL_NONE;
g_debug->header("Not supported format of image! texture not loaded" , 4);
g_debug->header("Not supported format of image! texture not loaded" , DebugApi::LogHeaderWarning);
break;
}
}
Expand Down

0 comments on commit 0a87a9b

Please sign in to comment.