add array_count.h (#2514)

This commit is contained in:
fig02
2025-04-26 18:17:02 -04:00
committed by GitHub
parent 25b2fa4bca
commit bed76a3bf3
154 changed files with 200 additions and 28 deletions
+8
View File
@@ -0,0 +1,8 @@
#ifndef ARRAY_COUNT_H
#define ARRAY_COUNT_H
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
#endif
-4
View File
@@ -1,10 +1,6 @@
#ifndef MACROS_H
#define MACROS_H
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNT_2D(arr) (s32)(sizeof(arr) / sizeof(arr[0][0]))
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
#endif
+1
View File
@@ -4,6 +4,7 @@
// TODO: This file still exists ONLY to provide neccesary headers to extracted assets.
// After assets are modified to include the headers they need directly, delete this file.
#include "array_count.h"
#include "gfx.h"
#include "sequence.h"
#include "sys_matrix.h"