Files
af/include/attributes.h
Anghelo Carvajal c7729c05c0 game.c OK (#37)
* C file

* game_dt

* game_ct

* fix offsets and building

* game_init_hyral and SetGameFrame

* more funcs

* game_main

* game_get_controller and func_800D2E00_jp

* Input

* game_draw_last

* a few attempts

* game_draw_first

* improve func_800D2E58_jp a bit

* format

* migrate data and bss

* what

* whoops

* name bss

* minor cleanup

* match game.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* fix malloc function wrongly named

* Update src/code/game.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* review

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
2023-08-09 20:51:25 -04:00

46 lines
954 B
C

#ifndef ATTRIBUTES_H
#define ATTRIBUTES_H
#if (!defined(__GNUC__) && !defined(__clang__)) || defined(M2CTX) || defined(__sgi)
#ifndef __attribute__
#define __attribute__(x)
#endif
#endif
#ifndef FALLTHROUGH
#ifdef PERMUTER
#define FALLTHROUGH
#elif __STDC_VERSION__ >= 202000L
#define FALLTHROUGH [[fallthrough]]
#else
#define FALLTHROUGH __attribute__((fallthrough))
#endif
#endif
#ifndef NORETURN
#ifdef PERMUTER
#define NORETURN
#elif __STDC_VERSION__ >= 202000L
#define NORETURN [[noreturn]]
#elif __STDC_VERSION__ >= 201112L
#define NORETURN _Noreturn
#else
#define NORETURN __attribute__((noreturn))
#endif
#endif
#ifndef UNUSED
#ifdef PERMUTER
#define UNUSED
#elif __STDC_VERSION__ >= 202000L
#define UNUSED [[maybe_unused]]
#else
#define UNUSED __attribute__((unused))
#endif
#endif
#endif