aschiffler@6763: /* aschiffler@6763: Simple DirectMedia Layer slouken@8149: Copyright (C) 1997-2014 Sam Lantinga aschiffler@6763: aschiffler@6763: This software is provided 'as-is', without any express or implied aschiffler@6763: warranty. In no event will the authors be held liable for any damages aschiffler@6763: arising from the use of this software. aschiffler@6763: aschiffler@6763: Permission is granted to anyone to use this software for any purpose, aschiffler@6763: including commercial applications, and to alter it and redistribute it aschiffler@6763: freely, subject to the following restrictions: aschiffler@6763: aschiffler@6763: 1. The origin of this software must not be misrepresented; you must not aschiffler@6763: claim that you wrote the original software. If you use this software aschiffler@6763: in a product, an acknowledgment in the product documentation would be aschiffler@6763: appreciated but is not required. aschiffler@6763: 2. Altered source versions must be plainly marked as such, and must not be aschiffler@6763: misrepresented as being the original software. aschiffler@6763: 3. This notice may not be removed or altered from any source distribution. aschiffler@6763: */ aschiffler@6763: aschiffler@6763: /** aschiffler@6763: * \file SDL_test_compare.h slouken@7191: * aschiffler@6763: * Include file for SDL test framework. aschiffler@6763: * aschiffler@6763: * This code is a part of the SDL2_test library, not the main SDL library. aschiffler@6763: */ aschiffler@6763: slouken@7191: /* aschiffler@6763: aschiffler@6763: Defines comparison functions (i.e. for surfaces). slouken@7191: aschiffler@6763: */ aschiffler@6763: aschiffler@6763: #ifndef _SDL_test_compare_h aschiffler@6763: #define _SDL_test_compare_h aschiffler@6763: aschiffler@6763: #include "SDL.h" aschiffler@6772: aschiffler@6763: #include "SDL_test_images.h" aschiffler@6763: aschiffler@6763: #include "begin_code.h" aschiffler@6763: /* Set up for C function definitions, even when using C++ */ aschiffler@6763: #ifdef __cplusplus aschiffler@6763: extern "C" { aschiffler@6763: #endif aschiffler@6763: aschiffler@6763: /** aschiffler@6763: * \brief Compares a surface and with reference image data for equality aschiffler@6763: * aschiffler@6772: * \param surface Surface used in comparison aschiffler@6772: * \param referenceSurface Test Surface used in comparison aschiffler@9254: * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. aschiffler@6763: * aschiffler@9254: * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. aschiffler@6763: */ aschiffler@6772: int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); slouken@7191: aschiffler@6763: aschiffler@6763: /* Ends C function definitions when using C++ */ aschiffler@6763: #ifdef __cplusplus aschiffler@6763: } aschiffler@6763: #endif aschiffler@6763: #include "close_code.h" aschiffler@6763: aschiffler@6763: #endif /* _SDL_test_compare_h */ aschiffler@6763: aschiffler@6763: /* vi: set ts=4 sw=4 expandtab: */