common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the Common namespace.
This commit is contained in:
parent
db58652680
commit
643472e24a
40 changed files with 309 additions and 301 deletions
|
@ -29,7 +29,7 @@ QImage LoadTexture(const u8* src, const Pica::Texture::TextureInfo& info) {
|
|||
QImage decoded_image(info.width, info.height, QImage::Format_ARGB32);
|
||||
for (u32 y = 0; y < info.height; ++y) {
|
||||
for (u32 x = 0; x < info.width; ++x) {
|
||||
Math::Vec4<u8> color = Pica::Texture::LookupTexture(src, x, y, info, true);
|
||||
Common::Vec4<u8> color = Pica::Texture::LookupTexture(src, x, y, info, true);
|
||||
decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -585,7 +585,7 @@ void GraphicsSurfaceWidget::OnUpdate() {
|
|||
|
||||
for (unsigned int y = 0; y < surface_height; ++y) {
|
||||
for (unsigned int x = 0; x < surface_width; ++x) {
|
||||
Math::Vec4<u8> color = Pica::Texture::LookupTexture(buffer, x, y, info, true);
|
||||
Common::Vec4<u8> color = Pica::Texture::LookupTexture(buffer, x, y, info, true);
|
||||
decoded_image.setPixel(x, y, qRgba(color.r(), color.g(), color.b(), color.a()));
|
||||
}
|
||||
}
|
||||
|
@ -605,7 +605,7 @@ void GraphicsSurfaceWidget::OnUpdate() {
|
|||
const u32 coarse_y = y & ~7;
|
||||
u32 offset = VideoCore::GetMortonOffset(x, y, bytes_per_pixel) + coarse_y * stride;
|
||||
const u8* pixel = buffer + offset;
|
||||
Math::Vec4<u8> color = {0, 0, 0, 0};
|
||||
Common::Vec4<u8> color = {0, 0, 0, 0};
|
||||
|
||||
switch (surface_format) {
|
||||
case Format::D16: {
|
||||
|
@ -622,14 +622,14 @@ void GraphicsSurfaceWidget::OnUpdate() {
|
|||
break;
|
||||
}
|
||||
case Format::D24X8: {
|
||||
Math::Vec2<u32> data = Color::DecodeD24S8(pixel);
|
||||
Common::Vec2<u32> data = Color::DecodeD24S8(pixel);
|
||||
color.r() = data.x & 0xFF;
|
||||
color.g() = (data.x >> 8) & 0xFF;
|
||||
color.b() = (data.x >> 16) & 0xFF;
|
||||
break;
|
||||
}
|
||||
case Format::X24S8: {
|
||||
Math::Vec2<u32> data = Color::DecodeD24S8(pixel);
|
||||
Common::Vec2<u32> data = Color::DecodeD24S8(pixel);
|
||||
color.r() = color.g() = color.b() = data.y;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue