TINYGL: Improved code commenting.
This commit is contained in:
parent
ff488253e7
commit
d747cad5b2
1 changed files with 41 additions and 1 deletions
|
@ -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 <bool disableBlending, bool disableColoring, bool disableTransform, bool flipVertical, bool flipHorizontal, bool enableAlphaBlending>
|
||||
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 <bool disableBlending, bool disableColoring, bool flipVertical, bool flipHorizontal>
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue