src: the great #include massacre of 2024
This commit is contained in:
parent
be7905d6a3
commit
8b37d1cbf2
395 changed files with 1056 additions and 1098 deletions
|
@ -7,8 +7,8 @@
|
|||
*/
|
||||
|
||||
#include "aniplayer.h"
|
||||
|
||||
#include "list.h"
|
||||
#include "global.h"
|
||||
#include "stageobjects.h"
|
||||
|
||||
void aniplayer_create(AniPlayer *plr, Animation *ani, const char *startsequence) {
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
// Similar examples occur throughout the code so if you want context, you can just look there.
|
||||
//
|
||||
#include "resource/animation.h"
|
||||
#include "stageobjects.h"
|
||||
#include "list.h"
|
||||
|
||||
typedef struct AniQueueEntry AniQueueEntry;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "arch_switch.h"
|
||||
#include "renderer/glcommon/debug.h"
|
||||
#include "util/env.h"
|
||||
#include "util/io.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <switch/services/applet.h>
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
#include "taisei.h"
|
||||
|
||||
// WARNING: This file intentionally shadows the standard header!
|
||||
#include "util/assert.h"
|
||||
#include "util/assert.h" // IWYU pragma: export
|
||||
|
|
|
@ -7,12 +7,15 @@
|
|||
*/
|
||||
|
||||
#include "audio.h"
|
||||
|
||||
#include "backend.h"
|
||||
#include "resource/resource.h"
|
||||
#include "resource/bgm.h"
|
||||
#include "resource/sfx.h"
|
||||
#include "events.h"
|
||||
#include "global.h"
|
||||
#include "resource/bgm.h"
|
||||
#include "resource/resource.h"
|
||||
#include "resource/sfx.h"
|
||||
#include "stage.h"
|
||||
#include "util/kvparser.h"
|
||||
|
||||
#define LOOPTIMEOUTFRAMES 10
|
||||
#define DEFAULT_SFX_VOLUME 100
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
*/
|
||||
|
||||
#include "backend.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "util/env.h"
|
||||
|
||||
#undef A
|
||||
#define A(x) extern AudioBackend _a_backend_##x;
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
*/
|
||||
|
||||
#include "../backend.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "util/env.h"
|
||||
|
||||
static bool audio_null_init(void) {
|
||||
if(strcmp(env_get("TAISEI_AUDIO_BACKEND", ""), "null")) { // don't warn if we asked for this
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include "../backend.h"
|
||||
#include "../stream/mixer.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "rwops/rwops_autobuf.h"
|
||||
#include "config.h"
|
||||
#include "util/io.h"
|
||||
|
||||
#define AUDIO_FREQ 48000
|
||||
#define AUDIO_FORMAT AUDIO_F32SYS
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "../backend.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
#include "stream.h"
|
||||
#include "stream_opus.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "util/miscmath.h"
|
||||
|
||||
#define PROCS(stream) (*NOT_NULL((stream)->procs))
|
||||
#define PROC(stream, proc) (NOT_NULL(PROCS(stream).proc))
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
|
||||
#include "stream_opus.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <opusfile.h>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "stream_pcm.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
static ssize_t astream_pcm_read(AudioStream *stream, size_t buffer_size, void *buffer) {
|
||||
|
|
22
src/boss.c
22
src/boss.c
|
@ -7,16 +7,20 @@
|
|||
*/
|
||||
|
||||
#include "boss.h"
|
||||
#include "global.h"
|
||||
#include "stage.h"
|
||||
#include "stagetext.h"
|
||||
#include "stagedraw.h"
|
||||
#include "entity.h"
|
||||
#include "util/glm.h"
|
||||
#include "portrait.h"
|
||||
#include "stages/stage5/stage5.h" // for unlockable bonus BGM
|
||||
#include "stageobjects.h"
|
||||
|
||||
#include "audio/audio.h"
|
||||
#include "dynstage.h"
|
||||
#include "entity.h"
|
||||
#include "global.h"
|
||||
#include "portrait.h"
|
||||
#include "stage.h"
|
||||
#include "stagedraw.h"
|
||||
#include "stageobjects.h"
|
||||
#include "stages/stage5/stage5.h" // for unlockable bonus BGM
|
||||
#include "stagetext.h"
|
||||
#include "util/env.h"
|
||||
#include "util/glm.h"
|
||||
#include "util/graphics.h"
|
||||
|
||||
#define DAMAGE_PER_POWER_POINT 500.0f
|
||||
#define DAMAGE_PER_POWER_ITEM (DAMAGE_PER_POWER_POINT * POWER_VALUE)
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "difficulty.h"
|
||||
#include "move.h"
|
||||
#include "taisei.h"
|
||||
|
||||
#include "aniplayer.h"
|
||||
#include "color.h"
|
||||
#include "projectile.h"
|
||||
#include "coroutine/taskdsl.h"
|
||||
#include "difficulty.h"
|
||||
#include "entity.h"
|
||||
#include "coroutine.h"
|
||||
#include "resource/resource.h"
|
||||
|
||||
#define BOSS_HURT_RADIUS 16
|
||||
|
|
|
@ -8,11 +8,13 @@
|
|||
|
||||
#include "camcontrol.h"
|
||||
|
||||
#include "events.h"
|
||||
#include "global.h"
|
||||
#include "stagetext.h"
|
||||
#include "coroutine.h"
|
||||
#include "util/glm.h"
|
||||
#include "video.h"
|
||||
#include "entity.h"
|
||||
#include "coroutine/taskdsl.h"
|
||||
|
||||
#define CAMCTRL_MOVE_SPEED 0.1
|
||||
// for scroll wheel move speed adjustment
|
||||
|
|
19
src/cli.c
19
src/cli.c
|
@ -6,17 +6,20 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
|
||||
#include "cli.h"
|
||||
#include "difficulty.h"
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "stage.h"
|
||||
#include "plrmodes.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "cutscenes/cutscene.h"
|
||||
#include "cutscenes/scenes.h"
|
||||
#include "difficulty.h"
|
||||
#include "log.h"
|
||||
#include "plrmodes.h"
|
||||
#include "stageinfo.h"
|
||||
#include "util.h"
|
||||
#include "util/env.h"
|
||||
#include "util/io.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <getopt.h>
|
||||
|
||||
struct TsOption { struct option opt; const char *help; const char *argname; };
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "color.h"
|
||||
#include "util/stringops.h"
|
||||
|
||||
#define COLOR_OP(c1, op, c2) do { \
|
||||
(c1)->r = (c1)->r op (c2)->r; \
|
||||
|
@ -184,7 +185,7 @@ bool color_equals(const Color *clr, const Color *clr2) {
|
|||
);
|
||||
}
|
||||
|
||||
char* color_str(const Color *clr) {
|
||||
char *color_str(const Color *clr) {
|
||||
return strfmt(
|
||||
"RGBA(%f, %f, %f, %f) at %p",
|
||||
clr->r,
|
||||
|
|
26
src/color.h
26
src/color.h
|
@ -9,7 +9,7 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "util/miscmath.h"
|
||||
|
||||
typedef union Color3 {
|
||||
struct { float r, g, b; };
|
||||
|
@ -51,37 +51,37 @@ Color* color_hsla(Color *clr, float h, float s, float l, float a)
|
|||
void color_get_hsl(const Color *c, float *out_h, float *out_s, float *out_l)
|
||||
attr_nonnull(1);
|
||||
|
||||
Color* color_add(Color *clr, const Color *clr2)
|
||||
Color *color_add(Color *clr, const Color *clr2)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_sub(Color *clr, const Color *clr2)
|
||||
Color *color_sub(Color *clr, const Color *clr2)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_mul(Color *clr, const Color *clr2)
|
||||
Color *color_mul(Color *clr, const Color *clr2)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_mul_alpha(Color *clr)
|
||||
Color *color_mul_alpha(Color *clr)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_mul_scalar(Color *clr, float scalar)
|
||||
Color *color_mul_scalar(Color *clr, float scalar)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_div(Color *clr, const Color *clr2)
|
||||
Color *color_div(Color *clr, const Color *clr2)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_div_alpha(Color *clr)
|
||||
Color *color_div_alpha(Color *clr)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_div_scalar(Color *clr, float scalar)
|
||||
Color *color_div_scalar(Color *clr, float scalar)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_lerp(Color *clr, const Color *clr2, float a)
|
||||
Color *color_lerp(Color *clr, const Color *clr2, float a)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_approach(Color *clr, const Color *clr2, float delta)
|
||||
Color *color_approach(Color *clr, const Color *clr2, float delta)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
Color* color_set_opacity(Color *clr, float opacity)
|
||||
Color *color_set_opacity(Color *clr, float opacity)
|
||||
attr_nonnull(1) attr_returns_nonnull;
|
||||
|
||||
/*
|
||||
|
@ -91,5 +91,5 @@ Color* color_set_opacity(Color *clr, float opacity)
|
|||
bool color_equals(const Color *clr, const Color *clr2)
|
||||
attr_nonnull(1, 2);
|
||||
|
||||
char* color_str(const Color *clr)
|
||||
char *color_str(const Color *clr)
|
||||
attr_nonnull(1) attr_returns_allocated;
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
*/
|
||||
|
||||
#include "common_tasks.h"
|
||||
|
||||
#include "audio/audio.h"
|
||||
#include "random.h"
|
||||
#include "util/glm.h"
|
||||
#include "stage.h"
|
||||
#include "util/glm.h"
|
||||
|
||||
void common_drop_items(cmplx pos, const ItemCounts *items) {
|
||||
for(int i = 0; i < ARRAY_SIZE(items->as_array); ++i) {
|
||||
|
|
|
@ -9,11 +9,13 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "coroutine.h"
|
||||
#include "item.h"
|
||||
#include "move.h"
|
||||
// IWYU pragma: always_keep
|
||||
|
||||
#include "coroutine/taskdsl.h"
|
||||
#include "entity.h"
|
||||
#include "global.h"
|
||||
#include "item.h"
|
||||
#include "move.h"
|
||||
#include "util/glm.h"
|
||||
|
||||
DECLARE_EXTERN_TASK(
|
||||
|
|
10
src/config.c
10
src/config.c
|
@ -7,10 +7,14 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
#include "version.h"
|
||||
#include "util/strbuf.h"
|
||||
|
||||
#include "bitarray.h"
|
||||
#include "gamepad.h"
|
||||
#include "global.h" // IWYU pragma: keep
|
||||
#include "util/kvparser.h"
|
||||
#include "util/strbuf.h"
|
||||
#include "version.h"
|
||||
#include "vfs/public.h"
|
||||
|
||||
#define CONFIG_FILE "storage/config"
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* This software is licensed under the terms of the MIT License.
|
||||
* See COPYING for further information.
|
||||
* ---
|
||||
* Copyright (c) 2011-2024, Lukas Weber <laochailan@web.de>.
|
||||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
// TODO: Remove this file and adjust includes.
|
||||
|
||||
#include "coroutine/coroutine.h"
|
||||
#include "coroutine/cotask.h"
|
||||
#include "coroutine/coevent.h"
|
||||
#include "coroutine/cosched.h"
|
||||
#include "coroutine/taskdsl.h"
|
|
@ -6,7 +6,11 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "coroutine/coevent.h"
|
||||
#include "coroutine/coevent_internal.h"
|
||||
#include "coroutine/cotask_internal.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void coevent_init(CoEvent *evt) {
|
||||
static uint32_t g_uid;
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
|
||||
#include "dynarray.h"
|
||||
|
||||
#include "cotask.h"
|
||||
|
||||
typedef enum CoEventStatus {
|
||||
CO_EVENT_PENDING,
|
||||
CO_EVENT_SIGNALED,
|
||||
CO_EVENT_CANCELED,
|
||||
} CoEventStatus;
|
||||
|
||||
typedef struct BoxedTask BoxedTask;
|
||||
|
||||
typedef struct CoEvent {
|
||||
DYNAMIC_ARRAY(BoxedTask) subscribers;
|
||||
uint32_t unique_id;
|
||||
|
@ -40,6 +40,8 @@ typedef COEVENTS_ARRAY(
|
|||
finished
|
||||
) CoTaskEvents;
|
||||
|
||||
#include "cotask.h"
|
||||
|
||||
void coevent_init(CoEvent *evt);
|
||||
void coevent_signal(CoEvent *evt);
|
||||
void coevent_signal_once(CoEvent *evt);
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "coevent.h"
|
||||
|
||||
// #define EVT_DEBUG
|
||||
|
||||
#ifdef EVT_DEBUG
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "util.h"
|
||||
#include "coroutine/coroutine.h"
|
||||
#include "coroutine/cotask_internal.h"
|
||||
|
||||
void coroutines_init(void) {
|
||||
cotask_global_init();
|
||||
|
|
|
@ -6,7 +6,10 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "coroutine/cosched.h"
|
||||
#include "coroutine/cotask.h"
|
||||
#include "coroutine/cotask_internal.h"
|
||||
#include "hashtable.h"
|
||||
|
||||
void cosched_init(CoSched *sched) {
|
||||
memset(sched, 0, sizeof(*sched));
|
||||
|
|
|
@ -6,7 +6,11 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "coroutine/cotask.h"
|
||||
#include "coroutine/cotask_internal.h"
|
||||
#include "coroutine/coevent_internal.h"
|
||||
#include "log.h"
|
||||
#include "thread.h"
|
||||
|
||||
static CoTaskList task_pool;
|
||||
static koishi_coroutine_t *co_main;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include "list.h"
|
||||
#include "entity.h"
|
||||
#include "util/debug.h"
|
||||
|
||||
// #define CO_TASK_DEBUG
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "cotask.h"
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#define CO_STACK_SIZE (64 * 1024)
|
||||
#else
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* This software is licensed under the terms of the MIT License.
|
||||
* See COPYING for further information.
|
||||
* ---
|
||||
* Copyright (c) 2011-2024, Lukas Weber <laochailan@web.de>.
|
||||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "coroutine.h"
|
||||
#include "cotask.h"
|
||||
#include "coevent.h"
|
||||
#include "cosched.h"
|
||||
|
||||
#include "cotask_internal.h"
|
||||
#include "coevent_internal.h"
|
|
@ -7,16 +7,22 @@
|
|||
*/
|
||||
|
||||
#include "credits.h"
|
||||
#include "global.h"
|
||||
#include "stages/stage6/draw.h"
|
||||
#include "video.h"
|
||||
#include "resource/model.h"
|
||||
#include "renderer/api.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "util/glm.h"
|
||||
|
||||
#include "audio/audio.h"
|
||||
#include "dynarray.h"
|
||||
#include "eventloop/eventloop.h"
|
||||
#include "events.h"
|
||||
#include "global.h"
|
||||
#include "menu/menu.h"
|
||||
#include "renderer/api.h"
|
||||
#include "replay/demoplayer.h"
|
||||
#include "resource/font.h"
|
||||
#include "stageutils.h"
|
||||
#include "transition.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "util/glm.h"
|
||||
#include "util/graphics.h"
|
||||
#include "video.h"
|
||||
|
||||
typedef struct CreditsEntry {
|
||||
char **data;
|
||||
|
|
|
@ -12,15 +12,17 @@
|
|||
|
||||
#include "audio/audio.h"
|
||||
#include "color.h"
|
||||
#include "eventloop/eventloop.h"
|
||||
#include "events.h"
|
||||
#include "global.h"
|
||||
#include "progress.h"
|
||||
#include "renderer/api.h"
|
||||
#include "replay/demoplayer.h"
|
||||
#include "transition.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "util/glm.h"
|
||||
#include "util/graphics.h"
|
||||
#include "video.h"
|
||||
#include "eventloop/eventloop.h"
|
||||
#include "replay/demoplayer.h"
|
||||
#include "watchdog.h"
|
||||
|
||||
#define SKIP_DELAY 3
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
*/
|
||||
|
||||
#include "dialog.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "portrait.h"
|
||||
#include "resource/font.h"
|
||||
|
||||
void dialog_init(Dialog *d) {
|
||||
memset(d, 0, sizeof(*d));
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "color.h"
|
||||
#include "resource/resource.h"
|
||||
#include "resource/sprite.h"
|
||||
#include "coroutine.h"
|
||||
#include "coroutine/coevent.h"
|
||||
|
||||
typedef enum DialogSide {
|
||||
DIALOG_SIDE_RIGHT,
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
#include "resource/resource.h"
|
||||
|
||||
#include "dialog.h" // IWYU pragma: export
|
||||
#include "coroutine/taskdsl.h"
|
||||
|
||||
#define DIALOG_SCRIPTS \
|
||||
WITH_EVENTS (Stage1PreBoss, (boss_appears, music_changes)) \
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
#include "stage.h"
|
||||
#include "portrait.h"
|
||||
#include "dialog.h" // IWYU pragma: export
|
||||
#include "stage.h" // IWYU pragma: export
|
||||
#include "portrait.h" // IWYU pragma: export
|
||||
|
||||
#define DIALOG_BEGIN(_interface) \
|
||||
if(ARGS.called_for_preload) { \
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
#include "dialog_interface.h"
|
||||
|
||||
extern PlayerDialogTasks dialog_tasks_marisa;
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
#include "dialog_interface.h"
|
||||
|
||||
extern PlayerDialogTasks dialog_tasks_reimu;
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "dialog.h"
|
||||
#include "dialog_interface.h"
|
||||
|
||||
extern PlayerDialogTasks dialog_tasks_youmu;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "difficulty.h"
|
||||
#include "resource/resource.h"
|
||||
#include "global.h"
|
||||
|
||||
typedef struct DiffDef {
|
||||
const char *name;
|
||||
|
|
|
@ -6,14 +6,15 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "dynstage.h"
|
||||
|
||||
#include "events.h"
|
||||
#include "filewatch/filewatch.h"
|
||||
|
||||
#ifndef TAISEI_BUILDCONF_HAVE_POSIX
|
||||
#error Stage hot reloading is only supported on POSIX systems
|
||||
#endif
|
||||
|
||||
#include "dynstage.h"
|
||||
#include "events.h"
|
||||
#include "filewatch/filewatch.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "resource/resource.h"
|
||||
#include "enemy.h"
|
||||
|
||||
#include "audio/audio.h"
|
||||
#include "entity.h"
|
||||
#include "global.h"
|
||||
#include "projectile.h"
|
||||
#include "list.h"
|
||||
#include "aniplayer.h"
|
||||
#include "projectile.h"
|
||||
#include "resource/resource.h"
|
||||
#include "stageobjects.h"
|
||||
#include "util/glm.h"
|
||||
#include "entity.h"
|
||||
|
||||
#ifdef create_enemy_p
|
||||
#undef create_enemy_p
|
||||
|
|
|
@ -9,13 +9,11 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "projectile.h"
|
||||
#include "objectpool.h"
|
||||
#include "coroutine/coevent.h"
|
||||
#include "entity.h"
|
||||
#include "coroutine.h"
|
||||
#include "move.h"
|
||||
#include "resource/resource.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#define ENEMY_DEBUG
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
*/
|
||||
|
||||
#include "enemy_classes.h"
|
||||
|
||||
#include "common_tasks.h"
|
||||
#include "global.h"
|
||||
#include "coroutine.h"
|
||||
|
||||
#define ECLASS_HP_SWIRL 100
|
||||
#define ECLASS_HP_FAIRY 400
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
*/
|
||||
|
||||
#include "entity.h"
|
||||
#include "util.h"
|
||||
#include "renderer/api.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "dynarray.h"
|
||||
#include "global.h"
|
||||
#include "renderer/api.h"
|
||||
#include "util.h"
|
||||
|
||||
typedef struct EntityDrawHook EntityDrawHook;
|
||||
typedef LIST_ANCHOR(EntityDrawHook) EntityDrawHookList;
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "objectpool.h"
|
||||
#include "known_entities.h"
|
||||
#include "list.h"
|
||||
#include "util/geometry.h"
|
||||
#include "util/macrohax.h"
|
||||
#include "known_entities.h"
|
||||
|
||||
#define LAYER_LOW_BITS 16
|
||||
#define LAYER_LOW_MASK ((1 << LAYER_LOW_BITS) - 1)
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "eventloop.h"
|
||||
#include "eventloop_private.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "video.h"
|
||||
#include "vfs/public.h"
|
||||
#include "thread.h"
|
||||
#include "util.h"
|
||||
#include "vfs/public.h"
|
||||
#include "video.h"
|
||||
|
||||
struct evloop_s evloop;
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
*/
|
||||
|
||||
#include "eventloop_private.h"
|
||||
#include "util.h"
|
||||
#include "framerate.h"
|
||||
#include "thread.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "thread.h"
|
||||
#include "util/env.h"
|
||||
|
||||
void eventloop_run(void) {
|
||||
assert(thread_current_is_main());
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
*/
|
||||
|
||||
#include "events.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
#include "transition.h"
|
||||
#include "video.h"
|
||||
#include "gamepad.h"
|
||||
|
||||
static hrtime_t keyrepeat_paused_until;
|
||||
static int global_handlers_lock = 0;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
#include <SDL_events.h>
|
||||
|
||||
typedef enum {
|
||||
TE_INVALID = -1,
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
*/
|
||||
|
||||
#include "filewatch.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "events.h"
|
||||
#include "hashtable.h"
|
||||
#include "list.h"
|
||||
#include "vfs/syspath_public.h"
|
||||
|
||||
#include <alloca.h>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "framerate.h"
|
||||
#include "global.h"
|
||||
#include "video.h"
|
||||
|
||||
void fpscounter_reset(FPSCounter *fps) {
|
||||
hrtime_t frametime = HRTIME_RESOLUTION / FPS;
|
||||
|
|
|
@ -7,10 +7,16 @@
|
|||
*/
|
||||
|
||||
#include "gamepad.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "dynarray.h"
|
||||
#include "events.h"
|
||||
#include "global.h"
|
||||
#include "hirestime.h"
|
||||
#include "log.h"
|
||||
#include "transition.h"
|
||||
#include "util/miscmath.h"
|
||||
#include "util/stringops.h"
|
||||
#include "vfs/public.h"
|
||||
|
||||
typedef struct GamepadAxisState {
|
||||
int16_t raw;
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
#include "events.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
typedef enum GamepadAxisDigitalValue {
|
||||
AXISVAL_LEFT = -1,
|
||||
AXISVAL_RIGHT = 1,
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#include "util/env.h"
|
||||
#include "gamepad.h"
|
||||
|
||||
Global global;
|
||||
|
||||
void init_global(CLIAction *cli) {
|
||||
|
|
46
src/global.h
46
src/global.h
|
@ -9,43 +9,21 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "cli.h"
|
||||
#include "config.h"
|
||||
#include "dialog.h"
|
||||
#include "enemy.h"
|
||||
#include "framerate.h"
|
||||
#include "item.h"
|
||||
#include "lasers/laser.h"
|
||||
#include "projectile.h"
|
||||
#include "random.h"
|
||||
#include "replay/state.h"
|
||||
#include "stageinfo.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_platform.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "color.h"
|
||||
|
||||
#include "resource/sfx.h"
|
||||
#include "resource/bgm.h"
|
||||
#include "resource/font.h"
|
||||
#include "resource/animation.h"
|
||||
|
||||
#include "menu/menu.h"
|
||||
|
||||
#include "player.h"
|
||||
#include "projectile.h"
|
||||
#include "enemy.h"
|
||||
#include "item.h"
|
||||
#include "boss.h"
|
||||
#include "laser.h"
|
||||
#include "dialog.h"
|
||||
#include "list.h"
|
||||
#include "config.h"
|
||||
#include "resource/resource.h"
|
||||
#include "replay/state.h"
|
||||
#include "random.h"
|
||||
#include "events.h"
|
||||
#include "difficulty.h"
|
||||
#include "color.h"
|
||||
#include "audio/audio.h"
|
||||
#include "rwops/all.h"
|
||||
#include "cli.h"
|
||||
#include "hirestime.h"
|
||||
#include "log.h"
|
||||
#include "framerate.h"
|
||||
#include "renderer/api.h"
|
||||
#include "stageinfo.h"
|
||||
|
||||
enum {
|
||||
// defaults
|
||||
RESX = 800,
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "hashtable.h"
|
||||
#include "util.h"
|
||||
#include "hashtable.h" // IWYU pragma: keep
|
||||
|
||||
#define HT_IMPL
|
||||
#include "hashtable_predefs.inc.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "hashtable.h"
|
||||
#include "list.h"
|
||||
#include "util/stringops.h"
|
||||
#include "util/assert.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
|
|
@ -6,9 +6,14 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
#include "hirestime.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "thread.h"
|
||||
#include "util/env.h"
|
||||
#include "util/miscmath.h"
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
static bool use_hires;
|
||||
static hrtime_t time_current;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
|
||||
#include "item.h"
|
||||
|
||||
#include "audio/audio.h"
|
||||
#include "global.h"
|
||||
#include "list.h"
|
||||
#include "stage.h"
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "resource/resource.h"
|
||||
#include "resource/texture.h"
|
||||
#include "resource/sprite.h"
|
||||
#include "objectpool.h"
|
||||
#include "entity.h"
|
||||
|
||||
typedef LIST_ANCHOR(Item) ItemList;
|
||||
|
|
13
src/laser.h
13
src/laser.h
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* This software is licensed under the terms of the MIT License.
|
||||
* See COPYING for further information.
|
||||
* ---
|
||||
* Copyright (c) 2011-2024, Lukas Weber <laochailan@web.de>.
|
||||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
// TODO remove this stub header
|
||||
#include "lasers/laser.h"
|
|
@ -6,20 +6,19 @@
|
|||
* Copyright (c) 2012-2024, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#include "laser.h"
|
||||
#include "draw.h"
|
||||
#include "laser.h"
|
||||
#include "internal.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "memory/allocator.h"
|
||||
#include "memory/arena.h"
|
||||
#include "renderer/api.h"
|
||||
#include "resource/model.h"
|
||||
#include "util.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "util/glm.h"
|
||||
#include "util/rectpack.h"
|
||||
#include "video.h"
|
||||
#include "config.h"
|
||||
#include "global.h"
|
||||
#include "memory/allocator.h"
|
||||
#include "memory/arena.h"
|
||||
|
||||
/*
|
||||
* LASER RENDERING OVERVIEW
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "laser.h"
|
||||
#include "util.h"
|
||||
#include "dynarray.h"
|
||||
|
||||
typedef struct LaserInternalData {
|
||||
|
|
|
@ -12,13 +12,10 @@
|
|||
|
||||
#include "global.h"
|
||||
#include "list.h"
|
||||
#include "stageobjects.h"
|
||||
#include "stagedraw.h"
|
||||
#include "renderer/api.h"
|
||||
#include "resource/model.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "stage.h"
|
||||
#include "stageobjects.h"
|
||||
#include "util/glm.h"
|
||||
#include "video.h"
|
||||
|
||||
typedef struct LaserSamplingParams {
|
||||
uint num_samples;
|
||||
|
|
|
@ -9,11 +9,8 @@
|
|||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
#include "draw.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "projectile.h"
|
||||
#include "resource/shader_program.h"
|
||||
#include "color.h"
|
||||
#include "coroutine/taskdsl.h"
|
||||
#include "entity.h"
|
||||
|
||||
typedef cmplx LaserRuleFunc(Laser *p, real t, void *ruledata);
|
||||
|
@ -111,4 +108,4 @@ DECLARE_EXTERN_TASK(laser_charge, {
|
|||
float target_width;
|
||||
});
|
||||
|
||||
#include "rules.h"
|
||||
#include "rules.h" // IWYU pragma: export
|
||||
|
|