Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Chin a6baf5b6e8 Added missing import 2011-03-25 20:45:25 -04:00
Andrew Chin 2be2a48d7c Merge remote-tracking branch 'origin/dtt-c-render' into dtt-c-render 2011-03-25 20:43:04 -04:00
Andrew Chin 82e0bf53b9 Added a new 'listify' parameter to the config file parser
Specifying listify on an option will cause it to be parsed as a list.
Use listdelim to specify the delimiter (defaults to ',')

Examples, assuming you had the following option:
add_option("--test","test", type="int", listify=True)

Command line:
  --test 1          results in [1]
  --test 1,2,3      results in [1,2,3]

Config file:
  test=1            results in [1]
  test="1,2,3"      results in [1,2,3]
  test=[1,4,9]      results in [1,4,9]
2011-03-25 20:42:05 -04:00
Andrew Chin 172198558a Moved helper function out of overviewer.py and into util.py
Solves a dependency problem where you can't import overviewer unless the extension is built
2011-03-24 22:45:26 -04:00
Andrew Chin 8dc66083e0 Merge branch 'version_stuff' into dtt-c-render 2011-03-24 22:30:49 -04:00
Andrew Chin c25e2cce0f Implement a --version option to overviewer
Should also work with py2exe binary kits
2011-03-24 22:27:50 -04:00
Andrew Chin df6124b425 Remove windows-style newlines 2011-03-24 19:51:33 -04:00
Andrew Chin 7daa1bac9d Now supports both MSVC and mingw32 2011-03-23 22:59:33 -04:00
Andrew Chin 57e99725df Removed noise leftover from last commit 2011-03-23 21:31:51 -04:00
Andrew Chin 977bf09a12 Bunch of changes to make VS happy
Mostly variable declarations moved to the top of blocks.
is_transparent can't be inline, since it's needed in several places
2011-03-23 20:34:49 -04:00
Andrew Chin a885568d4e Added missing DECREF
memory usage is stable and constant over a 7 minute execution
2011-03-21 23:23:35 -04:00
Andrew Chin 97d708106a Fixed typo preventing build 2011-03-21 23:18:34 -04:00
Andrew Chin 1872ccd690 remove swap files from repo, updated .gitingore to ignore them
how did they get there :/
2011-03-21 09:00:08 -04:00
Andrew Chin 61819a7f30 Merged in dtt-c-render
Conflicts:
	src/overviewer.h
2011-03-20 21:29:05 -04:00
Andrew Chin 329c7557f6 Move some code out of the render_loop function and into a 1-time init
routine
2011-03-20 21:13:17 -04:00
Andrew Chin 6f60439f14 accept callables in the configFile with type="function" 2011-03-20 00:37:34 -04:00
Andrew Chin 29dc98ce2a Fix a -p 1 regression 2011-03-19 23:49:56 -04:00
Andrew Chin e096eb45ff Initial version of C lighting code
Needs *lots* of performance work
2011-03-19 22:55:59 -04:00
Andrew Chin 26d781f249 declaration tweak to make some compilers happy 2011-03-19 14:37:48 -04:00
Andrew Chin 1ac922983f Use the list of transparent_blocks from chunk.py.
This fix is part 2 (of 2) of the graphical rendering glitch fix.
2011-03-19 00:38:30 -04:00
Andrew ChinandAaron Griffith f9ae158457 removed log message in iterate.c 2011-03-18 16:37:47 -04:00
Andrew Chin 9c7d6a184d Print error messages after print_help 2011-03-06 17:54:18 -05:00
Andrew Chin 66a9306a29 Experimental code to provide a C implementation of chunk_render
Please see the TODO comments in iterate.c

None of the lighting, spawning, night, or cave modes work with this
version.
2011-03-06 00:30:40 -05:00
Andrew Chin f4cd71a09b Fix region calc typo 2011-03-01 08:11:38 -05:00
Andrew Chin 5f2f098d40 Better cache checking, now uses chunk timestamps
and possibly fixed a bug in check_cache?
2011-02-28 22:10:36 -05:00
Andrew Chin caa1ef1f45 Catch proper exception in chunk.py
Also removed unnecessary check in world.py
2011-02-28 18:56:22 -05:00
Andrew Chin 1f8fb017a3 Check to ensure level.dat has been updated
Error out if level.dat has not been updated.  Also, cleaned up some
debugging print statements
2011-02-26 21:59:49 -05:00
Andrew Chin a690ebbce5 some caching work
hashchecking needs to be checked to see if it's still OK
timestamp checking should involved the timestamps from inside the region
file, not of the region file itself.
2011-02-24 23:29:58 -05:00
Andrew Chin 6f060633ad Running with -p should be OK now 2011-02-24 23:06:36 -05:00
Andrew Chin 05ea562060 Working rendering with the new McRegion format.
Notes:
 * Currently only works with -p 1
 * Caching is mostly compatible with existing caches, but not completly.
   This needs more testing and more code reviews
 * There are probably many code paths that will throw exceptions.
 * Not ready for general use yet, but is OK for testing
2011-02-23 22:13:35 -05:00
Andrew Chin 0372aea4ac New _find_regionfiles function 2011-02-23 17:49:34 -05:00
Andrew Chin 391ba50aea Provide a nice error message when run on McRegion'd worlds 2011-02-22 19:08:58 -05:00
Andrew Chin 409a66083e Merge branch 'master' of https://github.com/Evil-Code/Minecraft-Overviewer into Evil-Code-master
Conflicts:
	quadtree.py
2011-02-19 14:47:57 -05:00
Andrew Chin c9722af8a4 modified method to copy web_assets 2011-02-18 20:27:37 -05:00
Andrew Chin 12bc45f8c6 Merge branch 'master' of ../Minecraft-Overviewer into configfile 2011-02-17 22:34:26 -05:00
Andrew Chin 8e87e5571f Added new fire.png to the nightly kits 2011-02-08 19:45:34 -05:00
Andrew Chin d7bd365959 Merge branch 'master' of https://github.com/aheadley/Minecraft-Overviewer into aheadley-master 2011-02-04 21:01:24 -05:00
Andrew Chin 850f4fcf7d Removed debugging statement 2011-01-23 21:21:36 -05:00
Andrew Chin 5acd6a490c Merge remote branch 'upstream/master' 2011-01-22 14:29:38 -05:00
Andrew Chin f46d0ce4ad options with default args are now seeded in the globals dict 2011-01-22 14:23:20 -05:00
Andrew Chin 3db1953303 a signGroup can now have an optional icon URL 2011-01-21 21:11:39 -05:00
Andrew Chin ae993df2ae Merge branch 'minetracks' of https://github.com/Fenixin/Minecraft-Overviewer into Fenixin-minetracks 2011-01-10 21:54:03 -05:00
Andrew Chin 935d353ef1 Fix build regression on non-windows platforms 2011-01-10 21:42:33 -05:00
Andrew Chin 521a359139 changes for py2exe 2011-01-08 16:09:01 -05:00
Andrew Chin feeb3283e0 New benchmarking script
Useful for examining how a code change affects performance
2011-01-08 01:21:41 -05:00
Andrew Chin dc842874ed Merge remote branch 'upstream/master' 2011-01-08 01:03:58 -05:00
Andrew Chin 3d84e76d0e Merge branch 'grasscolor-fix' of https://github.com/agrif/Minecraft-Overviewer into agrif-grasscolor-fix 2011-01-01 20:57:24 -05:00
Andrew Chin 97aa81311c Fixed empty sign handling, updated findSigns.py 2010-12-31 23:35:18 -05:00
Andrew Chin 7b6bbbc267 Merge branch 'blanksigns' of https://github.com/TheMagistrate/Minecraft-Overviewer into TheMagistrate-blanksigns 2010-12-31 22:37:45 -05:00
Andrew Chin bbeb0d1359 Merge remote branch 'origin/master' 2010-12-31 00:56:05 -05:00
Andrew Chin e989e97c5e Added a new config file parser.
The new config file parser has an interface that's nearly identical to
the OptionParser of optparse.

Below is a sample settings.py config file:

$ cat settings.py
import multiprocessing

if 'rendermode' not in locals():
    rendermode="lighting"

cachedir = "cache.%s.cachedir" % rendermode

procs = multiprocessing.cpu_count() - 1
2010-12-31 00:53:57 -05:00
Andrew Chin 3ee93357b9 Check that level.dat exists before trying to nbt.load it 2010-12-30 21:04:36 -05:00
Andrew Chin fe8cd07c51 Fixed version check 2010-12-23 23:31:07 -05:00
Andrew Chin 2bf7566b5a Ignore cache images that don't start with "img."
This fixes a bug introduced by the cache-checking changes
2010-12-23 02:21:54 -05:00
Andrew Chin 1a526bbba0 Merged in rmccue's cache checking changes
Conflicts:
	chunk.py
2010-12-23 02:01:58 -05:00
Andrew Chin e9aa4b6228 Merge branch 'master' of https://github.com/jennytoo/Minecraft-Overviewer into jennytoo-master 2010-12-18 20:13:11 -05:00
Andrew Chin 334385951c Merge branch 'fences' of https://github.com/Fenixin/Minecraft-Overviewer into Fenixin-fences 2010-12-18 18:27:06 -05:00
Andrew Chin ad5fa9b208 Merge branch 'master' of https://github.com/rmccue/Minecraft-Overviewer into rmccue-master 2010-12-18 15:30:12 -05:00
Andrew Chin d08730eefb Merge branch 'optimization2' of https://github.com/Fenixin/Minecraft-Overviewer into Fenixin-optimization2 2010-12-18 13:50:35 -05:00
Andrew Chin 774e9ff1bd Merged in .gitignore changes 2010-12-18 13:21:43 -05:00
Andrew Chin 5819ab60e0 Fix for optimize-img with spaces in the output_dir 2010-12-13 19:49:24 -05:00
Andrew Chin e70bafb453 Tweaked the viewstate link GUI
Moved it to the bottom of the screen, as it was in the way of the
existing controls on the top-right.  Added it as a map conrol instead of
a simple div.  Improved the styling a bit
2010-12-11 23:15:02 -05:00
Andrew Chin 33a03213c4 Merged in arrai's viewstate link code
Merge commit 'ffe92f7db84789436f53769df1099cd8a68e6097' into arrai-master

Conflicts:
	template.html
2010-12-11 22:19:28 -05:00
Andrew Chin fcbff8af2a Improved marker titles and newlines
Primarily for browsers that don't render newlines in tooltips.
Thanks to ben0x539
2010-12-11 20:15:12 -05:00
Andrew Chin 97c58212c3 Check for the optimization programs at the start of execution.
This prevents the annoying case where MCO will fail hours into a run if
pngcrush and friends are missing.
2010-12-11 19:44:59 -05:00
Andrew Chin cebbf4b1b4 Added info on biome tinting to the README 2010-12-11 18:12:36 -05:00
Andrew Chin 9bc7c10bd1 Improved flexibilty when specifying signGroups
Group membership is now determined with a function.  See config.js for
some examples.  If we want to include more information about markers in
markers.js, this model should be useful.
2010-12-08 22:04:53 -05:00
Andrew Chin 65264407f9 Merge branch 'signpost_ui' of git://github.com/eminence/Minecraft-Overviewer into signpost_ui 2010-12-06 20:23:55 -05:00
Andrew Chin e96bb91b82 Better handling of the biome tinting images.
If they're not found with _find_file, then look in the EXTRACTEDBIOME
folder in the worlddir.
2010-12-05 01:35:12 -05:00
Andrew Chin 251a89b7dc Merged in agrif's blending fixes
Merge branch 'blending-fixes' of https://github.com/agrif/Minecraft-Overviewer
2010-12-04 20:33:56 -05:00
Andrew Chin 9125919d3e Give a more useful error if the biome color png files can't be found 2010-12-04 19:31:21 -05:00
Andrew Chin c60180f793 Biome data from Biome Extractor is now used if it is present.
If the BIOMEEXTRACTOR data is not available, then non-biome aware
tinting will be used

Open biome data in binary mode (Windows requires this)
2010-11-23 00:48:39 -05:00
Andrew Chin dc80c88e94 Biome tinting uses now uses the Biome Extractor data files.
See:
http://www.minecraftforum.net/viewtopic.php?f=25&t=80902&view=unread
2010-11-23 00:26:07 -05:00
Andrew Chin 210e65730f Hacky work on biome tinting
Currently this requires python-gearman, gearman-java, and a java SDK.

This code will probably be all thrown away, but if you really want to
play, first compile Biome.java, then run the resulting Biome.class.
Note you'll probably need to hack the signatures out of minecraft.jar to
get it to run.

Then copy grasscolor.png into the cwd, and run gmap.py as usual.

It is slowwwww.  Perhaps running Biome.class on multiple machines might
speed things up?

Here's the kind of output produced: http://smp.em32.net/biome_test/
2010-11-23 00:26:07 -05:00
Andrew Chin 859341008a Some minor signpost UI improvements
* Opening a sign infowindow will close the previously opened window.
 * The use of "Other" and "All" signpost categories are now more
   reasonable.
2010-11-20 18:20:20 -05:00
Andrew Chin cd88d63ab3 New UI control to toggle signposts on/off based on their content.
Pretty substantial javascript refactoring:
 * All javascript is now in funtions.js.  There is no javascript at all
   in index.html
 * Configuration options moved from template.html to config.js
   template.html moved to web_assets/index.html

config.js allows you to specify pattern-label pairs.  Each label will be
added to an on-screen "signposts" control.  Clicking the checkbox by
each label will show/hide any signposts that match the pattern attached
to that label.  config.js has some examples.

TODO:
 * The signposts control needs better styling.
 * The new javascript needs testing in IE.  Seems ok in Chome and FF.

These large changes may be hard to merge if you have non-trivial JS
changes to template.html locally.  Apologies in advance
2010-11-11 21:05:24 -05:00
Andrew Chin d0267d4e78 new contrib script to help re-rendering specific parts of a map
See the top of the file for usage details
2010-11-08 20:38:27 -05:00
Andrew Chin 914a3073f0 Fixed --chunklist
This bug was introduced by the signpost code which required a queue
object to be passed to the chunk rendered.  This wasn't done with
--chunklist
2010-11-08 20:36:02 -05:00
Andrew Chin 1af7287b8f Add a compass rose overlay to indicate which direction is north 2010-11-06 23:21:17 -04:00
Andrew Chin 16aca4c093 Fancy icons for signposts and spawn, plus info windows for signposts
Thanks to gabrielcrowe for the signpost icon.
2010-11-06 22:04:38 -04:00
Andrew Chin 57a9e8123d New findSigns.py contrib script
This can be used to create an complete overviewer.dat file without
having to re-render your entire world.  See the top of the script for
usage details
2010-11-06 15:29:04 -04:00
Andrew Chin c96b3363b2 Fixed bug in signpost handling code
Two of the coordinates were flipped in markers.js
Also, overviewer.dat is now removed with -d
2010-11-06 15:27:52 -04:00
Andrew Chin 0b6461083b Modified tintTexture() to look more like the original grass color 2010-11-03 22:57:47 -04:00
Andrew Chin 290269f8fe Corrected pumpkin rendering, Hacky tinting for grass, leaves
* Pumpkins and Jack-o-lanterns now face the correct direction
 * Pumpkins and jack-o-lanterns now have different textures (thanks
   alexjurkiewicz).  one is lit, the other is not
 * a bad looking green tint is applied to grass and to leaves
   Someone please make this better
2010-11-02 20:46:56 -04:00
Andrew Chin 2c49113bd2 Render the new blocks from the Boo update.
The following are now rendered:
 * Pumpkins
 * Jack-O-Lanterns (look identical to pumpkins at the moment, to match
   the ingame rendering)
 * Bloodstone
 * Slow Sand
 * Lightstone
2010-11-02 19:39:22 -04:00
Andrew Chin d01fb1f520 Merge remote branch 'upstream/master' 2010-11-02 18:59:58 -04:00
Andrew Chin f2b34dff7a Improved handling of signposts 2010-10-24 00:19:27 -04:00
Andrew Chin cb363df3cd Initial work on generating markers.js from signposts
Details:
 * A queue object is passed to all renderers, allowing each process to
   avoid using shared memory when recording signpost data.
 * New overviewer.dat file that stores persistent data between runs.
   Currently used to store information on signs.  markers.js is
   generated by merging the stored POI list with the newly generated POI
   list.
 * POIs are tagged with their type (e.g. "spawn" or "sign").  This
   should be useful if different types of POIs needs to be
   handled/displayed differently

Known bugs:
 * If you delete the last sign in a chunk, it won't be removed from
   markers.js
2010-10-20 22:11:34 -04:00
Andrew Chin 60966ffa73 Improve efficiency of special textures by pre-computing them 2010-10-02 20:17:13 -04:00
Andrew Chin 6993f2159d Render iron and wood doors with correct orientation.
Note: iron doors need testing (they are currently broken in my test SMP
world)
2010-10-02 15:33:33 -04:00
Andrew Chin cd97222a9b Render ladders (with correct orientation) 2010-10-01 23:19:53 -04:00
Andrew Chin 66a90bb411 Render furnaces with the correct texture (instead of smooth stone)
These are handled specially, since one side texture is different than the
other
2010-10-01 22:51:02 -04:00
Andrew Chin 78962cfbe5 Passable crop rendering 2010-10-01 22:33:25 -04:00
Andrew Chin 86d5476234 use os.path.join to build the spawn chunk path 2010-10-01 19:45:41 -04:00
Andrew Chin 822dd75431 Render minetracks (with correct orientation)
Other things with direction (torches, ladders, stairs, etc) will be
handled in a similar fashion.  Note: minetracks on slopes are still
not rendered correctly
2010-09-30 21:38:14 -04:00
Andrew Chin 055e11719f Create the tiles dir, if necessary, before writing blank.png.
Otherwise an error is raised, since .save() won't create intermediate
directories
2010-09-29 10:05:46 -04:00
Andrew Chin 6240f40226 Half blocks (step/#44) should be rendered reasonably well.
Tested 1 half block (44), 2 half blocks (43), a 3 half blocks (43,44)
and all seem to look OK.
2010-09-28 00:09:50 -04:00
Andrew Chin aa8a369aa8 Better cacti rendering 2010-09-27 21:32:26 -04:00
Andrew Chin 18040d96b4 Add support for some non-block textures
The following textures now no longer render as blocks:
 * Flowers
 * Mushrooms
 * Saplings
 * Reeds
 * Torches

Note that torches attached to wall are still rendered incorrectly
2010-09-26 01:33:24 -04:00
Andrew Chin 0a73d3af56 Merge remote branch 'origin/master' 2010-09-26 01:32:16 -04:00