![]() There are several ways to get multiple colors. It is then passed to OpenGL which clamps it to 0.1, and multiplies the wall texture with it. This color will be multiplied with 0.7.1 for every wall, depending on lighting. The wall color is the floating-point color, passed through the floor color avoidance with f=0.5. T is the texture color, and A is the alpha channel. The resulting color is then blended behind the cycle texture: This color will then be multiplied with 255, and converted to an 8-bit unsigned integer (0.255) by rounding toward zero and wrapping in case of overflow. The cycle color is the floating-point color, passed through the floor color avoidance with f=1. The text color is the floating-point color, multiplied with 255 and converted to an 8-bit unsigned integer (0.255) by rounding toward zero and clamping in case of overflow. S = C R + C G + C B (The game only adds a component if it is < 0.99, but that is implied by the loop condition of < 0.95.) If S < 0.02Ĭ R = C R + s C G = C G + s C B = C B + s Else (S ≥ 0.02)Ĭ R = C R + sC R/S C G = C G + sC G/S C B = C B + sC B/S C R = min(C R, 1) C G = min(C G, 1) C B = min(C B, 1) If the aforementioned condition is still true, enter the loop again. To enter the loop, the following condition must be true: (C R < 0.95 AND C G < 0.95 AND C B < 0.95) AND ((|F R - C Rf| + |F G - C Gf| + |F B - C Bf| < 0.5) OR (|C Rf| + |C Gf| + |C Bf| < 0.5)). I admit choosing names which only differ in case isn't very good, but they're partly based on names used in the game. S Sum of C's values, recalculated at the start of every loop. f Some value specifying the degree of avoidance. We start off with several variables and a constant:Ĭ The color. When a color is too close, it will be brightened until it's no longer close to the floor color or approaches white. See also Code hacks#Hardcoded teams.Īrmagetron has a mechanism that prevents colors from coming too close to the floor color. The leader in team naming/coloring context is the human who has been on his team for the longest time, or bot if there is none. Note that if at least 50% of all players on a team have "Name Team after Player" set (bots and the leader are an implicit no, but are not excluded), the team will be given the leader's color and name. It could be a separate value, and it is, but both its name and its value suggest it is a sum.įor your information, here is a table of the hardcoded team colors. O is the output color, B is the balancing constant, P is the player color and T is the team color. O R = (B RP R + B ST R) / (15B S + 15B R) O G = (B GP G + B ST G) / (15B S + 15B G) O B = (B BP B + B ST B) / (15B S + 15B B) It appears to be built around a balancing constant, an RGB triplet which specifies how much of the player's color is used instead of the team's. ![]() In a team game the short color is combined with the team color which is another short color. The float color is simply the short color divided by 15. ![]() FIXME: is this entirely true and what is the config item? I only have old code. That has been added mainly because overflows could result in drastic deviations from the team color. How that happens exactly depends on whether a team game is being played, but in both cases colors can be clamped to 0.15 beforehand. The short color is then converted to 32-bit IEEE 754 floating-point, where 0.1 is the normal range. I call this the short color after the short data type in C. There is no benefit to choosing a color outside of that range in the configuration item. When a color is absorbed from the configuration items and stored in a player it is truncated to three 16-bit unsigned integers with range 0.65535. Players have found that they can get multi-color walls that are brighter than the cycle by manually setting COLOR_ out of that range, using the console or by editing the configuration files. Normally, when entered in the player setup menu, colors are RGB triplets in the range 0.15.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |