mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
type-update
This commit is contained in:
parent
e7e2c16ee6
commit
3c7f46987a
32 changed files with 161 additions and 153 deletions
|
|
@ -302,7 +302,7 @@ void JObject::num(std::string key, float& dst) const {
|
|||
dst = getNum(key, dst);
|
||||
}
|
||||
|
||||
void JObject::num(std::string key, ubyte& dst) const {
|
||||
void JObject::num(std::string key, u_char8& dst) const {
|
||||
dst = getInteger(key, dst);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace json {
|
|||
void num(std::string key, uint& dst) const;
|
||||
void num(std::string key, int64_t& dst) const;
|
||||
void num(std::string key, uint64_t& dst) const;
|
||||
void num(std::string key, ubyte& dst) const;
|
||||
void num(std::string key, u_char8& dst) const;
|
||||
void num(std::string key, double& dst) const;
|
||||
JObject* obj(std::string key) const;
|
||||
JArray* arr(std::string key) const;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ using std::unique_ptr;
|
|||
#include <png.h>
|
||||
|
||||
// returns 0 if all-right, 1 otherwise
|
||||
int _png_write(const char* filename, uint width, uint height, const ubyte* data, bool alpha) {
|
||||
int _png_write(const char* filename, uint width, uint height, const u_char8* data, bool alpha) {
|
||||
png_structp png_ptr = nullptr;
|
||||
png_infop info_ptr = nullptr;
|
||||
uint pixsize = alpha ? 4 : 3;
|
||||
|
|
@ -365,5 +365,5 @@ Texture* png::load_texture(std::string filename) {
|
|||
}
|
||||
|
||||
void png::write_image(std::string filename, const ImageData* image) {
|
||||
_png_write(filename.c_str(), image->getWidth(), image->getHeight(), (const ubyte*)image->getData(), image->getFormat() == ImageFormat::rgba8888);
|
||||
_png_write(filename.c_str(), image->getWidth(), image->getHeight(), (const u_char8*)image->getData(), image->getFormat() == ImageFormat::rgba8888);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue