changed my code style to be more in line with eminence's (and PEP 7), added GPL notice
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
/*
|
||||
* This file is part of the Minecraft Overviewer.
|
||||
*
|
||||
* Minecraft Overviewer is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* Minecraft Overviewer is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with the Overviewer. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "overviewer.h"
|
||||
|
||||
#include <numpy/arrayobject.h>
|
||||
@@ -12,17 +29,18 @@ static inline int isTransparent(unsigned char b) {
|
||||
}
|
||||
|
||||
// helper to handle alpha_over calls involving a texture tuple
|
||||
static inline PyObject* texture_alpha_over(PyObject* dest, PyObject* t, int imgx, int imgy)
|
||||
static inline PyObject *
|
||||
texture_alpha_over(PyObject *dest, PyObject *t, int imgx, int imgy)
|
||||
{
|
||||
PyObject* src, * mask;
|
||||
|
||||
src = PyTuple_GET_ITEM(t, 0);
|
||||
mask = PyTuple_GET_ITEM(t, 1);
|
||||
if (mask == Py_None) {
|
||||
mask = src;
|
||||
}
|
||||
|
||||
return alpha_over(dest, src, mask, imgx, imgy, 0, 0);
|
||||
PyObject* src, * mask;
|
||||
|
||||
src = PyTuple_GET_ITEM(t, 0);
|
||||
mask = PyTuple_GET_ITEM(t, 1);
|
||||
if (mask == Py_None) {
|
||||
mask = src;
|
||||
}
|
||||
|
||||
return alpha_over(dest, src, mask, imgx, imgy, 0, 0);
|
||||
}
|
||||
|
||||
// TODO triple check this to make sure reference counting is correct
|
||||
|
||||
Reference in New Issue
Block a user