Skip to content

Commit

Permalink
butano: BN_CFG_ASSERT_TAG added
Browse files Browse the repository at this point in the history
  • Loading branch information
GValiente committed Jan 30, 2025
1 parent 4cd5367 commit 91cd975
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
13 changes: 12 additions & 1 deletion butano/include/bn_config_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @ingroup assert
*/

#include "bn_common.h"
#include "bn_version.h"

/**
* @def BN_CFG_ASSERT_ENABLED
Expand All @@ -39,6 +39,17 @@
#define BN_CFG_ASSERT_SHOW_DIAGNOSTIC true
#endif

/**
* @def BN_CFG_ASSERT_TAG
*
* Specifies the default tag displayed in assert messages.
*
* @ingroup assert
*/
#ifndef BN_CFG_ASSERT_TAG
#define BN_CFG_ASSERT_TAG BN_VERSION_STRING " " BN_TOOLCHAIN_TAG
#endif

/**
* @def BN_CFG_ASSERT_BUFFER_SIZE
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @section changelog_18_8_0 18.8.0 (next release)
*
* * bn::best_fit_allocator::check_empty_on_destructor and bn::best_fit_allocator::set_check_empty_on_destructor added.
* * @ref BN_CFG_ASSERT_TAG added.
* * Import tool now allows to specify the width of sprites and sprite tiles.
* See the @ref import_image import guide to learn how to specify it.
* * Show the sum of the ticks of all entries in the profiler results.
Expand Down
4 changes: 2 additions & 2 deletions butano/src/bn_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
#include "bn_keypad.h"
#include "bn_memory.h"
#include "bn_timers.h"
#include "bn_version.h"
#include "bn_profiler.h"
#include "bn_system_font.h"
#include "bn_bgs_manager.h"
#include "bn_hdma_manager.h"
#include "bn_link_manager.h"
#include "bn_gpio_manager.h"
#include "bn_audio_manager.h"
#include "bn_config_assert.h"
#include "bn_keypad_manager.h"
#include "bn_memory_manager.h"
#include "bn_display_manager.h"
Expand Down Expand Up @@ -132,7 +132,7 @@ namespace
timer cpu_usage_timer;
ticks last_ticks;
bn::system_font system_font;
string_view assert_tag = BN_VERSION_STRING " " BN_TOOLCHAIN_TAG;
string_view assert_tag = BN_CFG_ASSERT_TAG;
int skip_frames = 0;
int last_update_frames = 1;
int missed_frames = 0;
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.html

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/group__assert.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ <h2><a href="#define-members">Defines</a></h2>
<span class="m-doc-wrap-bumper">#define <a href="#ga4b7d0bdea5d644b055bcb3c64d310cf9" class="m-doc">BN_CFG_ASSERT_SHOW_DIAGNOSTIC</a></span>
</dt>
<dd></dd>
<dt>
<span class="m-doc-wrap-bumper">#define <a href="#ga3c61a3849a33edc22c9b06c6781fd593" class="m-doc">BN_CFG_ASSERT_TAG</a></span>
</dt>
<dd></dd>
<dt>
<span class="m-doc-wrap-bumper">#define <a href="#gae130b2a4530372f13f67f7bb22d15070" class="m-doc">BN_CFG_ASSERT_BUFFER_SIZE</a></span>
</dt>
Expand Down Expand Up @@ -179,6 +183,13 @@ <h3>
<div class="m-doc-include m-code m-inverted m-text-right"><span class="cp">#include</span> <a class="cpf" href="bn__config__assert_8h.html">&lt;bn_config_assert.h&gt;</a></div>
</h3>
<p>Specifies if asserts diagnostic information must be shown or not.</p><p>Disabling diagnostic information reduces ROM size.</p>
</div></section>
<section class="m-doc-details" id="ga3c61a3849a33edc22c9b06c6781fd593"><div>
<h3>
<span class="m-doc-wrap-bumper">#define <a href="#ga3c61a3849a33edc22c9b06c6781fd593" class="m-doc-self">BN_CFG_ASSERT_TAG</a></span>
<div class="m-doc-include m-code m-inverted m-text-right"><span class="cp">#include</span> <a class="cpf" href="bn__config__assert_8h.html">&lt;bn_config_assert.h&gt;</a></div>
</h3>
<p>Specifies the default tag displayed in assert messages.</p>
</div></section>
<section class="m-doc-details" id="gae130b2a4530372f13f67f7bb22d15070"><div>
<h3>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchdata-v2.js

Large diffs are not rendered by default.

0 comments on commit 91cd975

Please sign in to comment.