summary refs log tree commit diff
path: root/src/GFX/Image/RawImage.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-08 03:25:44 +0200
committerMel <einebeere@gmail.com>2023-07-08 03:25:44 +0200
commitfe2baedc760c2f29e2c720f6b1132a2de33c5430 (patch)
treedfbe1c72a17805a3cab6e0d47433e9021890c9ca /src/GFX/Image/RawImage.hpp
parent41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 (diff)
downloadmeowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.tar.zst
meowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.zip
Use own size types
Diffstat (limited to 'src/GFX/Image/RawImage.hpp')
-rw-r--r--src/GFX/Image/RawImage.hpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/GFX/Image/RawImage.hpp b/src/GFX/Image/RawImage.hpp
index 809ddd9..5a95dad 100644
--- a/src/GFX/Image/RawImage.hpp
+++ b/src/GFX/Image/RawImage.hpp
@@ -1,7 +1,6 @@
 #pragma once
 
-#include <cstdint>
-#include <cstddef>
+#include "../../Common/Sizes.hpp"
 #include <string>
 #include <vector>
 
@@ -11,26 +10,26 @@ class RawImage {
 public:
     RawImage() : m_width(0), m_height(0) {}
 
-    RawImage(uint32_t width, uint32_t height) : m_width(width), m_height(height) {
+    RawImage(U32 width, U32 height) : m_width(width), m_height(height) {
         m_pixels.reserve(width * height);
     }
 
     struct Pixel {
-        uint8_t r, g, b, a;
+        U8 r, g, b, a;
     };
 
     void add(Pixel pixel);
 
-    size_t size() const;
-    uint8_t* raw() const;
+    USize size() const;
+    U8* raw() const;
 
-    uint32_t width() const;
-    uint32_t height() const;
+    U32 width() const;
+    U32 height() const;
 
     std::string string() const;
 private:
     std::vector<Pixel> m_pixels;
-    uint32_t m_width, m_height;
+    U32 m_width, m_height;
 };
 
 }