From ff2ce54e61db1f5e85a4e297245e52bdafc87957 Mon Sep 17 00:00:00 2001 From: Philippe Symons Date: Fri, 27 Mar 2026 21:01:51 +0100 Subject: [PATCH] Fix some compiler warnings --- include/sound.h | 2 +- source/main.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/sound.h b/include/sound.h index d94c2fd..cda4a93 100644 --- a/include/sound.h +++ b/include/sound.h @@ -9,7 +9,7 @@ extern "C" { #endif -typedef void* PTGBSFXHandle; +typedef unsigned short PTGBSFXHandle; /** * @brief The API's defined here are a thin abstraction layer over the sound engine functions. diff --git a/source/main.cpp b/source/main.cpp index 9a7c14d..700899f 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -30,6 +30,9 @@ #include "custom_malloc.h" #include "sound.h" +#define MACRO_AS_STR_IMPL(x) #x +#define MACRO_AS_STR(x) MACRO_AS_STR_IMPL(x) + /* TODO: @@ -350,8 +353,9 @@ static void __attribute__((noinline)) show_intro() #ifndef JPN_ID #error JPN_ID_NOT_DEFINED #endif -#pragma message "PTGB_BUILD_LANGUAGE=" PTGB_BUILD_LANGUAGE -#pragma message "JPN_ID=" JPN_ID + +#pragma message("PTGB_BUILD_LANGUAGE=" MACRO_AS_STR(PTGB_BUILD_LANGUAGE)) +#pragma message("JPN_ID=" MACRO_AS_STR(JPN_ID)) int char_width = (PTGB_BUILD_LANGUAGE == JPN_ID ? 8 : 6); int x = ((240 - (press_start_text_length * char_width)) / 2);