mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
voxel long
This commit is contained in:
parent
3542a00445
commit
0175a8b76c
54 changed files with 615 additions and 593 deletions
|
|
@ -302,7 +302,7 @@ void JObject::num(std::string key, float& dst) const {
|
|||
dst = getNum(key, dst);
|
||||
}
|
||||
|
||||
void JObject::num(std::string key, u_char8& dst) const {
|
||||
void JObject::num(std::string key, u_char& 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, u_char8& dst) const;
|
||||
void num(std::string key, u_char& dst) const;
|
||||
void num(std::string key, double& dst) const;
|
||||
JObject* obj(std::string key) const;
|
||||
JArray* arr(std::string key) const;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include <png.h>
|
||||
|
||||
// returns 0 if all-right, 1 otherwise
|
||||
int _png_write(const char* filename, u_int width, u_int height, const u_char8* data, bool alpha) {
|
||||
int _png_write(const char* filename, u_int width, u_int height, const u_char* data, bool alpha) {
|
||||
u_int pixsize = alpha ? 4 : 3;
|
||||
|
||||
// Open file for writing (binary mode)
|
||||
|
|
@ -355,5 +355,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 u_char8*)image->getData(), image->getFormat() == ImageFormat::rgba8888);
|
||||
_png_write(filename.c_str(), image->getWidth(), image->getHeight(), (const u_char*)image->getData(), image->getFormat() == ImageFormat::rgba8888);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue