World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_test_compare.h

См. исходные тексты.

Функции

int SDLTest_CompareSurfaces (SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error)
 Compares a surface and with reference image data for equality. Подробнее...
 

Подробное описание

Include file for SDL test framework.

This code is a part of the SDL2_test library, not the main SDL library.

См. определение в файле SDL_test_compare.h

Функции

◆ SDLTest_CompareSurfaces()

int SDLTest_CompareSurfaces ( SDL_Surface surface,
SDL_Surface referenceSurface,
int  allowable_error 
)

Compares a surface and with reference image data for equality.

Аргументы
surfaceSurface used in comparison
referenceSurfaceTest Surface used in comparison
allowable_errorAllowable difference (=sum of squared difference for each RGB component) in blending accuracy.
Возвращает
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.