Clang Format Blinds (#253)

* Quick cleanup on bitset docs

* Clang format blind.h/c

* Replace `_` with `s_` for functions

* Fix newline size for macros.

* Fix format for ci

* Add macro for "unused" attribute
This commit is contained in:
Rickey
2025-11-25 13:47:44 -08:00
committed by GitHub
parent 2c32ff69e3
commit 09dd996181
10 changed files with 96 additions and 77 deletions
+17 -15
View File
@@ -2,18 +2,18 @@
#define BLIND_H
#include "sprite.h"
#define MAX_ANTE 8 // The GBA's max uint value is around 4 billion, so we're going to not add endless mode for simplicity's sake
// The GBA's max uint value is around 4 billion, so we're going to not add endless mode for simplicity's sake
#define MAX_ANTE 8
#define SMALL_BLIND_PB 1
#define BIG_BLIND_PB 2
#define BOSS_BLIND_PB 3
#define BIG_BLIND_PB 2
#define BOSS_BLIND_PB 3
#define BLIND_SPRITE_OFFSET 16
#define BLIND_SPRITE_OFFSET 16
#define BLIND_SPRITE_COPY_SIZE BLIND_SPRITE_OFFSET * 8 // 8 ints per tile
#define SMALL_BLIND_TID 960
#define BIG_BLIND_TID (BLIND_SPRITE_OFFSET + SMALL_BLIND_TID)
#define BOSS_BLIND_TID (BLIND_SPRITE_OFFSET + BIG_BLIND_TID)
#define SMALL_BLIND_TID 960
#define BIG_BLIND_TID (BLIND_SPRITE_OFFSET + SMALL_BLIND_TID)
#define BOSS_BLIND_TID (BLIND_SPRITE_OFFSET + BIG_BLIND_TID)
enum BlindColorIndex
{
@@ -26,19 +26,21 @@ enum BlindColorIndex
BLIND_BACKGROUND_SHADOW_COLOR_INDEX = 7,
};
#define BLIND_TYPE_INFO_TABLE \
BLIND_INFO(SMALL, small, FIX_ONE, 3) \
BLIND_INFO(BIG, big, (FIX_ONE * 3) / 2, 4) \
#define BLIND_TYPE_INFO_TABLE \
BLIND_INFO(SMALL, small, FIX_ONE, 3) \
BLIND_INFO(BIG, big, (FIX_ONE * 3) / 2, 4) \
BLIND_INFO(BOSS, boss, FIX_ONE * 2, 5)
// clang-format off
enum BlindType
{
#define BLIND_INFO(NAME, name, multi, reward) \
BLIND_TYPE_##NAME ,
#define BLIND_INFO(NAME, name, multi, reward) \
BLIND_TYPE_##NAME,
BLIND_TYPE_INFO_TABLE
BLIND_TYPE_MAX,
#undef BLIND_INFO
BLIND_TYPE_MAX,
};
// clang-format on
enum BlindState
{
@@ -74,6 +76,6 @@ int blind_get_requirement(enum BlindType type, int ante);
int blind_get_reward(enum BlindType type);
u16 blind_get_color(enum BlindType type, enum BlindColorIndex index);
Sprite *blind_token_new(enum BlindType type, int x, int y, int sprite_index);
Sprite* blind_token_new(enum BlindType type, int x, int y, int sprite_index);
#endif // BLIND_H