Skip to content

Commit 4296d82

Browse files
committed
Adding support Minecraft 1.7.2
1 parent b1132d2 commit 4296d82

12 files changed

+413
-189
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# if you don't want png support, remove "-DWITHPNG", "-lpng" and "draw_png.cpp" below
22
CC=g++
3-
CFLAGS=-O3 -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -I/usr/local/include -I/usr/X11/include
4-
LDFLAGS=-O3 -lz -lpng -fomit-frame-pointer -L/usr/local/lib -L/usr/X11/lib
3+
CFLAGS=-O3 -msse -c -Wall -fomit-frame-pointer -pedantic -DWITHPNG -I/usr/local/include
4+
LDFLAGS=-O3 -msse -lz -lpng -fomit-frame-pointer -L/usr/local/lib
55
DCFLAGS=-g -O0 -c -Wall -D_DEBUG -DWITHPNG -I/usr/local/include
66
DLDFLAGS=-g -O0 -lz -lpng -L/usr/local/lib
77
SOURCES=main.cpp helper.cpp nbt.cpp colors.cpp worldloader.cpp filesystem.cpp globals.cpp draw_png.cpp extractcolors.cpp pngreader.cpp

colors.cpp

+99-33
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ void loadColors()
8080
SETCOLOR(42, 191,191,191,255);
8181
SETCOLOR(DOUBLESTEP, 200,200,200,255);
8282
SETCOLOR(STEP, 200,200,200,254); // Not fully opaque to prevent culling on this one
83-
SETCOLOR(UP_STEP, 200,200,200,254); // Not fully opaque to prevent culling on this one
8483
SETCOLOR(45, 170,86,62,255);
8584
SETCOLOR(BRICKSTEP, 170,86,62,254);
86-
SETCOLOR(UP_BRICKSTEP, 170,86,62,254);
8785
SETCOLOR(46, 160,83,65,255);
8886
SETCOLORNOISE(48, 90,108,90,255, 27);
8987
SETCOLOR(49, 26,11,43,255);
@@ -132,7 +130,6 @@ void loadColors()
132130
SETCOLORNOISE(97, 128,128,128,255, 16);
133131
SETCOLORNOISE(98, 122,122,122,255, 7);
134132
SETCOLORNOISE(STONEBRICKSTEP, 122,122,122,254, 7);
135-
SETCOLORNOISE(UP_STONEBRICKSTEP, 122,122,122,254, 7);
136133
SETCOLORNOISE(99, 141,106,83,255, 0);
137134
SETCOLORNOISE(100, 182,37,36,255, 6);
138135
SETCOLORNOISE(IRON_BARS, 109,108,106,254, 6);
@@ -159,42 +156,12 @@ void loadColors()
159156
SETCOLOR(122, 20,18,29,255);
160157
SETCOLORNOISE(123, 70,43,26,255, 2);
161158
SETCOLORNOISE(124, 119,89,55,255, 7);
162-
SETCOLORNOISE(WOODEN_DOUBLE_STEP, 156,127,78,255, 11);
163-
SETCOLORNOISE(WOODEN_STEP, 156,127,78,254, 11);
164-
SETCOLOR(COCOA_PLANT, 145,80,30,200);
165-
SETCOLORNOISE(128, 218,210,158,255, 15);
166-
SETCOLORNOISE(129, 109,128,116,255, 18);
167-
SETCOLORNOISE(130, 18,16,27,255, 5);
168-
SETCOLORNOISE(131, 138,129,113,255, 28);
169-
SETCOLORNOISE(132, 129,129,129,107, 25);
170-
SETCOLOR(133, 81,217,117,255);
171-
SETCOLORNOISE(134, 103,77,46,255, 1);
172-
SETCOLORNOISE(135, 195,179,123,255, 3);
173-
SETCOLORNOISE(136, 154,110,77,255, 2);
174-
175159
SETCOLORNOISE(PINELEAVES, 44,84,44,160, 20); // Pine leaves
176160
SETCOLORNOISE(BIRCHLEAVES, 85,124,60,170, 11); // Birch leaves
177161
SETCOLORNOISE(JUNGLELEAVES, 44,135,50,175, 11); // Birch leaves
178162
SETCOLORNOISE(SANDSTEP, 218, 210, 158, 254, 7); // Not fully opaque to prevent culling on this one
179-
SETCOLORNOISE(UP_SANDSTEP, 218, 210, 158, 254, 7); // Not fully opaque to prevent culling on this one
180163
SETCOLORNOISE(WOODSTEP, 157,128,79,254, 11); // Not fully opaque to prevent culling on this one
181-
SETCOLORNOISE(UP_WOODSTEP, 157,128,79,254, 11); // Not fully opaque to prevent culling on this one
182164
SETCOLORNOISE(COBBLESTEP, 115,115,115,254, 26); // Not fully opaque to prevent culling on this one
183-
SETCOLORNOISE(UP_COBBLESTEP, 115,115,115,254, 26); // Not fully opaque to prevent culling on this one
184-
185-
SETCOLORNOISE(PINESTEP, 103,77,46,254, 1);
186-
SETCOLORNOISE(BIRCHSTEP, 195,179,123,254, 3);
187-
SETCOLORNOISE(JUNGLESTEP, 154,110,77,254, 2);
188-
189-
SETCOLORNOISE(UP_WOODSTEP2, 157,128,79,254, 11);
190-
SETCOLORNOISE(UP_PINESTEP, 103,77,46,255, 1);
191-
SETCOLORNOISE(UP_BIRCHSTEP, 195,179,123,255, 3);
192-
SETCOLORNOISE(UP_JUNGLESTEP, 154,110,77,255, 2);
193-
194-
SETCOLORNOISE(226, 103,77,46,255, 1);
195-
SETCOLORNOISE(227, 195,179,123,255, 3);
196-
SETCOLORNOISE(228, 154,110,77,255, 2);
197-
198165
SETCOLOR(237, 70,50,32, 255); // Pine trunk
199166
SETCOLORNOISE(238, 206,206,201, 255, 5); // Birch trunk
200167
SETCOLOR(239, 122,91,51, 255); // Jungle trunk
@@ -213,6 +180,104 @@ void loadColors()
213180
SETCOLOR(252, 55,77,24, 255);
214181
SETCOLOR(253, 173,44,40, 255);
215182
SETCOLOR(254, 32,27,27, 255);
183+
184+
//1.3.1+ various
185+
SETCOLOR(133, 61, 255, 61, 255 ); //emerald
186+
SETCOLOR(137, 203, 163, 136, 255 ); //command block
187+
SETCOLOR(138, 21, 255, 255, 255 ); //beacon
188+
SETCOLORNOISE(139, 128, 128, 128, 255, 16); // cobblestone wall
189+
SETCOLOR(145, 110, 110, 110, 255 ); //anvil
190+
SETCOLOR(146, 125, 91, 38, 255 ); //trapped chest
191+
SETCOLOR(152, 227, 38, 12, 255 ); //redstone block
192+
SETCOLOR(154, 110, 110, 110, 255 ); //hopper
193+
SETCOLOR(155, 240, 238, 232, 255 ); //quartz
194+
SETCOLOR(156, 240, 238, 232, 255 ); //quartz stairs
195+
//SETCOLOR(159, 209, 177, 160, 255 ); //white stained clay !
196+
SETCOLOR(161, 54, 135, 40, 180 ); //leaves Acacia/Dark Oak
197+
SETCOLOR(162, 72, 72, 72, 255 ); //log Acacia/Dark Oak
198+
SETCOLORNOISE(163, 154, 110, 77, 255, 2); // Acacia Wood Stairs
199+
SETCOLORNOISE(164, 106, 127, 98, 255, 11); // Dark Oak Wood Stairs
200+
SETCOLOR(170, 172, 145, 18, 255 ); //haystack
201+
SETCOLOR(171, 224, 224, 224, 255 ); //white carpet
202+
SETCOLOR(172, 209, 177, 160, 255 ); //hardened clay
203+
SETCOLOR(173, 21, 21, 21, 255 ); //coal block
204+
SETCOLOR(174, 159, 189, 239, 255 ); //packed ice
205+
SETCOLOR(175, 0, 255, 0, 254 ); //Large flower
206+
207+
// carpets
208+
SETCOLOR(36 , 255, 255, 255, 254 ); //White carpet
209+
SETCOLOR(68 , 244, 137, 54, 254 ); //Orange carpet
210+
SETCOLOR(69 , 200, 75, 210, 254 ); //Magenta carpet
211+
SETCOLOR(70 , 120, 158, 241, 254 ); //Light Blue carpet
212+
SETCOLOR(72 , 204, 200, 28, 254 ); //Yellow carpet
213+
SETCOLOR(77 , 59, 210, 47, 254 ); //Lime carpet
214+
SETCOLOR(131, 237, 141, 164, 254 ); //Pink carpet
215+
SETCOLOR(132, 76, 76, 76, 254 ); //Gray carpet
216+
SETCOLOR(141, 168, 172, 172, 254 ); //Light Gray
217+
SETCOLOR(142, 39, 116, 149, 254 ); //Cyan carpet
218+
SETCOLOR(143, 133, 53, 195, 254 ); //Purple carpet
219+
SETCOLOR(147, 38, 51, 160, 254 ); //Blue carpet
220+
SETCOLOR(148, 85, 51, 27, 254 ); //Brown carpet
221+
SETCOLOR(149, 55, 77, 24, 254 ); //Green carpet
222+
SETCOLOR(150, 173, 44, 40, 254 ); //Red carpet
223+
SETCOLOR(158, 32, 27, 27, 254 ); //Black carpet
224+
225+
// clays
226+
SETCOLOR(159, 225, 225, 225, 255 ); //White Stained Clay
227+
228+
SETCOLOR(186, 214, 107, 24, 255 ); //Orange Stained Clay
229+
SETCOLOR(187, 170, 45, 180, 255 ); //Magenta Stained Clay
230+
SETCOLOR(188, 90 , 128, 211, 255 ); //Light Blue Stained Clay
231+
SETCOLOR(189, 174, 170, 0, 255 ); //Yellow Stained Clay
232+
SETCOLOR(190, 29, 180, 17, 255 ); //Lime Stained Clay
233+
SETCOLOR(191, 207, 111, 134, 255 ); //Pink Stained Clay
234+
SETCOLOR(192, 46, 46, 46, 255 ); //Gray Stained Clay
235+
SETCOLOR(193, 138, 142, 142, 255 ); //Light Gray Stained Clay
236+
SETCOLOR(194, 9, 86, 119, 255 ); //Cyan Stained Clay
237+
SETCOLOR(195, 103, 23, 165, 255 ); //Purple Stained Clay
238+
SETCOLOR(196, 38, 51, 160, 255 ); //Blue Stained Clay
239+
SETCOLOR(197, 85, 51, 0, 255 ); //Brown Stained Clay
240+
SETCOLOR(198, 55, 77, 0, 255 ); //Green Stained Clay
241+
SETCOLOR(199, 143, 14, 10, 255 ); //Red Stained Clay
242+
SETCOLOR(200, 2, 0, 0, 255 ); //Black Stained Clay
243+
244+
SETCOLOR(153, 254, 167, 54, 255 ); //Red Sand
245+
246+
// glass
247+
SETCOLOR(95 , 255, 255, 255, 100 ); //White Stained Glass
248+
SETCOLOR(160, 255, 255, 255, 100 ); //White Stained Glass pane
249+
SETCOLOR(207, 244, 137, 54, 40 ); //Orange Stained Glass [pane]
250+
SETCOLOR(225, 200, 75, 210, 40 ); //Magenta Stained Glass [pane]
251+
SETCOLOR(255, 120, 158, 241, 40 ); //Light Blue Stained Glass [pane]
252+
SETCOLOR(166, 204, 200, 28, 40 ); //Yellow Stained Glass [pane]
253+
SETCOLOR(167, 59, 210, 47, 40 ); //Lime Stained Glass [pane]
254+
SETCOLOR(168, 237, 141, 164, 40 ); //Pink Stained Glass [pane]
255+
SETCOLOR(169, 76, 76, 76, 40 ); //Gray Stained Glass [pane]
256+
SETCOLOR(178, 168, 172, 172, 40 ); //Light Gray Stained Glass [pane]
257+
SETCOLOR(179, 39, 116, 149, 40 ); //Cyan Stained Glass [pane]
258+
SETCOLOR(180, 133, 53, 195, 40 ); //Purple Stained Glass [pane]
259+
SETCOLOR(181, 38, 51, 160, 40 ); //Blue Stained Glass [pane]
260+
SETCOLOR(182, 85, 51, 27, 40 ); //Brown Stained Glass [pane]
261+
SETCOLOR(183, 55, 77, 24, 40 ); //Green Stained Glass [pane]
262+
SETCOLOR(184, 173, 44, 40, 40 ); //Red Stained Glass [pane]
263+
SETCOLOR(185, 32, 27, 27, 40 ); //Black Stained Glass [pane]
264+
265+
// flowers
266+
SETCOLOR(165, 120, 158, 241, 254 ); //BLUE_ORCHID 165
267+
SETCOLOR(176, 200, 75, 210, 254 ); //ALLIUM 176
268+
SETCOLOR(206, 168, 172, 172, 254 ); //AZURE_BLUET 206
269+
// 38, 173 44 40 254, ); //RED_TULIP 38
270+
SETCOLOR(217, 244, 137, 54, 254 ); //ORANGE_TULIP 217
271+
SETCOLOR(218, 255, 255, 255, 254 ); //WHITE_TULIP 218
272+
SETCOLOR(219, 237, 141, 164, 254 ); //PINK_TULIP 219
273+
SETCOLOR(220, 168, 172, 172, 254 ); //OXEYE_DAISY 220
274+
// 37, 255 255 0 254, ); //SUNFLOWER 37
275+
SETCOLOR(233, 200, 75, 210, 254 ); //LILAC 233
276+
SETCOLOR(177, 237, 141, 164, 254 ); //PEONY 177
277+
278+
// nether
279+
//SETCOLORNOISE(238, 206, 206, 201, 255, 5); // Birch Wood / quartz slab (sic!)
280+
216281
}
217282

218283

@@ -275,6 +340,7 @@ bool dumpColorsToFile(const char *file)
275340
return false;
276341
}
277342
fprintf(f, "# For Block IDs see http://minecraftwiki.net/wiki/Data_values\n"
343+
"and http://wrim.pl/mcmap (for blocks introduced since Minecraft 1.3.1 and mcmap 2.4)\n"
278344
"# Note that noise or alpha (or both) do not work for a few blocks like snow, torches, fences, steps, ...\n"
279345
"# Actually, if you see any block has an alpha value of 254 you should leave it that way to prevent black artifacts.\n"
280346
"# If you want to set alpha of grass to <255, use -blendall or you won't get what you expect.\n"

colors.h

+19-26
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,29 @@ bool loadBiomeColors(const char* path);
7676
#define NETHER_BRICK_FENCE 113
7777
#define NETHER_BRICK_STAIRS 114
7878
#define NETHER_WART 115
79-
#define WOODEN_DOUBLE_STEP 125
80-
#define WOODEN_STEP 126
81-
#define COCOA_PLANT 127
82-
#define TRIPWIRE_HOOK 131
83-
#define TRIPWIRE 132
8479

85-
#define SANDSTEP 201
86-
#define WOODSTEP 202
87-
#define COBBLESTEP 203
88-
#define BRICKSTEP 204
89-
#define STONEBRICKSTEP 205
90-
91-
#define UP_STEP 208
92-
#define UP_SANDSTEP 209
93-
#define UP_WOODSTEP 210
94-
#define UP_COBBLESTEP 211
95-
#define UP_BRICKSTEP 212
96-
#define UP_STONEBRICKSTEP 213
97-
98-
#define PINESTEP 214
99-
#define BIRCHSTEP 215
100-
#define JUNGLESTEP 216
101-
102-
#define UP_WOODSTEP2 221
103-
#define UP_PINESTEP 222
104-
#define UP_BIRCHSTEP 223
105-
#define UP_JUNGLESTEP 224
80+
#define SANDSTEP 232
81+
#define WOODSTEP 233
82+
#define COBBLESTEP 234
83+
#define BRICKSTEP 235
84+
#define STONEBRICKSTEP 236
10685

10786
#define PINELEAVES 229
10887
#define BIRCHLEAVES 230
10988
#define JUNGLELEAVES 231
11089

90+
#define BLUE_ORCHID 165
91+
#define ALLIUM 176
92+
#define AZURE_BLUET 206
93+
#define RED_TULIP 38
94+
#define ORANGE_TULIP 217
95+
#define WHITE_TULIP 218
96+
#define PINK_TULIP 219
97+
#define OXEYE_DAISY 220
98+
#define SUNFLOWER 37
99+
#define LILAC 233
100+
#define PEONY 177
101+
102+
#define REDSAND 153
103+
111104
#endif

draw_png.cpp

+20-44
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ namespace
7878
void setGrass(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark, const int sub);
7979
void setFence(const size_t x, const size_t y, const uint8_t * const color);
8080
void setStep(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark);
81-
void setUpStep(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark);
8281
# define setRailroad setSnowBA
8382

8483
// Then make duplicate copies so it is one hell of a mess
@@ -88,7 +87,6 @@ namespace
8887
void setFlowerBA(const size_t x, const size_t y, const uint8_t * const color);
8988
void setGrassBA(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark, const int sub);
9089
void setStepBA(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark);
91-
void setUpStepBA(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark);
9290
}
9391

9492
void createImageBuffer(const size_t width, const size_t height, const bool splitUp)
@@ -639,23 +637,28 @@ void setPixel(const size_t x, const size_t y, const uint8_t color, const float f
639637
modColor(c, sub);
640638
if (g_BlendAll) {
641639
// Then check the block type, as some types will be drawn differently
642-
if (color == SNOW || color == TRAPDOOR) {
640+
if (color == SNOW || color == TRAPDOOR
641+
|| color == 141 || color == 142 || color == 158 || color == 149
642+
|| color == 131 || color == 132 || color == 150 || color == 147 || color == 148 || color == 68 || color == 69 || color == 70
643+
|| color == 72 || color == 77 || color == 143 || color == 36) { //three lines of carpets ID's I can't do this other way
643644
setSnowBA(x, y, c);
644645
return;
645646
}
646647
if (color == TORCH || color == REDTORCH_ON || color == REDTORCH_OFF) {
647648
setTorchBA(x, y, c);
648649
return;
649650
}
650-
if (color == FLOWERR || color == FLOWERY || color == MUSHROOMB || color == MUSHROOMR || color == MELON_STEM || color == PUMPKIN_STEM || color == SHRUB || color == COBWEB || color == LILYPAD || color == NETHER_WART) {
651+
if (color == FLOWERR || color == FLOWERY || color == MUSHROOMB || color == MUSHROOMR || color == MELON_STEM || color == PUMPKIN_STEM || color == SHRUB || color == COBWEB || color == LILYPAD || color == NETHER_WART
652+
|| color == 175 || color == BLUE_ORCHID || color == ALLIUM || color == AZURE_BLUET || color == RED_TULIP || color == ORANGE_TULIP || color == WHITE_TULIP || color == PINK_TULIP || color == OXEYE_DAISY || color == SUNFLOWER || color == LILAC || color == PEONY ) {
651653
setFlowerBA(x, y, c);
652654
return;
653655
}
654-
if (color == FENCE || color == FENCE_GATE || color == VINES || color == IRON_BARS || color == NETHER_BRICK_FENCE) {
656+
if (color == FENCE || color == FENCE_GATE || color == VINES || color == IRON_BARS || color == NETHER_BRICK_FENCE
657+
|| color == 139) {
655658
setFence(x, y, c);
656659
return;
657660
}
658-
if (color == REDWIRE || color == TRIPWIRE) {
661+
if (color == REDWIRE) {
659662
setRedwire(x, y, c);
660663
return;
661664
}
@@ -674,37 +677,37 @@ void setPixel(const size_t x, const size_t y, const uint8_t color, const float f
674677
setGrassBA(x, y, c, L, D, sub);
675678
return;
676679
}
677-
if (color == FIRE || color == TALL_GRASS || color == COCOA_PLANT) {
680+
if (color == FIRE || color == TALL_GRASS) {
678681
setFire(x, y, c, L, D);
679682
return;
680683
}
681-
if (color == STEP || color == CAKE || color == BED || color == SANDSTEP || color == WOODSTEP || color == COBBLESTEP || color == BRICKSTEP || color == STONEBRICKSTEP || color == PINESTEP || color == BIRCHSTEP || color == JUNGLESTEP) {
684+
if (color == STEP || color == CAKE || color == BED || color == SANDSTEP || color == WOODSTEP || color == COBBLESTEP || color == BRICKSTEP || color == STONEBRICKSTEP) {
682685
setStepBA(x, y, c, L, D);
683686
return;
684687
}
685-
if (color == UP_STEP || color == UP_SANDSTEP || color == UP_WOODSTEP || color == UP_COBBLESTEP || color == UP_BRICKSTEP || color == UP_STONEBRICKSTEP || color == UP_WOODSTEP2 || color == UP_PINESTEP || color == UP_BIRCHSTEP || color == UP_JUNGLESTEP) {
686-
setUpStepBA(x, y, c, L, D);
687-
return;
688-
}
689688
} else {
690689
// Then check the block type, as some types will be drawn differently
691-
if (color == SNOW || color == TRAPDOOR) {
690+
if (color == SNOW || color == TRAPDOOR
691+
|| color == 141 || color == 142 || color == 158 || color == 149
692+
|| color == 131 || color == 132 || color == 150 || color == 147 || color == 148 || color == 68 || color == 69 || color == 70
693+
|| color == 72 || color == 77 || color == 143 || color == 36) { //three lines of carpets ID's I can't do this other way
692694
setSnow(x, y, c);
693695
return;
694696
}
695697
if (color == TORCH || color == REDTORCH_ON || color == REDTORCH_OFF) {
696698
setTorch(x, y, c);
697699
return;
698700
}
699-
if (color == FLOWERR || color == FLOWERY || color == MUSHROOMB || color == MUSHROOMR || color == MELON_STEM || color == PUMPKIN_STEM || color == SHRUB || color == COBWEB || color == LILYPAD || color == NETHER_WART) {
701+
if (color == FLOWERR || color == FLOWERY || color == MUSHROOMB || color == MUSHROOMR || color == MELON_STEM || color == PUMPKIN_STEM || color == SHRUB || color == COBWEB || color == LILYPAD || color == NETHER_WART
702+
|| color == 175 || color == BLUE_ORCHID || color == ALLIUM || color == AZURE_BLUET || color == RED_TULIP || color == ORANGE_TULIP || color == WHITE_TULIP || color == PINK_TULIP || color == OXEYE_DAISY || color == SUNFLOWER || color == LILAC || color == PEONY ) {
700703
setFlower(x, y, c);
701704
return;
702705
}
703706
if (color == FENCE || color == FENCE_GATE || color == VINES || color == IRON_BARS || color == NETHER_BRICK_FENCE) {
704707
setFence(x, y, c);
705708
return;
706709
}
707-
if (color == REDWIRE || color == TRIPWIRE) {
710+
if (color == REDWIRE) {
708711
setRedwire(x, y, c);
709712
return;
710713
}
@@ -723,18 +726,14 @@ void setPixel(const size_t x, const size_t y, const uint8_t color, const float f
723726
setGrass(x, y, c, L, D, sub);
724727
return;
725728
}
726-
if (color == FIRE || color == TALL_GRASS || color == COCOA_PLANT) {
729+
if (color == FIRE || color == TALL_GRASS) {
727730
setFire(x, y, c, L, D);
728731
return;
729732
}
730-
if (color == STEP || color == CAKE || color == BED || color == SANDSTEP || color == WOODSTEP || color == COBBLESTEP || color == BRICKSTEP || color == STONEBRICKSTEP || color == PINESTEP || color == BIRCHSTEP || color == JUNGLESTEP) {
733+
if (color == STEP || color == CAKE || color == BED || color == SANDSTEP || color == WOODSTEP || color == COBBLESTEP) {
731734
setStep(x, y, c, L, D);
732735
return;
733736
}
734-
if (color == UP_STEP || color == UP_SANDSTEP || color == UP_WOODSTEP || color == UP_COBBLESTEP || color == UP_BRICKSTEP || color == UP_STONEBRICKSTEP || color == UP_WOODSTEP2 || color == UP_PINESTEP || color == UP_BIRCHSTEP || color == UP_JUNGLESTEP) {
735-
setUpStep(x, y, c, L, D);
736-
return;
737-
}
738737
}
739738
// In case the user wants noise, calc the strength now, depending on the desired intensity and the block's brightness
740739
int noise = 0;
@@ -1005,18 +1004,6 @@ namespace
10051004
}
10061005
}
10071006

1008-
void setUpStep(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark)
1009-
{
1010-
uint8_t *pos = &PIXEL(x, y);
1011-
for (size_t i = 0; i < 4; ++i, pos += CHANSPERPIXEL) {
1012-
memcpy(pos, color, BYTESPERPIXEL);
1013-
}
1014-
pos = &PIXEL(x, y+1);
1015-
for (size_t i = 0; i < 4; ++i, pos += CHANSPERPIXEL) {
1016-
memcpy(pos, color, BYTESPERPIXEL);
1017-
}
1018-
}
1019-
10201007
void setRedwire(const size_t x, const size_t y, const uint8_t * const color)
10211008
{
10221009
uint8_t *pos = &PIXEL(x+1, y+2);
@@ -1108,15 +1095,4 @@ namespace
11081095
}
11091096
}
11101097

1111-
void setUpStepBA(const size_t x, const size_t y, const uint8_t * const color, const uint8_t * const light, const uint8_t * const dark)
1112-
{
1113-
uint8_t *pos = &PIXEL(x, y);
1114-
for (size_t i = 0; i < 3; ++i, pos += CHANSPERPIXEL) {
1115-
blend(pos, color);
1116-
}
1117-
pos = &PIXEL(x, y+1);
1118-
for (size_t i = 0; i < 10; ++i, pos += CHANSPERPIXEL) {
1119-
blend(pos, color);
1120-
}
1121-
}
11221098
}

0 commit comments

Comments
 (0)