diff options
| author | Mel <einebeere@gmail.com> | 2023-07-08 03:25:44 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-08 03:25:44 +0200 |
| commit | fe2baedc760c2f29e2c720f6b1132a2de33c5430 (patch) | |
| tree | dfbe1c72a17805a3cab6e0d47433e9021890c9ca /src/GFX/Image/PPMParser.hpp | |
| parent | 41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 (diff) | |
| download | meowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.tar.zst meowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.zip | |
Use own size types
Diffstat (limited to 'src/GFX/Image/PPMParser.hpp')
| -rw-r--r-- | src/GFX/Image/PPMParser.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/GFX/Image/PPMParser.hpp b/src/GFX/Image/PPMParser.hpp index a7e9b41..77f1cec 100644 --- a/src/GFX/Image/PPMParser.hpp +++ b/src/GFX/Image/PPMParser.hpp @@ -1,6 +1,6 @@ #pragma once -#include <cstdint> +#include "../../Common/Sizes.hpp" #include <string_view> #include "RawImage.hpp" @@ -20,27 +20,27 @@ private: struct PPMHeader { PPMType type; - uint32_t width; - uint32_t height; - uint8_t max_color; + U32 width; + U32 height; + U8 max_color; }; PPMHeader parse_header(); - RawImage::Pixel parse_pixel(uint8_t max_color); - uint64_t parse_sample(); + RawImage::Pixel parse_pixel(U8 max_color); + U64 parse_sample(); - uint64_t chomp_number(); + U64 chomp_number(); std::string_view chomp_part(); void skip_whitespace(); void skip_comment(); - bool is_eof() const; + Bool is_eof() const; static constexpr RawImage::Pixel alpha_color{192, 0, 255}; std::string_view m_source; - uint64_t m_cursor = 0; + U64 m_cursor = 0; }; } |
