Assert.hpp
Some checks failed
Build Dusk / build-linux (push) Failing after 1m11s
Build Dusk / build-psp (push) Failing after 1m20s

This commit is contained in:
2025-12-23 20:21:05 +10:00
parent bfdc0e8462
commit 5b95669482
44 changed files with 43 additions and 53 deletions

View File

@@ -6,7 +6,7 @@
*/
#include "TimeManager.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
#if TIME_SDL2
#include <SDL2/SDL.h>

View File

@@ -5,7 +5,7 @@
* https://opensource.org/licenses/MIT
*/
#include "assert.hpp"
#include "Assert.hpp"
#include "debug/debug.hpp"
#ifndef ASSERTIONS_FAKED

View File

@@ -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

View File

@@ -6,5 +6,5 @@
# Sources
target_sources(${DUSK_TARGET_NAME}
PRIVATE
assert.cpp
Assert.cpp
)

View File

@@ -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"

View File

@@ -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) {

View File

@@ -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)

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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");

View File

@@ -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"

View File

@@ -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};

View File

@@ -7,7 +7,7 @@
#include "mesh.hpp"
#include "util/memory.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
void meshInit(
mesh_t *mesh,

View File

@@ -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] = {

View File

@@ -6,7 +6,7 @@
*/
#include "screen.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
#include "util/memory.hpp"
#include "display/mesh/quad.hpp"

View File

@@ -6,7 +6,7 @@
*/
#include "spritebatch.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
#include "util/memory.hpp"
spritebatch_t SPRITEBATCH;

View File

@@ -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"

View File

@@ -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"

View File

@@ -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) {

View File

@@ -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[] = {

View File

@@ -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;

View File

@@ -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"

View File

@@ -6,7 +6,7 @@
*/
#include "entitydir.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
entitydir_t entityDirGetOpposite(const entitydir_t dir) {
switch(dir) {

View File

@@ -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"

View File

@@ -6,7 +6,7 @@
*/
#include "entity.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
#include "rpg/rpgcamera.hpp"
#include "Engine.hpp"

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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"

View File

@@ -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;

View File

@@ -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"

View File

@@ -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"

View File

@@ -7,7 +7,7 @@
#pragma once
#include "script/scriptcontext.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"

View File

@@ -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");

View File

@@ -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");

View File

@@ -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"

View File

@@ -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"

View File

@@ -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.");

View File

@@ -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"

View File

@@ -7,7 +7,7 @@
#include "uiframe.hpp"
#include "display/spritebatch.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
#include <math.h>
void uiFrameDraw(

View File

@@ -6,7 +6,7 @@
// */
#include "uitext.hpp"
#include "assert/assert.hpp"
#include "assert/Assert.hpp"
#include "util/memory.hpp"
#include "display/spritebatch.hpp"

View File

@@ -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.");

View File

@@ -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) {