Added more ores, fixed light based heat sources
This commit is contained in:
parent
1e1cc5fb5b
commit
9394ae9ac1
|
|
@ -242,7 +242,7 @@ public class DisplayLighting
|
|||
Vec2i tpos = new Vec2i(x + lighting.x * 16, y + lighting.y * 16);
|
||||
|
||||
// Store light level data from the image
|
||||
layer.setLightLevel(lighting.p[i3+1], tpos);
|
||||
layer.setLightLevel(lighting.p[i3+0], tpos);
|
||||
|
||||
// Store temperature and humidity data
|
||||
lighting.p[i3+1] = (float)layer.getTemperature(new Vec2i(x + lighting.x * 16, y + lighting.y * 16));
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import gl_engine.vec.Vec2d;
|
|||
import projectzombie.model.Model;
|
||||
import projectzombie.model.ModelBox;
|
||||
import projectzombie.model.ModelCactus;
|
||||
import projectzombie.model.ModelChunkBorder;
|
||||
import projectzombie.model.ModelCross;
|
||||
import projectzombie.model.ModelEmpty;
|
||||
import projectzombie.model.ModelGrass;
|
||||
|
|
@ -217,4 +218,6 @@ public class Models
|
|||
public static final Model ENTITY_ZOMBIE_F = new ModelVertical(Resources.ATLAS.get("/entity/zombie_front_moving.png"), 4, 10);
|
||||
public static final Model ENTITY_ZOMBIE_B_ARMORED = new ModelVertical(Resources.ATLAS.get("/entity/armored_zombie_back_moving.png"), 4, 10);
|
||||
public static final Model ENTITY_ZOMBIE_F_ARMORED = new ModelVertical(Resources.ATLAS.get("/entity/armored_zombie_front_moving.png"), 4, 10);
|
||||
|
||||
public static final ModelChunkBorder CHUNK_BORDER = new ModelChunkBorder();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
package projectzombie.model;
|
||||
|
||||
import gl_engine.texture.TextureRef3D;
|
||||
import gl_engine.vec.Vec2d;
|
||||
import projectzombie.init.Resources;
|
||||
|
||||
public class ModelChunkBorder extends Model
|
||||
{
|
||||
private static final TextureRef3D ref = Resources.ATLAS.get("/gui/pixel_white.png");
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIndexSize() {
|
||||
return 24;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] getVerticies()
|
||||
{
|
||||
float w = 16;
|
||||
float h = 0.0625f;
|
||||
float f = 0b10;
|
||||
float c = 0b000000111111111111;
|
||||
float o = 0.5f;
|
||||
|
||||
return new float[]
|
||||
{
|
||||
0-o, 0, 0-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, 0, 0-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, h, 0-o, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
0-o, h, 0-o, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
|
||||
0-o, 0, w-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, 0, w-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, h, w-o, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
0-o, h, w-o, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
|
||||
0-o, 0, 0-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
0-o, 0, w-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
0-o, h, w-o, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
0-o, h, 0-o, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
|
||||
w-o, 0, 0-o, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, 0, w-o, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, h, w-o, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
w-o, h, 0-o, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, c, f,
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIndicies() {
|
||||
return new int[] {
|
||||
0, 1, 2,
|
||||
2, 3, 0,
|
||||
|
||||
4, 5, 6,
|
||||
6, 7, 4,
|
||||
|
||||
8, 9, 10,
|
||||
10, 11, 8,
|
||||
|
||||
12, 13, 14,
|
||||
14, 15, 12,
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureRef3D[] getTextures()
|
||||
{
|
||||
return new TextureRef3D[] {
|
||||
ref, ref, ref, ref,
|
||||
ref, ref, ref, ref,
|
||||
ref, ref, ref, ref,
|
||||
ref, ref, ref, ref,
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getHeight() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getWidth() {
|
||||
return 16;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ import projectzombie.world.chunk.Chunk;
|
|||
|
||||
public class Environment
|
||||
{
|
||||
public static String gdir = "./";
|
||||
public static String gdir = "./run/";
|
||||
|
||||
public static void init(String args[])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,10 +26,12 @@ import projectzombie.entity.EntityParticle;
|
|||
import projectzombie.entity.EntityParticlePart;
|
||||
import projectzombie.entity.particle.ParticleBreak;
|
||||
import projectzombie.entity.tileentity.TileEntity;
|
||||
import projectzombie.init.Models;
|
||||
import projectzombie.init.Tiles;
|
||||
import projectzombie.model.IModel;
|
||||
import projectzombie.model.Model;
|
||||
import projectzombie.model.ModelChunk;
|
||||
import projectzombie.model.ModelChunkBorder;
|
||||
import projectzombie.tiles.Tile;
|
||||
import projectzombie.util.math.random.RandomHelpers;
|
||||
import projectzombie.world.layer.Layer;
|
||||
|
|
@ -428,6 +430,10 @@ public class Chunk implements ClassBdf
|
|||
model.setModel(Matrix4.translate(c_pos.x * 16 - Camera.camera.x, 0, c_pos.y * 16 - Camera.camera.y));
|
||||
model.render();
|
||||
|
||||
if(SHOW_CHUNKS) {
|
||||
Models.CHUNK_BORDER.render();
|
||||
}
|
||||
|
||||
return renderEntities(entities.toArray(), particle_pool, upto);
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
|
|
@ -55,18 +55,23 @@
|
|||
./tile/rock_sandstone.png
|
||||
./tile/sapling2.png
|
||||
./list.txt
|
||||
./item/rock_gold.png
|
||||
./item/log.png
|
||||
./item/rock.png
|
||||
./item/stone_shovel.png
|
||||
./item/coal.png
|
||||
./item/rock_copper.png
|
||||
./item/acorn.png
|
||||
./item/clay.png
|
||||
./item/stone_pick.png
|
||||
./item/rock_tin.png
|
||||
./item/ammo_box.png
|
||||
./item/plant_fibre.png
|
||||
./item/torch_lit.png
|
||||
./item/rock_iron.png
|
||||
./item/stone_hatchet.png
|
||||
./item/flint_hatchet.png
|
||||
./item/rock_uranium.png
|
||||
./item/hemp_seed.png
|
||||
./item/shield_upgrade.png
|
||||
./item/grappling_hook.png
|
||||
|
|
|
|||
Loading…
Reference in New Issue