Decent Wood.
This commit is contained in:
@@ -258,23 +258,32 @@ namespace CaveGame::Client {
|
||||
|
||||
//int row_offset = wy
|
||||
|
||||
int plank_row_idx = ((int)Math::Floor(wy/5)) % 5;
|
||||
int plank_row = ((int)Math::Floor(wy/5));
|
||||
int plank_row_idx = plank_row % 5;
|
||||
|
||||
int plank_length_modulus = 0;
|
||||
|
||||
if (plank_row_idx == 0) plank_length_modulus = -7;
|
||||
if (plank_row_idx == 0) plank_length_modulus = 0;
|
||||
if (plank_row_idx == 1) plank_length_modulus = 3;
|
||||
if (plank_row_idx == 2) plank_length_modulus = 9;
|
||||
if (plank_row_idx == 3) plank_length_modulus = 0;
|
||||
if (plank_row_idx == 4) plank_length_modulus = 13;
|
||||
if (plank_row_idx == 2) plank_length_modulus = 6;
|
||||
if (plank_row_idx == 3) plank_length_modulus = 9;
|
||||
if (plank_row_idx == 4) plank_length_modulus = 12;
|
||||
|
||||
// Looks good for brick.
|
||||
|
||||
uint8_t shift = generator.ColorMap(25, wx, wy);
|
||||
uint8_t base_r = 222 - shift;
|
||||
uint8_t base_g = 184 - shift;
|
||||
uint8_t base_b = 135 - shift;
|
||||
|
||||
//if (wy % 5 == 0 || ((Math::RoundInt(wy/5)*5)+wx) % 9 == 0) { //&& (y_remainder == 0)) {
|
||||
if (wy % 5 == 0 || (wx+plank_length_modulus) % 19 == 0) { //&& (y_remainder == 0)) {
|
||||
t_color = Colors::Browns::Brown;
|
||||
} else {
|
||||
t_color = Colors::Browns::BurlyWood;
|
||||
if (wy % 5 == 0 || (wx+(plank_row*5)) % 19 == 0) { //&& (y_remainder == 0)) {
|
||||
base_r -= 50;
|
||||
base_g -= 45;
|
||||
base_b -= 40;
|
||||
}
|
||||
|
||||
t_color = {base_r, base_g, base_b};
|
||||
} else if (t_data->has_color_pallet) {
|
||||
uint rand = generator.ColorMap(t_data->color_pallet.size(), wx, wy);
|
||||
t_color = t_data->color_pallet[rand];
|
||||
|
Reference in New Issue
Block a user