Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 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
b7312a1
Merge branches 'universe/master' and 'master'
Jul 10, 2013
30e8c77
Hay block fix
akudeukie Jul 11, 2013
20b8175
Merge pull request #2 from akudeukie/mc_1.6
akudeukie Jul 11, 2013
cff35aa
Features from Minecraft 1.7
akudeukie Sep 15, 2013
178eabe
Features from Minecraft 1.7
akudeukie Sep 26, 2013
8c69729
Alpha filler for RGB images
akudeukie Oct 2, 2013
8168aa3
Features from Minecraft 1.7
akudeukie Oct 10, 2013
1bec4af
Features from Minecraft 1.7
akudeukie Oct 22, 2013
9e303e3
Merge branch 'master', remote branch 'akudeukie/mc_1.6'
Oct 25, 2013
892c835
Merge pull request #3 from akudeukie/mc_1.6
akudeukie Oct 26, 2013
c314691
fixed double_plant* texture names
Oct 26, 2013
f76a908
Merge pull request #4 from UniversE/master
akudeukie Oct 27, 2013
efa434b
Features from Minecraft 1.8
akudeukie Jan 25, 2014
95cc594
Features from Minecraft 1.8 (14w07a)
akudeukie Feb 17, 2014
796f682
Features from Minecraft 1.8 (14w25a)
akudeukie Jun 18, 2014
f65da95
README update
akudeukie Jun 18, 2014
b8635af
Features from Minecraft 1.8
akudeukie Aug 27, 2014
193a57b
Features from Minecraft 1.9 (15w31a+)
akudeukie Aug 12, 2015
723f262
Basic blocks up to recent Minecraft version 16w20a
akudeukie May 19, 2016
d0fb5a4
New Blocks up to Minecraft 17w17b snapshot
akudeukie May 2, 2017
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
124 changes: 79 additions & 45 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ essentially the same thing, just faster and with fewer fancy options. Features

-isometric projection; level of detail on max zoom is user-settable
-Google Maps tile output
-custom tilesets (supply your own terrain.png)
-ability to manually edit the isometric block images generated from terrain.png,
-custom tilesets (supply your own texture pack)
-ability to manually edit the isometric block images generated from texture pack,
for further beautification
-incremental map updates, but you must supply your own list of modified chunks (most
likely via rsync or something similar)
Expand All @@ -25,12 +25,15 @@ Andrew Brown and contributors).
The official pigmap repository is at:
https://github.com/equalpants/pigmap

Latest textures to build tile set is at (if you don't want to manually extract textures):
https://www.dropbox.com/s/qkckuwbu1an77sm/pigmap_mc_textures.7z

---------------------------------------------------------------------------------------------------

Supported platforms are Linux and cygwin. OS X should also be fine, but I haven't tried it
myself. (I've heard reports of it working, though.)

Dependencies are zlib, libpng, pthreads, and some very basic system stuff: getopt, mkdir,
Dependencies are zlib, libpng, libjpeg, pthreads, and some very basic system stuff: getopt, mkdir,
dirent.h. If your platform has a separate development package for libpng (called libpng-dev,
libpng-devel, or something like that), you'll need that one, too.

Expand All @@ -39,6 +42,32 @@ Use supplied makefile to build with g++.
---------------------------------------------------------------------------------------------------

Change log (important stuff only):
1.8
-new blocks up to Minecraft 1.8 (andesite, diorite, granite, coarse dirt
prismarine blocks, sea lantern, sponge, iron trapdoor, inverted daylight sensor)
-new fence & fence gate variants
-new door variants
-added different bottom texture for stairs (sandstone, quartz, red sandstone)
-fixed farmland block not showing if it is wet

1.7
-added support for RGB PNG images (with no alpha channel)
-endportal.png is no longer included in root directory
-texture names are aligned with 1.6+/1.7 textures
-new blocks up to Minecraft 1.7 (packed ice, tall flowers, new flowers, stained glass, stained glass pane)
-new block type (used for tall flowers)
-new texture directive (to combine multiple textures in one, to be used for generating tiles)

1.6
-new blocks up to Minecraft 1.6

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
Expand Down Expand Up @@ -116,15 +145,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 +197,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 (textures/ 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 @@ -179,30 +208,42 @@ are stored in blocks-B.png. (As more blocks are added to the game, the version
The selection of block images works thusly:

-If blocks-B.png does not exist, then the tileset you provide will be used to create it.
-If blocks-B.png exists but has an old version, your tileset will be used to fill in any missing
(i.e. new) blocks, but the existing portions of blocks-B.png will be preserved.
-If blocks-B.png exists but has an old version, your tileset will be used to create new replacement. Old blocks-B.png data will be lost.
-If blocks-B.png exists and is up-to-date, its block images will be used.

This means that pigmap will need your tileset the first time it runs, so it can generate blocks-B.png;
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).
To generate blocks-B.png, extract the entity/ and blocks/ folders from your minecraft.jar into textures/ folder inside the folder
you have specified, so folder structure looks like this:
/%specified_image_path%
/textures
/blocks
/entity

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.
All of these must be RGBA/RGB (32BPP/24BPP) png files.

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 @@ -283,33 +324,26 @@ are redrawn.

---------------------------------------------------------------------------------------------------

Custom blocks:

1. Textures
blocktextures.list file is used to declare and pre-process textures, before generating blocks-B.png
tiles. For more info read blocktextures.list;

2. Blocks
blockdescriptor.list file is used to declare and describe new blocks by their respective IDs.
It also describes how blocks look and what textures do they use. Textures must be declared in
blocktextures.list file. For more info read blockdescriptor.list;

Note: Block IDs >= 256 will be not used by renderer.

---------------------------------------------------------------------------------------------------

Special note for those who choose to manually edit blocks-B.png:

When new block types are introduced, their block images are added on to the end of blocks-B.png,
and the existing contents are preserved, so you don't need to worry about previous modifications
getting destroyed. However, sometimes it may be necessary to remove existing block images and
replace them with new versions; when this happens, the old block image offset will no longer be
used, and a new block image will be added to the end of the file.

Example: prior to pigmap 0.6, the furnace block images were located at offsets 68, 69, and 149-152.
Starting with 0.6, they are instead located at 183-188. (This is because the furnace graphics
were changed in Minecraft Beta 1.2.) So if you modified the furnace block images while using a
pre-0.6 version of pigmap, your modified images can still be found at their old locations in your
blocks-B.png, but they must be copied to the new locations.

Complete list of block image moves:

--- pigmap 1.2 ---
gravel: 21->483
chests: 54->484, 177->485, 297->486, [173-176]->[487,490], [298-301]->[491-494]

--- pigmap 1.0 ---
beds: 232->281, 233->282, 234->283, 235->284, 236->285, 237->286, 238->287, 239->288
cake: 228->289

--- pigmap 0.6 ---
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
Block positions in blocks-B.png are dynamic. When new blocks are declared in blockdescriptor.list,
old blocks-B.png is overwritten by newly generated. Don't forget to make backups.

Block images are generated in order of appearance in blockdescriptor.list. You can use that to your advantage
by declaring new blocks at the end of the list. Then you can easily combine old and new ones with image editor,
as new blocks-B.png will look similar to the old one with new tiles added at the end.
Loading