Render more in terrain
This commit is contained in:
parent
3ef1233ee5
commit
2cef922233
15
junk.txt
15
junk.txt
@ -1,15 +0,0 @@
|
|||||||
// haloo3d_print(&pt, "Thi sis a gaint string. I am disylax, I acn'at type, really \n"
|
|
||||||
// "And this string will just keep going because i need it to take up tons of\n"
|
|
||||||
// "your time today. fuck you, eat a cock, thank you. just kidding, i love you\n"
|
|
||||||
// "please have a nice day, but eat a cock if you like that kind of thing. \n"
|
|
||||||
// "slurp slurp yummy yummy give me treats. i like fat bellies");
|
|
||||||
// haloo3d_print(&pt, "Thi sis a gaint string. I am disylax, I acn'at type, really \n"
|
|
||||||
// "And this string will just keep going because i need it to take up tons of\n"
|
|
||||||
// "your time today. fuck you, eat a cock, thank you. just kidding, i love you\n"
|
|
||||||
// "please have a nice day, but eat a cock if you like that kind of thing. \n"
|
|
||||||
// "slurp slurp yummy yummy give me treats. i like fat bellies");
|
|
||||||
// haloo3d_print(&pt, "Thi sis a gaint string. I am disylax, I acn'at type, really \n"
|
|
||||||
// "And this string will just keep going because i need it to take up tons of\n"
|
|
||||||
// "your time today. fuck you, eat a cock, thank you. just kidding, i love you\n"
|
|
||||||
// "please have a nice day, but eat a cock if you like that kind of thing. \n"
|
|
||||||
// "slurp slurp yummy yummy give me treats. i like fat bellies");
|
|
3
notes.txt
Normal file
3
notes.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
1) MAKE SURE DEFINES ARE ISOLATED!
|
||||||
|
Minxrod gave a very useful command to find them:
|
||||||
|
find . -name '*.[ch]' | xargs grep -n -d recurse '#define .* [-+*/] .*' | grep -v '[(].* [-+*/] .*[)]'
|
14
terrain.c
14
terrain.c
@ -56,10 +56,10 @@
|
|||||||
{ .x = 0, .y = 0, .z = -1 }
|
{ .x = 0, .y = 0, .z = -1 }
|
||||||
// How big each chunk is (x and y, square). MUST BE POWER OF 2 - 1
|
// How big each chunk is (x and y, square). MUST BE POWER OF 2 - 1
|
||||||
#define CHUNKSIZE 7 // This is the width in tiles
|
#define CHUNKSIZE 7 // This is the width in tiles
|
||||||
#define CHUNKSCALE 1.0 / CHUNKSIZE
|
#define CHUNKSCALE (1.0 / CHUNKSIZE)
|
||||||
// This is how many vertices across a chunk is
|
// This is how many vertices across a chunk is
|
||||||
#define CHUNKVSIZE (CHUNKSIZE + 1)
|
#define CHUNKVSIZE (CHUNKSIZE + 1)
|
||||||
#define VIEWDISTANCE 10
|
#define VIEWDISTANCE 11
|
||||||
#define PLBOXEDGE (VIEWDISTANCE * 2 + 1)
|
#define PLBOXEDGE (VIEWDISTANCE * 2 + 1)
|
||||||
#define INIT_NEARCLIP 0.01
|
#define INIT_NEARCLIP 0.01
|
||||||
#define INIT_FARCLIP 100.0
|
#define INIT_FARCLIP 100.0
|
||||||
@ -82,18 +82,18 @@
|
|||||||
#define CLOUDHEIGHT 2
|
#define CLOUDHEIGHT 2
|
||||||
#define CLOUDSTRETCH 2
|
#define CLOUDSTRETCH 2
|
||||||
#define CLOUDCHANCE 0.1
|
#define CLOUDCHANCE 0.1
|
||||||
#define INIT_LIGHTPITCH MPI_2 * 1.65
|
#define INIT_LIGHTPITCH (MPI_2 * 1.65)
|
||||||
#define INIT_LIGHTYAW MPI_2 * 0.65
|
#define INIT_LIGHTYAW (MPI_2 * 0.65)
|
||||||
#define INIT_MINLIGHT 0.2
|
#define INIT_MINLIGHT 0.2
|
||||||
#define INIT_DITHERSTART 3.5
|
#define INIT_DITHERSTART 3.5
|
||||||
#define INIT_DITHEREND VIEWDISTANCE - 0.5
|
#define INIT_DITHEREND (VIEWDISTANCE - 1.5)
|
||||||
#define MAXTREEPERCELL 9
|
#define MAXTREEPERCELL 9
|
||||||
#define MAXTREEACROSS 3
|
#define MAXTREEACROSS 3
|
||||||
#define MAXTREECLOSENESS 0.2
|
#define MAXTREECLOSENESS 0.2
|
||||||
|
|
||||||
// Player things
|
// Player things
|
||||||
#define INIT_FOV 90.0
|
#define INIT_FOV 90.0
|
||||||
#define INIT_CAMPITCH MPI_2 * 1.3 // MPI_2 * 1.6 // 1.575
|
#define INIT_CAMPITCH (MPI_2 * 1.3) // MPI_2 * 1.6 // 1.575
|
||||||
#define INIT_PLAYERHEIGHT 0.65
|
#define INIT_PLAYERHEIGHT 0.65
|
||||||
#define INIT_PLAYERSPEED \
|
#define INIT_PLAYERSPEED \
|
||||||
{ .x = 0, .y = 0, .z = -1.5 }
|
{ .x = 0, .y = 0, .z = -1.5 }
|
||||||
@ -217,7 +217,7 @@ void gen_cloud(render_context *ctx, tecs *ecs, struct vec3i pos) {
|
|||||||
.up = DEFAULTUP,
|
.up = DEFAULTUP,
|
||||||
.lookvec = DEFAULTLOOK,
|
.lookvec = DEFAULTLOOK,
|
||||||
.pos = {
|
.pos = {
|
||||||
.x = pos.x + RANDF(), .y = CLOUDHEIGHT + 0.0 * RANDF(), .z = pos.z}};
|
.x = pos.x + RANDF(), .y = CLOUDHEIGHT + 1.0 * RANDF(), .z = pos.z}};
|
||||||
ECS_SETCOMPONENT(ecs, cloudid, ecs_object){
|
ECS_SETCOMPONENT(ecs, cloudid, ecs_object){
|
||||||
.flatdither = CLOUDTRANSMIN + (CLOUDTRANSMAX - CLOUDTRANSMIN) * RANDF(),
|
.flatdither = CLOUDTRANSMIN + (CLOUDTRANSMAX - CLOUDTRANSMIN) * RANDF(),
|
||||||
.texture = haloo3d_easystore_gettex(&ecs->storage, PALETTEKEY),
|
.texture = haloo3d_easystore_gettex(&ecs->storage, PALETTEKEY),
|
||||||
|
Loading…
Reference in New Issue
Block a user