Merge commit 'refs/pull/815/head' of github.com:overviewer/Minecraft-Overviewer into merge_815
This commit is contained in:
@@ -53,6 +53,7 @@ feature.
|
|||||||
* Alex Cline <cline@vivisimo.com>
|
* Alex Cline <cline@vivisimo.com>
|
||||||
* Andrew Clunis <andrew@orospakr.ca>
|
* Andrew Clunis <andrew@orospakr.ca>
|
||||||
* CounterPillow <spam@tes-cheese.ch>
|
* CounterPillow <spam@tes-cheese.ch>
|
||||||
|
* Mark Crichton <crichton@gmail.com>
|
||||||
* Johannes Dewender <github@JonnyJD.net>
|
* Johannes Dewender <github@JonnyJD.net>
|
||||||
* Michael Fallows <michael@fallo.ws>
|
* Michael Fallows <michael@fallo.ws>
|
||||||
* Ryan Finnie <ryan@feh.colobox.com>
|
* Ryan Finnie <ryan@feh.colobox.com>
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ class Base(RenderPrimitive):
|
|||||||
class Nether(RenderPrimitive):
|
class Nether(RenderPrimitive):
|
||||||
name = "nether"
|
name = "nether"
|
||||||
|
|
||||||
|
class NetherAlt(RenderPrimitive):
|
||||||
|
name = "nether2"
|
||||||
|
|
||||||
class HeightFading(RenderPrimitive):
|
class HeightFading(RenderPrimitive):
|
||||||
name = "height-fading"
|
name = "height-fading"
|
||||||
options = {
|
options = {
|
||||||
@@ -230,4 +233,7 @@ smooth_night = [Base(), EdgeLines(), SmoothLighting(night=True)]
|
|||||||
nether = [Base(), EdgeLines(), Nether()]
|
nether = [Base(), EdgeLines(), Nether()]
|
||||||
nether_lighting = [Base(), EdgeLines(), Nether(), Lighting()]
|
nether_lighting = [Base(), EdgeLines(), Nether(), Lighting()]
|
||||||
nether_smooth_lighting = [Base(), EdgeLines(), Nether(), SmoothLighting()]
|
nether_smooth_lighting = [Base(), EdgeLines(), Nether(), SmoothLighting()]
|
||||||
|
netheralt = [Base(), EdgeLines(), NetherAlt()]
|
||||||
|
netheralt_lighting = [Base(), EdgeLines(), NetherAlt(), Lighting()]
|
||||||
|
netheralt_smooth_lighting = [Base(), EdgeLines(), NetherAlt(), SmoothLighting()]
|
||||||
cave = [Base(), EdgeLines(), Cave(), DepthTinting()]
|
cave = [Base(), EdgeLines(), Cave(), DepthTinting()]
|
||||||
|
|||||||
69
overviewer_core/src/primitives/nether2.c
Normal file
69
overviewer_core/src/primitives/nether2.c
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Minecraft Overviewer.
|
||||||
|
*
|
||||||
|
* Minecraft Overviewer is free software: you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Minecraft Overviewer is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with the Overviewer. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../overviewer.h"
|
||||||
|
#include "nether2.h"
|
||||||
|
|
||||||
|
static void
|
||||||
|
walk_chunk(RenderState *state, RenderPrimitiveNether2 *data) {
|
||||||
|
int x, y, z;
|
||||||
|
int id;
|
||||||
|
|
||||||
|
for (x = 0; x < WIDTH; x++) {
|
||||||
|
for (z = 0; z < DEPTH; z++) {
|
||||||
|
id = get_data(state, BLOCKS, x, NETHER_ROOF - (state->chunky * 16), z);
|
||||||
|
if (id == 7) {
|
||||||
|
data->remove_block[x][NETHER_ROOF][z] = 1;
|
||||||
|
id = get_data(state, BLOCKS, x, (NETHER_ROOF + 1) - (state->chunky * 16), z);
|
||||||
|
if (id == 39 || id == 40)
|
||||||
|
data->remove_block[x][NETHER_ROOF + 1][z] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (y = NETHER_ROOF-1; y>=0; y--) {
|
||||||
|
id = get_data(state, BLOCKS, x, y - (state->chunky * 16), z);
|
||||||
|
if (id == 7 || id == 87)
|
||||||
|
data->remove_block[x][y][z] = 1;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data->walked_chunk = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
nether2_hidden(void *data, RenderState *state, int x, int y, int z) {
|
||||||
|
RenderPrimitiveNether2* self;
|
||||||
|
int real_y;
|
||||||
|
|
||||||
|
self = (RenderPrimitiveNether2 *)data;
|
||||||
|
|
||||||
|
if (!(self->walked_chunk))
|
||||||
|
walk_chunk(state, self);
|
||||||
|
|
||||||
|
real_y = y + (state->chunky * 16);
|
||||||
|
return self->remove_block[x][real_y][z];
|
||||||
|
}
|
||||||
|
|
||||||
|
RenderPrimitiveInterface primitive_nether2 = {
|
||||||
|
"nether2", sizeof(RenderPrimitiveNether2),
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
nether2_hidden,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
30
overviewer_core/src/primitives/nether2.h
Normal file
30
overviewer_core/src/primitives/nether2.h
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Minecraft Overviewer.
|
||||||
|
*
|
||||||
|
* Minecraft Overviewer is free software: you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* Minecraft Overviewer is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with the Overviewer. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "../overviewer.h"
|
||||||
|
|
||||||
|
#define NETHER_ROOF 127
|
||||||
|
#define WIDTH 16
|
||||||
|
#define DEPTH 16
|
||||||
|
#define HEIGHT 256
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int walked_chunk;
|
||||||
|
|
||||||
|
int remove_block[WIDTH][HEIGHT][DEPTH];
|
||||||
|
|
||||||
|
} RenderPrimitiveNether2;
|
||||||
Reference in New Issue
Block a user