diff --git a/include/macros.h b/include/macros.h index 67fb52c759..9ab7a94594 100644 --- a/include/macros.h +++ b/include/macros.h @@ -77,4 +77,6 @@ #define _NS(x, y) x ## _ ## y #define NS(x, y) _NS(x, y) +#define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0))) + #endif diff --git a/src/code_1060_len_310.c b/src/code_1060_len_310.c index 90c815d46b..44a8397aee 100644 --- a/src/code_1060_len_310.c +++ b/src/code_1060_len_310.c @@ -1,13 +1,11 @@ #include "common.h" -#define U32_CHAR_LITERAL(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0))) - void func_80025C60(void) { OSPiHandle** handle = &carthandle; osEPiWriteIo(*handle, 0xB3FF0014, 0); osEPiWriteIo(*handle, 0xB3FF0004, 0); - osEPiWriteIo(*handle, 0xB3FF0000, U32_CHAR_LITERAL('I', 'S', '6', '4')); + osEPiWriteIo(*handle, 0xB3FF0000, ASCII_TO_U32('I', 'S', '6', '4')); } INCLUDE_ASM(s32, "code_1060_len_310", func_80025CC0);