From d747cad5b2bad2a1480f0f202f8fb670dca1ba85 Mon Sep 17 00:00:00 2001 From: Stefano Musumeci Date: Sun, 10 Aug 2014 20:17:31 +0200 Subject: [PATCH] TINYGL: Improved code commenting. --- graphics/tinygl/zblit.cpp | 42 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/graphics/tinygl/zblit.cpp b/graphics/tinygl/zblit.cpp index 3dd3518414e..1cd787845bb 100644 --- a/graphics/tinygl/zblit.cpp +++ b/graphics/tinygl/zblit.cpp @@ -184,7 +184,7 @@ public: FORCEINLINE void tglBlitRotoScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, int rotation, int originX, int originY, float aTint, float rTint, float gTint, float bTint); - //Utility function. + //Utility function that calls the correct blitting function. template FORCEINLINE void tglBlitGeneric(const BlitTransform &transform) { if (disableTransform) { @@ -381,6 +381,46 @@ FORCEINLINE void BlitImage::tglBlitSimple(int dstX, int dstY, int srcX, int srcY } } +/* + +The below two functions are adapted from SDL_rotozoom.c, +taken from SDL_gfx-2.0.18. + +Its copyright notice: + +============================================================================= +SDL_rotozoom.c: rotozoomer, zoomer and shrinker for 32bit or 8bit surfaces + +Copyright (C) 2001-2012 Andreas Schiffler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. + +Andreas Schiffler -- aschiffler at ferzkopp dot net +============================================================================= + + +The functions have been adapted for different structures and coordinate +systems. + +*/ + template FORCEINLINE void BlitImage::tglBlitScale(int dstX, int dstY, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight, float aTint, float rTint, float gTint, float bTint) {