Assert.hpp
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "TimeManager.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
#if TIME_SDL2
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "assert.hpp"
|
||||
#include "Assert.hpp"
|
||||
#include "debug/debug.hpp"
|
||||
|
||||
#ifndef ASSERTIONS_FAKED
|
||||
@@ -96,15 +96,6 @@
|
||||
const char *message
|
||||
);
|
||||
|
||||
void assertMemoryRangeMatchesImpl(
|
||||
const char *file,
|
||||
const int32_t line,
|
||||
const void *start,
|
||||
const void *end,
|
||||
const size_t size,
|
||||
const char *message
|
||||
);
|
||||
|
||||
#define assertTrue(x, message) \
|
||||
assertTrueImpl(__FILE__, __LINE__, x, message)
|
||||
|
||||
@@ -139,5 +130,4 @@
|
||||
#define assertDeprecated(message) ((void)0)
|
||||
#define assertStrLenMax(str, len, message) ((void)0)
|
||||
#define assertStrLenMin(str, len, message) ((void)0)
|
||||
|
||||
#endif
|
||||
@@ -6,5 +6,5 @@
|
||||
# Sources
|
||||
target_sources(${DUSK_TARGET_NAME}
|
||||
PRIVATE
|
||||
assert.cpp
|
||||
Assert.cpp
|
||||
)
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "asset.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "util/string.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "asset/assettype.h"
|
||||
#include "Engine.hpp"
|
||||
#include "debug/debug.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "assetalphaimage.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "display/texture.hpp"
|
||||
|
||||
void assetAlphaImageLoad(void *data, void *output) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "asset/asset.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "rpg/entity/entity.hpp"
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "asset/asset.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "locale/localemanager.hpp"
|
||||
|
||||
void assetLanguageHandler(assetcustom_t custom) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "asset/asset.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
|
||||
void assetMapLoad(void *data, void *output) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "assetpaletteimage.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "display/texture.hpp"
|
||||
|
||||
void assetPaletteImageLoad(void *data, void *output) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "asset/asset.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
void assetScriptHandler(assetcustom_t custom) {
|
||||
assertNotNull(custom.zipFile, "Custom asset zip file cannot be NULL");
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "camera.hpp"
|
||||
#include "display/display.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "display/framebuffer.hpp"
|
||||
#include "display/screen.hpp"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "framebuffer.hpp"
|
||||
#include "display/display.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
|
||||
framebuffer_t FRAMEBUFFER_BACKBUFFER = {0};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "mesh.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
void meshInit(
|
||||
mesh_t *mesh,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "quad.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
mesh_t QUAD_MESH_SIMPLE;
|
||||
meshvertex_t QUAD_MESH_SIMPLE_VERTICES[QUAD_VERTEX_COUNT] = {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "screen.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "display/mesh/quad.hpp"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "spritebatch.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
|
||||
spritebatch_t SPRITEBATCH;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "texture.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "util/math.hpp"
|
||||
#include "display/palette/palettelist.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "InputManager.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "util/string.hpp"
|
||||
#include "util/math.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "inputaction.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/string.hpp"
|
||||
|
||||
// inputaction_t inputActionGetByName(const char_t *name) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "inputbutton.hpp"
|
||||
#include "InputManager.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/string.hpp"
|
||||
|
||||
inputbuttondata_t INPUT_BUTTON_DATA[] = {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "localemanager.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "asset/asset.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
localemanager_t LOCALE;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "entity.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "util/math.hpp"
|
||||
#include "rpg/cutscene/cutscenemode.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "entitydir.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
entitydir_t entityDirGetOpposite(const entitydir_t dir) {
|
||||
switch(dir) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "entity.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
#include "rpg/cutscene/scene/testcutscene.hpp"
|
||||
#include "rpg/rpgtextbox.hpp"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "entity.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "rpg/rpgcamera.hpp"
|
||||
#include "Engine.hpp"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "rpgcamera.hpp"
|
||||
#include "rpgtextbox.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "Engine.hpp"
|
||||
|
||||
using namespace Dusk;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "util/memory.hpp"
|
||||
#include "rpg/entity/entity.hpp"
|
||||
#include "rpg/world/map.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
rpgcamera_t RPG_CAMERA;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "rpgtextbox.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "util/string.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
rpgtextbox_t RPG_TEXTBOX;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "map.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "asset/asset.hpp"
|
||||
#include "rpg/entity/entity.hpp"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "worldpos.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
bool_t worldPosIsEqual(const worldpos_t a, const worldpos_t b) {
|
||||
return a.x == b.x && a.y == b.y && a.z == b.z;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "scenemap.hpp"
|
||||
#include "scene/scenedata.hpp"
|
||||
#include "display/spritebatch.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "asset/asset.hpp"
|
||||
#include "rpg/entity/entity.hpp"
|
||||
#include "rpg/world/map.hpp"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "scenemanager.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "display/framebuffer.hpp"
|
||||
#include "util/string.hpp"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "script/scriptcontext.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "script/scriptcontext.hpp"
|
||||
#include "rpg/entity/entity.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
int32_t scriptFuncEntityAdd(lua_State *L) {
|
||||
assertNotNull(L, "Lua state cannot be NULL");
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "script/scriptcontext.hpp"
|
||||
#include "debug/debug.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
int32_t scriptContextPrint(lua_State *L) {
|
||||
assertNotNull(L, "Lua state cannot be NULL");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "scriptcontext.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "asset/asset.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "debug/debug.hpp"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "scriptmanager.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "debug/debug.hpp"
|
||||
#include "asset/asset.hpp"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "thread.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
void threadInit(thread_t *thread, const threadcallback_t callback) {
|
||||
assertNotNull(thread, "Thread cannot be NULL.");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "ui/uidebug.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "display/tileset/tileset_minogram.hpp"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "uiframe.hpp"
|
||||
#include "display/spritebatch.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include <math.h>
|
||||
|
||||
void uiFrameDraw(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// */
|
||||
|
||||
#include "uitext.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
#include "display/spritebatch.hpp"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "memory.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
|
||||
void * memoryAllocate(const size_t size) {
|
||||
assertTrue(size > 0, "Cannot allocate 0 bytes of memory.");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "string.hpp"
|
||||
#include "assert/assert.hpp"
|
||||
#include "assert/Assert.hpp"
|
||||
#include "util/memory.hpp"
|
||||
|
||||
bool_t stringIsWhitespace(const char_t c) {
|
||||
|
||||
Reference in New Issue
Block a user