Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7bc7924
Implemented JPEG support with two new command line options:
slicedlime Oct 26, 2012
774e2ab
Added the possibility of running "make mode=debug to get debuggable b…
slicedlime Oct 27, 2012
8d0e490
Added _DEBUG and NDEBUG defines.
slicedlime Oct 27, 2012
fb9bd86
- Replaced macros with inline functions for debuggability.
slicedlime Oct 27, 2012
317f002
Fixed all -Wall warnings, added -Wall to default build flags.
slicedlime Oct 27, 2012
9250091
Fixed all -Wall warnings, added -Wall to default build flags.
slicedlime Oct 27, 2012
784a05a
Fixed compile error on some platforms
slicedlime Oct 27, 2012
8b0febc
new blocks in Minecraft 1.4; carrots, potatoes
akudeukie Nov 4, 2012
eb888ff
Fixed bug causing fully zoomed in tiles to be written with bad file e…
slicedlime Nov 17, 2012
c271163
Optimization: Around 35% reduction in rendering time.
slicedlime Nov 17, 2012
c96bc5e
Added "coverage" and "profile" compile modes to be able to to some pe…
slicedlime Nov 18, 2012
170407e
Optimizations that cut away another 15-20% rendering time:
slicedlime Nov 18, 2012
b9b0266
Compile fix.
slicedlime Nov 18, 2012
1216488
Merge branch 'master' of git://github.com/akudeukie/pigmap
slicedlime Nov 19, 2012
bd0a254
new blocks in Minecraft 1.4; cobblestone walls
akudeukie Nov 22, 2012
f9fe5b8
new blocks in Minecraft 1.4;
akudeukie Nov 24, 2012
8a6a9f2
new blocks in Minecraft 1.4;
akudeukie Nov 25, 2012
1314c1a
Flower pots; Reworked base tile drawing code(DRY)
akudeukie Nov 25, 2012
f9a5508
Removed execute permissions on source files
dominickpastore Dec 11, 2012
67d9a20
Removed trailing carriage returns
dominickpastore Dec 11, 2012
3e903d1
Removed trailing carriage returns and fixed permissions
dominickpastore Dec 11, 2012
4f5d409
Merge branch 'akudeukie-master' into akudeukie-changes
dominickpastore Dec 11, 2012
7ab11a0
Fixed oversight from merge
dominickpastore Dec 11, 2012
a5b6555
Fixed bug causing ice to be drawn improperly sometimes
dominickpastore Dec 11, 2012
a5a2ea2
Fixed compiler warnings
dominickpastore Dec 11, 2012
3c95d33
fix uint compliation erro
dantealiegri Dec 23, 2012
969e81e
ignore object and executable
dantealiegri Dec 24, 2012
3ab6459
change threads to -t, make -h the standard help display.
dantealiegri Dec 24, 2012
c46f73f
Blocks from Minecraft 1.5 Snapshots
akudeukie Jan 22, 2013
80ca842
Make file update
akudeukie Jan 23, 2013
f769d04
Merge remote-tracking branch 'dante/master'
akudeukie Jan 24, 2013
a00c632
Post-merge fixes.
akudeukie Jan 24, 2013
aa44d38
Readme update (-t for threads, latest features)
akudeukie Jan 24, 2013
d4e65c0
Added check for blockdescriptor file
akudeukie Jan 24, 2013
de8c7de
Change logic for missing/corrupt descriptor file
akudeukie Jan 24, 2013
ec64dd0
texture lists are now expected in image directory + fixed some docume…
Mar 19, 2013
3e63cc7
Merge pull request #1 from UniversE/universe/master
akudeukie Apr 23, 2013
8aab297
Blocks from Minecraft 1.6 Snapshots
akudeukie May 9, 2013
fad97aa
Blocks from Minecraft 1.6 Snapshots
akudeukie May 10, 2013
cd24a44
Merge branch 'master', remote branch 'akudeukie/mc_1.6' into universe…
Jul 10, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.o
pigmap
Empty file modified COPYING
100755 → 100644
Empty file.
67 changes: 38 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
objects = pigmap.o blockimages.o chunk.o map.o render.o region.o rgba.o tables.o utils.o world.o

pigmap : $(objects)
g++ $(objects) -o pigmap -l z -l png -l pthread -O3

pigmap.o : pigmap.cpp blockimages.h chunk.h map.h render.h rgba.h tables.h utils.h world.h
g++ -c pigmap.cpp -O3
blockimages.o : blockimages.cpp blockimages.h rgba.h utils.h
g++ -c blockimages.cpp -O3
chunk.o : chunk.cpp chunk.h map.h region.h tables.h utils.h
g++ -c chunk.cpp -O3
map.o : map.cpp map.h utils.h
g++ -c map.cpp -O3
render.o : render.cpp blockimages.h chunk.h map.h render.h rgba.h tables.h utils.h
g++ -c render.cpp -O3
region.o : region.cpp map.h region.h tables.h utils.h
g++ -c region.cpp -O3
rgba.o : rgba.cpp rgba.h utils.h
g++ -c rgba.cpp -O3
tables.o : tables.cpp map.h tables.h utils.h
g++ -c tables.cpp -O3
utils.o : utils.cpp utils.h
g++ -c utils.cpp -O3
world.o : world.cpp map.h region.h tables.h world.h
g++ -c world.cpp -O3

clean :
rm -f *.o pigmap

objects = pigmap.o blockimages.o chunk.o map.o render.o region.o rgba.o tables.o utils.o world.o

ifeq ($(mode),debug)
CFLAGS = -g -Wall -D_DEBUG
else ifeq ($(mode),profile)
CFLAGS = -Wall -O3 -DNDEBUG -pg
else ifeq ($(mode),coverage)
CFLAGS = -Wall -O3 -DNDEBUG -fprofile-arcs -ftest-coverage
else
CFLAGS = -Wall -O3 -DNDEBUG
endif

pigmap : $(objects)
g++ $(objects) -o pigmap -l z -l png -l jpeg -l pthread $(CFLAGS)

pigmap.o : pigmap.cpp blockimages.h chunk.h map.h render.h rgba.h tables.h utils.h world.h
g++ -c pigmap.cpp $(CFLAGS)
blockimages.o : blockimages.cpp blockimages.h rgba.h utils.h
g++ -c blockimages.cpp $(CFLAGS) -std=c++0x
chunk.o : chunk.cpp chunk.h map.h region.h tables.h utils.h
g++ -c chunk.cpp $(CFLAGS)
map.o : map.cpp map.h utils.h
g++ -c map.cpp $(CFLAGS)
render.o : render.cpp blockimages.h chunk.h map.h render.h rgba.h tables.h utils.h
g++ -c render.cpp $(CFLAGS)
region.o : region.cpp map.h region.h tables.h utils.h
g++ -c region.cpp $(CFLAGS)
rgba.o : rgba.cpp rgba.h utils.h
g++ -c rgba.cpp $(CFLAGS)
tables.o : tables.cpp map.h tables.h utils.h
g++ -c tables.cpp $(CFLAGS)
utils.o : utils.cpp utils.h
g++ -c utils.cpp $(CFLAGS)
world.o : world.cpp map.h region.h tables.h world.h
g++ -c world.cpp $(CFLAGS)

clean :
rm -f *.o pigmap
53 changes: 39 additions & 14 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ Use supplied makefile to build with g++.

Change log (important stuff only):

%LATEST_VERSION%
-new block up to Minecraft 1.6 13w18c snapshot
-new textures should be added to image folder (or updated):
textures/blocks/blockCoal.png
textures/blocks/blockLapis.png
textures/blocks/clayHardened.png
textures/blocks/clayHardenedStained_[0-15].png
textures/blocks/hayBlock.png
textures/blocks/hayBlock_top.png

1.5
-fire.png, terrain.png, chest.png (and similar) are no longer required
-pigmap now works with upcoming Minecraft 1.5 textures
-folders /item, /textures/blocks from minecraft.jar or your texture pack are
required (in image path), including their contents
-new blocks up to 13w03a Minecraft snapshot (upcoming Minecraft 1.5)
-possibility to render custom blocks

1.2
-new blocks up to Minecraft 1.3
-chest.png, etc. now required
Expand Down Expand Up @@ -116,15 +134,15 @@ Usage examples:

full render:

pigmap -B 6 -T 1 -Z 10 -i input/World1 -o output/World1 -g images -h 3
pigmap -B 6 -T 1 -Z 10 -i input/World1 -o output/World1 -g images -t 3

...builds a map with parameters B = 6, T = 1, baseZoom = 10, reading world data from the path
"input/World1", writing tiles out to the path "output/World1", reading terrain images from the path
"images", and using 3 threads.

incremental update:

pigmap -i input/World1 -o output/World1 -r regionlist -h 3 -x
pigmap -i input/World1 -o output/World1 -r regionlist -t 3 -x

...updates an existing map by redrawing any tiles touched by regions listed in the file "regionlist",
with the input and output dirs as before. Terrain images are read from the path ".", and 3 threads
Expand Down Expand Up @@ -168,7 +186,7 @@ incremental update; make a copy if you need to add fancier abilities to it.

c. [optional (kind of)] image path (-g)

This is where pigmap expects to find either a copy of your tileset (terrain.png, etc.), or a copy of
This is where pigmap expects to find either a copy of your textures (texture/ folder of your minecraft.jar etc.), or a copy of
blocks-B.png (substituting the actual numeric value of B; see below for definition of B), a
pigmap-generated file that contains the isometric renderings of each block. These files are not
optional, but the -g parameter itself may be omitted, in which case "." is used as the image path.
Expand All @@ -187,22 +205,29 @@ This means that pigmap will need your tileset the first time it runs, so it can
subsequent runs will use the existing blocks-B.png, which can be manually edited if insufficiently
pretty, or for special effects, etc.

The following images are required to generate blocks-B.png:
-terrain.png, chest.png, largechest.png, enderchest.png: these files come from your tileset
or minecraft.jar
-fire.png, endportal.png: these files are included with pigmap
All of these must be RGBA png files (not just RGB).

High-res tilesets are supported. The textures in terrain.png, fire.png, and endportal.png can be
any size, as long as they remain square. The textures in the chest pngs can be scaled up, but their
size must be an integer multiple of the original size.
The generate blocks-B.pngi, extract the item/ and textures/ folder of your minecraft.jar into the folder you have specified.
All of these must be RGBA png files (not just RGB). So check the alpha channels, if one file is not recognized. From minecraft version 1.5 it is known that the lava.png is missing an alpha channel. You can simply add one by using tools like GIMP.

d. [optional] number of threads (-h)
d. [optional] number of threads (-t)

Defaults to 1. Each thread requires around 250-300 MB of RAM (they work in different areas of the
map and keep separate caches of chunk data). Returns from extra threads may diminish quickly as the
disk becomes a bottleneck.

e. [optional] output image file format (-f)

Defaults to png. The output is either done as png files, jpeg files or both. Jpeg can be compressed to
smaller file sizes than png and may be preferrable for web use, but incremental rendering only reads
png files, since jpeg is a lossy format. The "both" option is supplied to deal with this situation -
both file formats will be written, jpeg used in the html map and png files can be kept for future
incremental renders.

f. [optional] Jpeg quality (-j)

Defaults to 75. A number between 1 and 100 that determines what quality level jpeg files are written.
Higher means better quality but larger file sizes. Has no effect (obviously) if the output file format
is not set to jpeg or both.


2. Params for full renders only:

Expand Down Expand Up @@ -312,4 +337,4 @@ furnaces: 68->183, 69->186, 149->184, 150->185, 151->187, 152->188
fire: 48->189
buttons: 123->190, 124->191, 125->192, 126->193
levers: 104->194, 105->195, 106->196, 107->197, 108->198, 109->199
ascending tracks: 88->200, 89->201, 90->202, 91->203
ascending tracks: 88->200, 89->201, 90->202, 91->203
Loading