1 /*
2  * This software is licensed under the terms of the MIT License.
3  * See COPYING for further information.
4  * ---
5  * Copyright (c) 2011-2019, Lukas Weber <laochailan@web.de>.
6  * Copyright (c) 2012-2019, Andrei Alexeyev <akari@taisei-project.org>.
7  */
8 
9 #ifndef IGUARD_stagedraw_h
10 #define IGUARD_stagedraw_h
11 
12 #include "taisei.h"
13 
14 #include "stage.h"
15 #include "util/graphics.h"
16 
17 typedef enum StageFBPair {
18 	FBPAIR_BG,
19 	FBPAIR_BG_AUX,
20 	FBPAIR_FG,
21 	FBPAIR_FG_AUX,
22 	NUM_FBPAIRS,
23 } StageFBPair;
24 
25 void stage_draw_pre_init(void);
26 void stage_draw_init(void);
27 void stage_draw_shutdown(void);
28 void stage_draw_hud(void);
29 void stage_draw_viewport(void);
30 void stage_draw_overlay(void);
31 void stage_draw_scene(StageInfo *stage);
32 void stage_draw_bottom_text(void);
33 bool stage_should_draw_particle(Projectile *p);
34 
35 void stage_display_clear_screen(const StageClearBonus *bonus);
36 
37 void stage_draw_begin_noshake(void);
38 void stage_draw_end_noshake(void);
39 
40 FBPair* stage_get_fbpair(StageFBPair id) attr_returns_nonnull;
41 Framebuffer* stage_add_foreground_framebuffer(const char *label, float scale_worst, float scale_best, uint num_attachments, FBAttachmentConfig attachments[num_attachments]);
42 Framebuffer* stage_add_background_framebuffer(const char *label, float scale_worst, float scale_best, uint num_attachments, FBAttachmentConfig attachments[num_attachments]);
43 
44 #endif // IGUARD_stagedraw_h
45