mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-30 18:55:54 +00:00
add array_count.h
This commit is contained in:
parent
d4528a0541
commit
0a7b82081a
154 changed files with 201 additions and 30 deletions
8
include/array_count.h
Normal file
8
include/array_count.h
Normal 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
|
|
@ -12,10 +12,6 @@
|
|||
#define BAD_RETURN(type) void
|
||||
#endif
|
||||
|
||||
#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 ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
#define DECR(x) ((x) == 0 ? 0 : --(x))
|
||||
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
|
||||
|
|
|
@ -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 "sequence.h"
|
||||
#include "sys_matrix.h"
|
||||
#include "ultra64.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue