diff --git a/src/dusk/animation/animation.c b/src/dusk/animation/animation.c index 65fa2b20..179fbe0f 100644 --- a/src/dusk/animation/animation.c +++ b/src/dusk/animation/animation.c @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #include "animation.h" #include "assert/assert.h" @@ -14,9 +16,9 @@ void animationInit( uint16_t *keyframeCounts, const uint16_t layerCount ) { - assertNotNull(anim, "Animation pointer cannot be null."); - assertNotNull(keyframes, "Keyframes pointer cannot be null."); - assertNotNull(keyframeCounts, "Keyframe counts pointer cannot be null."); + assertNotNull(anim, "Animation pointer cannot be NULL."); + assertNotNull(keyframes, "Keyframes pointer cannot be NULL."); + assertNotNull(keyframeCounts, "Keyframe counts pointer cannot be NULL."); assertTrue(layerCount > 0, "Layer count must be greater than zero."); memoryZero(anim, sizeof(animation_t)); @@ -49,7 +51,7 @@ void animationInit( } float_t animationGetLayerValue(const animation_t *anim, const uint16_t layer) { - assertNotNull(anim, "Animation pointer cannot be null."); + assertNotNull(anim, "Animation pointer cannot be NULL."); assertTrue(layer < anim->layerCount, "Layer index out of bounds."); uint16_t keyframeCount = anim->keyframeCounts[layer]; @@ -61,7 +63,7 @@ void animationUpdate( animation_t *anim, const float_t deltaTime ) { - assertNotNull(anim, "Animation pointer cannot be null."); + assertNotNull(anim, "Animation pointer cannot be NULL."); assertTrue(deltaTime >= 0, "Delta time must be non-negative."); bool_t justCompleted = false; diff --git a/src/dusk/animation/animation.h b/src/dusk/animation/animation.h index f8cea8b8..8891deb9 100644 --- a/src/dusk/animation/animation.h +++ b/src/dusk/animation/animation.h @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #pragma once #include "keyframe.h" diff --git a/src/dusk/animation/easing.c b/src/dusk/animation/easing.c index 19cbf12a..dd7b246d 100644 --- a/src/dusk/animation/easing.c +++ b/src/dusk/animation/easing.c @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #include "easing.h" #include "assert/assert.h" diff --git a/src/dusk/animation/easing.h b/src/dusk/animation/easing.h index 117988b5..dd1f7c3e 100644 --- a/src/dusk/animation/easing.h +++ b/src/dusk/animation/easing.h @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #pragma once #include "dusk.h" @@ -45,19 +47,136 @@ extern const easingfn_t EASING_FUNCTIONS[EASING_COUNT]; */ float_t easingApply(const easingtype_t type, const float_t t); +/** + * No easing - returns t unchanged. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, equal to t. + */ float_t easingLinear(const float_t t); + +/** + * Sinusoidal easing in: starts slow, accelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInSine(const float_t t); + +/** + * Sinusoidal easing out: starts fast, decelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingOutSine(const float_t t); + +/** + * Sinusoidal easing in and out: slow at both ends, fastest in + * the middle. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInOutSine(const float_t t); + +/** + * Quadratic easing in: starts slow, accelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInQuad(const float_t t); + +/** + * Quadratic easing out: starts fast, decelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingOutQuad(const float_t t); + +/** + * Quadratic easing in and out: slow at both ends, fastest in the + * middle. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInOutQuad(const float_t t); + +/** + * Cubic easing in: starts slow, accelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInCubic(const float_t t); + +/** + * Cubic easing out: starts fast, decelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingOutCubic(const float_t t); + +/** + * Cubic easing in and out: slow at both ends, fastest in the + * middle. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInOutCubic(const float_t t); + +/** + * Quartic easing in: starts slow, accelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInQuart(const float_t t); + +/** + * Quartic easing out: starts fast, decelerates to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingOutQuart(const float_t t); + +/** + * Quartic easing in and out: slow at both ends, fastest in the + * middle. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, in the range [0, 1]. + */ float_t easingInOutQuart(const float_t t); + +/** + * Back easing in: overshoots backwards before moving to the end. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, which may fall below 0. + */ float_t easingInBack(const float_t t); + +/** + * Back easing out: overshoots past the end before settling on it. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, which may rise above 1. + */ float_t easingOutBack(const float_t t); + +/** + * Back easing in and out: overshoots backwards at the start and + * past the end before settling on it. + * + * @param t The input time, in the range [0, 1]. + * @return The eased value, which may fall below 0 or rise above 1. + */ float_t easingInOutBack(const float_t t); + diff --git a/src/dusk/animation/keyframe.c b/src/dusk/animation/keyframe.c index a50338ef..82f7f56b 100644 --- a/src/dusk/animation/keyframe.c +++ b/src/dusk/animation/keyframe.c @@ -14,7 +14,7 @@ float_t keyframeGetValue( const uint32_t keyframeCount, const float_t time ) { - assertNotNull(keyframes, "Keyframes pointer cannot be null."); + assertNotNull(keyframes, "Keyframes pointer cannot be NULL."); assertTrue(keyframeCount > 0, "Keyframe count must be more than 0."); assertTrue(time >= 0, "Time must be non-negative."); #ifdef DUSK_ASSERTIONS diff --git a/src/dusk/animation/keyframe.h b/src/dusk/animation/keyframe.h index 96a0a4f6..d7ac504c 100644 --- a/src/dusk/animation/keyframe.h +++ b/src/dusk/animation/keyframe.h @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #pragma once #include "easing.h" diff --git a/src/dusk/asset/asset.c b/src/dusk/asset/asset.c index e8bd0a06..313db683 100644 --- a/src/dusk/asset/asset.c +++ b/src/dusk/asset/asset.c @@ -28,8 +28,8 @@ errorret_t assetInit(void) { // assetInitPlatform must either define both ASSET.zip/ASSET.zipStored or // throw an error. errorChain(assetInitPlatform()); - assertNotNull(ASSET.zip, "Asset zip null without error."); - assertNotNull(ASSET.zipStored, "Asset stored zip null without error."); + assertNotNull(ASSET.zip, "Asset zip NULL without error."); + assertNotNull(ASSET.zipStored, "Asset stored zip NULL without error."); threadInit(&ASSET.loadThread, assetUpdateAsync); threadStart(&ASSET.loadThread); diff --git a/src/dusk/asset/assetfile.c b/src/dusk/asset/assetfile.c index 06aaaa7f..589bd7ba 100644 --- a/src/dusk/asset/assetfile.c +++ b/src/dusk/asset/assetfile.c @@ -279,7 +279,7 @@ errorret_t assetFileLineReaderAppend( errorOk(); } - /* reserve room for optional NUL terminator */ + // reserve room for optional NUL terminator if(reader->lineLength + srcLength >= reader->outBufferSize) { errorThrow("Line length exceeds output buffer size."); } @@ -328,7 +328,7 @@ errorret_t assetFileLineReaderFill(assetfilelinereader_t *reader) { size_t unreadBytes = assetFileLineReaderUnreadBytes(reader); - /* If buffer is fully consumed, refill from start. */ + // If buffer is fully consumed, refill from start. if(unreadBytes == 0) { reader->bufferStart = 0; reader->bufferEnd = 0; @@ -349,18 +349,14 @@ errorret_t assetFileLineReaderFill(assetfilelinereader_t *reader) { errorOk(); } - /* - * There are unread bytes left but no newline in them. - * If bufferStart > 0, slide unread bytes to front so we can read more. - * This only happens when necessary to make space. - */ + // There are unread bytes left but no newline in them. + // If bufferStart > 0, slide unread bytes to front so we can read more. + // This only happens when necessary to make space. if(reader->bufferEnd == reader->readBufferSize) { if(reader->bufferStart == 0) { - /* - * Entire read buffer is unread and contains no newline. - * Caller must have a large enough outBuffer to accumulate across fills, - * so we consume these bytes into outBuffer before refilling. - */ + // Entire read buffer is unread and contains no newline. + // Caller must have a large enough outBuffer to accumulate across fills, + // so we consume these bytes into outBuffer before refilling. errorOk(); } @@ -403,7 +399,7 @@ errorret_t assetFileLineReaderNext(assetfilelinereader_t *reader) { size_t chunkLength = (size_t)newlineIndex - reader->bufferStart; errorret_t ret; - /* strip CR in CRLF */ + // strip CR in CRLF if( chunkLength > 0 && reader->readBuffer[(size_t)newlineIndex - 1] == '\r' diff --git a/src/dusk/asset/loader/dmf/assetmodelloader.c b/src/dusk/asset/loader/dmf/assetmodelloader.c index 64bdd826..2687af22 100644 --- a/src/dusk/asset/loader/dmf/assetmodelloader.c +++ b/src/dusk/asset/loader/dmf/assetmodelloader.c @@ -62,7 +62,7 @@ errorret_t assetModelLoaderSync(assetloading_t *loading) { // Parse required mesh path. yyjson_val *meshVal = yyjson_obj_get(root, "mesh"); - if(!meshVal || !yyjson_is_str(meshVal)) { + if(meshVal == NULL || !yyjson_is_str(meshVal)) { assetUnlockEntry(jsonEntry); loading->entry->state = ASSET_ENTRY_STATE_ERROR; errorThrow("Model JSON missing 'mesh' string"); diff --git a/src/dusk/asset/loader/dmf/assetmodelloader.h b/src/dusk/asset/loader/dmf/assetmodelloader.h index 555407c6..0b2cfdc4 100644 --- a/src/dusk/asset/loader/dmf/assetmodelloader.h +++ b/src/dusk/asset/loader/dmf/assetmodelloader.h @@ -32,7 +32,7 @@ typedef struct { * on the main thread; this callback is never reached. * * @param loading Loading information for the asset being loaded. - * @returns Always success. + * @return Always success. */ errorret_t assetModelLoaderAsync(assetloading_t *loading); @@ -44,7 +44,7 @@ errorret_t assetModelLoaderAsync(assetloading_t *loading); * within ASSET_LOADING_COUNT_MAX slot limits. * * @param loading Loading information for the asset being loaded. - * @returns Error code indicating success or failure. + * @return Error code indicating success or failure. */ errorret_t assetModelLoaderSync(assetloading_t *loading); @@ -53,6 +53,6 @@ errorret_t assetModelLoaderSync(assetloading_t *loading); * sub-asset entries. * * @param entry Asset entry containing the model to dispose. - * @returns Error code indicating success or failure. + * @return Error code indicating success or failure. */ errorret_t assetModelDispose(assetentry_t *entry); diff --git a/src/dusk/asset/loader/json/assetjsonloader.c b/src/dusk/asset/loader/json/assetjsonloader.c index c8505cca..eea18425 100644 --- a/src/dusk/asset/loader/json/assetjsonloader.c +++ b/src/dusk/asset/loader/json/assetjsonloader.c @@ -77,7 +77,7 @@ errorret_t assetJsonLoaderSync(assetloading_t *loading) { memoryFree(buffer); loading->loading.json.buffer = NULL; - if(!loading->entry->data.json) { + if(loading->entry->data.json == NULL) { assetLoaderErrorThrow(loading, "Failed to parse JSON"); } diff --git a/src/dusk/asset/loader/json/assetjsonloader.h b/src/dusk/asset/loader/json/assetjsonloader.h index e3c2d251..76679220 100644 --- a/src/dusk/asset/loader/json/assetjsonloader.h +++ b/src/dusk/asset/loader/json/assetjsonloader.h @@ -41,6 +41,32 @@ typedef struct { typedef yyjson_doc * assetjsonoutput_t; +/** + * Asynchronous loader callback. Opens the JSON file and reads the whole of + * it into a heap buffer, so the main thread is not blocked on I/O. The + * buffer is parsed later, on the main thread, by assetJsonLoaderSync. Sets + * the entry state to `ASSET_ENTRY_STATE_PENDING_SYNC` on success. + * + * @param loading The loading slot for this asset entry. + * @return OK on success, error otherwise. + */ errorret_t assetJsonLoaderAsync(assetloading_t *loading); + +/** + * Synchronous loader callback. Drives the load state machine: on the first + * call it queues the async read, and once that has completed it parses the + * buffer into a `yyjson_doc` (comments and trailing commas allowed), frees + * the buffer and marks the entry `ASSET_ENTRY_STATE_LOADED`. + * + * @param loading The loading slot for this asset entry. + * @return OK on success, error otherwise. + */ errorret_t assetJsonLoaderSync(assetloading_t *loading); + +/** + * Dispose callback. Frees the parsed `yyjson_doc` held by the entry. + * + * @param entry The asset entry to dispose. + * @return OK on success, error otherwise. + */ errorret_t assetJsonDispose(assetentry_t *entry); diff --git a/src/dusk/asset/loader/locale/assetlocaleloader.c b/src/dusk/asset/loader/locale/assetlocaleloader.c index 839e55b8..2f8710c2 100644 --- a/src/dusk/asset/loader/locale/assetlocaleloader.c +++ b/src/dusk/asset/loader/locale/assetlocaleloader.c @@ -93,7 +93,7 @@ errorret_t assetLocaleParseHeader( // Find "Plural-Forms: " line and parse out plural form info char_t *pluralFormsLine = strstr(headerBuffer, "Plural-Forms:"); - if(!pluralFormsLine) { + if(pluralFormsLine == NULL) { errorOk(); } @@ -101,7 +101,7 @@ errorret_t assetLocaleParseHeader( // Expect nplurals char_t *npluralsStr = strstr(pluralFormsLine, "nplurals="); - if(!npluralsStr) { + if(npluralsStr == NULL) { errorThrow("Failed to find nplurals in Plural-Forms header."); } npluralsStr += strlen("nplurals="); @@ -120,7 +120,7 @@ errorret_t assetLocaleParseHeader( // Expect plural= char_t *pluralStr = strstr(pluralFormsLine, "plural="); - if(!pluralStr) { + if(pluralStr == NULL) { errorThrow("Failed to find plural in Plural-Forms header."); } pluralStr += strlen("plural="); @@ -128,7 +128,7 @@ errorret_t assetLocaleParseHeader( // Expect ( [expressions] ) char_t *openParen = strchr(pluralStr, '('); char_t *closeParen = strrchr(pluralStr, ')'); - if(!openParen || !closeParen || closeParen < openParen) { + if(openParen == NULL || closeParen == NULL || closeParen < openParen) { errorThrow("Failed to find plural expression in Plural-Forms header."); } @@ -399,12 +399,12 @@ errorret_t assetLocaleLineUnbuffer( // At the point this funciton is called, we are looking for an opening quote. char_t *start = strchr((char_t *)lineBuffer, '"'); - if(!start) { + if(start == NULL) { errorThrow("Expected open (0) \""); } char *end = strchr(start + 1, '"'); - if(!end) { + if(end == NULL) { errorThrow("Expected close (0) \""); } *end = '\0'; @@ -690,7 +690,7 @@ errorret_t assetLocaleGetStringLookup( // Parse until ] char *end = strchr(ptr, ']'); - if(!end) { + if(end == NULL) { errorThrow("Expected ] for plural form, found: %s", lineBuffer); } *end = '\0'; @@ -854,7 +854,7 @@ errorret_t assetLocaleGetStringWithArgs( inIndex++; - /* Escaped percent */ + // Escaped percent if(format[inIndex] == '%') { if(outIndex + 1 >= bufferSize) { memoryFree(format); @@ -880,7 +880,7 @@ errorret_t assetLocaleGetStringWithArgs( specBuffer[specLength++] = '%'; - /* Allow flags / width / precision */ + // Allow flags / width / precision while(format[inIndex] != '\0') { char_t ch = format[inIndex]; diff --git a/src/dusk/display/mesh/capsule.c b/src/dusk/display/mesh/capsule.c index 23e7d877..b62ad0dc 100644 --- a/src/dusk/display/mesh/capsule.c +++ b/src/dusk/display/mesh/capsule.c @@ -55,8 +55,8 @@ void capsuleBuffer( vertices[vi].uv[1] = (v); \ vi++; - /* ---- Top hemisphere ---- */ - /* phi ranges from PI/2 (top pole) down to 0 (equator). */ + // ---- Top hemisphere ---- + // phi ranges from PI/2 (top pole) down to 0 (equator). const float_t capStep = (float_t)GLM_PI_2 / (float_t)capRings; for(int32_t i = 0; i < capRings; i++) { const float_t phi1 = (float_t)GLM_PI_2 - (float_t)i * capStep; @@ -67,8 +67,8 @@ void capsuleBuffer( const float_t lxz1 = radius * cosf(phi1); const float_t lxz2 = radius * cosf(phi2); - /* UV: top cap occupies v in [0.5 + halfHeightFrac .. 1.0]: we use a - * simple per-band normalisation against the full height. */ + // UV: top cap occupies v in [0.5 + halfHeightFrac .. 1.0]: we use a + // simple per-band normalisation against the full height. const float_t v1 = 1.0f - (float_t)i / (float_t)(2 * capRings + 1); const float_t v2 = 1.0f - (float_t)(i + 1) / (float_t)(2 * capRings + 1); @@ -97,7 +97,7 @@ void capsuleBuffer( } } - /* ---- Cylindrical body ---- */ + // ---- Cylindrical body ---- { const float_t yTop = cy + halfHeight; const float_t yBot = cy - halfHeight; diff --git a/src/dusk/display/mesh/mesh.h b/src/dusk/display/mesh/mesh.h index 2056eacf..d01eb35e 100644 --- a/src/dusk/display/mesh/mesh.h +++ b/src/dusk/display/mesh/mesh.h @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #pragma once #include "display/display.h" diff --git a/src/dusk/display/mesh/plane.c b/src/dusk/display/mesh/plane.c index df3d135c..2a1e42fe 100644 --- a/src/dusk/display/mesh/plane.c +++ b/src/dusk/display/mesh/plane.c @@ -59,7 +59,7 @@ void planeBuffer( switch(axis) { case PLANE_AXIS_XY: { - /* Flat in XY at z = min[2]; spans X and Y. */ + // Flat in XY at z = min[2]; spans X and Y. const float_t z = min[2]; PLANE_VERT(0, min[0], min[1], z, u0, v0) PLANE_VERT(1, max[0], min[1], z, u1, v0) @@ -71,7 +71,7 @@ void planeBuffer( } case PLANE_AXIS_XZ: { - /* Flat in XZ at y = min[1]; spans X and Z. */ + // Flat in XZ at y = min[1]; spans X and Z. const float_t y = min[1]; PLANE_VERT(0, min[0], y, min[2], u0, v0) PLANE_VERT(1, max[0], y, min[2], u1, v0) @@ -83,7 +83,7 @@ void planeBuffer( } case PLANE_AXIS_YZ: { - /* Flat in YZ at x = min[0]; spans Y and Z. */ + // Flat in YZ at x = min[0]; spans Y and Z. const float_t x = min[0]; PLANE_VERT(0, x, min[1], min[2], u0, v0) PLANE_VERT(1, x, max[1], min[2], u1, v0) diff --git a/src/dusk/display/mesh/sphere.c b/src/dusk/display/mesh/sphere.c index f794ced1..c50642cb 100644 --- a/src/dusk/display/mesh/sphere.c +++ b/src/dusk/display/mesh/sphere.c @@ -44,7 +44,7 @@ void sphereBuffer( int32_t vi = 0; for(int32_t i = 0; i < stacks; i++) { - /* Latitude angles: top of band -> bottom of band */ + // Latitude angles: top of band -> bottom of band const float_t phi1 = (float_t)GLM_PI_2 - (float_t)i * stackStep; const float_t phi2 = (float_t)GLM_PI_2 - (float_t)(i + 1) * stackStep; diff --git a/src/dusk/display/mesh/triprism.c b/src/dusk/display/mesh/triprism.c index 79f9b8f1..b9e6687d 100644 --- a/src/dusk/display/mesh/triprism.c +++ b/src/dusk/display/mesh/triprism.c @@ -47,17 +47,17 @@ void triPrismBuffer( vertices[vi].uv[1] = (v); \ vi++; - /* --- Front face (z = maxZ), CCW from +Z --- */ + // --- Front face (z = maxZ), CCW from +Z --- PRISM_VERT(x0, y0, maxZ, 0.0f, 0.0f) PRISM_VERT(x1, y1, maxZ, 1.0f, 0.0f) PRISM_VERT(x2, y2, maxZ, 0.5f, 1.0f) - /* --- Back face (z = minZ), CCW from -Z (reverse winding) --- */ + // --- Back face (z = minZ), CCW from -Z (reverse winding) --- PRISM_VERT(x2, y2, minZ, 0.5f, 1.0f) PRISM_VERT(x1, y1, minZ, 1.0f, 0.0f) PRISM_VERT(x0, y0, minZ, 0.0f, 0.0f) - /* --- Side face 0: edge p0->p1 --- */ + // --- Side face 0: edge p0->p1 --- PRISM_VERT(x0, y0, minZ, 0.0f, 0.0f) PRISM_VERT(x1, y1, minZ, 1.0f, 0.0f) PRISM_VERT(x1, y1, maxZ, 1.0f, 1.0f) @@ -66,7 +66,7 @@ void triPrismBuffer( PRISM_VERT(x1, y1, maxZ, 1.0f, 1.0f) PRISM_VERT(x0, y0, maxZ, 0.0f, 1.0f) - /* --- Side face 1: edge p1->p2 --- */ + // --- Side face 1: edge p1->p2 --- PRISM_VERT(x1, y1, minZ, 0.0f, 0.0f) PRISM_VERT(x2, y2, minZ, 1.0f, 0.0f) PRISM_VERT(x2, y2, maxZ, 1.0f, 1.0f) @@ -75,7 +75,7 @@ void triPrismBuffer( PRISM_VERT(x2, y2, maxZ, 1.0f, 1.0f) PRISM_VERT(x1, y1, maxZ, 0.0f, 1.0f) - /* --- Side face 2: edge p2->p0 --- */ + // --- Side face 2: edge p2->p0 --- PRISM_VERT(x2, y2, minZ, 0.0f, 0.0f) PRISM_VERT(x0, y0, minZ, 1.0f, 0.0f) PRISM_VERT(x0, y0, maxZ, 1.0f, 1.0f) diff --git a/src/dusk/display/shader/shader.c b/src/dusk/display/shader/shader.c index 92c6fb09..bf6a109b 100644 --- a/src/dusk/display/shader/shader.c +++ b/src/dusk/display/shader/shader.c @@ -13,14 +13,14 @@ shader_t *bound = NULL; errorret_t shaderInit(shader_t *shader, const shaderdefinition_t *def) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); errorChain(shaderInitPlatform(shader, def)); bound = NULL; errorOk(); } errorret_t shaderBind(shader_t *shader) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); errorChain(shaderBindPlatform(shader)); bound = shader; errorOk(); @@ -31,9 +31,9 @@ errorret_t shaderSetMatrix( const char_t *name, mat4 matrix ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); - assertNotNull(matrix, "Matrix cannot be null"); + assertNotNull(matrix, "Matrix cannot be NULL"); assertTrue(bound == shader, "Shader must be bound."); errorChain(shaderSetMatrixPlatform(shader, name, matrix)); errorOk(); @@ -44,7 +44,7 @@ errorret_t shaderSetTexture( const char_t *name, texture_t *texture ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); assertTrue(bound == shader, "Shader must be bound."); errorChain(shaderSetTexturePlatform(shader, name, texture)); @@ -56,7 +56,7 @@ errorret_t shaderSetColor( const char_t *name, color_t color ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); assertTrue(bound == shader, "Shader must be bound."); errorChain(shaderSetColorPlatform(shader, name, color)); @@ -67,16 +67,16 @@ errorret_t shaderSetMaterial( shader_t *shader, const shadermaterial_t *material ) { - assertNotNull(shader, "Shader cannot be null"); - assertNotNull(material, "Material cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); + assertNotNull(material, "Material cannot be NULL"); assertTrue(bound == shader, "Shader must be bound."); - assertNotNull(shader->definition, "Shader definition cannot be null"); + assertNotNull(shader->definition, "Shader definition cannot be NULL"); assertNotNull(shader->definition->setMaterial, "Def lacks setMaterial"); return shader->definition->setMaterial(shader, material); } errorret_t shaderDispose(shader_t *shader) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); bound = NULL; errorChain(shaderDisposePlatform(shader)); errorOk(); diff --git a/src/dusk/display/shader/shaderlist.c b/src/dusk/display/shader/shaderlist.c index 9a816298..971b2cdc 100644 --- a/src/dusk/display/shader/shaderlist.c +++ b/src/dusk/display/shader/shaderlist.c @@ -41,10 +41,10 @@ errorret_t shaderListInit() { } assertNotNull( - SHADER_LIST_DEFS[i].shader, "Shader cannot be null" + SHADER_LIST_DEFS[i].shader, "Shader cannot be NULL" ); assertNotNull( - SHADER_LIST_DEFS[i].definition, "Shader definition cannot be null" + SHADER_LIST_DEFS[i].definition, "Shader definition cannot be NULL" ); errorChain(shaderInit( @@ -78,7 +78,7 @@ errorret_t shaderListDispose(void) { } assertNotNull( - SHADER_LIST_DEFS[i].shader, "Shader cannot be null" + SHADER_LIST_DEFS[i].shader, "Shader cannot be NULL" ); errorChain(shaderDispose(SHADER_LIST_DEFS[i].shader)); diff --git a/src/dusk/display/spritebatch/spritebatch.c b/src/dusk/display/spritebatch/spritebatch.c index 32cbad9a..dc963c1a 100644 --- a/src/dusk/display/spritebatch/spritebatch.c +++ b/src/dusk/display/spritebatch/spritebatch.c @@ -31,9 +31,9 @@ errorret_t spriteBatchBuffer( shader_t *shader, const shadermaterial_t material ) { - assertNotNull(sprites, "Sprites cannot be null"); + assertNotNull(sprites, "Sprites cannot be NULL"); assertTrue(count > 0, "Count must be greater than zero"); - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); // Did the shader or material data change? if(shader != SPRITEBATCH.shader) { @@ -92,9 +92,9 @@ void spriteBatchBufferToMesh( meshvertex_t *vertices, const uint32_t verticesSize ) { - assertNotNull(sprites, "Sprites cannot be null"); + assertNotNull(sprites, "Sprites cannot be NULL"); assertTrue(count > 0, "Count must be greater than zero"); - assertNotNull(vertices, "Vertices cannot be null"); + assertNotNull(vertices, "Vertices cannot be NULL"); assertTrue( verticesSize >= count * QUAD_VERTEX_COUNT, "Vertices array too small" ); diff --git a/src/dusk/display/spritebatch/spritebatchsprite.h b/src/dusk/display/spritebatch/spritebatchsprite.h index ef7e2924..41bf41d1 100644 --- a/src/dusk/display/spritebatch/spritebatchsprite.h +++ b/src/dusk/display/spritebatch/spritebatchsprite.h @@ -27,7 +27,7 @@ typedef struct { * @param y Screen y position of the sprite's top-left corner. * @param width Width of the sprite in screen space. * @param height Height of the sprite in screen space. - * @returns The populated sprite. + * @return The populated sprite. */ spritebatchsprite_t spriteBatchSpriteTilesetPosition( const tileset_t *tileset, diff --git a/src/dusk/input/input.c b/src/dusk/input/input.c index 5ef56e81..c50ea089 100644 --- a/src/dusk/input/input.c +++ b/src/dusk/input/input.c @@ -152,7 +152,7 @@ float_t inputGetLastValue(const inputaction_t action) { const inputaction_t negY, const inputaction_t posY, vec2 result ) { - assertNotNull(result, "Result vector cannot be null"); + assertNotNull(result, "Result vector cannot be NULL"); result[0] = inputAxisDynamic(negX, posX); result[1] = inputAxisDynamic(negY, posY); } @@ -162,7 +162,7 @@ float_t inputGetLastValue(const inputaction_t action) { const inputaction_t negY, const inputaction_t posY, vec2 result ) { - assertNotNull(result, "Result vector cannot be null"); + assertNotNull(result, "Result vector cannot be NULL"); float_t x = inputAxisDynamic(negX, posX); float_t y = inputAxisDynamic(negY, posY); float_t mag = sqrtf(x * x + y * y); @@ -208,7 +208,7 @@ void inputAxis2D( const inputaction_t negY, const inputaction_t posY, vec2 result ) { - assertNotNull(result, "Result vector cannot be null"); + assertNotNull(result, "Result vector cannot be NULL"); result[0] = inputAxis(negX, posX); result[1] = inputAxis(negY, posY); } @@ -218,7 +218,7 @@ void inputAngle2D( const inputaction_t negY, const inputaction_t posY, vec2 result ) { - assertNotNull(result, "Result vector cannot be null"); + assertNotNull(result, "Result vector cannot be NULL"); float_t x = inputAxis(negX, posX); float_t y = inputAxis(negY, posY); float_t mag = sqrtf(x * x + y * y); diff --git a/src/dusk/rpg/battle/battlefighter.h b/src/dusk/rpg/battle/battlefighter.h index af032331..401ab62b 100644 --- a/src/dusk/rpg/battle/battlefighter.h +++ b/src/dusk/rpg/battle/battlefighter.h @@ -82,6 +82,6 @@ void battleFighterInit( * is not dead). * * @param fighter Pointer to the fighter to check. - * @returns True if the fighter can act. + * @return True if the fighter can act. */ bool_t battleFighterIsAlive(const battlefighter_t *fighter); diff --git a/src/dusk/rpg/cutscene/cutscenesystem.c b/src/dusk/rpg/cutscene/cutscenesystem.c index 56fab869..6a372e42 100644 --- a/src/dusk/rpg/cutscene/cutscenesystem.c +++ b/src/dusk/rpg/cutscene/cutscenesystem.c @@ -136,7 +136,7 @@ void cutsceneSystemNext() { // Start item. const cutsceneitem_t *item = cutsceneSystemGetCurrentItem(); - memset(&CUTSCENE_SYSTEM.data, 0, sizeof(CUTSCENE_SYSTEM.data)); + memoryZero(&CUTSCENE_SYSTEM.data, sizeof(CUTSCENE_SYSTEM.data)); cutsceneItemStart(item, &CUTSCENE_SYSTEM.data); } diff --git a/src/dusk/rpg/cutscene/cutscenesystem.h b/src/dusk/rpg/cutscene/cutscenesystem.h index b4c1f4f3..b8ea4315 100644 --- a/src/dusk/rpg/cutscene/cutscenesystem.h +++ b/src/dusk/rpg/cutscene/cutscenesystem.h @@ -146,7 +146,7 @@ void cutsceneSystemSetOnComplete(cutscenecallback_t onComplete); * Asserts the resolved entity is within bounds. * * @param entityIndex Raw entity index or sentinel value. - * @returns Pointer to the resolved entity. + * @return Pointer to the resolved entity. */ entity_t * cutsceneSystemGetEntity(const uint8_t entityIndex); @@ -155,7 +155,7 @@ entity_t * cutsceneSystemGetEntity(const uint8_t entityIndex); * a concrete map area ID. * * @param areaId Raw map area ID or sentinel value. - * @returns The resolved map area ID. + * @return The resolved map area ID. */ uint8_t cutsceneSystemGetAreaId(const uint8_t areaId); @@ -164,7 +164,7 @@ uint8_t cutsceneSystemGetAreaId(const uint8_t areaId); * sentinel) to a concrete UI_TEXTBOX_MINI_LIST slot index. * * @param index Raw slot index or sentinel value. - * @returns The resolved slot index. + * @return The resolved slot index. */ uint8_t cutsceneSystemGetTextMiniId(const uint8_t index); @@ -174,7 +174,7 @@ uint8_t cutsceneSystemGetTextMiniId(const uint8_t index); * once its keyboard closes). Empty ("") if nothing has been cached yet * for the running cutscene. * - * @returns The cached text. + * @return The cached text. */ const char_t * cutsceneSystemGetTextCache(void); diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofade.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofade.h index 09631ae3..f35714c1 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofade.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofade.h @@ -36,7 +36,7 @@ void cutsceneAudioFadeStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioFadeUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofadewait.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofadewait.h index 739db057..3b1bb61c 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofadewait.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiofadewait.h @@ -16,7 +16,7 @@ * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the channel is no longer fading. + * @return true once the channel is no longer fading. */ bool_t cutsceneAudioFadeWaitUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiopause.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiopause.h index 335e363d..56f34e33 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiopause.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiopause.h @@ -25,7 +25,7 @@ void cutsceneAudioPauseStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioPauseUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudioplay.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudioplay.h index 007f913b..c490381c 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudioplay.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudioplay.h @@ -38,7 +38,7 @@ void cutsceneAudioPlayStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioPlayUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudioresume.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudioresume.h index e04ab810..f99977d7 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudioresume.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudioresume.h @@ -25,7 +25,7 @@ void cutsceneAudioResumeStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioResumeUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudioset.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudioset.h index 4ae69c3d..db66a28c 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudioset.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudioset.h @@ -37,7 +37,7 @@ void cutsceneAudioSetStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioSetUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetloop.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetloop.h index 518bb9da..b217b9cf 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetloop.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetloop.h @@ -34,7 +34,7 @@ void cutsceneAudioSetLoopStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioSetLoopUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetpan.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetpan.h index 4599c415..a8c018ac 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetpan.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiosetpan.h @@ -31,7 +31,7 @@ void cutsceneAudioSetPanStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioSetPanUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiostop.h b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiostop.h index ff366870..709840cb 100644 --- a/src/dusk/rpg/cutscene/item/audio/cutsceneaudiostop.h +++ b/src/dusk/rpg/cutscene/item/audio/cutsceneaudiostop.h @@ -25,7 +25,7 @@ void cutsceneAudioStopStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneAudioStopUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/battle/cutscenebattleforceaction.h b/src/dusk/rpg/cutscene/item/battle/cutscenebattleforceaction.h index 52bebc95..ceb742c3 100644 --- a/src/dusk/rpg/cutscene/item/battle/cutscenebattleforceaction.h +++ b/src/dusk/rpg/cutscene/item/battle/cutscenebattleforceaction.h @@ -32,7 +32,7 @@ void cutsceneBattleForceActionStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneBattleForceActionUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/battle/cutscenebattlewaitstate.h b/src/dusk/rpg/cutscene/item/battle/cutscenebattlewaitstate.h index e4b9d837..4aed4d31 100644 --- a/src/dusk/rpg/cutscene/item/battle/cutscenebattlewaitstate.h +++ b/src/dusk/rpg/cutscene/item/battle/cutscenebattlewaitstate.h @@ -20,7 +20,7 @@ typedef struct { * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once BATTLE.state equals the watched state. + * @return true once BATTLE.state equals the watched state. */ bool_t cutsceneBattleWaitStateUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/battle/cutscenestartbattle.h b/src/dusk/rpg/cutscene/item/battle/cutscenestartbattle.h index 341a7d06..4f3f5317 100644 --- a/src/dusk/rpg/cutscene/item/battle/cutscenestartbattle.h +++ b/src/dusk/rpg/cutscene/item/battle/cutscenestartbattle.h @@ -43,7 +43,7 @@ void cutsceneStartBattleStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the battle has ended. + * @return true once the battle has ended. */ bool_t cutsceneStartBattleUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutsceneconcurrent.h b/src/dusk/rpg/cutscene/item/control/cutsceneconcurrent.h index 71b0ba1e..7baec1ac 100644 --- a/src/dusk/rpg/cutscene/item/control/cutsceneconcurrent.h +++ b/src/dusk/rpg/cutscene/item/control/cutsceneconcurrent.h @@ -52,7 +52,7 @@ void cutsceneConcurrentStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once every child has completed. + * @return true once every child has completed. */ bool_t cutsceneConcurrentUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutsceneidle.h b/src/dusk/rpg/cutscene/item/control/cutsceneidle.h index d819084e..46e0c217 100644 --- a/src/dusk/rpg/cutscene/item/control/cutsceneidle.h +++ b/src/dusk/rpg/cutscene/item/control/cutsceneidle.h @@ -15,7 +15,7 @@ * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneIdleUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutscenemarker.h b/src/dusk/rpg/cutscene/item/control/cutscenemarker.h index 3cb8faf5..d45497c8 100644 --- a/src/dusk/rpg/cutscene/item/control/cutscenemarker.h +++ b/src/dusk/rpg/cutscene/item/control/cutscenemarker.h @@ -29,7 +29,7 @@ void cutsceneMarkerStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneMarkerUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutscenequitgame.h b/src/dusk/rpg/cutscene/item/control/cutscenequitgame.h index 9848a84f..f0afc73d 100644 --- a/src/dusk/rpg/cutscene/item/control/cutscenequitgame.h +++ b/src/dusk/rpg/cutscene/item/control/cutscenequitgame.h @@ -27,7 +27,7 @@ void cutsceneQuitGameStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneQuitGameUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutscenerestart.h b/src/dusk/rpg/cutscene/item/control/cutscenerestart.h index a1e05dd4..799ee710 100644 --- a/src/dusk/rpg/cutscene/item/control/cutscenerestart.h +++ b/src/dusk/rpg/cutscene/item/control/cutscenerestart.h @@ -27,7 +27,7 @@ void cutsceneRestartStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneRestartUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutscenescene.h b/src/dusk/rpg/cutscene/item/control/cutscenescene.h index bde0493d..e845a3c2 100644 --- a/src/dusk/rpg/cutscene/item/control/cutscenescene.h +++ b/src/dusk/rpg/cutscene/item/control/cutscenescene.h @@ -33,7 +33,7 @@ void cutsceneSceneStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneSceneUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutscenesetpause.h b/src/dusk/rpg/cutscene/item/control/cutscenesetpause.h index ad75a046..f2b36724 100644 --- a/src/dusk/rpg/cutscene/item/control/cutscenesetpause.h +++ b/src/dusk/rpg/cutscene/item/control/cutscenesetpause.h @@ -25,7 +25,7 @@ void cutsceneSetPauseStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneSetPauseUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/control/cutscenewait.h b/src/dusk/rpg/cutscene/item/control/cutscenewait.h index 7ac03793..32732e82 100644 --- a/src/dusk/rpg/cutscene/item/control/cutscenewait.h +++ b/src/dusk/rpg/cutscene/item/control/cutscenewait.h @@ -27,7 +27,7 @@ void cutsceneWaitStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true when the wait has elapsed. + * @return true when the wait has elapsed. */ bool_t cutsceneWaitUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/cutscenecallback.h b/src/dusk/rpg/cutscene/item/cutscenecallback.h index 41029607..e953e67b 100644 --- a/src/dusk/rpg/cutscene/item/cutscenecallback.h +++ b/src/dusk/rpg/cutscene/item/cutscenecallback.h @@ -26,7 +26,7 @@ void cutsceneCallbackStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneCallbackUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/cutsceneitem.h b/src/dusk/rpg/cutscene/item/cutsceneitem.h index f73572e0..cb37b048 100644 --- a/src/dusk/rpg/cutscene/item/cutsceneitem.h +++ b/src/dusk/rpg/cutscene/item/cutsceneitem.h @@ -213,7 +213,7 @@ void cutsceneItemStart( * * @param item The cutscene item to tick. * @param data Runtime data storage. - * @returns true if the item is complete and the cutscene should advance. + * @return true if the item is complete and the cutscene should advance. */ bool_t cutsceneItemUpdate( const cutsceneitem_t *item, @@ -252,7 +252,7 @@ void cutsceneCutsceneStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneCutsceneUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/cutsceneprint.h b/src/dusk/rpg/cutscene/item/cutsceneprint.h index 9eaef022..b7120ad0 100644 --- a/src/dusk/rpg/cutscene/item/cutsceneprint.h +++ b/src/dusk/rpg/cutscene/item/cutsceneprint.h @@ -30,7 +30,7 @@ void cutscenePrintStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutscenePrintUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/entity/cutsceneentityadd.h b/src/dusk/rpg/cutscene/item/entity/cutsceneentityadd.h index 4bece21c..a41ad562 100644 --- a/src/dusk/rpg/cutscene/item/entity/cutsceneentityadd.h +++ b/src/dusk/rpg/cutscene/item/entity/cutsceneentityadd.h @@ -31,7 +31,7 @@ void cutsceneEntityAddStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneEntityAddUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/entity/cutsceneentityremove.h b/src/dusk/rpg/cutscene/item/entity/cutsceneentityremove.h index beb7187a..8b27818f 100644 --- a/src/dusk/rpg/cutscene/item/entity/cutsceneentityremove.h +++ b/src/dusk/rpg/cutscene/item/entity/cutsceneentityremove.h @@ -28,7 +28,7 @@ void cutsceneEntityRemoveStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneEntityRemoveUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/entity/cutsceneentityteleport.h b/src/dusk/rpg/cutscene/item/entity/cutsceneentityteleport.h index 9d474cea..2cb2140c 100644 --- a/src/dusk/rpg/cutscene/item/entity/cutsceneentityteleport.h +++ b/src/dusk/rpg/cutscene/item/entity/cutsceneentityteleport.h @@ -30,7 +30,7 @@ void cutsceneEntityTeleportStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneEntityTeleportUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/entity/cutsceneentityturn.h b/src/dusk/rpg/cutscene/item/entity/cutsceneentityturn.h index 4d7a6213..c17905f9 100644 --- a/src/dusk/rpg/cutscene/item/entity/cutsceneentityturn.h +++ b/src/dusk/rpg/cutscene/item/entity/cutsceneentityturn.h @@ -32,7 +32,7 @@ void cutsceneEntityTurnStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the entity is idle and facing the target direction. + * @return true once the entity is idle and facing the target direction. */ bool_t cutsceneEntityTurnUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalkto.h b/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalkto.h index 705eeb66..9c8364dc 100644 --- a/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalkto.h +++ b/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalkto.h @@ -36,7 +36,7 @@ void cutsceneEntityWalkToStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once all waypoints have been reached. + * @return true once all waypoints have been reached. */ bool_t cutsceneEntityWalkToUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalktoentity.h b/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalktoentity.h index 2d19a4bb..8355bc9b 100644 --- a/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalktoentity.h +++ b/src/dusk/rpg/cutscene/item/entity/cutsceneentitywalktoentity.h @@ -36,7 +36,7 @@ void cutsceneEntityWalkToEntityStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the entity has reached the target's side. + * @return true once the entity has reached the target's side. */ bool_t cutsceneEntityWalkToEntityUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/item/cutsceneitemgive.h b/src/dusk/rpg/cutscene/item/item/cutsceneitemgive.h index 538d69e2..6c84a920 100644 --- a/src/dusk/rpg/cutscene/item/item/cutsceneitemgive.h +++ b/src/dusk/rpg/cutscene/item/item/cutsceneitemgive.h @@ -30,7 +30,7 @@ void cutsceneItemGiveStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneItemGiveUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/maparea/cutscenemapareaadd.h b/src/dusk/rpg/cutscene/item/maparea/cutscenemapareaadd.h index 14cb13db..ac6e2f83 100644 --- a/src/dusk/rpg/cutscene/item/maparea/cutscenemapareaadd.h +++ b/src/dusk/rpg/cutscene/item/maparea/cutscenemapareaadd.h @@ -34,7 +34,7 @@ void cutsceneMapAreaAddStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneMapAreaAddUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/maparea/cutscenemaparearemove.h b/src/dusk/rpg/cutscene/item/maparea/cutscenemaparearemove.h index bca46048..59f0b6d2 100644 --- a/src/dusk/rpg/cutscene/item/maparea/cutscenemaparearemove.h +++ b/src/dusk/rpg/cutscene/item/maparea/cutscenemaparearemove.h @@ -29,7 +29,7 @@ void cutsceneMapAreaRemoveStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneMapAreaRemoveUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/maparea/cutscenemapareawait.h b/src/dusk/rpg/cutscene/item/maparea/cutscenemapareawait.h index e443fdcb..0b363987 100644 --- a/src/dusk/rpg/cutscene/item/maparea/cutscenemapareawait.h +++ b/src/dusk/rpg/cutscene/item/maparea/cutscenemapareawait.h @@ -38,7 +38,7 @@ void cutsceneMapAreaWaitStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once any watched area has been triggered. + * @return true once any watched area has been triggered. */ bool_t cutsceneMapAreaWaitUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/save/cutscenesavedevicecheck.h b/src/dusk/rpg/cutscene/item/save/cutscenesavedevicecheck.h index 895f5291..bb5b498b 100644 --- a/src/dusk/rpg/cutscene/item/save/cutscenesavedevicecheck.h +++ b/src/dusk/rpg/cutscene/item/save/cutscenesavedevicecheck.h @@ -34,7 +34,7 @@ void cutsceneSaveDeviceCheckStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneSaveDeviceCheckUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/save/cutscenesaveloadallslots.h b/src/dusk/rpg/cutscene/item/save/cutscenesaveloadallslots.h index 1208c05d..3f418b20 100644 --- a/src/dusk/rpg/cutscene/item/save/cutscenesaveloadallslots.h +++ b/src/dusk/rpg/cutscene/item/save/cutscenesaveloadallslots.h @@ -33,7 +33,7 @@ void cutsceneSaveLoadAllSlotsStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneSaveLoadAllSlotsUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutsceneemoji.h b/src/dusk/rpg/cutscene/item/ui/cutsceneemoji.h index de0cd558..10c7999e 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutsceneemoji.h +++ b/src/dusk/rpg/cutscene/item/ui/cutsceneemoji.h @@ -32,7 +32,7 @@ void cutsceneEmojiStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneEmojiUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenefade.h b/src/dusk/rpg/cutscene/item/ui/cutscenefade.h index c80661c3..34211dcf 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenefade.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenefade.h @@ -33,7 +33,7 @@ void cutsceneFadeStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the overlay transition has completed. + * @return true once the overlay transition has completed. */ bool_t cutsceneFadeUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenekeyboard.h b/src/dusk/rpg/cutscene/item/ui/cutscenekeyboard.h index ae97ebb2..555b386d 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenekeyboard.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenekeyboard.h @@ -36,7 +36,7 @@ void cutsceneKeyboardStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the keyboard has closed; false while still open. + * @return true once the keyboard has closed; false while still open. */ bool_t cutsceneKeyboardUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenemodal.h b/src/dusk/rpg/cutscene/item/ui/cutscenemodal.h index 761be491..cca1b118 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenemodal.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenemodal.h @@ -71,7 +71,7 @@ void cutsceneModalStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once immediately for a message-only modal; false + * @return true once immediately for a message-only modal; false * always for a modal with options. */ bool_t cutsceneModalUpdate( @@ -114,7 +114,7 @@ void cutsceneModalCloseStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneModalCloseUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenemodaloptionsmarkers.h b/src/dusk/rpg/cutscene/item/ui/cutscenemodaloptionsmarkers.h index 642dbf92..8b33d29e 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenemodaloptionsmarkers.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenemodaloptionsmarkers.h @@ -46,7 +46,7 @@ void cutsceneModalOptionsMarkersStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns false always. + * @return false always. */ bool_t cutsceneModalOptionsMarkersUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutsceneshake.h b/src/dusk/rpg/cutscene/item/ui/cutsceneshake.h index 8e72a104..bb53d0e0 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutsceneshake.h +++ b/src/dusk/rpg/cutscene/item/ui/cutsceneshake.h @@ -30,7 +30,7 @@ void cutsceneShakeStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneShakeUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenetext.h b/src/dusk/rpg/cutscene/item/ui/cutscenetext.h index a5a2abb0..1263f09d 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenetext.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenetext.h @@ -30,7 +30,7 @@ void cutsceneTextStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true once the textbox has been dismissed. + * @return true once the textbox has been dismissed. */ bool_t cutsceneTextUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenetextmini.h b/src/dusk/rpg/cutscene/item/ui/cutscenetextmini.h index 905d033b..4da746b8 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenetextmini.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenetextmini.h @@ -33,7 +33,7 @@ void cutsceneTextMiniStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneTextMiniUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutscenetextminihide.h b/src/dusk/rpg/cutscene/item/ui/cutscenetextminihide.h index 6f063e8a..cd31ca1e 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutscenetextminihide.h +++ b/src/dusk/rpg/cutscene/item/ui/cutscenetextminihide.h @@ -28,7 +28,7 @@ void cutsceneTextMiniHideStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneTextMiniHideUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/cutscene/item/ui/cutsceneuishow.h b/src/dusk/rpg/cutscene/item/ui/cutsceneuishow.h index 58eba6bc..e46d49f7 100644 --- a/src/dusk/rpg/cutscene/item/ui/cutsceneuishow.h +++ b/src/dusk/rpg/cutscene/item/ui/cutsceneuishow.h @@ -37,7 +37,7 @@ void cutsceneUIShowStart( * * @param item The cutscene item. * @param data Runtime data storage. - * @returns true always. + * @return true always. */ bool_t cutsceneUIShowUpdate( const cutsceneitem_t *item, diff --git a/src/dusk/rpg/entity/anim/entityanim.h b/src/dusk/rpg/entity/anim/entityanim.h index ff4cde20..6f6fe7b4 100644 --- a/src/dusk/rpg/entity/anim/entityanim.h +++ b/src/dusk/rpg/entity/anim/entityanim.h @@ -41,6 +41,6 @@ void entityAnimUpdate(entity_t *entity); * Used to lift entity render position to mid-ramp height. * * @param pos World position to sample. - * @returns float_t The Z offset to apply. + * @return The Z offset to apply. */ float_t entityAnimTileZOffset(const worldpos_t pos); diff --git a/src/dusk/rpg/entity/entity.h b/src/dusk/rpg/entity/entity.h index 2ef8b64c..4a5de38b 100644 --- a/src/dusk/rpg/entity/entity.h +++ b/src/dusk/rpg/entity/entity.h @@ -63,7 +63,7 @@ void entityUpdate(entity_t *entity); * Returns true if the entity is in a state where it can turn. * * @param entity Pointer to the entity to check. - * @returns True if the entity can turn. + * @return True if the entity can turn. */ bool_t entityCanTurn(entity_t *entity); @@ -71,7 +71,7 @@ bool_t entityCanTurn(entity_t *entity); * Returns true if the entity is in a state where it can walk. * * @param entity Pointer to the entity to check. - * @returns True if the entity can walk. + * @return True if the entity can walk. */ bool_t entityCanWalk(entity_t *entity); @@ -79,7 +79,7 @@ bool_t entityCanWalk(entity_t *entity); * Returns true if the entity is in a state where it can run. * * @param entity Pointer to the entity to check. - * @returns True if the entity can run. + * @return True if the entity can run. */ bool_t entityCanRun(entity_t *entity); @@ -89,7 +89,7 @@ bool_t entityCanRun(entity_t *entity); * range below ENTITY_GLOBAL_ID_START. * * @param entity Pointer to the entity to check. - * @returns True if the entity can be unloaded. + * @return True if the entity can be unloaded. */ bool_t entityCanUnload(entity_t *entity); @@ -112,7 +112,7 @@ void entityTurn(entity_t *entity, const entitydir_t direction); * @param direction The direction the entity is moving in. * @param newPos The world position the entity is moving to. * @param tileNew In/out: the tile at newPos, possibly cleared to TILE_NULL. - * @returns True if the entity should be raised up onto the ramp. + * @return True if the entity should be raised up onto the ramp. */ bool_t entityWalkCheckRampUp( const tile_t tileCurrent, @@ -128,7 +128,7 @@ bool_t entityWalkCheckRampUp( * @param tileNew The tile at the position the entity is moving to. * @param newPos The world position the entity is moving to. * @param direction The direction the entity is moving in. - * @returns True if the entity should fall to the tile below newPos. + * @return True if the entity should fall to the tile below newPos. */ bool_t entityWalkCheckFall( const tile_t tileNew, const worldpos_t newPos, const entitydir_t direction @@ -139,7 +139,7 @@ bool_t entityWalkCheckFall( * * @param entity The entity that is moving (excluded from the check). * @param newPos The world position to check for occupancy. - * @returns True if another entity occupies newPos. + * @return True if another entity occupies newPos. */ bool_t entityWalkIsBlockedByEntity(entity_t *entity, const worldpos_t newPos); diff --git a/src/dusk/rpg/entity/entitypathstep.h b/src/dusk/rpg/entity/entitypathstep.h index 1608cae8..59c0d63b 100644 --- a/src/dusk/rpg/entity/entitypathstep.h +++ b/src/dusk/rpg/entity/entitypathstep.h @@ -17,7 +17,7 @@ * @param entity Pointer to the entity to move. * @param target The world position to move toward. * @param walkAround Whether to try perpendicular directions when blocked. - * @returns true if the entity is already at target, false otherwise. + * @return true if the entity is already at target, false otherwise. */ bool_t entityPathStep( entity_t *entity, diff --git a/src/dusk/rpg/entity/global/entityglobaldefs.h b/src/dusk/rpg/entity/global/entityglobaldefs.h index 73913e45..5dd0d929 100644 --- a/src/dusk/rpg/entity/global/entityglobaldefs.h +++ b/src/dusk/rpg/entity/global/entityglobaldefs.h @@ -21,7 +21,7 @@ typedef struct { * Callback invoked to initialize a global entity. * * @param create Pointer to the entity/position being initialized. - * @returns An error code. + * @return An error code. */ typedef void (*entityglobalinitcallback_t)( entityglobalcreate_t *create diff --git a/src/dusk/rpg/entity/npc/npcturn.c b/src/dusk/rpg/entity/npc/npcturn.c index 63654ab3..b7b1dc13 100644 --- a/src/dusk/rpg/entity/npc/npcturn.c +++ b/src/dusk/rpg/entity/npc/npcturn.c @@ -9,7 +9,6 @@ #include "rpg/entity/entity.h" #include "util/random.h" #include "time/time.h" -#include void npcRandomTurnInit(npc_t *npc) { npcrandomturn_t *turn = &npc->moveData.randomTurn; diff --git a/src/dusk/rpg/entity/player.h b/src/dusk/rpg/entity/player.h index 13e369d1..8d92eda8 100644 --- a/src/dusk/rpg/entity/player.h +++ b/src/dusk/rpg/entity/player.h @@ -40,7 +40,7 @@ void playerInit(entity_t *entity); * Returns true if the player entity is in a state where it can interact. * * @param entity Pointer to the player entity to check. - * @returns True if the entity can interact. + * @return True if the entity can interact. */ bool_t playerCanInteract(entity_t *entity); diff --git a/src/dusk/rpg/item/backpack.c b/src/dusk/rpg/item/backpack.c index 03bd91ae..73a6f26c 100644 --- a/src/dusk/rpg/item/backpack.c +++ b/src/dusk/rpg/item/backpack.c @@ -21,49 +21,49 @@ void backpackInit() { } inventory_t *backpackGetInventory(const itemtype_t type) { - assertTrue(type > ITEM_TYPE_NULL, "Item type must not be null"); + assertTrue(type > ITEM_TYPE_NULL, "Item type must not be NULL"); assertTrue(type < ITEM_TYPE_COUNT, "Item type out of range"); return &BACKPACK.inventories[type]; } void backpackAdd(const itemid_t item, const uint8_t quantity) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); inventoryAdd(backpackGetInventory(ITEMS[item].type), item, quantity); } void backpackRemove(const itemid_t item) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); inventoryRemove(backpackGetInventory(ITEMS[item].type), item); } void backpackSet(const itemid_t item, const uint8_t quantity) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); inventorySet(backpackGetInventory(ITEMS[item].type), item, quantity); } uint8_t backpackGetCount(const itemid_t item) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); return inventoryGetCount(backpackGetInventory(ITEMS[item].type), item); } bool_t backpackItemExists(const itemid_t item) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); return inventoryItemExists(backpackGetInventory(ITEMS[item].type), item); } bool_t backpackIsFull(const itemtype_t type) { - assertTrue(type > ITEM_TYPE_NULL, "Item type must not be null"); + assertTrue(type > ITEM_TYPE_NULL, "Item type must not be NULL"); assertTrue(type < ITEM_TYPE_COUNT, "Item type out of range"); return inventoryIsFull(backpackGetInventory(type)); } bool_t backpackItemFull(const itemid_t item) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); return inventoryItemFull(backpackGetInventory(ITEMS[item].type), item); } @@ -73,7 +73,7 @@ void backpackSort( const inventorysort_t sortBy, const bool_t reverse ) { - assertTrue(type > ITEM_TYPE_NULL, "Item type must not be null"); + assertTrue(type > ITEM_TYPE_NULL, "Item type must not be NULL"); assertTrue(type < ITEM_TYPE_COUNT, "Item type out of range"); inventorySort(backpackGetInventory(type), sortBy, reverse); } \ No newline at end of file diff --git a/src/dusk/rpg/item/backpack.h b/src/dusk/rpg/item/backpack.h index 5812befa..2da59035 100644 --- a/src/dusk/rpg/item/backpack.h +++ b/src/dusk/rpg/item/backpack.h @@ -24,7 +24,7 @@ void backpackInit(); * Returns the inventory for a given item type. * * @param type The item type. - * @returns Pointer to the inventory for that type. + * @return Pointer to the inventory for that type. */ inventory_t *backpackGetInventory(const itemtype_t type); @@ -55,7 +55,7 @@ void backpackSet(const itemid_t item, const uint8_t quantity); * Gets the quantity of an item in the backpack. * * @param item The item ID to check. - * @returns The quantity held. + * @return The quantity held. */ uint8_t backpackGetCount(const itemid_t item); @@ -63,7 +63,7 @@ uint8_t backpackGetCount(const itemid_t item); * Checks if an item exists in the backpack (quantity > 0). * * @param item The item ID to check. - * @returns true if the item exists. + * @return true if the item exists. */ bool_t backpackItemExists(const itemid_t item); @@ -71,7 +71,7 @@ bool_t backpackItemExists(const itemid_t item); * Checks if the inventory for a given type is full. * * @param type The item type to check. - * @returns true if the type's inventory is full. + * @return true if the type's inventory is full. */ bool_t backpackIsFull(const itemtype_t type); @@ -79,7 +79,7 @@ bool_t backpackIsFull(const itemtype_t type); * Checks if an item's stack is full in the backpack. * * @param item The item ID to check. - * @returns true if the item stack is full. + * @return true if the item stack is full. */ bool_t backpackItemFull(const itemid_t item); diff --git a/src/dusk/rpg/item/item.c b/src/dusk/rpg/item/item.c index 010b6845..32110c86 100644 --- a/src/dusk/rpg/item/item.c +++ b/src/dusk/rpg/item/item.c @@ -15,7 +15,7 @@ errorret_t itemGetName( char_t *buffer, const size_t bufferSize ) { - assertTrue(item > ITEM_ID_NULL, "Item ID must not be null"); + assertTrue(item > ITEM_ID_NULL, "Item ID must not be NULL"); assertTrue(item < ITEM_ID_COUNT, "Item ID out of range"); errorChain(localeManagerGetString(ITEMS[item].name, buffer, bufferSize, 0)); diff --git a/src/dusk/rpg/overworld/maparea.h b/src/dusk/rpg/overworld/maparea.h index 8ffb3de9..4ca84117 100644 --- a/src/dusk/rpg/overworld/maparea.h +++ b/src/dusk/rpg/overworld/maparea.h @@ -76,7 +76,7 @@ void mapAreaInit( * * @param area Pointer to the map area to check. * @param position The world position to check. - * @returns true if the position is inside the area. + * @return true if the position is inside the area. */ bool_t mapAreaIsInside(const maparea_t *area, const worldpos_t position); @@ -86,7 +86,7 @@ bool_t mapAreaIsInside(const maparea_t *area, const worldpos_t position); * * @param area Pointer to the map area to check. * @param chunk Pointer to the chunk to check. - * @returns true if the chunk overlaps the area. + * @return true if the chunk overlaps the area. */ bool_t mapAreaIsChunkOverlappingOrInside( const maparea_t *area, @@ -98,7 +98,7 @@ bool_t mapAreaIsChunkOverlappingOrInside( * occupies a position within its bounds. * * @param area Pointer to the map area to check. - * @returns true if no entity is inside the area. + * @return true if no entity is inside the area. */ bool_t mapAreaCanUnload(const maparea_t *area); @@ -107,7 +107,7 @@ bool_t mapAreaCanUnload(const maparea_t *area); * * @param area Pointer to the map area to check. * @param entity Pointer to the entity to check. - * @returns true if the entity's type should trigger this area's callback. + * @return true if the entity's type should trigger this area's callback. */ bool_t mapAreaShouldNotify(const maparea_t *area, const entity_t *entity); @@ -122,7 +122,7 @@ bool_t mapAreaShouldNotify(const maparea_t *area, const entity_t *entity); * should trigger the callback. * @param trigger Bitwise MAP_TRIGGER_* flags for which conditions should * invoke the callback. - * @returns The ID of the newly added map area. + * @return The ID of the newly added map area. */ uint8_t mapAreaAdd( const worldpos_t min, @@ -176,7 +176,7 @@ void mapAreaNoopCallback(entity_t *entity, const uint8_t trigger); * should trigger the callback. * @param trigger Bitwise MAP_TRIGGER_* flags for which conditions should * invoke the callback. - * @returns The ID of the newly added map area. + * @return The ID of the newly added map area. */ uint8_t mapAreaAddGlobal( const worldpos_t min, diff --git a/src/dusk/rpg/overworld/worldpos.h b/src/dusk/rpg/overworld/worldpos.h index 3169839c..2aeb3915 100644 --- a/src/dusk/rpg/overworld/worldpos.h +++ b/src/dusk/rpg/overworld/worldpos.h @@ -53,7 +53,7 @@ typedef struct worldpos_s { worldunit_t x, y, z; } worldpos_t; -typedef struct chunkpos_t { +typedef struct chunkpos_s { chunkunit_t x, y, z; } chunkpos_t; diff --git a/src/dusk/save/save.c b/src/dusk/save/save.c index 4586b0af..8706a9d8 100644 --- a/src/dusk/save/save.c +++ b/src/dusk/save/save.c @@ -49,7 +49,7 @@ errorret_t saveUpdate() { if(SAVE.findingAvailableDevice) { assertNotNull( SAVE.findAvailableCallback, - "Callback cannot be null while looking for devices" + "Callback cannot be NULL while looking for devices" ); // Yes, we have a device available, fire the callback. @@ -94,7 +94,7 @@ void saveFindAvailableDevice( void *user ) { assertIsMainThread("Invalid thread"); - assertNotNull(callback, "Callback cannot be null"); + assertNotNull(callback, "Callback cannot be NULL"); assertFalse( SAVE.findingAvailableDevice, "Already finding an available device" @@ -122,7 +122,7 @@ void saveFindAvailableDevice( // No currently available device, check them IN ORDER, starting at 0 savedevice_t *deviceToCheck = &SAVE.devices[0]; - assertNotNull(deviceToCheck, "Device to check cannot be null"); + assertNotNull(deviceToCheck, "Device to check cannot be NULL"); saveDeviceCheckAvailability( deviceToCheck, saveOnDeviceAvailabilityChecked, @@ -131,7 +131,7 @@ void saveFindAvailableDevice( } void saveOnDeviceAvailabilityChecked(savedevice_t *device, void *user) { - assertNotNull(device, "Device cannot be null"); + assertNotNull(device, "Device cannot be NULL"); assertTrue( SAVE.findingAvailableDevice, "Not currently finding an available device" diff --git a/src/dusk/save/savedevice.c b/src/dusk/save/savedevice.c index 6f705e59..9e2d5bc8 100644 --- a/src/dusk/save/savedevice.c +++ b/src/dusk/save/savedevice.c @@ -20,7 +20,7 @@ #endif errorret_t saveDeviceInit(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); memoryZero(device, sizeof(savedevice_t)); device->state = 0xFF;// We set this because the platform must define it. @@ -39,7 +39,7 @@ errorret_t saveDeviceInit(savedevice_t *device) { } errorret_t saveDeviceUpdate(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); // Perform a device update. @@ -55,7 +55,7 @@ errorret_t saveDeviceUpdate(savedevice_t *device) { } void saveDeviceFireCallback(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); assertFalse(device->fireCallback, "Device callback already fired?"); device->fireCallback = true; @@ -66,8 +66,8 @@ void saveDeviceCheckAvailability( savedevicestatecallback_t callback, void *user ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(callback, "callback cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(callback, "callback cannot be NULL"); assertIsMainThread("Invalid thread"); // The device must be in a state that we allow checking the availability. @@ -471,8 +471,8 @@ errorret_t saveDeviceSlotWrite( saveslot_t *slot, const uint8_t slotIndex ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(slot, "slot cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(slot, "slot cannot be NULL"); #if defined(SAVE_DEVICE_DATA_RAW) errorChain(saveDeviceRawStoreItem(device, NULL, slot, slotIndex)); @@ -488,8 +488,8 @@ errorret_t saveDeviceSlotRead( saveslot_t *slot, const uint8_t slotIndex ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(slot, "slot cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(slot, "slot cannot be NULL"); #if defined(SAVE_DEVICE_DATA_RAW) errorChain(saveDeviceRawFetchItem(device, NULL, slot, slotIndex)); @@ -504,8 +504,8 @@ errorret_t saveDeviceSettingsWrite( savedevice_t *device, savesettings_t *settings ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(settings, "settings cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(settings, "settings cannot be NULL"); #if defined(SAVE_DEVICE_DATA_RAW) errorChain(saveDeviceRawStoreItem(device, settings, NULL, 0)); @@ -520,8 +520,8 @@ errorret_t saveDeviceSettingsRead( savedevice_t *device, savesettings_t *settings ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(settings, "settings cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(settings, "settings cannot be NULL"); #if defined(SAVE_DEVICE_DATA_RAW) errorChain(saveDeviceRawFetchItem(device, settings, NULL, 0)); @@ -533,7 +533,7 @@ errorret_t saveDeviceSettingsRead( } errorret_t saveDeviceDispose(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); errorChain(saveDevicePlatformDispose(device)); errorOk(); } \ No newline at end of file diff --git a/src/dusk/save/savesettings.c b/src/dusk/save/savesettings.c index 91d5afac..2392dccc 100644 --- a/src/dusk/save/savesettings.c +++ b/src/dusk/save/savesettings.c @@ -11,7 +11,7 @@ #include "savejson.h" void saveSettingsInit(savesettings_t *settings) { - assertNotNull(settings, "Settings cannot be null"); + assertNotNull(settings, "Settings cannot be NULL"); memorySet(settings, 0, sizeof(savesettings_t)); @@ -28,9 +28,9 @@ errorret_t saveSettingsWriteJSON( yyjson_mut_doc *doc, yyjson_mut_val *object ) { - assertNotNull(settings, "Settings cannot be null"); - assertNotNull(doc, "Doc cannot be null"); - assertNotNull(object, "Object cannot be null"); + assertNotNull(settings, "Settings cannot be NULL"); + assertNotNull(doc, "Doc cannot be NULL"); + assertNotNull(object, "Object cannot be NULL"); writeInt32("someSetting", settings->someSetting); writeFloat("audioMasterVolume", settings->audioMasterVolume); @@ -43,8 +43,8 @@ errorret_t saveSettingsWriteJSON( } errorret_t saveSettingsReadJSON(savesettings_t *settings, yyjson_val *object) { - assertNotNull(settings, "Settings cannot be null"); - assertNotNull(object, "Object cannot be null"); + assertNotNull(settings, "Settings cannot be NULL"); + assertNotNull(object, "Object cannot be NULL"); readInt32("someSetting", settings->someSetting, 0); readFloat("audioMasterVolume", settings->audioMasterVolume, 1.0f); diff --git a/src/dusk/save/saveslot.c b/src/dusk/save/saveslot.c index bea3f860..586e9531 100644 --- a/src/dusk/save/saveslot.c +++ b/src/dusk/save/saveslot.c @@ -12,19 +12,19 @@ #include "time/time.h" void saveSlotInit(saveslot_t *slot) { - assertNotNull(slot, "Slot cannot be null"); + assertNotNull(slot, "Slot cannot be NULL"); memorySet(slot, 0, sizeof(saveslot_t)); slot->version = 1; } bool_t saveSlotInUse(saveslotcache_t *slot) { - assertNotNull(slot, "Slot cannot be null"); + assertNotNull(slot, "Slot cannot be NULL"); return slot->name[0] != '\0'; } bool_t saveSlotHasSaved(saveslotcache_t *slot) { - assertNotNull(slot, "Slot cannot be null"); + assertNotNull(slot, "Slot cannot be NULL"); return slot->time.time != 0; } @@ -33,9 +33,9 @@ errorret_t saveSlotWriteJSON( yyjson_mut_doc *doc, yyjson_mut_val *object ) { - assertNotNull(slot, "Slot cannot be null"); - assertNotNull(doc, "Doc cannot be null"); - assertNotNull(object, "Object cannot be null"); + assertNotNull(slot, "Slot cannot be NULL"); + assertNotNull(doc, "Doc cannot be NULL"); + assertNotNull(object, "Object cannot be NULL"); // Update time slot->cachedData.time = timeGetEpoch(); @@ -48,8 +48,8 @@ errorret_t saveSlotWriteJSON( } errorret_t saveSlotReadJSON(saveslot_t *slot, yyjson_val *object) { - assertNotNull(slot, "Slot cannot be null"); - assertNotNull(object, "Object cannot be null"); + assertNotNull(slot, "Slot cannot be NULL"); + assertNotNull(object, "Object cannot be NULL"); char_t saveJsonStringBuffer[SAVE_JSON_STRING_BUFFER_SIZE]; diff --git a/src/dusk/scene/initial/sceneinitial.c b/src/dusk/scene/initial/sceneinitial.c index 2242f142..7f91b98d 100644 --- a/src/dusk/scene/initial/sceneinitial.c +++ b/src/dusk/scene/initial/sceneinitial.c @@ -14,7 +14,7 @@ #include "rpg/cutscene/cutscenesystem.h" errorret_t sceneInitialInit(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); memoryZero(&sceneData->initial, sizeof(sceneinitial_t)); // Set background color to black for the initial scene @@ -29,16 +29,16 @@ errorret_t sceneInitialInit(scenedata_t *sceneData) { } errorret_t sceneInitialUpdate(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); errorOk(); } errorret_t sceneInitialRender(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); errorOk(); } errorret_t sceneInitialDispose(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); errorOk(); } diff --git a/src/dusk/scene/overworld/sceneoverworld.c b/src/dusk/scene/overworld/sceneoverworld.c index 6a7214b5..e38826d5 100644 --- a/src/dusk/scene/overworld/sceneoverworld.c +++ b/src/dusk/scene/overworld/sceneoverworld.c @@ -27,17 +27,17 @@ #include "util/memory.h" errorret_t sceneOverworldInit(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); errorOk(); } errorret_t sceneOverworldUpdate(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); errorOk(); } errorret_t sceneOverworldRender(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); sceneoverworld_t *overworld = &sceneData->overworld; sceneOverworldCullUpdate(overworld); @@ -259,6 +259,6 @@ errorret_t sceneOverworldDrawChunksProps(const sceneoverworld_t *overworld) { } errorret_t sceneOverworldDispose(scenedata_t *sceneData) { - assertNotNull(sceneData, "Scene data cannot be null"); + assertNotNull(sceneData, "Scene data cannot be NULL"); errorOk(); } diff --git a/src/dusk/scene/scene.c b/src/dusk/scene/scene.c index 72c4e9d9..34a5bed9 100644 --- a/src/dusk/scene/scene.c +++ b/src/dusk/scene/scene.c @@ -1,7 +1,9 @@ -// Copyright (c) 2026 Dominic Masters -// -// This software is released under the MIT License. -// https://opensource.org/licenses/MIT +/** + * Copyright (c) 2026 Dominic Masters + * + * This software is released under the MIT License. + * https://opensource.org/licenses/MIT + */ #include "scene.h" #include "assert/assert.h" diff --git a/src/dusk/thread/threadmutex.h b/src/dusk/thread/threadmutex.h index 29ef7ba7..fbb338b4 100644 --- a/src/dusk/thread/threadmutex.h +++ b/src/dusk/thread/threadmutex.h @@ -14,7 +14,7 @@ #error "At least one threading implementation must be defined." #endif -typedef struct threadlock_t { +typedef struct threadmutex_s { #ifdef DUSK_THREAD_PTHREAD pthread_mutex_t mutex; pthread_cond_t cond; diff --git a/src/dusk/time/timeepoch.c b/src/dusk/time/timeepoch.c index 9acbd22a..da7e1dc0 100644 --- a/src/dusk/time/timeepoch.c +++ b/src/dusk/time/timeepoch.c @@ -122,8 +122,8 @@ size_t timeEpochFormat( char_t* buffer, const size_t bufferSize ) { - assertNotNull(format, "Format string cannot be null"); - assertNotNull(buffer, "Buffer cannot be null"); + assertNotNull(format, "Format string cannot be NULL"); + assertNotNull(buffer, "Buffer cannot be NULL"); assertTrue(bufferSize > 0, "Buffer size must be greater than 0"); size_t bufferIndex = 0; diff --git a/src/dusk/ui/debug/uicutscene.c b/src/dusk/ui/debug/uicutscene.c index 94bdf321..47357cf3 100644 --- a/src/dusk/ui/debug/uicutscene.c +++ b/src/dusk/ui/debug/uicutscene.c @@ -42,14 +42,14 @@ errorret_t uiCutsceneInit() { errorret_t uiCutsceneDraw() { const cutsceneitem_t *item = cutsceneSystemGetCurrentItem(); - if(!item || !CUTSCENE_SYSTEM.scene) { + if(item == NULL || CUTSCENE_SYSTEM.scene == NULL) { stringCopy( UICUTSCENE.countText, "Cutscene Inactive", UI_CUTSCENE_TEXT_MAX - 1 ); UICUTSCENE.itemText[0] = '\0'; } else { const char_t *name = CUTSCENE_ITEM_CALLBACKS[item->type].jsonName; - if(!name) name = "???"; + if(name == NULL) name = "???"; stringFormat( UICUTSCENE.countText, diff --git a/src/dusk/ui/debug/uiplayerpos.c b/src/dusk/ui/debug/uiplayerpos.c index ad430075..6fcfee1c 100644 --- a/src/dusk/ui/debug/uiplayerpos.c +++ b/src/dusk/ui/debug/uiplayerpos.c @@ -38,7 +38,7 @@ errorret_t uiPlayerPosDraw() { break; } } - if(!player) errorOk(); + if(player == NULL) errorOk(); chunkpos_t chunkPos; worldPosToChunkPos(&player->position, &chunkPos); diff --git a/src/dusk/ui/dialog/keyboard/uikeyboard.h b/src/dusk/ui/dialog/keyboard/uikeyboard.h index 565d7cba..78f54473 100644 --- a/src/dusk/ui/dialog/keyboard/uikeyboard.h +++ b/src/dusk/ui/dialog/keyboard/uikeyboard.h @@ -112,7 +112,7 @@ typedef void (*uikeyboardinputcallback_t)( * @param c The character about to be entered (SPACE included, DEL/ * confirm/cancel excluded - those aren't text being entered). * @param user Arbitrary pointer passed via uikeyboardopen_t.user. - * @returns True to allow the character, false to reject it (ignored, + * @return True to allow the character, false to reject it (ignored, * nothing is entered). */ typedef bool_t (*uikeyboardkeypresscallback_t)(const char_t c, void *user); @@ -254,7 +254,7 @@ errorret_t uiKeyboardDraw(void); /** * Returns true when the keyboard dialog is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiKeyboardIsOpen(void); @@ -303,7 +303,7 @@ void uiKeyboardFocusConfirm(void); * UI_KEYBOARD.trimmed is false, so whitespace-only text was never * reduced to empty) a string of only whitespace. * - * @returns True if blank. + * @return True if blank. */ bool_t uiKeyboardTextIsBlank(void); @@ -376,7 +376,7 @@ void uiKeyboardMenuClosed(const uimenu_t *menu); * nothing. * * @param menu The keyboard's menu. - * @returns Always true - this always fully handles back itself + * @return Always true - this always fully handles back itself * (backspace, explicit close, or swallow), never falling through to the * default pop. */ @@ -388,7 +388,7 @@ bool_t uiKeyboardMenuCancel(const uimenu_t *menu); * handle. * * @param key A table entry, possibly NULL. - * @returns key, or "" if key was NULL. + * @return key, or "" if key was NULL. */ const char_t * uiKeyboardNormalizeKey(const char_t *key); @@ -398,7 +398,7 @@ const char_t * uiKeyboardNormalizeKey(const char_t *key); * * @param shift Current shift state. * @param caps Current caps state. - * @returns The selected table. + * @return The selected table. */ const char_t *const * uiKeyboardSelectTable( const bool_t shift, @@ -420,7 +420,7 @@ const char_t *const * uiKeyboardSelectTable( * UI_KEYBOARD_KEY_COUNT entries. * @param shift Initial shift state - see uiKeyboardGetChar. * @param caps Initial caps state - see uiKeyboardGetChar. - * @returns The number of items written (UI_KEYBOARD_KEY_COUNT). + * @return The number of items written (UI_KEYBOARD_KEY_COUNT). */ uint8_t uiKeyboardBuildItems( uimenuitem_t *items, @@ -453,7 +453,7 @@ void uiKeyboardUpdateDisplay( * own (possibly shifted) label.text. * * @param index Grid slot index, from 0 to UI_KEYBOARD_KEY_COUNT - 1. - * @returns The slot's canonical label. + * @return The slot's canonical label. */ const char_t * uiKeyboardGetCanonicalKey(const uint8_t index); @@ -464,7 +464,7 @@ const char_t * uiKeyboardGetCanonicalKey(const uint8_t index); * (SPACE, DEL, SHIFT, CAPS, or blank filler). * * @param index Grid slot index, from 0 to UI_KEYBOARD_KEY_COUNT - 1. - * @returns True if shift affects this slot's character. + * @return True if shift affects this slot's character. */ bool_t uiKeyboardIsShiftSensitive(const uint8_t index); @@ -481,7 +481,7 @@ bool_t uiKeyboardIsShiftSensitive(const uint8_t index); * @param index Grid slot index, from 0 to UI_KEYBOARD_KEY_COUNT - 1. * @param shift Current shift state (one-shot, see UI_KEYBOARD.shift). * @param caps Current caps state (persistent toggle, see UI_KEYBOARD.caps). - * @returns The character to display/type. + * @return The character to display/type. */ char_t uiKeyboardGetChar( const uint8_t index, diff --git a/src/dusk/ui/dialog/save/uisaveslot.h b/src/dusk/ui/dialog/save/uisaveslot.h index 07799765..6f7f3077 100644 --- a/src/dusk/ui/dialog/save/uisaveslot.h +++ b/src/dusk/ui/dialog/save/uisaveslot.h @@ -63,7 +63,7 @@ void uiSaveSlotInit( * Returns whether the save slot widget is highlighted. * * @param saveSlot The save slot widget to query. - * @returns True if highlighted. + * @return True if highlighted. */ bool_t uiSaveSlotIsHighlighted(const uisaveslot_t *saveSlot); @@ -79,7 +79,7 @@ void uiSaveSlotSetHighlighted(uisaveslot_t *saveSlot, const bool_t highlighted); * Returns the save slot widget's display type. * * @param saveSlot The save slot widget to query. - * @returns The display type. + * @return The display type. */ uisaveslotdisplaytype_t uiSaveSlotGetDisplayType(const uisaveslot_t *saveSlot); diff --git a/src/dusk/ui/dialog/save/uiselectsave.h b/src/dusk/ui/dialog/save/uiselectsave.h index d916c016..2e38fdc8 100644 --- a/src/dusk/ui/dialog/save/uiselectsave.h +++ b/src/dusk/ui/dialog/save/uiselectsave.h @@ -93,7 +93,7 @@ errorret_t uiSelectSaveDraw(void); /** * Returns true when the select-save panel is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiSelectSaveIsOpen(void); diff --git a/src/dusk/ui/dialog/uiconfirm.h b/src/dusk/ui/dialog/uiconfirm.h index 3b76ac59..e1dab844 100644 --- a/src/dusk/ui/dialog/uiconfirm.h +++ b/src/dusk/ui/dialog/uiconfirm.h @@ -36,14 +36,14 @@ errorret_t uiConfirmInit(void); /** * Returns true when the confirm dialog is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiConfirmIsOpen(void); /** * Returns the result of the most recently dismissed confirm dialog. * - * @returns True if Confirm was selected, false otherwise. + * @return True if Confirm was selected, false otherwise. */ bool_t uiConfirmGetResult(void); diff --git a/src/dusk/ui/focus/uifocus.h b/src/dusk/ui/focus/uifocus.h index d68de640..18e3035f 100644 --- a/src/dusk/ui/focus/uifocus.h +++ b/src/dusk/ui/focus/uifocus.h @@ -67,7 +67,7 @@ void uiFocusInit(void); * @param direction Called on a direction press/hold before the default * cell-to-cell movement is applied; may be NULL. * @param user Arbitrary pointer stored on the item before changed fires. - * @returns Pointer to the newly pushed focus item. + * @return Pointer to the newly pushed focus item. */ uifocusitem_t * uiFocusPush( const uint8_t cols, diff --git a/src/dusk/ui/focus/uifocusitem.h b/src/dusk/ui/focus/uifocusitem.h index 32654321..9068df02 100644 --- a/src/dusk/ui/focus/uifocusitem.h +++ b/src/dusk/ui/focus/uifocusitem.h @@ -32,7 +32,7 @@ typedef bool_t (*uifocusitemcallback_t)(const uifocusitem_t *item); * * @param item The focus item that is currently focused. * @param direction The direction that was pressed. - * @returns True if the direction was fully handled and the default + * @return True if the direction was fully handled and the default * grid movement should be skipped; false to fall through to it. */ typedef bool_t (*uifocusitemdirectioncallback_t)( diff --git a/src/dusk/ui/overlay/uifatalerror.h b/src/dusk/ui/overlay/uifatalerror.h index 043b58c1..207d7fc7 100644 --- a/src/dusk/ui/overlay/uifatalerror.h +++ b/src/dusk/ui/overlay/uifatalerror.h @@ -59,7 +59,7 @@ void uiFatalErrorOpen(const char_t *message); /** * Returns whether the fatal error overlay is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiFatalErrorIsOpen(void); diff --git a/src/dusk/ui/rpg/textbox/uitextbox.h b/src/dusk/ui/rpg/textbox/uitextbox.h index 047e7e1f..54c7172a 100644 --- a/src/dusk/ui/rpg/textbox/uitextbox.h +++ b/src/dusk/ui/rpg/textbox/uitextbox.h @@ -82,7 +82,7 @@ void uiTextboxBuildLayout( * Skipped on dynamic ticks. * * @param box The textbox to update. - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxUpdate(uitextbox_t *box); @@ -95,7 +95,7 @@ errorret_t uiTextboxUpdate(uitextbox_t *box); * @param y Screen y position. * @param width Draw width in pixels. * @param height Draw height in pixels. - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxDraw( uitextbox_t *box, @@ -109,7 +109,7 @@ errorret_t uiTextboxDraw( * Returns the total visible char count for the current page. * * @param box The textbox to query. - * @returns Total chars on the current page. + * @return Total chars on the current page. */ int32_t uiTextboxGetPageCharCount(const uitextbox_t *box); @@ -117,7 +117,7 @@ int32_t uiTextboxGetPageCharCount(const uitextbox_t *box); * Returns true when scroll has fully revealed the current page. * * @param box The textbox to query. - * @returns True if the current page is fully visible. + * @return True if the current page is fully visible. */ bool_t uiTextboxPageIsComplete(const uitextbox_t *box); @@ -125,7 +125,7 @@ bool_t uiTextboxPageIsComplete(const uitextbox_t *box); * Returns true when there is at least one more page after the current one. * * @param box The textbox to query. - * @returns True if a next page exists. + * @return True if a next page exists. */ bool_t uiTextboxHasNextPage(const uitextbox_t *box); diff --git a/src/dusk/ui/rpg/textbox/uitextboxmain.h b/src/dusk/ui/rpg/textbox/uitextboxmain.h index e7eb83f6..be484240 100644 --- a/src/dusk/ui/rpg/textbox/uitextboxmain.h +++ b/src/dusk/ui/rpg/textbox/uitextboxmain.h @@ -24,7 +24,7 @@ extern uitextboxmain_t UI_TEXTBOX_MAIN; /** * Initializes UI_TEXTBOX_MAIN. * - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMainInit(void); @@ -38,7 +38,7 @@ void uiTextboxMainSetText(const char_t *text); /** * Advances the typewriter scroll for UI_TEXTBOX_MAIN. * - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMainUpdate(void); @@ -46,21 +46,21 @@ errorret_t uiTextboxMainUpdate(void); * Draws UI_TEXTBOX_MAIN full-width at the bottom of the screen. * Position and size are derived from SCREEN each call. * - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMainDraw(void); /** * Returns true when the current page is fully scrolled in. * - * @returns True if the current page is complete. + * @return True if the current page is complete. */ bool_t uiTextboxMainPageIsComplete(void); /** * Returns true when at least one more page follows the current one. * - * @returns True if a next page exists. + * @return True if a next page exists. */ bool_t uiTextboxMainHasNextPage(void); @@ -73,7 +73,7 @@ void uiTextboxMainNextPage(void); /** * Returns true when UI_TEXTBOX_MAIN has focus (is visible and active). * - * @returns True if the textbox is currently active. + * @return True if the textbox is currently active. */ bool_t uiTextboxMainIsActive(void); @@ -81,7 +81,7 @@ bool_t uiTextboxMainIsActive(void); * Internal focus callback - skip scroll or advance page or dismiss. * * @param item The active focus item. - * @returns True. + * @return True. */ bool_t uiTextboxMainFocusSelected(const uifocusitem_t *item); @@ -89,6 +89,6 @@ bool_t uiTextboxMainFocusSelected(const uifocusitem_t *item); * Internal focus callback - clears the focus item pointer on dismiss. * * @param item The focus item being closed. - * @returns True. + * @return True. */ bool_t uiTextboxMainFocusClosed(const uifocusitem_t *item); diff --git a/src/dusk/ui/rpg/textbox/uitextboxmini.h b/src/dusk/ui/rpg/textbox/uitextboxmini.h index 16cf3f4b..9f36e5a5 100644 --- a/src/dusk/ui/rpg/textbox/uitextboxmini.h +++ b/src/dusk/ui/rpg/textbox/uitextboxmini.h @@ -85,7 +85,7 @@ void uiTextboxMiniShow( * UI_TEXTBOX_MINI_DURATION_INFINITE. * * @param mini The mini textbox to update. - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMiniUpdate(uitextboxmini_t *mini); @@ -95,7 +95,7 @@ errorret_t uiTextboxMiniUpdate(uitextboxmini_t *mini); * active. * * @param mini The mini textbox to draw. - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMiniDraw(uitextboxmini_t *mini); @@ -103,7 +103,7 @@ errorret_t uiTextboxMiniDraw(uitextboxmini_t *mini); * Returns true when the mini textbox is currently visible. * * @param mini The mini textbox to query. - * @returns True if active. + * @return True if active. */ bool_t uiTextboxMiniIsActive(const uitextboxmini_t *mini); diff --git a/src/dusk/ui/rpg/textbox/uitextboxminilist.h b/src/dusk/ui/rpg/textbox/uitextboxminilist.h index f3040b2c..dcf4bd82 100644 --- a/src/dusk/ui/rpg/textbox/uitextboxminilist.h +++ b/src/dusk/ui/rpg/textbox/uitextboxminilist.h @@ -17,7 +17,7 @@ extern uint8_t UI_TEXTBOX_MINI_LIST_NEXT; * Initializes all UI_TEXTBOX_MINI_LIST slots and resets * UI_TEXTBOX_MINI_LIST_NEXT. * - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMiniListInit(void); @@ -25,20 +25,20 @@ errorret_t uiTextboxMiniListInit(void); * Returns the index of the next UI_TEXTBOX_MINI_LIST slot to use, cycling * through all slots in round-robin order via UI_TEXTBOX_MINI_LIST_NEXT. * - * @returns The next slot index. + * @return The next slot index. */ uint8_t uiTextboxMiniListGetNext(void); /** * Updates all UI_TEXTBOX_MINI_LIST slots. * - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMiniListUpdate(void); /** * Draws all active UI_TEXTBOX_MINI_LIST slots. * - * @returns Any error that occurs. + * @return Any error that occurs. */ errorret_t uiTextboxMiniListDraw(void); diff --git a/src/dusk/ui/screen/backpack/uibackpack.h b/src/dusk/ui/screen/backpack/uibackpack.h index 46088313..f74df5f5 100644 --- a/src/dusk/ui/screen/backpack/uibackpack.h +++ b/src/dusk/ui/screen/backpack/uibackpack.h @@ -45,7 +45,7 @@ errorret_t uiBackpackDraw(void); /** * Returns true when the backpack panel is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiBackpackIsOpen(void); diff --git a/src/dusk/ui/screen/game/uigamemenu.h b/src/dusk/ui/screen/game/uigamemenu.h index 87ec2a4e..36c450e3 100644 --- a/src/dusk/ui/screen/game/uigamemenu.h +++ b/src/dusk/ui/screen/game/uigamemenu.h @@ -49,7 +49,7 @@ errorret_t uiGameMenuDraw(void); /** * Returns true when the game menu panel is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiGameMenuIsOpen(void); diff --git a/src/dusk/ui/uielement.h b/src/dusk/ui/uielement.h index d4fdc74f..94eb0e39 100644 --- a/src/dusk/ui/uielement.h +++ b/src/dusk/ui/uielement.h @@ -21,7 +21,7 @@ typedef struct { * the end of the UI_ELEMENTS array. * * @param element The element to test. - * @returns True if the element is the null terminator. + * @return True if the element is the null terminator. */ bool_t uiElementIsNull(const uielement_t *element); diff --git a/src/dusk/ui/widget/uibutton.h b/src/dusk/ui/widget/uibutton.h index 87cd1a21..f1b5fda2 100644 --- a/src/dusk/ui/widget/uibutton.h +++ b/src/dusk/ui/widget/uibutton.h @@ -35,7 +35,7 @@ void uiButtonInit(uibutton_t *button, const char_t *label); * Returns whether the button is highlighted. * * @param button The button to query. - * @returns True if highlighted. + * @return True if highlighted. */ bool_t uiButtonIsHighlighted(const uibutton_t *button); @@ -51,7 +51,7 @@ void uiButtonSetHighlighted(uibutton_t *button, const bool_t highlighted); * Returns whether the button is active. * * @param button The button to query. - * @returns True if active. + * @return True if active. */ bool_t uiButtonIsActive(const uibutton_t *button); diff --git a/src/dusk/ui/widget/uicheckbox.h b/src/dusk/ui/widget/uicheckbox.h index b32d52cc..f3ff0282 100644 --- a/src/dusk/ui/widget/uicheckbox.h +++ b/src/dusk/ui/widget/uicheckbox.h @@ -29,7 +29,7 @@ void uiCheckboxInit( * Returns whether the checkbox is checked. * * @param checkbox The checkbox to query. - * @returns True if checked. + * @return True if checked. */ bool_t uiCheckboxIsChecked(const uicheckbox_t *checkbox); @@ -52,7 +52,7 @@ void uiCheckboxToggle(uicheckbox_t *checkbox); * Returns whether the checkbox is highlighted. * * @param checkbox The checkbox to query. - * @returns True if highlighted. + * @return True if highlighted. */ bool_t uiCheckboxIsHighlighted(const uicheckbox_t *checkbox); diff --git a/src/dusk/ui/widget/uidropdown.h b/src/dusk/ui/widget/uidropdown.h index 0c6884ac..d2e8cec9 100644 --- a/src/dusk/ui/widget/uidropdown.h +++ b/src/dusk/ui/widget/uidropdown.h @@ -42,7 +42,7 @@ void uiDropdownInit( * Returns the index of the currently selected option. * * @param dropdown The dropdown to query. - * @returns The selected option index. + * @return The selected option index. */ uint8_t uiDropdownGetSelectedIndex(const uidropdown_t *dropdown); @@ -50,7 +50,7 @@ uint8_t uiDropdownGetSelectedIndex(const uidropdown_t *dropdown); * Returns the currently selected option's display string. * * @param dropdown The dropdown to query. - * @returns The selected option string. + * @return The selected option string. */ const char_t *uiDropdownGetSelectedOption(const uidropdown_t *dropdown); @@ -82,7 +82,7 @@ void uiDropdownStepPrev(uidropdown_t *dropdown); * Returns whether the dropdown is highlighted. * * @param dropdown The dropdown to query. - * @returns True if highlighted. + * @return True if highlighted. */ bool_t uiDropdownIsHighlighted(const uidropdown_t *dropdown); diff --git a/src/dusk/ui/widget/uiitem.h b/src/dusk/ui/widget/uiitem.h index 787884c8..f0457585 100644 --- a/src/dusk/ui/widget/uiitem.h +++ b/src/dusk/ui/widget/uiitem.h @@ -37,7 +37,7 @@ errorret_t uiItemInit( * Returns the item ID this widget displays. * * @param item The item widget to query. - * @returns The item ID. + * @return The item ID. */ itemid_t uiItemGetItem(const uiitem_t *item); @@ -45,7 +45,7 @@ itemid_t uiItemGetItem(const uiitem_t *item); * Returns the stack quantity this widget displays. * * @param item The item widget to query. - * @returns The quantity. + * @return The quantity. */ uint8_t uiItemGetQuantity(const uiitem_t *item); @@ -61,7 +61,7 @@ void uiItemSetQuantity(uiitem_t *item, const uint8_t quantity); * Returns whether the item widget is highlighted. * * @param item The item widget to query. - * @returns True if highlighted. + * @return True if highlighted. */ bool_t uiItemIsHighlighted(const uiitem_t *item); diff --git a/src/dusk/ui/widget/uiitemlist.h b/src/dusk/ui/widget/uiitemlist.h index 26b3e350..19018094 100644 --- a/src/dusk/ui/widget/uiitemlist.h +++ b/src/dusk/ui/widget/uiitemlist.h @@ -148,7 +148,7 @@ void uiItemListClose(uiitemlist_t *list); * Returns whether the item list is currently on the UI focus stack. * * @param list The item list to query. - * @returns True if active. + * @return True if active. */ bool_t uiItemListIsActive(const uiitemlist_t *list); @@ -175,7 +175,7 @@ errorret_t uiItemListDraw( * * @param focusItem The active focus item; user field must point to * uiitemlist_t. - * @returns True. + * @return True. */ bool_t uiItemListFocusSelected(const uifocusitem_t *focusItem); @@ -185,7 +185,7 @@ bool_t uiItemListFocusSelected(const uifocusitem_t *focusItem); * * @param focusItem The active focus item; user field must point to * uiitemlist_t. - * @returns True. + * @return True. */ bool_t uiItemListFocusChanged(const uifocusitem_t *focusItem); @@ -195,6 +195,6 @@ bool_t uiItemListFocusChanged(const uifocusitem_t *focusItem); * * @param focusItem The active focus item; user field must point to * uiitemlist_t. - * @returns True. + * @return True. */ bool_t uiItemListFocusClosed(const uifocusitem_t *focusItem); diff --git a/src/dusk/ui/widget/uilabel.h b/src/dusk/ui/widget/uilabel.h index c771a89d..0af532ae 100644 --- a/src/dusk/ui/widget/uilabel.h +++ b/src/dusk/ui/widget/uilabel.h @@ -53,7 +53,7 @@ void uiLabelSetX(uilabel_t *label, const float_t x); * Returns the screen x position of the label. * * @param label The label to query. - * @returns The label's x position. + * @return The label's x position. */ float_t uiLabelGetX(const uilabel_t *label); @@ -69,7 +69,7 @@ void uiLabelSetY(uilabel_t *label, const float_t y); * Returns the screen y position of the label. * * @param label The label to query. - * @returns The label's y position. + * @return The label's y position. */ float_t uiLabelGetY(const uilabel_t *label); diff --git a/src/dusk/ui/widget/uimenu.h b/src/dusk/ui/widget/uimenu.h index 88abc38f..365808c3 100644 --- a/src/dusk/ui/widget/uimenu.h +++ b/src/dusk/ui/widget/uimenu.h @@ -60,7 +60,7 @@ typedef void (*uimenuclosedcallback_t)(const uimenu_t *menu); * focused - see uiMenuSetCancelCallback. * * @param menu The menu that was cancelled. - * @returns True if fully handled (skips the default disableBack/pop + * @return True if fully handled (skips the default disableBack/pop * behavior); false to fall through to it. */ typedef bool_t (*uimenucancelcallback_t)(const uimenu_t *menu); @@ -164,7 +164,7 @@ void uiMenuSetCancelCallback(uimenu_t *menu, uimenucancelcallback_t cancel); * Returns whether the menu is currently active (on the UI focus stack). * * @param menu The menu to query. - * @returns True if the menu is active. + * @return True if the menu is active. */ bool_t uiMenuIsActive(const uimenu_t *menu); @@ -176,7 +176,7 @@ bool_t uiMenuIsActive(const uimenu_t *menu); * @param y The y-coordinate to draw the menu at. * @param width The width of the menu. * @param height The height of the menu. - * @returns An error code indicating success or failure. + * @return An error code indicating success or failure. */ errorret_t uiMenuDraw( const uimenu_t *menu, @@ -190,7 +190,7 @@ errorret_t uiMenuDraw( * Returns the number of focusable (non-label) items in the menu. * * @param menu The menu to query. - * @returns Count of non-label items. + * @return Count of non-label items. */ uint8_t uiMenuFocusableCount(const uimenu_t *menu); @@ -200,7 +200,7 @@ uint8_t uiMenuFocusableCount(const uimenu_t *menu); * * @param menu The menu to query. * @param slot The focus slot index (y * columns + x). - * @returns The item array index, or 0xFF if out of range. + * @return The item array index, or 0xFF if out of range. */ uint8_t uiMenuFocusSlotToIndex(const uimenu_t *menu, const uint8_t slot); @@ -219,7 +219,7 @@ void uiMenuItemSetHighlighted(uimenuitem_t *item, const bool_t highlighted); * handler. * * @param focusItem The active focus item; user field must point to uimenu_t. - * @returns True. + * @return True. */ bool_t uiMenuFocusSelected(const uifocusitem_t *focusItem); @@ -227,7 +227,7 @@ bool_t uiMenuFocusSelected(const uifocusitem_t *focusItem); * Internal focus callback - updates widget highlights and fires changed. * * @param focusItem The active focus item; user field must point to uimenu_t. - * @returns True. + * @return True. */ bool_t uiMenuFocusChanged(const uifocusitem_t *focusItem); @@ -235,7 +235,7 @@ bool_t uiMenuFocusChanged(const uifocusitem_t *focusItem); * Internal focus callback - clears focusItem and fires the closed handler. * * @param focusItem The active focus item; user field must point to uimenu_t. - * @returns True. + * @return True. */ bool_t uiMenuFocusClosed(const uifocusitem_t *focusItem); @@ -249,7 +249,7 @@ bool_t uiMenuFocusClosed(const uifocusitem_t *focusItem); * * @param focusItem The active focus item; user field must point to uimenu_t. * @param direction The direction that was pressed or held. - * @returns True if handled (a widget adjusted itself, or focus moved to + * @return True if handled (a widget adjusted itself, or focus moved to * a non-blank cell); false to fall through to the default single-step * move (only when every cell along this line is blank). */ @@ -267,7 +267,7 @@ bool_t uiMenuFocusDirection( * they're already excluded from the focus grid entirely. * * @param item The item to check. - * @returns True if this item is blank filler. + * @return True if this item is blank filler. */ bool_t uiMenuItemIsBlank(const uimenuitem_t *item); @@ -301,7 +301,7 @@ bool_t uiMenuItemIsBlank(const uimenuitem_t *item); * @param menu The menu to move within. * @param focusItem The active focus item; must belong to menu. * @param direction The direction that was pressed or held. - * @returns True if a non-blank cell was found and focus moved there. + * @return True if a non-blank cell was found and focus moved there. */ bool_t uiMenuFocusSkipBlanks( uimenu_t *menu, @@ -314,7 +314,7 @@ bool_t uiMenuFocusSkipBlanks( * cancel handler, if one is set. * * @param focusItem The active focus item; user field must point to uimenu_t. - * @returns The cancel handler's result, or false if none is set. + * @return The cancel handler's result, or false if none is set. */ bool_t uiMenuFocusCancel(const uifocusitem_t *focusItem); diff --git a/src/dusk/ui/widget/uimodal.h b/src/dusk/ui/widget/uimodal.h index 2a10b13f..b74b6b46 100644 --- a/src/dusk/ui/widget/uimodal.h +++ b/src/dusk/ui/widget/uimodal.h @@ -92,14 +92,14 @@ errorret_t uiModalDraw(void); /** * Returns true when the modal dialog is currently open. * - * @returns True if open. + * @return True if open. */ bool_t uiModalIsOpen(void); /** * Returns the result of the most recently dismissed modal. * - * @returns The selected option index, or UI_MODAL_RESULT_NONE. + * @return The selected option index, or UI_MODAL_RESULT_NONE. */ uint8_t uiModalGetResult(void); diff --git a/src/dusk/ui/widget/uislider.h b/src/dusk/ui/widget/uislider.h index d53dee00..e871a4fb 100644 --- a/src/dusk/ui/widget/uislider.h +++ b/src/dusk/ui/widget/uislider.h @@ -86,7 +86,7 @@ void uiSliderInitInt( * types; int values are widened to float. * * @param slider The slider to query. - * @returns The current value. + * @return The current value. */ float_t uiSliderGetFloat(const uislider_t *slider); @@ -95,7 +95,7 @@ float_t uiSliderGetFloat(const uislider_t *slider); * UI_SLIDER_TYPE_INT sliders. * * @param slider The slider to query. - * @returns The current value. + * @return The current value. */ int32_t uiSliderGetInt(const uislider_t *slider); @@ -138,7 +138,7 @@ void uiSliderStepDown(uislider_t *slider); * on its min/max. * * @param slider The slider to query. - * @returns The normalized value. + * @return The normalized value. */ float_t uiSliderGetRatio(const uislider_t *slider); @@ -147,7 +147,7 @@ float_t uiSliderGetRatio(const uislider_t *slider); * for float sliders. * * @param slider The slider to query. - * @returns The step count. + * @return The step count. */ int32_t uiSliderGetStepCount(const uislider_t *slider); @@ -155,7 +155,7 @@ int32_t uiSliderGetStepCount(const uislider_t *slider); * Returns whether the slider is highlighted. * * @param slider The slider to query. - * @returns True if highlighted. + * @return True if highlighted. */ bool_t uiSliderIsHighlighted(const uislider_t *slider); diff --git a/src/dusk/ui/widget/uitab.h b/src/dusk/ui/widget/uitab.h index 678f54b6..5c650c5e 100644 --- a/src/dusk/ui/widget/uitab.h +++ b/src/dusk/ui/widget/uitab.h @@ -25,7 +25,7 @@ void uiTabInit(uitab_t *tab, const char_t *label); * Returns whether the tab is active. * * @param tab The tab to query. - * @returns True if active. + * @return True if active. */ bool_t uiTabIsActive(const uitab_t *tab); diff --git a/src/dusk/util/random.c b/src/dusk/util/random.c index c7974029..4fba1250 100644 --- a/src/dusk/util/random.c +++ b/src/dusk/util/random.c @@ -6,7 +6,6 @@ */ #include "random.h" -#include float_t randomFloat(const float_t min, const float_t max) { return min + ((float_t)rand() / (float_t)RAND_MAX) * (max - min); diff --git a/src/dusk/util/random.h b/src/dusk/util/random.h index 1fba6946..6be4059d 100644 --- a/src/dusk/util/random.h +++ b/src/dusk/util/random.h @@ -13,7 +13,7 @@ * * @param min Lower bound. * @param max Upper bound. - * @returns A random float in [min, max). + * @return A random float in [min, max). */ float_t randomFloat(const float_t min, const float_t max); @@ -22,6 +22,6 @@ float_t randomFloat(const float_t min, const float_t max); * * @param min Lower bound. * @param max Upper bound. - * @returns A random integer in [min, max). + * @return A random integer in [min, max). */ int_t randomInt(const int_t min, const int_t max); diff --git a/src/dusk/util/sort.c b/src/dusk/util/sort.c index 3e184bbb..dde9c486 100644 --- a/src/dusk/util/sort.c +++ b/src/dusk/util/sort.c @@ -1,4 +1,3 @@ -#include /** * Copyright (c) 2026 Dominic Masters * diff --git a/src/duskdolphin/asset/assetdolphindvd.c b/src/duskdolphin/asset/assetdolphindvd.c index 19d6ea67..10a9e2bb 100644 --- a/src/duskdolphin/asset/assetdolphindvd.c +++ b/src/duskdolphin/asset/assetdolphindvd.c @@ -23,7 +23,7 @@ errorret_t assetInitDolphinDVD(void) { (s64)(ASSET_DOLPHIN_DVD_PVD_SECTOR * ASSET_DOLPHIN_DVD_SECTOR_SIZE), ASSET_DOLPHIN_DVD_SECTOR_SIZE ); - if(!pvd) errorThrow("Failed to read ISO 9660 PVD."); + if(pvd == NULL) errorThrow("Failed to read ISO 9660 PVD."); // Sanity-check: type=1, identifier="CD001" if(pvd[0] != 1 || pvd[1] != 'C' || pvd[2] != 'D' || @@ -42,7 +42,7 @@ errorret_t assetInitDolphinDVD(void) { u8 *dir = (u8 *)assetDolphinDVDRead( (s64)rootLBA * ASSET_DOLPHIN_DVD_SECTOR_SIZE, rootSize ); - if(!dir) errorThrow("Failed to read ISO 9660 root directory."); + if(dir == NULL) errorThrow("Failed to read ISO 9660 root directory."); // Scan directory records for dusk.dsk. // ISO 9660 level-1 names are uppercase with a ";1" version suffix, e.g. @@ -89,7 +89,7 @@ errorret_t assetInitDolphinDVD(void) { u8 *data = (u8 *)assetDolphinDVDRead( (s64)fileLBA * ASSET_DOLPHIN_DVD_SECTOR_SIZE, fileSize ); - if(!data) errorThrow("Failed to read asset file from ISO."); + if(data == NULL) errorThrow("Failed to read asset file from ISO."); errorret_t ret = assetDskOpenFromBuffer( data, fileSize, &ASSET.zip, &ASSET.zipStored @@ -106,7 +106,7 @@ errorret_t assetInitDolphinDVD(void) { void *assetDolphinDVDRead(const s64 offset, const u32 size) { u32 padded = ASSET_DOLPHIN_DVD_ALIGN_UP(size); void *buf = memoryAlign(ASSET_DOLPHIN_DVD_ALIGN, padded); - if(!buf) return NULL; + if(buf == NULL) return NULL; DCInvalidateRange(buf, padded); static dvdcmdblk block; if(DVD_ReadAbs(&block, buf, padded, offset) <= 0) { diff --git a/src/duskdolphin/display/mesh/meshdolphin.c b/src/duskdolphin/display/mesh/meshdolphin.c index 95dd3d9b..aa56dce6 100644 --- a/src/duskdolphin/display/mesh/meshdolphin.c +++ b/src/duskdolphin/display/mesh/meshdolphin.c @@ -16,8 +16,8 @@ errorret_t meshInitDolphin( const int32_t vertexCount, const meshvertex_t *vertices ) { - assertNotNull(mesh, "Mesh cannot be null."); - assertNotNull(vertices, "Vertices cannot be null."); + assertNotNull(mesh, "Mesh cannot be NULL."); + assertNotNull(vertices, "Vertices cannot be NULL."); assertTrue(vertexCount > 0, "Vertex count must be greater than 0."); mesh->primitiveType = primitiveType; diff --git a/src/duskdolphin/display/shader/shaderdolphin.c b/src/duskdolphin/display/shader/shaderdolphin.c index cc381b02..a1242b2a 100644 --- a/src/duskdolphin/display/shader/shaderdolphin.c +++ b/src/duskdolphin/display/shader/shaderdolphin.c @@ -17,8 +17,8 @@ errorret_t shaderInitDolphin( shaderdolphin_t *shader, const shaderdefinitiondolphin_t *def ) { - assertNotNull(shader, "Shader must not be null"); - assertNotNull(def, "Shader definition must not be null"); + assertNotNull(shader, "Shader must not be NULL"); + assertNotNull(def, "Shader definition must not be NULL"); memoryZero(shader, sizeof(shaderdolphin_t)); @@ -37,7 +37,7 @@ errorret_t shaderInitDolphin( } errorret_t shaderBindDolphin(shaderdolphin_t *shader) { - assertNotNull(shader, "Shader must not be null"); + assertNotNull(shader, "Shader must not be NULL"); SHADER_BOUND = shader; @@ -56,8 +56,8 @@ errorret_t shaderSetMatrixDolphin( const char_t *name, mat4 mat ) { - assertNotNull(shader, "Shader must not be null"); - assertNotNull(name, "Uniform name must not be null"); + assertNotNull(shader, "Shader must not be NULL"); + assertNotNull(name, "Uniform name must not be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); if(stringCompare(name, SHADER_UNLIT_PROJECTION) == 0) { @@ -84,8 +84,8 @@ errorret_t shaderSetTextureDolphin( const char_t *name, texture_t *texture ) { - assertNotNull(shader, "Shader must not be null"); - assertNotNull(name, "Uniform name must not be null"); + assertNotNull(shader, "Shader must not be NULL"); + assertNotNull(name, "Uniform name must not be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); if(texture == NULL) { @@ -168,8 +168,8 @@ errorret_t shaderSetColorDolphin( const char_t *name, color_t color ) { - assertNotNull(shader, "Shader must not be null"); - assertNotNull(name, "Uniform name must not be null"); + assertNotNull(shader, "Shader must not be NULL"); + assertNotNull(name, "Uniform name must not be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); GX_SetChanMatColor(GX_COLOR0A0, (GXColor){ @@ -183,7 +183,7 @@ errorret_t shaderSetColorDolphin( } errorret_t shaderDisposeDolphin(shaderdolphin_t *shader) { - assertNotNull(shader, "Shader must not be null"); + assertNotNull(shader, "Shader must not be NULL"); SHADER_BOUND = NULL; @@ -191,7 +191,7 @@ errorret_t shaderDisposeDolphin(shaderdolphin_t *shader) { } errorret_t shaderUpdateMVPDolphin() { - assertNotNull(SHADER_BOUND, "Shader must not be null"); + assertNotNull(SHADER_BOUND, "Shader must not be NULL"); // Any changes? if(SHADER_BOUND->dirtyMatrix == 0) errorOk(); @@ -243,8 +243,8 @@ errorret_t shaderUpdateMVPDolphin() { } void shaderMat4ToMtx44(const mat4 inGlmMatrix, Mtx44 outGXMatrix) { - assertNotNull(inGlmMatrix, "Input matrix cannot be null"); - assertNotNull(outGXMatrix, "Output matrix cannot be null"); + assertNotNull(inGlmMatrix, "Input matrix cannot be NULL"); + assertNotNull(outGXMatrix, "Output matrix cannot be NULL"); for(int row = 0; row < 4; ++row) { for(int col = 0; col < 4; ++col) { @@ -254,8 +254,8 @@ void shaderMat4ToMtx44(const mat4 inGlmMatrix, Mtx44 outGXMatrix) { } void shaderMat4ToMtx(const mat4 inGlmMatrix, Mtx outGXMatrix) { - assertNotNull(inGlmMatrix, "Input matrix cannot be null"); - assertNotNull(outGXMatrix, "Output matrix cannot be null"); + assertNotNull(inGlmMatrix, "Input matrix cannot be NULL"); + assertNotNull(outGXMatrix, "Output matrix cannot be NULL"); guMtxIdentity(outGXMatrix); diff --git a/src/duskdolphin/save/savedevicedolphincard.c b/src/duskdolphin/save/savedevicedolphincard.c index ce102d9e..03d2073d 100644 --- a/src/duskdolphin/save/savedevicedolphincard.c +++ b/src/duskdolphin/save/savedevicedolphincard.c @@ -12,7 +12,7 @@ #include "util/memory.h" errorret_t saveDeviceDolphinCardInit(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); device->state = SAVE_DEVICE_STATE_UNKNOWN; @@ -27,13 +27,13 @@ errorret_t saveDeviceDolphinCardInit(savedevice_t *device) { } errorret_t saveDeviceDolphinCardUpdate(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); errorOk(); } void saveDeviceDolphinCardCheckAvailability(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); assertTrue( device->state == SAVE_DEVICE_STATE_CHECKING_AVAILABILITY, @@ -164,8 +164,8 @@ errorret_t saveDeviceDolphinCardDataWrite( const uint8_t *buffer, size_t size ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(buffer, "buffer cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(buffer, "buffer cannot be NULL"); int32_t channel = device->platform.channel; @@ -233,9 +233,9 @@ errorret_t saveDeviceDolphinCardDataRead( uint8_t **outBuffer, size_t *outSize ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(outBuffer, "outBuffer cannot be null"); - assertNotNull(outSize, "outSize cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(outBuffer, "outBuffer cannot be NULL"); + assertNotNull(outSize, "outSize cannot be NULL"); int32_t channel = device->platform.channel; @@ -272,7 +272,7 @@ errorret_t saveDeviceDolphinCardDataRead( } errorret_t saveDeviceDolphinCardDispose(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); if(device->platform.mounted) { CARD_Unmount(device->platform.channel); device->platform.mounted = false; diff --git a/src/duskdolphin/save/savedevicedolphinnand.c b/src/duskdolphin/save/savedevicedolphinnand.c index 52e0a42a..02ba1a41 100644 --- a/src/duskdolphin/save/savedevicedolphinnand.c +++ b/src/duskdolphin/save/savedevicedolphinnand.c @@ -14,7 +14,7 @@ #define SAVE_DEVICE_DOLPHIN_NAND_PATH_MAX 64 errorret_t saveDeviceDolphinNandInit(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); device->state = SAVE_DEVICE_STATE_UNKNOWN; @@ -22,13 +22,13 @@ errorret_t saveDeviceDolphinNandInit(savedevice_t *device) { } errorret_t saveDeviceDolphinNandUpdate(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); errorOk(); } void saveDeviceDolphinNandCheckAvailability(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); assertTrue( device->state == SAVE_DEVICE_STATE_CHECKING_AVAILABILITY, @@ -70,7 +70,7 @@ errorret_t saveDeviceDolphinNandGetDataPath( char_t *dest, const size_t destSize ) { - assertNotNull(dest, "dest cannot be null"); + assertNotNull(dest, "dest cannot be NULL"); stringFormat( dest, destSize, "%s/%s", @@ -85,8 +85,8 @@ errorret_t saveDeviceDolphinNandDataWrite( const uint8_t *buffer, size_t size ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(buffer, "buffer cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(buffer, "buffer cannot be NULL"); char_t finalPath[SAVE_DEVICE_DOLPHIN_NAND_PATH_MAX]; errorChain(saveDeviceDolphinNandGetDataPath(finalPath, sizeof(finalPath))); @@ -131,9 +131,9 @@ errorret_t saveDeviceDolphinNandDataRead( uint8_t **outBuffer, size_t *outSize ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(outBuffer, "outBuffer cannot be null"); - assertNotNull(outSize, "outSize cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(outBuffer, "outBuffer cannot be NULL"); + assertNotNull(outSize, "outSize cannot be NULL"); char_t path[SAVE_DEVICE_DOLPHIN_NAND_PATH_MAX]; errorChain(saveDeviceDolphinNandGetDataPath(path, sizeof(path))); @@ -168,7 +168,7 @@ errorret_t saveDeviceDolphinNandDataRead( } errorret_t saveDeviceDolphinNandDispose(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); if(device->platform.initialized) { ISFS_Deinitialize(); device->platform.initialized = false; diff --git a/src/duskdolphin/save/savedevicedolphinsd.c b/src/duskdolphin/save/savedevicedolphinsd.c index 32074889..cf30237e 100644 --- a/src/duskdolphin/save/savedevicedolphinsd.c +++ b/src/duskdolphin/save/savedevicedolphinsd.c @@ -18,7 +18,7 @@ #define SAVE_DEVICE_DOLPHIN_SD_PATH_MAX 128 errorret_t saveDeviceDolphinSDInit(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); device->state = SAVE_DEVICE_STATE_UNKNOWN; @@ -26,13 +26,13 @@ errorret_t saveDeviceDolphinSDInit(savedevice_t *device) { } errorret_t saveDeviceDolphinSDUpdate(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); errorOk(); } void saveDeviceDolphinSDCheckAvailability(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); assertTrue( device->state == SAVE_DEVICE_STATE_CHECKING_AVAILABILITY, @@ -57,7 +57,7 @@ errorret_t saveDeviceDolphinSDGetDataPath( char_t *dest, const size_t destSize ) { - assertNotNull(dest, "dest cannot be null"); + assertNotNull(dest, "dest cannot be NULL"); stringFormat( dest, destSize, "%s/%s", @@ -72,8 +72,8 @@ errorret_t saveDeviceDolphinSDDataWrite( const uint8_t *buffer, size_t size ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(buffer, "buffer cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(buffer, "buffer cannot be NULL"); char_t finalPath[SAVE_DEVICE_DOLPHIN_SD_PATH_MAX]; errorChain(saveDeviceDolphinSDGetDataPath(finalPath, sizeof(finalPath))); @@ -106,9 +106,9 @@ errorret_t saveDeviceDolphinSDDataRead( uint8_t **outBuffer, size_t *outSize ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(outBuffer, "outBuffer cannot be null"); - assertNotNull(outSize, "outSize cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(outBuffer, "outBuffer cannot be NULL"); + assertNotNull(outSize, "outSize cannot be NULL"); char_t path[SAVE_DEVICE_DOLPHIN_SD_PATH_MAX]; errorChain(saveDeviceDolphinSDGetDataPath(path, sizeof(path))); diff --git a/src/duskgl/display/shader/shadergl.c b/src/duskgl/display/shader/shadergl.c index f7467f41..05b63916 100644 --- a/src/duskgl/display/shader/shadergl.c +++ b/src/duskgl/display/shader/shadergl.c @@ -16,8 +16,8 @@ #endif errorret_t shaderInitGL(shadergl_t *shader, const shaderdefinitiongl_t *def) { - assertNotNull(shader, "Shader cannot be null"); - assertNotNull(def, "Shader definition cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); + assertNotNull(def, "Shader definition cannot be NULL"); memoryZero(shader, sizeof(shadergl_t)); shader->definition = def; @@ -30,8 +30,8 @@ errorret_t shaderInitGL(shadergl_t *shader, const shaderdefinitiongl_t *def) { SHADER_LEGACY.boundShader = NULL; errorOk(); #else - assertNotNull(def->vert, "Vertex shader source cannot be null"); - assertNotNull(def->frag, "Fragment shader source cannot be null"); + assertNotNull(def->vert, "Vertex shader source cannot be NULL"); + assertNotNull(def->frag, "Fragment shader source cannot be NULL"); // Create vertex shader shader->vertexShaderId = glCreateShader(GL_VERTEX_SHADER); @@ -150,9 +150,9 @@ errorret_t shaderParamGetLocationGL( const char_t *name, GLint *location ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); - assertNotNull(location, "Location cannot be null"); + assertNotNull(location, "Location cannot be NULL"); #ifdef DUSK_OPENGL_LEGACY assertUnreachable("Cannot get uniform locations on legacy opengl."); @@ -172,9 +172,9 @@ errorret_t shaderSetMatrixGL( const char_t *name, mat4 mat ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); - assertNotNull(mat, "Matrix data cannot be null"); + assertNotNull(mat, "Matrix data cannot be NULL"); #ifdef DUSK_OPENGL_LEGACY assertTrue( @@ -213,7 +213,7 @@ errorret_t shaderSetTextureGL( const char_t *name, texture_t *texture ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); #ifdef DUSK_OPENGL_LEGACY @@ -256,7 +256,7 @@ errorret_t shaderSetTextureGL( // errorChain(errorGLCheck()); #else - assertNotNull(shader->definition, "Shader definition cannot be null"); + assertNotNull(shader->definition, "Shader definition cannot be NULL"); assertNotNull(shader->definition->setTexture, "Shader cannot do textures."); errorChain(shader->definition->setTexture(shader, name, texture)); #endif @@ -269,7 +269,7 @@ errorret_t shaderSetColorGL( const char_t *name, color_t color ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); #ifdef DUSK_OPENGL_LEGACY @@ -340,7 +340,7 @@ errorret_t shaderSetColorGL( errorret_t shaderBindGL(shadergl_t *shader) { #ifdef DUSK_OPENGL_LEGACY - assertNotNull(shader, "Cannot bind a null shader."); + assertNotNull(shader, "Cannot bind a NULL shader."); SHADER_LEGACY.boundShader = shader; SHADER_LEGACY.dirty = ( SHADER_LEGACY_DIRTY_MODEL | @@ -348,7 +348,7 @@ errorret_t shaderBindGL(shadergl_t *shader) { SHADER_LEGACY_DIRTY_VIEW ); #else - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); glUseProgram(shader->shaderProgramId); errorChain(errorGLCheck()); #endif @@ -357,7 +357,7 @@ errorret_t shaderBindGL(shadergl_t *shader) { } errorret_t shaderDisposeGL(shadergl_t *shader) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); #ifdef DUSK_OPENGL_LEGACY SHADER_LEGACY.boundShader = NULL; diff --git a/src/duskgl/display/shader/shaderunlitgl.c b/src/duskgl/display/shader/shaderunlitgl.c index f349de83..e0261a4b 100644 --- a/src/duskgl/display/shader/shaderunlitgl.c +++ b/src/duskgl/display/shader/shaderunlitgl.c @@ -18,7 +18,7 @@ const char_t *name, texture_t *texture ) { - assertNotNull(shader, "Shader cannot be null"); + assertNotNull(shader, "Shader cannot be NULL"); assertStrLenMin(name, 1, "Uniform name cannot be empty"); assertStringEqual( name, diff --git a/src/dusklinux/save/savedevicelinux.c b/src/dusklinux/save/savedevicelinux.c index 1aafd1d0..0068215a 100644 --- a/src/dusklinux/save/savedevicelinux.c +++ b/src/dusklinux/save/savedevicelinux.c @@ -16,7 +16,7 @@ #include "util/string.h" errorret_t saveDeviceLinuxInit(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); device->state = SAVE_DEVICE_STATE_UNKNOWN; @@ -24,13 +24,13 @@ errorret_t saveDeviceLinuxInit(savedevice_t *device) { } errorret_t saveDeviceLinuxUpdate(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); errorOk(); } void saveDeviceLinuxCheckAvailability(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); assertTrue( device->state == SAVE_DEVICE_STATE_CHECKING_AVAILABILITY, @@ -62,7 +62,7 @@ void saveDeviceLinuxCheckAvailability(savedevice_t *device) { } errorret_t saveDeviceLinuxGetDirectory(char_t *dest, const size_t destSize) { - assertNotNull(dest, "dest cannot be null"); + assertNotNull(dest, "dest cannot be NULL"); stringFormat( dest, destSize, "%s/%s", @@ -75,7 +75,7 @@ errorret_t saveDeviceLinuxGetSettingsPath( char_t *dest, const size_t destSize ) { - assertNotNull(dest, "dest cannot be null"); + assertNotNull(dest, "dest cannot be NULL"); char_t directory[SAVE_DEVICE_LINUX_PATH_MAX]; errorChain(saveDeviceLinuxGetDirectory(directory, sizeof(directory))); @@ -91,7 +91,7 @@ errorret_t saveDeviceLinuxGetSlotPath( const size_t destSize, const uint8_t slotIndex ) { - assertNotNull(dest, "dest cannot be null"); + assertNotNull(dest, "dest cannot be NULL"); char_t directory[SAVE_DEVICE_LINUX_PATH_MAX]; errorChain(saveDeviceLinuxGetDirectory(directory, sizeof(directory))); @@ -111,8 +111,8 @@ errorret_t saveDeviceLinuxSlotWrite( saveslot_t *slot, uint8_t slotIndex ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(slot, "slot cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(slot, "slot cannot be NULL"); char_t path[SAVE_DEVICE_LINUX_PATH_MAX]; errorChain(saveDeviceLinuxGetSlotPath(path, sizeof(path), slotIndex)); @@ -143,8 +143,8 @@ errorret_t saveDeviceLinuxSlotRead( saveslot_t *slot, uint8_t slotIndex ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(slot, "slot cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(slot, "slot cannot be NULL"); char_t path[SAVE_DEVICE_LINUX_PATH_MAX]; errorChain(saveDeviceLinuxGetSlotPath(path, sizeof(path), slotIndex)); @@ -176,8 +176,8 @@ errorret_t saveDeviceLinuxSettingsWrite( savedevice_t *device, savesettings_t *settings ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(settings, "settings cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(settings, "settings cannot be NULL"); char_t path[SAVE_DEVICE_LINUX_PATH_MAX]; errorChain(saveDeviceLinuxGetSettingsPath(path, sizeof(path))); @@ -207,8 +207,8 @@ errorret_t saveDeviceLinuxSettingsRead( savedevice_t *device, savesettings_t *settings ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(settings, "settings cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(settings, "settings cannot be NULL"); char_t path[SAVE_DEVICE_LINUX_PATH_MAX]; errorChain(saveDeviceLinuxGetSettingsPath(path, sizeof(path))); diff --git a/src/dusklinux/util/mkdirp.c b/src/dusklinux/util/mkdirp.c index 2c086ea8..5461fca2 100644 --- a/src/dusklinux/util/mkdirp.c +++ b/src/dusklinux/util/mkdirp.c @@ -12,7 +12,7 @@ #include int_t mkdirp(const char_t *path, const int_t mode) { - assertNotNull(path, "path cannot be null"); + assertNotNull(path, "path cannot be NULL"); assertStrLenMax(path, PATH_MAX, "path is too long"); char_t buffer[PATH_MAX]; diff --git a/src/dusknetwork/network/network.c b/src/dusknetwork/network/network.c index 9ebd57fd..9bc957ea 100644 --- a/src/dusknetwork/network/network.c +++ b/src/dusknetwork/network/network.c @@ -57,9 +57,9 @@ void networkRequestConnection( void (*onDisconnect)(errorret_t error, void *user), void *user ) { - assertNotNull(onConnected, "onConnected callback must not be null"); - assertNotNull(onFailed, "onFailed callback must not be null"); - assertNotNull(onDisconnect, "onDisconnect callback must not be null"); + assertNotNull(onConnected, "onConnected callback must not be NULL"); + assertNotNull(onFailed, "onFailed callback must not be NULL"); + assertNotNull(onDisconnect, "onDisconnect callback must not be NULL"); NETWORK.state = NETWORK_STATE_CONNECTING; NETWORK.onDisconnect = onDisconnect; @@ -91,7 +91,7 @@ void networkRequestDisconnection( void (*onComplete)(void *user), void *user ) { - assertNotNull(onComplete, "onComplete callback must not be null"); + assertNotNull(onComplete, "onComplete callback must not be NULL"); NETWORK.state = NETWORK_STATE_DISCONNECTING; #ifndef networkPlatformRequestDisconnection diff --git a/src/duskpsp/asset/assetpbp.c b/src/duskpsp/asset/assetpbp.c index dc7dd424..6d00ba30 100644 --- a/src/duskpsp/asset/assetpbp.c +++ b/src/duskpsp/asset/assetpbp.c @@ -12,7 +12,7 @@ #include "util/string.h" errorret_t assetInitPBP(const char_t *pbpPath) { - assertNotNull(pbpPath, "PBP path cannot be null."); + assertNotNull(pbpPath, "PBP path cannot be NULL."); assertStrLenMin(pbpPath, 1, "PBP path cannot be empty."); assertStrLenMax(pbpPath, ASSET_PBP_PATH_MAX, "PBP path is too long."); diff --git a/src/duskpsp/asset/assetpbp.h b/src/duskpsp/asset/assetpbp.h index dbbcc02c..eb568ed4 100644 --- a/src/duskpsp/asset/assetpbp.h +++ b/src/duskpsp/asset/assetpbp.h @@ -35,13 +35,13 @@ typedef struct { * Initializes the PBP style asset system. * * @param pbpPath The file path to the PBP file to read. - * @returns An errorret_t indicating success or failure of the operation. + * @return An errorret_t indicating success or failure of the operation. */ errorret_t assetInitPBP(const char_t *pbpPath); /** * Disposes the PBP style asset system. * - * @returns An errorret_t indicating success or failure of the operation. + * @return An errorret_t indicating success or failure of the operation. */ errorret_t assetDisposePBP(void); \ No newline at end of file diff --git a/src/duskpsp/asset/assetpsp.h b/src/duskpsp/asset/assetpsp.h index badcd314..52382b94 100644 --- a/src/duskpsp/asset/assetpsp.h +++ b/src/duskpsp/asset/assetpsp.h @@ -15,13 +15,13 @@ typedef assetpbp_t assetpsp_t; /** * Initializes the PSP style asset system. * - * @returns An errorret_t indicating success or failure of the operation. + * @return An errorret_t indicating success or failure of the operation. */ errorret_t assetInitPSP(void); /** * Disposes the PSP style asset system. * - * @returns An errorret_t indicating success or failure of the operation. + * @return An errorret_t indicating success or failure of the operation. */ errorret_t assetDisposePSP(void); \ No newline at end of file diff --git a/src/duskpsp/save/savedevicepsp.c b/src/duskpsp/save/savedevicepsp.c index 8eadee92..8dd099eb 100644 --- a/src/duskpsp/save/savedevicepsp.c +++ b/src/duskpsp/save/savedevicepsp.c @@ -16,7 +16,7 @@ #define SAVE_DEVICE_PSP_PATH_MAX 64 errorret_t saveDevicePSPInit(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); device->state = SAVE_DEVICE_STATE_UNKNOWN; @@ -24,13 +24,13 @@ errorret_t saveDevicePSPInit(savedevice_t *device) { } errorret_t saveDevicePSPUpdate(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); errorOk(); } void saveDevicePSPCheckAvailability(savedevice_t *device) { - assertNotNull(device, "device cannot be null"); + assertNotNull(device, "device cannot be NULL"); assertIsMainThread("Invalid thread"); assertTrue( device->state == SAVE_DEVICE_STATE_CHECKING_AVAILABILITY, @@ -61,7 +61,7 @@ errorret_t saveDevicePSPGetDataPath( char_t *dest, const size_t destSize ) { - assertNotNull(dest, "dest cannot be null"); + assertNotNull(dest, "dest cannot be NULL"); stringFormat( dest, destSize, "%s/%s", @@ -76,8 +76,8 @@ errorret_t saveDevicePSPDataWrite( const uint8_t *buffer, size_t size ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(buffer, "buffer cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(buffer, "buffer cannot be NULL"); char_t finalPath[SAVE_DEVICE_PSP_PATH_MAX]; errorChain(saveDevicePSPGetDataPath(finalPath, sizeof(finalPath))); @@ -112,9 +112,9 @@ errorret_t saveDevicePSPDataRead( uint8_t **outBuffer, size_t *outSize ) { - assertNotNull(device, "device cannot be null"); - assertNotNull(outBuffer, "outBuffer cannot be null"); - assertNotNull(outSize, "outSize cannot be null"); + assertNotNull(device, "device cannot be NULL"); + assertNotNull(outBuffer, "outBuffer cannot be NULL"); + assertNotNull(outSize, "outSize cannot be NULL"); char_t path[SAVE_DEVICE_PSP_PATH_MAX]; errorChain(saveDevicePSPGetDataPath(path, sizeof(path))); diff --git a/src/duskvita/asset/assetvita.h b/src/duskvita/asset/assetvita.h index 82d2bbbf..bb9188bf 100644 --- a/src/duskvita/asset/assetvita.h +++ b/src/duskvita/asset/assetvita.h @@ -18,13 +18,13 @@ typedef struct { /** * Initializes the Vita asset system, opening dusk.dsk from the VPK mount. * - * @returns An errorret_t indicating success or failure. + * @return An errorret_t indicating success or failure. */ errorret_t assetInitVita(void); /** * Disposes the Vita asset system. * - * @returns An errorret_t indicating success or failure. + * @return An errorret_t indicating success or failure. */ errorret_t assetDisposeVita(void);