headers: isolate endings, remove stage.h inc. from plrmodes.h, fix resulting mess
This commit is contained in:
parent
42cbdc7005
commit
bd361067df
24 changed files with 55 additions and 25 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "resource/bgm.h"
|
||||
#include "resource/sfx.h"
|
||||
#include "global.h"
|
||||
#include "stage.h"
|
||||
|
||||
#define LOOPTIMEOUTFRAMES 10
|
||||
#define DEFAULT_SFX_VOLUME 100
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "common_tasks.h"
|
||||
#include "random.h"
|
||||
#include "util/glm.h"
|
||||
#include "stage.h"
|
||||
|
||||
void common_drop_items(cmplx pos, const ItemCounts *items) {
|
||||
for(int i = 0; i < ARRAY_SIZE(items->as_array); ++i) {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "renderer/api.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "util/glm.h"
|
||||
#include "util/graphics.h"
|
||||
#include "video.h"
|
||||
#include "eventloop/eventloop.h"
|
||||
|
||||
|
|
32
src/endings.h
Normal file
32
src/endings.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* This software is licensed under the terms of the MIT License.
|
||||
* See COPYING for further information.
|
||||
* ---
|
||||
* Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>.
|
||||
* Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "taisei.h"
|
||||
|
||||
typedef enum EndingID {
|
||||
// WARNING: Reordering this will break current progress files.
|
||||
|
||||
ENDING_BAD_MARISA,
|
||||
ENDING_BAD_YOUMU,
|
||||
ENDING_GOOD_MARISA,
|
||||
ENDING_GOOD_YOUMU,
|
||||
ENDING_BAD_REIMU,
|
||||
ENDING_GOOD_REIMU,
|
||||
NUM_ENDINGS,
|
||||
} EndingID;
|
||||
|
||||
#define GOOD_ENDINGS \
|
||||
ENDING(ENDING_GOOD_MARISA) \
|
||||
ENDING(ENDING_GOOD_YOUMU) \
|
||||
ENDING(ENDING_GOOD_REIMU)
|
||||
|
||||
#define BAD_ENDINGS \
|
||||
ENDING(ENDING_BAD_MARISA) \
|
||||
ENDING(ENDING_BAD_YOUMU) \
|
||||
ENDING(ENDING_BAD_REIMU)
|
|
@ -11,6 +11,7 @@
|
|||
#include "item.h"
|
||||
#include "global.h"
|
||||
#include "list.h"
|
||||
#include "stage.h"
|
||||
#include "stageobjects.h"
|
||||
|
||||
// Instant collection radius.
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "global.h"
|
||||
#include "video.h"
|
||||
#include "util/glm.h"
|
||||
#include "util/graphics.h"
|
||||
#include "portrait.h"
|
||||
|
||||
#define SELECTED_SUBSHOT(m) (((CharMenuContext*)(m)->context)->subshot)
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include "video.h"
|
||||
#include "replay/struct.h"
|
||||
#include "replay/state.h"
|
||||
#include "util/graphics.h"
|
||||
#include "stage.h"
|
||||
|
||||
typedef struct StartGameContext {
|
||||
StageInfo *restart_stage;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "video.h"
|
||||
#include "eventloop/eventloop.h"
|
||||
#include "replay/demoplayer.h"
|
||||
#include "util/graphics.h"
|
||||
|
||||
MenuEntry *add_menu_entry(MenuData *menu, const char *name, MenuAction action, void *arg) {
|
||||
MenuEntry *e = dynarray_append(&menu->entries);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "mainmenu.h"
|
||||
#include "global.h"
|
||||
#include "video.h"
|
||||
#include "util/graphics.h"
|
||||
|
||||
typedef struct OptionBinding OptionBinding;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "plrmodes.h"
|
||||
#include "common.h"
|
||||
#include "video.h"
|
||||
#include "util/graphics.h"
|
||||
|
||||
attr_nonnull_all
|
||||
static void do_save_replay(Replay *rpy) {
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#include "projectile.h"
|
||||
#include "player.h"
|
||||
#include "cutscenes/cutscene.h"
|
||||
#include "stage.h"
|
||||
#include "dialog.h"
|
||||
#include "endings.h"
|
||||
|
||||
typedef enum {
|
||||
// WARNING: Reordering this will break current replays, and possibly even progress files.
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "cutscenes/cutscene.h"
|
||||
#include "endings.h"
|
||||
|
||||
typedef struct StageProgress {
|
||||
// Keep this struct small if you can
|
||||
|
@ -46,28 +47,6 @@ typedef enum ProgressBGMID {
|
|||
PBGM_INTRO,
|
||||
} ProgressBGMID;
|
||||
|
||||
typedef enum EndingID {
|
||||
// WARNING: Reordering this will break current progress files.
|
||||
|
||||
ENDING_BAD_MARISA,
|
||||
ENDING_BAD_YOUMU,
|
||||
ENDING_GOOD_MARISA,
|
||||
ENDING_GOOD_YOUMU,
|
||||
ENDING_BAD_REIMU,
|
||||
ENDING_GOOD_REIMU,
|
||||
NUM_ENDINGS,
|
||||
} EndingID;
|
||||
|
||||
#define GOOD_ENDINGS \
|
||||
ENDING(ENDING_GOOD_MARISA) \
|
||||
ENDING(ENDING_GOOD_YOUMU) \
|
||||
ENDING(ENDING_GOOD_REIMU)
|
||||
|
||||
#define BAD_ENDINGS \
|
||||
ENDING(ENDING_BAD_MARISA) \
|
||||
ENDING(ENDING_BAD_YOUMU) \
|
||||
ENDING(ENDING_BAD_REIMU)
|
||||
|
||||
typedef struct GlobalProgress {
|
||||
uint32_t hiscore;
|
||||
uint32_t achieved_endings[NUM_ENDINGS];
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "list.h"
|
||||
#include "stageobjects.h"
|
||||
#include "util/glm.h"
|
||||
#include "stage.h"
|
||||
|
||||
static ht_ptr2int_t shader_sublayer_map;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "projectile.h"
|
||||
#include "boss.h"
|
||||
#include "progress.h"
|
||||
#include "difficulty.h"
|
||||
#include "util/graphics.h"
|
||||
#include "dialog.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "boss.h"
|
||||
#include "stage.h"
|
||||
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage1_midboss_nonspell_1, BossAttack);
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage1_boss_nonspell_1, BossAttack);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../stage1.h"
|
||||
#include "boss.h"
|
||||
#include "stage.h"
|
||||
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage1_spell_perfect_freeze, BossAttack);
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage1_spell_crystal_rain, BossAttack);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "boss.h"
|
||||
#include "stage.h"
|
||||
|
||||
void hina_cards1(Boss *h, int time);
|
||||
void hina_cards2(Boss *h, int time);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "boss.h"
|
||||
#include "stage.h"
|
||||
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage3_midboss_nonspell_1, BossAttack);
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage3_boss_nonspell_1, BossAttack);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "boss.h"
|
||||
#include "stage.h"
|
||||
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage4_boss_nonspell_1, BossAttack);
|
||||
DECLARE_EXTERN_TASK_WITH_INTERFACE(stage4_boss_nonspell_2, BossAttack);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "common_tasks.h"
|
||||
#include "stage.h"
|
||||
|
||||
#include "stages/stage5/iku.h"
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "common_tasks.h"
|
||||
#include "stage.h"
|
||||
|
||||
#include "stages/stage5/iku.h"
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "taisei.h"
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "boss.h"
|
||||
#include "stage.h"
|
||||
|
||||
#include "stages/stage6/elly.h"
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "transition.h"
|
||||
#include "menu/ingamemenu.h"
|
||||
#include "global.h"
|
||||
#include "util/graphics.h"
|
||||
|
||||
Transition transition;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "renderer/api.h"
|
||||
#include "util/pngcruft.h"
|
||||
#include "util/fbmgr.h"
|
||||
#include "util/graphics.h"
|
||||
#include "taskmanager.h"
|
||||
#include "video_postprocess.h"
|
||||
#include "dynarray.h"
|
||||
|
|
Loading…
Reference in a new issue