0

changed my code style to be more in line with eminence's (and PEP 7), added GPL notice

This commit is contained in:
Aaron Griffith
2011-03-08 19:58:09 -05:00
parent 07dd219d20
commit 5852c17ec8
4 changed files with 247 additions and 212 deletions

View File

@@ -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