0
Commit Graph

17 Commits

Author SHA1 Message Date
Wunkolo
4298aea569 Fix GCC signed-unsigned and pointer-warnings (#1608)
* Fix GCC signed-unsigned and pointer-warnings

A lot of the signed/unsigned issues are related to the fact that I converted
a lot of indexing values to use unsigned types, little did I know that a lot of
other values used when indexing actually come from the python-end. Python does
not have built-in unsigned types so all integers coming from Python are signed
implicitly so a lot of things like image-size and x, y coordiantes are specially
handling negative-integer cases.

Guess we'll just take our `int32_t i = 0; i < blah; ++i` and like it.

Code now compiles with no warnings or nagging.
2019-07-12 15:26:45 +02:00
Wunkolo
22840d5a97 Implement straggler standard integer types 2019-06-26 10:29:10 -07:00
Wunkolo
d738c21852 Propagate block, bool, standard integer types across codebase
Posix type integer pass

Propagate block, bool, integer types across codebase

Add standard integer types to prototypes
2019-06-25 11:56:11 -07:00
Wunkolo
8162f3f877 Add .clang_format
Also applies clang-format to the current code base, using command:
`find . -regex '.*\.\(c\|h\)' -exec clang-format -style=file -i {} \;`
2019-06-23 18:43:32 -07:00
Nicolas F
b70f1a012f Fix C extension build warnings the painful way
Some bad distributions (Debian) apparently are not good enough to
have a Pillow version from this decade packaged.

Therefore, we need to do it the painful way of prefixing our
symbols and refactoring everything to use them.

A new header file called "utils.h" has been added for this purpose,
and it is included in "overviewer.h".

The following macros have been prefixed with "OV_":
- MIN
- MAX
- CLAMP
- BLEND
- MULDIV255

Additionally, the C extension version was bumped to 56 because 55
was reverted back to 54.
2019-02-22 12:53:47 +01:00
Aaron Griffith
3286b9c576 tabs -> spaces and removed windows newline 2012-07-03 21:07:40 -04:00
RamsesA
2b421d6d25 added a fast resize function
Added resize_half() and resize_half_wrap() functions to composite.c and
overviewer.h, to replace the call to PIL's resize function made by
tileset.py. Also added "resize_half" to COverviewerMethods in main.c, so
it can be called from Python. Should increase performance by 10 to 20%
for the entire program.
2012-07-03 20:26:23 -04:00
Aaron Griffith
34e5ddf620 biomes are now murky *and* smooth
closes issue #708

Props to mkor for taking advantage of the existing average loop, and
CounterPillow for sussing out the correct biome multiplication
color. This commit is just a teensy bit more future-proof.
2012-05-06 20:22:31 -04:00
Andrew Chin
935d221886 Revert "Clean up build warnings on Windows"
This was causing segfaults, reason unknown

This reverts commit 868256b538.
2012-03-02 17:45:24 -05:00
Andrew Chin
868256b538 Clean up build warnings on Windows 2012-03-02 13:40:58 -05:00
Aaron Griffith
09c4e4cbf8 removed really old composite.py stub wrapper 2012-02-09 10:12:12 -05:00
Aaron Griffith
4bddf2c78a fixed top smooth lighting tesselation error 2011-10-18 09:56:01 -04:00
Aaron Griffith
2705a1efe8 smooth-lighting triangles now pull lighting data correctly for each vertex 2011-10-16 17:18:24 -04:00
Aaron Griffith
80a3849a6c added a triangle drawing function, with interpolated color 2011-10-11 21:17:10 -04:00
Alejandro Aguilera
8d398864e3 Fix bad handle of both alpha layers being zero in composite.c 2011-08-23 21:37:10 +02:00
Aaron Griffith
383b01859f Merge branch 'master' into py-package
Conflicts:
	overviewer_core/data/config.js
	overviewer_core/data/web_assets/functions.js
	overviewer_core/data/web_assets/style.css
	setup.py
	web_assets/overviewer.css
	web_assets/style.css
2011-05-10 20:19:10 -04:00
Aaron Griffith
42596416d9 sdist and install now work
next step is using a custom data dir, and falling back on the package
data dir. Also, fixing --version.
2011-03-29 13:49:50 -04:00