Move File-opening of PNG image into Png constructor (#2161)

Also rename `File::c_str` to `display_name` for clarity
This commit is contained in:
Rangi authored and GitHub committed 2026-09-27 13:19:05 -04:00
1 parent ac7d7edf4d
commit c0a16e4bad
6 files changed
+37 -22

No files matched your search

+5
View File
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <streambuf>
#include <string>
#include <vector>
#include "gfx/rgba.hpp"
@@ -17,7 +18,11 @@ struct Png {
bool isIndexed = false;
Png() {}
Png(std::string const &path);
Png(char const *filename, std::streambuf &file);
private:
void initialize(char const *filename, std::streambuf &file);
};
#endif // RGBDS_GFX_PNG_HPP