Commit Graph

11318 Commits

Author SHA1 Message Date
Broxzier
fb9ff85238 Only overwrite buffer when loading was successful 2017-04-24 23:19:51 +02:00
Broxzier
2cd4a686f6 Disable page widgets until a map is loaded
A few strings have their {WINDOW_COLOUR_2} setting removed, since this
prevented strings from being market as inset. All uses of these strings
have been checked.
2017-04-24 23:19:51 +02:00
Broxzier
a26dc83647 Update changelog and contributors entry 2017-04-24 23:19:51 +02:00
Broxzier
8b8f982d0e Fix typos
[ci skip]
2017-04-24 23:19:51 +02:00
Broxzier
03bfc68250 Loading height map into memory 2017-04-24 23:19:51 +02:00
Broxzier
f93b7f761b Fix travis errors
Couldn't merge janitosaur's commit or apply a patch after the changes and rebase
2017-04-24 23:19:51 +02:00
Broxzier
0d07ea69f8 Add support for loading PNG files
This needs to be refactored
2017-04-24 23:19:51 +02:00
Broxzier
8548f60453 Optimization: Average RGB channels once before smoothing, instead of inside the loop. 2017-04-24 23:19:51 +02:00
Broxzier
624f3e3298 Fix smooth-tiles checkbox not being invalidated; updated default height values 2017-04-24 23:19:51 +02:00
Broxzier
810103b90f Use loadsave window for selecting the heightmap 2017-04-24 23:19:51 +02:00
Broxzier
3095106b0e Use average pixel value instead of only the red channel 2017-04-24 23:19:51 +02:00
Broxzier
6edea503b2 Refactored mapgen window file
- Removed duplicated code
- Moved shared widgets to define
- Moved shared widget handling code to function
2017-04-24 23:19:51 +02:00
Broxzier
c6e3ecd5ed Better widget behaviour and fixes
- Inset text for disabled labels and values
- Spinners can be held down

Other fixes:

- Use correct types for widget indices
- Use WINDOW_MAPGEN_PAGE_COUNT for arrays (when a new page is added in the
  future, the compiler will warn about all the arrays having an invalid
  size)
- Sort code so that related arrays are placed near each other
2017-04-24 23:19:51 +02:00
Broxzier
55c1787a13 Add heightmap smoothing
Fixed underflow error that was visible for non-tilable maps.
Reordered widgets to reflect the same order of the algorithm.
Always regenerate the map when a setting is changed.
2017-04-24 23:19:51 +02:00
Broxzier
26989ea8f6 Add smoothing height map option 2017-04-24 23:19:51 +02:00
Broxzier
edfe997e78 Add option to normalize height map 2017-04-24 23:19:51 +02:00
Broxzier
fda415cd44 Add settings to heightmap tab 2017-04-24 23:19:51 +02:00
Broxzier
d2113514a0 Add tile_smooth function to smooth generated map 2017-04-24 23:19:51 +02:00
Broxzier
702d99e1e3 Initial prototype of loading heightmaps
Adds new strings and string ids for some future commits too.
2017-04-24 23:19:51 +02:00
Michał Janiszewski
73efe0755d Validate water image id while loading palette 2017-04-24 22:56:37 +02:00
Michał Janiszewski
ee7ad17a30 Align field assignments in S6Importer.cpp 2017-04-24 22:40:22 +02:00
Michał Janiszewski
ad7ecc0d85 Format S6Exporter.cpp
Pretty much just align field assignments
2017-04-24 22:40:22 +02:00
Michał Janiszewski
a83dd095d6 Fix mismatched allocator/deallocater for S6 2017-04-24 22:40:21 +02:00
xp4xbox
eaac6759fe Replace Twister booster sprites with improved versions 2017-04-24 22:31:42 +02:00
Michał Janiszewski
f4b1c010e1 Fix uninitialised variable 2017-04-24 21:59:01 +02:00