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
include/array_count.h Normal file
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

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

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"

View File

@@ -1,7 +1,7 @@
#include "array_count.h"
#include "sfx.h"
#include "ultra64.h"
#include "z64audio.h"
#include "macros.h"
#include "sfx.h"
// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256.
u8 gSfxRequestWriteIndex = 0;

View File

@@ -1,5 +1,5 @@
#include "libu64/gfxprint.h"
#include "ultra64.h"
#include "array_count.h"
#include "attributes.h"
#include "audiothread_cmd.h"
#include "controller.h"
@@ -8,6 +8,7 @@
#include "seqcmd.h"
#include "sequence.h"
#include "sfx.h"
#include "ultra64.h"
#include "versions.h"
#include "z64audio.h"
#include "z64ocarina.h"

View File

@@ -1,3 +1,4 @@
#include "array_count.h"
#include "attributes.h"
#include "buffers.h"
#include "segment_symbols.h"

View File

@@ -14,6 +14,7 @@
* Otherwise, each set of instructions has its own command interpreter
*/
#include "audio/aseq.h"
#include "array_count.h"
#include "assert.h"
#include "attributes.h"
#include "macros.h"

View File

@@ -1,3 +1,4 @@
#include "array_count.h"
#include "audiothread_cmd.h"
#include "macros.h"
#include "ultra64.h"

View File

@@ -17,15 +17,14 @@
* Nor are these commands to be confused with the internal audio commands used to transfer requests from
* the graph thread to the audio thread.
*/
#include "array_count.h"
#include "audiothread_cmd.h"
#include "ultra64.h"
#include "ultra64/abi.h"
#include "seqcmd.h"
#include "sfx.h"
#include "ultra64.h"
#include "ultra64/abi.h"
#include "z64audio.h"
#include "macros.h"
// Direct audio command (skips the queueing system)
#define SEQCMD_SET_SEQPLAYER_VOLUME_NOW(seqPlayerIndex, duration, volume) \
Audio_ProcessSeqCmd((SEQCMD_OP_SET_SEQPLAYER_VOLUME << 28) | ((u8)(seqPlayerIndex) << 24) | \

View File

@@ -1,3 +1,4 @@
#include "array_count.h"
#include "buffers.h"
#include "z64audio.h"

View File

@@ -1,3 +1,4 @@
#include "array_count.h"
#include "audiothread_cmd.h"
#include "macros.h"
#include "printf.h"

View File

@@ -1,3 +1,4 @@
#include "array_count.h"
#include "buffers.h"
#include "build.h"
#include "idle.h"

View File

@@ -21,6 +21,7 @@
#include "libc64/sleep.h"
#include "libc64/sprintf.h"
#include "libu64/debug.h"
#include "array_count.h"
#include "attributes.h"
#include "carthandle.h"
#include "fault.h"

View File

@@ -1,6 +1,7 @@
#include "array_count.h"
#include "sfx.h"
#include "ultra64.h"
#include "macros.h"
u8 sSfxBankIds[] = {

View File

@@ -5,6 +5,7 @@
* and sending the audio rsp tasks generated by the driver to the task scheduler.
*/
#include "array_count.h"
#include "audiomgr.h"
#include "printf.h"
#include "regs.h"

View File

@@ -1,4 +1,5 @@
#include "libu64/gfxprint.h"
#include "array_count.h"
#include "attributes.h"
#include "controller.h"
#include "db_camera.h"

View File

@@ -47,6 +47,7 @@
#include "libc64/sleep.h"
#include "libc64/sprintf.h"
#include "alloca.h"
#include "array_count.h"
#include "controller.h"
#include "gfx.h"
#include "padmgr.h"

View File

@@ -5,6 +5,7 @@
* the crash screen implemented by fault.c
*/
#include "array_count.h"
#include "fault.h"
#include "gfx.h"

View File

@@ -1,6 +1,7 @@
#include "libc64/os_malloc.h"
#include "libc64/sleep.h"
#include "libc64/sprintf.h"
#include "array_count.h"
#include "controller.h"
#include "fault.h"
#include "gfx.h"

View File

@@ -2,6 +2,7 @@
#include "libc64/os_malloc.h"
#include "libu64/debug.h"
#include "libu64/gfxprint.h"
#include "array_count.h"
#include "audiomgr.h"
#include "buffers.h"
#include "controller.h"

Some files were not shown because too many files have changed in this diff Show More