Definition at line 127 of file tile2x2.cpp.hpp.
127 {
129
130
134 }
138 }
139
140
142
143
144 for (u16
x = 0;
x < 2; ++
x) {
145 for (u16
y = 0;
y < 2; ++
y) {
146 const auto& data_a = a.at(
x,
y);
147 const auto& data_b = b.at(
x,
y);
148
149
150
151 vec2<u16>
pos = data_a.first;
152
153
154 u8 alpha_a = data_a.second;
155 u8 alpha_b = data_b.second;
156
157
158 float alpha_float = alpha_a +
t * (alpha_b - alpha_a);
159 u8 interpolated_alpha =
static_cast<u8>(alpha_float + 0.5f);
160
161 interpolated.mData[
y][
x] = {
pos, interpolated_alpha};
162 }
163 }
164
165 result.push_back(interpolated);
167}
Tile2x2_u8_wrap() FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
FixedVector< T, INLINED_SIZE > vector_fixed
References Tile2x2_u8_wrap(), at(), mData, pos, fl::t, fl::x, and fl::y.