| 298 | namespace |
| 299 | { |
| 300 | std::optional<uint8_t> GetItemOffset( const std::string& item ) |
| 301 | { |
| 302 | if( item == "x" || item == "r" ) |
| 303 | { |
| 304 | return 0; |
| 305 | } |
| 306 | if( item == "y" || item == "g" ) |
| 307 | { |
| 308 | return 1; |
| 309 | } |
| 310 | if( item == "z" || item == "b" ) |
| 311 | { |
| 312 | return 2; |
| 313 | } |
| 314 | if( item == "w" || item == "a" ) |
| 315 | { |
| 316 | return 3; |
| 317 | } |
| 318 | return std::nullopt; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | void TriValueBinding::Initialize() |