Fixed flower colors

This commit is contained in:
Carlos Sanchez 2024-09-21 14:21:42 -04:00
parent 5966782b90
commit cf228eee94

View File

@ -70,13 +70,13 @@
#define LANDHEIGHT 4.0
#define LANDCOL 0xF6D2 // 0xF4E1
#define SEACOL 0xF28D // 0xF26C
#define SKYCOL 0xF97F // 0xF77F
#define SKYCOL 0xFC7F // 0xF77F
#define CLOUDCOL 0xFFFF
#define TREECOL 0xF070
#define TREETRUNKCOL 0xF950
#define TREEBOTTOM -0.333
#define TREETRUNKWIDTH 0.2
#define REDFLOWERCOL 0xFF13
#define REDFLOWERCOL 0xFF9A
#define YELLOWFLOWERCOL 0xFEE0
#define SEATRANS 0.75
#define CLOUDTRANSMIN 0.1
@ -216,7 +216,7 @@ uint16_t gen_terrain(struct vec3i pos, haloo3d_obj *model,
float scale = 0.04;
float vertscale = scale * (1 - 0.5 * RANDF()); // * CHUNKSCALE * 4;
haloo3d_obj_addobj(
&nl_model, flowers[RANDF() * 0.4 > y],
&nl_model, flowers[nlayer > -0.9], // flowers[RANDF() * 0.4 > y],
(struct vec3){
.x = treepos.x, .y = y + vertscale * 0.5, .z = treepos.y},
(struct vec3)DEFAULTLOOK,
@ -472,7 +472,7 @@ void sys_renderobject(ecs_placement *p, ecs_object *o, tecs **ecs) {
// }
for (int ti = 0; ti < tris; ti++) {
int backface = !haloo3d_facef_finalize(outfaces[ti]);
if (o->cullbackface && backface) {
if (o->cullbackface && facei < o->stoplighting && backface) {
continue;
}
(*ecs)->totaldrawn++;