mirror of
https://github.com/NoelFB/blah.git
synced 2025-07-18 19:41:52 +08:00
large organizational & cleanup refactor
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
#include <blah/images/aseprite.h>
|
||||
#include <blah/streams/filestream.h>
|
||||
#include <blah/core/filesystem.h>
|
||||
#include <blah/core/common.h>
|
||||
#include <blah/math/calc.h>
|
||||
#include <blah/filesystem.h>
|
||||
#include <blah/common.h>
|
||||
#include <blah/numerics/calc.h>
|
||||
|
||||
#define STBI_NO_STDIO
|
||||
#define STBI_ONLY_ZLIB
|
||||
@ -81,7 +81,7 @@ void Aseprite::parse(Stream& stream)
|
||||
{
|
||||
if (!stream.is_readable())
|
||||
{
|
||||
BLAH_ERROR("Stream is not readable");
|
||||
BLAH_ASSERT(false, "Stream is not readable");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ void Aseprite::parse(Stream& stream)
|
||||
auto magic = stream.read<u16>(Endian::Little);
|
||||
if (magic != 0xA5E0)
|
||||
{
|
||||
BLAH_ERROR("File is not a valid Aseprite file");
|
||||
BLAH_ASSERT(false, "File is not a valid Aseprite file");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ void Aseprite::parse(Stream& stream)
|
||||
auto magic = stream.read<u16>(Endian::Little); // magic number
|
||||
if (magic != 0xF1FA)
|
||||
{
|
||||
BLAH_ERROR("File is not a valid Aseprite file");
|
||||
BLAH_ASSERT(false, "File is not a valid Aseprite file");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ void Aseprite::parse_cel(Stream& stream, int frameIndex, size_t maxPosition)
|
||||
|
||||
if (res < 0)
|
||||
{
|
||||
BLAH_ERROR("Unable to parse Aseprite file");
|
||||
BLAH_ASSERT(false, "Unable to parse Aseprite file");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -460,6 +460,6 @@ void Aseprite::render_cel(Cel* cel, Frame* frame)
|
||||
}
|
||||
else
|
||||
{
|
||||
BLAH_ERROR("Aseprite blendmodes aren't implemented");
|
||||
BLAH_ASSERT(false, "Aseprite blendmodes aren't implemented");
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <blah/images/font.h>
|
||||
#include <blah/streams/filestream.h>
|
||||
#include <blah/math/calc.h>
|
||||
#include <blah/core/common.h>
|
||||
#include <blah/numerics/calc.h>
|
||||
#include <blah/common.h>
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
@ -111,7 +111,7 @@ void Font::load(Stream& stream)
|
||||
|
||||
if (!stream.is_readable())
|
||||
{
|
||||
BLAH_ERROR("Unable to load a font as the Stream was not readable");
|
||||
BLAH_ASSERT(false, "Unable to load a font as the Stream was not readable");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <blah/images/image.h>
|
||||
#include <blah/streams/stream.h>
|
||||
#include <blah/streams/filestream.h>
|
||||
#include <blah/core/common.h>
|
||||
#include <blah/common.h>
|
||||
|
||||
using namespace Blah;
|
||||
|
||||
@ -148,7 +148,7 @@ void Image::from_stream(Stream& stream)
|
||||
|
||||
if (!stream.is_readable())
|
||||
{
|
||||
BLAH_ERROR("Unable to load image as the Stream was not readable");
|
||||
BLAH_ASSERT(false, "Unable to load image as the Stream was not readable");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ void Image::from_stream(Stream& stream)
|
||||
|
||||
if (data == nullptr)
|
||||
{
|
||||
BLAH_ERROR("Unable to load image as the Stream's data was not a valid image");
|
||||
BLAH_ASSERT(false, "Unable to load image as the Stream's data was not a valid image");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <blah/images/packer.h>
|
||||
#include <blah/core/common.h>
|
||||
#include <blah/common.h>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
@ -169,7 +169,7 @@ void Packer::pack()
|
||||
// make sure the largest isn't too large
|
||||
if (sources[0]->packed.w + padding * 2 > max_size || sources[0]->packed.h + padding * 2 > max_size)
|
||||
{
|
||||
BLAH_ERROR("Source image is larger than max atlas size");
|
||||
BLAH_ASSERT(false, "Source image is larger than max atlas size");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user