Ignore:
Timestamp:
05/06/25 23:00:14 (2 days ago)
Author:
Maciej Komosinski
Message:

f9: the colors of the sticks now match the colors of letters for genes, making it easier to connect f9 genes with their phenotypic expressions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f9/f9_oper.cpp

    r1330 r1336  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2024  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2025  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    152152                int pos = ptr - turtle_commands_f9;
    153153                int axis = pos / 2;
    154                 style = GENSTYLE_RGBS(axis == 0 ? 200 : 0, axis == 2 ? 200 : 0, axis == 1 ? 200 : 0, GENSTYLE_NONE);
     154                bool increase = (pos % 2) == 1; // positive direction (right/forth/up, not left/back/down) gets brighter, two-dimensional rgb colors
     155                // same colors as in GenoConv_f90::setColors(), but not brightened (to increase contrast on white background)
     156                style = GENSTYLE_RGBS(
     157                        axis == 0 ? 200 : (axis == 1 && increase) ? 150 : 0,
     158                        axis == 1 ? 200 : (axis == 2 && increase) ? 150 : 0,
     159                        axis == 2 ? 200 : (axis == 0 && increase) ? 150 : 0, GENSTYLE_NONE);
    155160        }
    156161        return style;
Note: See TracChangeset for help on using the changeset viewer.