replace include guards with #pragma once
This commit is contained in:
parent
c49357ffef
commit
8d2ee76710
269 changed files with 284 additions and 1348 deletions
|
@ -31,6 +31,8 @@ copyright_comment_default_copyrights = r"""
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
"""
|
||||
|
||||
use_pragma_once = True
|
||||
|
||||
guard_prefix = 'IGUARD_'
|
||||
guard_chars = 'A-Za-z0-9_'
|
||||
|
||||
|
@ -76,13 +78,20 @@ class Janitor:
|
|||
return f'{guard_prefix}{badchar_regex.sub("_", str(relpath))}'
|
||||
|
||||
def get_guard_template(self, guard):
|
||||
return (
|
||||
r'\n\n'
|
||||
rf'#ifndef {guard}\n'
|
||||
rf'#define {guard}\n\n'
|
||||
r'\1\n\n'
|
||||
rf'#endif // {guard}\n'
|
||||
)
|
||||
if use_pragma_once:
|
||||
return (
|
||||
r'\n\n'
|
||||
rf'#pragma once\n'
|
||||
r'\1\n'
|
||||
)
|
||||
else:
|
||||
return (
|
||||
r'\n\n'
|
||||
rf'#ifndef {guard}\n'
|
||||
rf'#define {guard}\n\n'
|
||||
r'\1\n\n'
|
||||
rf'#endif // {guard}\n'
|
||||
)
|
||||
|
||||
def transform_include_guards(self, text, path):
|
||||
guard = self.get_guard_name(path)
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_aniplayer_h
|
||||
#define IGUARD_aniplayer_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
// In principle, playing an animation does not require any state, just a call to
|
||||
|
@ -107,5 +105,3 @@ AniQueueEntry *aniplayer_queue_frames(AniPlayer *plr, const char *seqname, int m
|
|||
// the rest of the game which just uses global.frames as a counter). So you
|
||||
// need to call this function once per frame to make an animation move.
|
||||
void aniplayer_update(AniPlayer *plr) attr_nonnull(1);
|
||||
|
||||
#endif // IGUARD_aniplayer_h
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
* Copyright (c) 2019, p-sam <p-sam@d3vs.net>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_arch_switch_h
|
||||
#define IGUARD_arch_switch_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
typedef void (*nxAtExitFn)(void);
|
||||
|
@ -18,5 +16,3 @@ int nxAtExit(nxAtExitFn fn);
|
|||
void noreturn nxExit(int rc);
|
||||
void noreturn nxAbort(void);
|
||||
const char* nxGetProgramDir(void);
|
||||
|
||||
#endif // IGUARD_arch_switch_h
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_assert_h
|
||||
#define IGUARD_assert_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
// WARNING: This file intentionally shadows the standard header!
|
||||
#include "util/assert.h"
|
||||
|
||||
#endif // IGUARD_assert_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_audio_audio_h
|
||||
#define IGUARD_audio_audio_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "resource/sfx.h"
|
||||
|
@ -88,5 +86,3 @@ INLINE SFXPlayID play_sound_ex(const char *name, int cooldown, bool replace) {
|
|||
}
|
||||
|
||||
double audioutil_loopaware_position(double rt_pos, double duration, double loop_start);
|
||||
|
||||
#endif // IGUARD_audio_audio_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_audio_backend_h
|
||||
#define IGUARD_audio_backend_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "audio.h"
|
||||
|
@ -76,5 +74,3 @@ typedef struct AudioBackend {
|
|||
extern AudioBackend _a_backend;
|
||||
|
||||
bool audio_backend_init(void);
|
||||
|
||||
#endif // IGUARD_audio_backend_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_audio_stream_player_h
|
||||
#define IGUARD_audio_stream_player_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
@ -60,5 +58,3 @@ int splayer_pick_channel(StreamPlayer *plr) attr_nonnull_all;
|
|||
#include "audio/audio.h"
|
||||
|
||||
BGMStatus splayer_util_bgmstatus(StreamPlayer *plr, int chan) attr_nonnull_all;
|
||||
|
||||
#endif // IGUARD_audio_stream_player_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_audio_stream_stream_h
|
||||
#define IGUARD_audio_stream_stream_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include <SDL_audio.h>
|
||||
|
@ -70,5 +68,3 @@ AudioStreamSpec astream_spec(SDL_AudioFormat sample_format, uint channels, uint
|
|||
bool astream_spec_equals(const AudioStreamSpec *s1, const AudioStreamSpec *s2);
|
||||
|
||||
ssize_t astream_util_resampled_buffer_size(const AudioStream *src, const AudioStreamSpec *spec);
|
||||
|
||||
#endif // IGUARD_audio_stream_stream_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_audio_stream_stream_opus_h
|
||||
#define IGUARD_audio_stream_stream_opus_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
bool astream_opus_open(AudioStream *stream, SDL_RWops *rw);
|
||||
|
||||
#endif // IGUARD_audio_stream_stream_opus_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_audio_stream_stream_pcm_h
|
||||
#define IGUARD_audio_stream_stream_pcm_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
@ -32,5 +30,3 @@ bool astream_pcm_reopen(AudioStream *stream, const AudioStreamSpec *spec, size_t
|
|||
|
||||
void astream_pcm_static_init(StaticPCMAudioStream *stream)
|
||||
attr_nonnull_all;
|
||||
|
||||
#endif // IGUARD_audio_stream_stream_pcm_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_boss_h
|
||||
#define IGUARD_boss_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
|
@ -244,5 +242,3 @@ void _begin_boss_attack_task(const BossAttackTaskArgs *args)
|
|||
|
||||
int attacktype_start_delay(AttackType t) attr_const;
|
||||
int attacktype_end_delay(AttackType t) attr_const;
|
||||
|
||||
#endif // IGUARD_boss_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_camcontrol_h
|
||||
#define IGUARD_camcontrol_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "stageutils.h"
|
||||
|
@ -27,5 +25,3 @@
|
|||
*/
|
||||
|
||||
void camcontrol_init(Camera3D *cam);
|
||||
|
||||
#endif // IGUARD_camcontrol_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_cli_h
|
||||
#define IGUARD_cli_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "plrmodes.h"
|
||||
|
@ -40,5 +38,3 @@ struct CLIAction {
|
|||
|
||||
int cli_args(int argc, char **argv, CLIAction *a);
|
||||
void free_cli_action(CLIAction *a);
|
||||
|
||||
#endif // IGUARD_cli_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_color_h
|
||||
#define IGUARD_color_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
|
@ -95,5 +93,3 @@ bool color_equals(const Color *clr, const Color *clr2)
|
|||
|
||||
char* color_str(const Color *clr)
|
||||
attr_nonnull(1) attr_returns_allocated;
|
||||
|
||||
#endif // IGUARD_color_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_common_tasks_h
|
||||
#define IGUARD_common_tasks_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "coroutine.h"
|
||||
|
@ -125,5 +123,3 @@ DECLARE_EXTERN_TASK(
|
|||
glm_ease_t ease;
|
||||
}
|
||||
);
|
||||
|
||||
#endif // IGUARD_common_tasks_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_config_h
|
||||
#define IGUARD_config_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include <SDL_keycode.h>
|
||||
|
@ -236,5 +234,3 @@ void config_save(void);
|
|||
int config_set_int(ConfigIndex idx, int val);
|
||||
double config_set_float(ConfigIndex idx, double val);
|
||||
char* config_set_str(ConfigIndex idx, const char *val) attr_nonnull(2) attr_returns_nonnull;
|
||||
|
||||
#endif // IGUARD_config_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_coroutine_h
|
||||
#define IGUARD_coroutine_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "entity.h"
|
||||
|
@ -519,5 +517,3 @@ INLINE EntityInterface *_cotask_bind_to_entity_Entity(EntityInterface *ent, CoTa
|
|||
ENT_UNBOXED_DISPATCH_FUNCTION(_cotask_bind_to_entity_, ent, task)
|
||||
|
||||
#define TASK_BIND(ent_or_box) cotask_bind_to_entity(cotask_active(), ENT_UNBOX_OR_PASSTHROUGH(ent_or_box))
|
||||
|
||||
#endif // IGUARD_coroutine_h
|
||||
|
|
|
@ -6,14 +6,10 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_credits_h
|
||||
#define IGUARD_credits_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "eventloop/eventloop.h"
|
||||
|
||||
void credits_enter(CallChain next);
|
||||
void credits_preload(void);
|
||||
|
||||
#endif // IGUARD_credits_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_cutscenes_cutscene_h
|
||||
#define IGUARD_cutscenes_cutscene_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "eventloop/eventloop.h"
|
||||
|
@ -34,5 +32,3 @@ typedef enum CutsceneID {
|
|||
|
||||
void cutscene_enter(CallChain next, CutsceneID id);
|
||||
const char *cutscene_get_name(CutsceneID id);
|
||||
|
||||
#endif // IGUARD_cutscenes_cutscene_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_cutscenes_scene_impl_h
|
||||
#define IGUARD_cutscenes_scene_impl_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "color.h"
|
||||
|
@ -73,5 +71,3 @@ typedef struct Cutscene {
|
|||
#define T_REMILIA(text) T_SPEECH("Remilia", text, { 0.900, 0.100, 0.100, 1 })
|
||||
#define T_FLANDRE(text) T_SPEECH("Flandre", text, { 1.000, 0.600, 0.600, 1 })
|
||||
#define T_PATCHOULI(text) T_SPEECH("Patchouli", text, { 0.700, 0.600, 1.000, 1 })
|
||||
|
||||
#endif // IGUARD_cutscenes_scene_impl_h
|
||||
|
|
|
@ -6,14 +6,10 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_cutscenes_scenes_h
|
||||
#define IGUARD_cutscenes_scenes_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "cutscene.h"
|
||||
#include "scene_impl.h"
|
||||
|
||||
extern const Cutscene g_cutscenes[NUM_CUTSCENE_IDS];
|
||||
|
||||
#endif // IGUARD_cutscenes_scenes_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dialog_h
|
||||
#define IGUARD_dialog_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "color.h"
|
||||
|
@ -135,5 +133,3 @@ bool dialog_is_active(Dialog *d);
|
|||
void dialog_preload(void);
|
||||
|
||||
#include "dialog/dialog_interface.h"
|
||||
|
||||
#endif // IGUARD_dialog_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dialog_dialog_interface_h
|
||||
#define IGUARD_dialog_dialog_interface_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
|
@ -72,5 +70,3 @@ typedef struct PlayerDialogTasks {
|
|||
}; \
|
||||
_dialog_ref._cotask_##_dialog_name##Dialog##_thunk(&_dialog_args); \
|
||||
} while(0)
|
||||
|
||||
#endif // IGUARD_dialog_dialog_interface_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dialog_dialog_macros_h
|
||||
#define IGUARD_dialog_dialog_macros_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
|
@ -67,5 +65,3 @@
|
|||
|
||||
#define PRELOAD_FACE(face) \
|
||||
portrait_preload_face_sprite(_charname, #face, ARGS.preload_rflags)
|
||||
|
||||
#endif // IGUARD_dialog_dialog_macros_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dialog_marisa_h
|
||||
#define IGUARD_dialog_marisa_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
|
||||
extern PlayerDialogTasks dialog_tasks_marisa;
|
||||
|
||||
#endif // IGUARD_dialog_marisa_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dialog_reimu_h
|
||||
#define IGUARD_dialog_reimu_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
|
||||
extern PlayerDialogTasks dialog_tasks_reimu;
|
||||
|
||||
#endif // IGUARD_dialog_reimu_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dialog_youmu_h
|
||||
#define IGUARD_dialog_youmu_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
|
||||
extern PlayerDialogTasks dialog_tasks_youmu;
|
||||
|
||||
#endif // IGUARD_dialog_youmu_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_difficulty_h
|
||||
#define IGUARD_difficulty_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "color.h"
|
||||
|
@ -37,5 +35,3 @@ void difficulty_preload(void);
|
|||
|
||||
double difficulty_value(double easy, double normal, double hard, double lunatic)
|
||||
attr_pure;
|
||||
|
||||
#endif // IGUARD_difficulty_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_dynarray_h
|
||||
#define IGUARD_dynarray_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util/macrohax.h"
|
||||
|
@ -168,5 +166,3 @@ void _dynarray_filter(
|
|||
attr_unused void *_dynarray_foreach_ignored, \
|
||||
__VA_ARGS__ \
|
||||
)
|
||||
|
||||
#endif // IGUARD_dynarray_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_enemy_h
|
||||
#define IGUARD_enemy_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
|
@ -157,5 +155,3 @@ void BigFairy(Enemy*, int t, bool render) attr_deprecated("Use the espawn_ API f
|
|||
int enemy_flare(Projectile *p, int t) attr_deprecated("Use tasks");
|
||||
|
||||
void enemies_preload(void);
|
||||
|
||||
#endif // IGUARD_enemy_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_enemy_classes_h
|
||||
#define IGUARD_enemy_classes_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "enemy.h"
|
||||
|
@ -41,5 +39,3 @@ Enemy *espawn_super_fairy(cmplx pos, const ItemCounts *item_drops);
|
|||
#define espawn_big_fairy_box(...) ENT_BOX(espawn_big_fairy(__VA_ARGS__))
|
||||
#define espawn_huge_fairy_box(...) ENT_BOX(espawn_huge_fairy(__VA_ARGS__))
|
||||
#define espawn_super_fairy_box(...) ENT_BOX(espawn_super_fairy(__VA_ARGS__))
|
||||
|
||||
#endif // IGUARD_enemy_classes_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_entity_h
|
||||
#define IGUARD_entity_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "objectpool.h"
|
||||
|
@ -309,5 +307,3 @@ INLINE void _ent_array_add_Entity(struct EntityInterface *ent, BoxedEntityArray
|
|||
} while(0)
|
||||
|
||||
#define ENT_ARRAY_CLEAR(_array) ((_array)->size = 0)
|
||||
|
||||
#endif // IGUARD_entity_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_eventloop_eventloop_h
|
||||
#define IGUARD_eventloop_eventloop_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "hirestime.h"
|
||||
|
@ -98,5 +96,3 @@ INLINE attr_nonnull(1) void run_call_chain(CallChain *cc, void *result) {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // IGUARD_eventloop_eventloop_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_eventloop_eventloop_private_h
|
||||
#define IGUARD_eventloop_eventloop_private_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "eventloop.h"
|
||||
|
@ -38,5 +36,3 @@ void eventloop_leave(void);
|
|||
LogicFrameAction run_logic_frame(LoopFrame *frame);
|
||||
LogicFrameAction handle_logic(LoopFrame **pframe, const FrameTimes *ftimes);
|
||||
RenderFrameAction run_render_frame(LoopFrame *frame);
|
||||
|
||||
#endif // IGUARD_eventloop_eventloop_private_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_events_h
|
||||
#define IGUARD_events_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
|
@ -116,5 +114,3 @@ void events_unregister_handler(EventHandlerProc proc);
|
|||
void events_poll(EventHandler *handlers, EventFlags flags);
|
||||
void events_emit(TaiseiEvent type, int32_t code, void *data1, void *data2);
|
||||
void events_defer(SDL_Event *evt);
|
||||
|
||||
#endif // IGUARD_events_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_framerate_h
|
||||
#define IGUARD_framerate_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "hirestime.h"
|
||||
|
@ -23,5 +21,3 @@ typedef struct {
|
|||
uint32_t get_effective_frameskip(void);
|
||||
void fpscounter_reset(FPSCounter *fps);
|
||||
void fpscounter_update(FPSCounter *fps);
|
||||
|
||||
#endif // IGUARD_framerate_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_gamepad_h
|
||||
#define IGUARD_gamepad_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -133,5 +131,3 @@ int gamepad_denormalize_axis_value(double val);
|
|||
#define GAMEPAD_AXIS_MAX_VALUE 32767
|
||||
#define GAMEPAD_AXIS_MIN_VALUE -32768
|
||||
#define AXISVAL sign
|
||||
|
||||
#endif // IGUARD_gamepad_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_global_h
|
||||
#define IGUARD_global_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -148,5 +146,3 @@ void taisei_commit_persistent_data(void);
|
|||
|
||||
// XXX: Move this somewhere?
|
||||
bool gamekeypressed(KeyIndex key);
|
||||
|
||||
#endif // IGUARD_global_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_hashtable_h
|
||||
#define IGUARD_hashtable_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
/*
|
||||
|
@ -78,5 +76,3 @@ INLINE uint32_t htutil_hashfunc_string(const char *str) {
|
|||
|
||||
// NOTE: For the hashtable API, see hashtable.inc.h
|
||||
// NOTE: For type-generic wrappers around the API, see hashtable_predefs.inc.h
|
||||
|
||||
#endif // IGUARD_hashtable_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_hirestime_h
|
||||
#define IGUARD_hirestime_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
typedef uint64_t hrtime_t;
|
||||
|
@ -23,5 +21,3 @@ typedef int64_t shrtime_t;
|
|||
void time_init(void);
|
||||
void time_shutdown(void);
|
||||
hrtime_t time_get(void);
|
||||
|
||||
#endif // IGUARD_hirestime_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_item_h
|
||||
#define IGUARD_item_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
|
@ -104,5 +102,3 @@ void items_preload(void);
|
|||
|
||||
#define ITEM_MAX_VALUE 1.0
|
||||
#define ITEM_MIN_VALUE 0.1
|
||||
|
||||
#endif // IGUARD_item_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_known_entities_h
|
||||
#define IGUARD_known_entities_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#define ENTITIES_CORE(X, ...) \
|
||||
|
@ -27,5 +25,3 @@
|
|||
ENTITIES_CORE(X, __VA_ARGS__) \
|
||||
ENTITIES_PLAYERMODES(X, __VA_ARGS__) \
|
||||
ENTITIES_STAGES(X, __VA_ARGS__) \
|
||||
|
||||
#endif // IGUARD_known_entities_h
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_laser_h
|
||||
#define IGUARD_laser_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
// TODO remove this stub header
|
||||
#include "lasers/laser.h"
|
||||
|
||||
#endif // IGUARD_laser_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_lasers_draw_h
|
||||
#define IGUARD_lasers_draw_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "entity.h"
|
||||
|
@ -24,5 +22,3 @@ struct LaserRenderData {
|
|||
LIST_INTERFACE(LaserRenderData);
|
||||
int tile;
|
||||
};
|
||||
|
||||
#endif // IGUARD_lasers_draw_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_lasers_internal_h
|
||||
#define IGUARD_lasers_internal_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
|
@ -41,5 +39,3 @@ extern LaserInternalData lintern;
|
|||
|
||||
void laserintern_init(void);
|
||||
void laserintern_shutdown(void);
|
||||
|
||||
#endif // IGUARD_lasers_internal_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_lasers_laser_h
|
||||
#define IGUARD_lasers_laser_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "draw.h"
|
||||
|
@ -98,5 +96,3 @@ DECLARE_EXTERN_TASK(laser_charge, {
|
|||
float charge_delay;
|
||||
float target_width;
|
||||
});
|
||||
|
||||
#endif // IGUARD_lasers_laser_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_list_h
|
||||
#define IGUARD_list_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#if TAISEI_BUILDCONF_MALLOC_ALIGNMENT < 16
|
||||
|
@ -188,5 +186,3 @@ ListContainer* list_wrap_container(void *data) attr_returns_allocated;
|
|||
|
||||
#define alist_free_all(dest) \
|
||||
alist_free_all(LIST_ANCHOR_CAST(dest))
|
||||
|
||||
#endif // IGUARD_list_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_log_h
|
||||
#define IGUARD_log_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
@ -152,5 +150,3 @@ void _taisei_log(LogLevel lvl, const char *funcname, const char *filename, uint
|
|||
|
||||
noreturn void _taisei_log_fatal(LogLevel lvl, const char *funcname, const char *filename, uint line, const char *fmt, ...)
|
||||
attr_printf(5, 6);
|
||||
|
||||
#endif // IGUARD_log_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_charselect_h
|
||||
#define IGUARD_menu_charselect_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
@ -16,5 +14,3 @@
|
|||
MenuData* create_char_menu(void);
|
||||
void draw_char_menu(MenuData *menu);
|
||||
void preload_char_menu(void);
|
||||
|
||||
#endif // IGUARD_menu_charselect_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_common_h
|
||||
#define IGUARD_menu_common_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
@ -22,5 +20,3 @@ void animate_menu_list(MenuData *m);
|
|||
void animate_menu_list_entries(MenuData *m);
|
||||
void animate_menu_list_entry(MenuData *m, int i);
|
||||
void menu_action_close(MenuData *menu, void *arg);
|
||||
|
||||
#endif // IGUARD_menu_common_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_cutsceneview_h
|
||||
#define IGUARD_menu_cutsceneview_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData *create_cutsceneview_menu(void);
|
||||
|
||||
#endif // IGUARD_menu_cutsceneview_h
|
||||
|
|
|
@ -6,14 +6,10 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_difficultyselect_h
|
||||
#define IGUARD_menu_difficultyselect_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData* create_difficulty_menu(void);
|
||||
void draw_difficulty_menu(MenuData *m);
|
||||
|
||||
#endif // IGUARD_menu_difficultyselect_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_gameovermenu_h
|
||||
#define IGUARD_menu_gameovermenu_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData* create_gameover_menu(void);
|
||||
|
||||
#endif // IGUARD_menu_gameovermenu_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_ingamemenu_h
|
||||
#define IGUARD_menu_ingamemenu_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
@ -22,5 +20,3 @@ MenuData* create_ingame_menu_replay(void);
|
|||
void update_ingame_menu(MenuData *menu);
|
||||
|
||||
void restart_game(MenuData *m, void *arg);
|
||||
|
||||
#endif // IGUARD_menu_ingamemenu_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_mainmenu_h
|
||||
#define IGUARD_menu_mainmenu_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
@ -19,5 +17,3 @@ void draw_main_menu(MenuData *m);
|
|||
void main_menu_update_practice_menus(void);
|
||||
void draw_loading_screen(void);
|
||||
void menu_preload(void);
|
||||
|
||||
#endif // IGUARD_menu_mainmenu_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_media_h
|
||||
#define IGUARD_menu_media_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData *create_media_menu(void);
|
||||
|
||||
#endif // IGUARD_menu_media_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_menu_h
|
||||
#define IGUARD_menu_menu_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "transition.h"
|
||||
|
@ -99,5 +97,3 @@ void menu_no_input(MenuData *menu);
|
|||
float menu_fade(MenuData *menu);
|
||||
|
||||
bool menu_input_handler(SDL_Event *event, void *arg);
|
||||
|
||||
#endif // IGUARD_menu_menu_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_musicroom_h
|
||||
#define IGUARD_menu_musicroom_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData* create_musicroom_menu(void);
|
||||
|
||||
#endif // IGUARD_menu_musicroom_h
|
||||
|
|
|
@ -6,14 +6,10 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_options_h
|
||||
#define IGUARD_menu_options_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData* create_options_menu(void);
|
||||
void draw_options_menu_bg(MenuData*);
|
||||
|
||||
#endif // IGUARD_menu_options_h
|
||||
|
|
|
@ -6,13 +6,9 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_replayview_h
|
||||
#define IGUARD_menu_replayview_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData* create_replayview_menu(void);
|
||||
|
||||
#endif // IGUARD_menu_replayview_h
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#ifndef IGUARD_menu_savereplay_h
|
||||
#define IGUARD_menu_savereplay_h
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "menu.h"
|
||||
|
@ -17,5 +15,3 @@
|
|||
|
||||
void ask_save_replay(Replay *rpy, CallChain next)
|
||||
attr_nonnull(1);
|
||||
|
||||
#endif // IGUARD_menu_savereplay_h
|
||||
|
|