Fixed all the () prototypes, changed to (void)
This commit is contained in:
parent
0f78b1a7eb
commit
779ff58684
59 changed files with 159 additions and 160 deletions
|
@ -46,7 +46,7 @@ ConfigEntry* config_findentry(char *name) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void config_preset() {
|
||||
void config_preset(void) {
|
||||
memset(tconfig.strval, 0, sizeof(tconfig.strval));
|
||||
|
||||
tconfig.intval[KEY_UP] = SDLK_UP;
|
||||
|
|
|
@ -72,7 +72,7 @@ Config tconfig;
|
|||
#define CONFIG_LOAD_BUFSIZE 256
|
||||
|
||||
int config_sym2key(int sym);
|
||||
void config_preset();
|
||||
void config_preset(void);
|
||||
void config_load(char *filename);
|
||||
void config_save(char *filename);
|
||||
ConfigEntry* config_findentry(char *name);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
Global global;
|
||||
|
||||
void init_global() {
|
||||
void init_global(void) {
|
||||
memset(&global, 0, sizeof(global));
|
||||
|
||||
tsrand_seed_p(&global.rand_game, time(0));
|
||||
|
@ -36,7 +36,7 @@ void init_global() {
|
|||
SDL_EnableKeyRepeat(TS_KR_DELAY, TS_KR_INTERVAL);
|
||||
}
|
||||
|
||||
void print_state_checksum() {
|
||||
void print_state_checksum(void) {
|
||||
int plr, spos = 0, smisc = 0, sargs = 0, proj = 0;
|
||||
Player *p = &global.plr;
|
||||
Enemy *s;
|
||||
|
@ -94,7 +94,7 @@ void calc_fps(FPSCounter *fps) {
|
|||
fps->stagebg_fps = approach(fps->stagebg_fps, fps->show_fps, 0.1);
|
||||
}
|
||||
|
||||
void set_ortho() {
|
||||
void set_ortho(void) {
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0, SCREEN_W, SCREEN_H, 0, -100, 100);
|
||||
|
@ -142,7 +142,7 @@ double clamp(double f, double lower, double upper) {
|
|||
return f;
|
||||
}
|
||||
|
||||
void take_screenshot()
|
||||
void take_screenshot(void)
|
||||
{
|
||||
FILE *out;
|
||||
char *data;
|
||||
|
|
11
src/global.h
11
src/global.h
|
@ -127,20 +127,18 @@ typedef struct {
|
|||
|
||||
extern Global global;
|
||||
|
||||
void print_state_checksum();
|
||||
void print_state_checksum(void);
|
||||
|
||||
void init_global();
|
||||
void init_global(void);
|
||||
|
||||
void frame_rate(int *lasttime);
|
||||
void calc_fps(FPSCounter *fps);
|
||||
void set_ortho();
|
||||
void set_ortho(void);
|
||||
void colorfill(float r, float g, float b, float a);
|
||||
void fade_out(float f);
|
||||
|
||||
void global_processevent(SDL_Event*);
|
||||
void take_screenshot();
|
||||
|
||||
double psin();
|
||||
void take_screenshot(void);
|
||||
|
||||
// needed for mingw compatibility:
|
||||
#undef min
|
||||
|
@ -153,6 +151,7 @@ double min(double, double);
|
|||
double max(double, double);
|
||||
double clamp(double, double, double);
|
||||
double approach(double v, double t, double d);
|
||||
double psin(double);
|
||||
int strendswith(char *s, char *e);
|
||||
char* difficulty_name(Difficulty diff);
|
||||
void stralloc(char **dest, char *src);
|
||||
|
|
|
@ -26,7 +26,7 @@ void delete_item(Item *item) {
|
|||
delete_element((void **)&global.items, item);
|
||||
}
|
||||
|
||||
void draw_items() {
|
||||
void draw_items(void) {
|
||||
Item *p;
|
||||
Texture *tex = NULL;
|
||||
for(p = global.items; p; p = p->next) {
|
||||
|
@ -57,7 +57,7 @@ void draw_items() {
|
|||
}
|
||||
}
|
||||
|
||||
void delete_items() {
|
||||
void delete_items(void) {
|
||||
delete_all_elements((void **)&global.items, delete_element);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ void move_item(Item *i) {
|
|||
i->pos = i->pos0 + log(t/5.0 + 1)*5*(i->v + lim) + lim*t;
|
||||
}
|
||||
|
||||
void process_items() {
|
||||
void process_items(void) {
|
||||
Item *item = global.items, *del = NULL;
|
||||
int v;
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ struct Item{
|
|||
|
||||
Item *create_item(complex pos, complex v, Type type);
|
||||
void delete_item(Item *item);
|
||||
void draw_items();
|
||||
void delete_items();
|
||||
void draw_items(void);
|
||||
void delete_items(void);
|
||||
|
||||
int collision_item(Item *p);
|
||||
void process_items();
|
||||
void process_items(void);
|
||||
|
||||
void spawn_item(complex pos, Type type);
|
||||
void spawn_items(complex pos, int point, int power, int bomb, int life);
|
||||
|
|
|
@ -139,7 +139,7 @@ void draw_laser_curve(Laser *laser) {
|
|||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
void draw_lasers() {
|
||||
void draw_lasers(void) {
|
||||
Laser *laser;
|
||||
|
||||
for(laser = global.lasers; laser; laser = laser->next) {
|
||||
|
@ -162,11 +162,11 @@ void _delete_laser(void **lasers, void *laser) {
|
|||
delete_element(lasers, laser);
|
||||
}
|
||||
|
||||
void delete_lasers() {
|
||||
void delete_lasers(void) {
|
||||
delete_all_elements((void **)&global.lasers, _delete_laser);
|
||||
}
|
||||
|
||||
void process_lasers() {
|
||||
void process_lasers(void) {
|
||||
Laser *laser = global.lasers, *del = NULL;
|
||||
|
||||
while(laser != NULL) {
|
||||
|
|
|
@ -54,9 +54,9 @@ struct Laser {
|
|||
Laser *create_laserline_ab(complex a, complex b, float width, float charge, float dur, Color *clr);
|
||||
|
||||
Laser *create_laser(complex pos, float time, float deathtime, Color *color, LaserPosRule prule, LaserLogicRule lrule, complex a0, complex a1, complex a2, complex a3);
|
||||
void draw_lasers();
|
||||
void delete_lasers();
|
||||
void process_lasers();
|
||||
void draw_lasers(void);
|
||||
void delete_lasers(void);
|
||||
void process_lasers(void);
|
||||
|
||||
int collision_laser_line(Laser *l);
|
||||
int collision_laser_curve(Laser *l);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "paths/native.h"
|
||||
#include "taiseigl.h"
|
||||
|
||||
void init_gl() {
|
||||
void init_gl(void) {
|
||||
load_gl_functions();
|
||||
check_gl_extensions();
|
||||
|
||||
|
@ -34,7 +34,7 @@ void init_gl() {
|
|||
}
|
||||
|
||||
|
||||
void taisei_shutdown() {
|
||||
void taisei_shutdown(void) {
|
||||
config_save(CONFIG_FILE);
|
||||
printf("\nshutdown:\n");
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ void give_up(void *arg) {
|
|||
global.game_over = (MAX_CONTINUES - global.plr.continues)? GAMEOVER_ABORT : GAMEOVER_DEFEAT;
|
||||
}
|
||||
|
||||
MenuData *create_gameover_menu() {
|
||||
MenuData *create_gameover_menu(void) {
|
||||
MenuData *m = malloc(sizeof(MenuData));
|
||||
create_menu(m);
|
||||
m->abortable = -1;
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData *create_gameover_menu();
|
||||
MenuData *create_gameover_menu(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@ void return_to_title(void *arg) {
|
|||
global.game_over = GAMEOVER_ABORT;
|
||||
}
|
||||
|
||||
MenuData *create_ingame_menu() {
|
||||
MenuData *create_ingame_menu(void) {
|
||||
MenuData *m = malloc(sizeof(MenuData));
|
||||
create_menu(m);
|
||||
add_menu_entry(m, "Return to Game", return_to_game, NULL);
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
#include "menu.h"
|
||||
|
||||
MenuData *create_ingame_menu();
|
||||
MenuData *create_ingame_menu(void);
|
||||
void draw_ingame_menu(MenuData *menu);
|
||||
void ingame_menu_logic(MenuData **menu);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef struct MenuData{
|
|||
} MenuData;
|
||||
|
||||
void add_menu_entry(MenuData *menu, char *name, void (*action)(void *), void *arg);
|
||||
void add_menu_separator();
|
||||
void add_menu_separator(MenuData *menu);
|
||||
void create_menu(MenuData *menu);
|
||||
void destroy_menu(MenuData *menu);
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ int bind_noshader_set(void *b, int v)
|
|||
return i;
|
||||
}
|
||||
|
||||
int bind_stagebg_fpslimit_dependence() {
|
||||
int bind_stagebg_fpslimit_dependence(void) {
|
||||
return tconfig.intval[NO_STAGEBG] == 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ int options_menu_loop(MenuData *m);
|
|||
|
||||
typedef int (*BindingGetter)(void*);
|
||||
typedef int (*BindingSetter)(void*, int);
|
||||
typedef int (*BindingDependence)();
|
||||
typedef int (*BindingDependence)(void);
|
||||
|
||||
typedef enum BindingType {
|
||||
BT_IntValue,
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#ifndef NATIVE_H
|
||||
#define NATIVE_H
|
||||
|
||||
const char *get_prefix();
|
||||
const char *get_config_path();
|
||||
const char *get_screenshots_path();
|
||||
const char *get_replays_path();
|
||||
const char *get_prefix(void);
|
||||
const char *get_config_path(void);
|
||||
const char *get_screenshots_path(void);
|
||||
const char *get_replays_path(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,7 @@ void delete_animation(void **anis, void *ani) {
|
|||
delete_element(anis, ani);
|
||||
}
|
||||
|
||||
void delete_animations() {
|
||||
void delete_animations(void) {
|
||||
delete_all_elements((void **)&resources.animations, delete_animation);
|
||||
}
|
||||
|
||||
|
@ -113,4 +113,4 @@ void draw_animation_p(float x, float y, int row, Animation *ani) {
|
|||
glPopMatrix();
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ typedef struct Animation {
|
|||
|
||||
Animation *init_animation(char *filename);
|
||||
Animation *get_ani(char *name);
|
||||
void delete_animations();
|
||||
void delete_animations(void);
|
||||
void draw_animation(float x, float y, int row, char *name);
|
||||
void draw_animation_p(float x, float y, int row, Animation *ani);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -82,6 +82,6 @@ void delete_sound(void **snds, void *snd) {
|
|||
delete_element(snds, snd);
|
||||
}
|
||||
|
||||
void delete_sounds() {
|
||||
void delete_sounds(void) {
|
||||
delete_all_elements((void **)&resources.sounds, delete_sound);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,6 @@ void play_sound(char *name);
|
|||
void play_sound_p(Sound *snd);
|
||||
|
||||
Sound *get_snd(char *name);
|
||||
void delete_sounds();
|
||||
void delete_sounds(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@ TTF_Font *load_font(char *name, int size) {
|
|||
return f;
|
||||
}
|
||||
|
||||
void init_fonts() {
|
||||
void init_fonts(void) {
|
||||
TTF_Init();
|
||||
|
||||
_fonts.standard = load_font("gfx/LinBiolinum.ttf", 20);
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef enum {
|
|||
|
||||
Texture *load_text(const char *text, TTF_Font *font);
|
||||
void draw_text(Alignment align, float x, float y, const char *text, TTF_Font *font);
|
||||
void init_fonts();
|
||||
void init_fonts(void);
|
||||
int stringwidth(char *s, TTF_Font *font);
|
||||
int stringheight(char *s, TTF_Font *font);
|
||||
int charwidth(char c, TTF_Font *font);
|
||||
|
|
|
@ -225,6 +225,6 @@ void delete_model(void **models, void *model) {
|
|||
delete_element(models, model);
|
||||
}
|
||||
|
||||
void delete_models() { // Does not delete elements from the VBO, so doing this at runtime is leaking VBO space
|
||||
void delete_models(void) { // Does not delete elements from the VBO, so doing this at runtime is leaking VBO space
|
||||
delete_all_elements((void **)&resources.models, delete_model);
|
||||
}
|
||||
|
|
|
@ -48,6 +48,6 @@ Model *get_model(char *name);
|
|||
|
||||
void draw_model_p(Model *model);
|
||||
void draw_model(char *name);
|
||||
void delete_models(); // Does not delete elements from the VBO, so doing this at runtime is leaking VBO space
|
||||
void delete_models(void); // Does not delete elements from the VBO, so doing this at runtime is leaking VBO space
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -51,7 +51,7 @@ void recurse_dir(char *path) {
|
|||
closedir(dir);
|
||||
}
|
||||
|
||||
void load_resources() {
|
||||
void load_resources(void) {
|
||||
printf("load_resources():\n");
|
||||
|
||||
char *path = malloc(strlen(get_prefix())+32);
|
||||
|
@ -107,7 +107,7 @@ void load_resources() {
|
|||
}
|
||||
}
|
||||
|
||||
void free_resources() {
|
||||
void free_resources(void) {
|
||||
if(resources.state & RS_SfxLoaded) {
|
||||
printf("-- freeing sounds\n");
|
||||
delete_sounds();
|
||||
|
|
|
@ -47,6 +47,6 @@ struct Resources {
|
|||
|
||||
extern Resources resources;
|
||||
|
||||
void load_resources();
|
||||
void free_resources();
|
||||
void load_resources(void);
|
||||
void free_resources(void);
|
||||
#endif
|
||||
|
|
|
@ -300,6 +300,6 @@ void delete_shader(void **shas, void *sha) {
|
|||
delete_element(shas, sha);
|
||||
}
|
||||
|
||||
void delete_shaders() {
|
||||
void delete_shaders(void) {
|
||||
delete_all_elements((void **)&resources.shaders, delete_shader);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ void load_shader_snippets(char *filename, char *prefix);
|
|||
void load_shader_file(char *filename);
|
||||
void load_shader(char *vtext, char *ftext, char *name, int nsize);
|
||||
Shader *get_shader(const char *name);
|
||||
void delete_shaders();
|
||||
void delete_shaders(void);
|
||||
|
||||
void cache_uniforms(Shader *sha);
|
||||
int uniloc(Shader *sha, char *name);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -68,7 +68,7 @@ void delete_texture(void **texs, void *tex) {
|
|||
delete_element((void **)texs, tex);
|
||||
}
|
||||
|
||||
void delete_textures() {
|
||||
void delete_textures(void) {
|
||||
delete_all_elements((void **)&resources.textures, delete_texture);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ Texture *prefix_get_tex(char *name, char *prefix);
|
|||
SDL_Surface *load_png(const char *filename);
|
||||
|
||||
void delete_texture(void **texs, void *tex);
|
||||
void delete_textures();
|
||||
void delete_textures(void);
|
||||
|
||||
Texture *load_texture(const char *filename);
|
||||
void load_sdl_surf(SDL_Surface *surface, Texture *texture);
|
||||
|
@ -50,4 +50,4 @@ void draw_texture_p(float x, float y, Texture *tex);
|
|||
void fill_screen(float xoff, float yoff, float ratio, char *name);
|
||||
void fill_screen_p(float xoff, float yoff, float ratio, Texture *tex);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
12
src/stage.c
12
src/stage.c
|
@ -36,7 +36,7 @@ StageInfo* stage_get(int n) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void stage_start() {
|
||||
void stage_start(void) {
|
||||
global.timer = 0;
|
||||
global.frames = 0;
|
||||
global.game_over = 0;
|
||||
|
@ -51,14 +51,14 @@ void stage_start() {
|
|||
global.plr.deathtime = -1;
|
||||
}
|
||||
|
||||
void stage_ingamemenu() {
|
||||
void stage_ingamemenu(void) {
|
||||
if(!global.menu)
|
||||
global.menu = create_ingame_menu();
|
||||
else
|
||||
global.menu->quit = 1;
|
||||
}
|
||||
|
||||
void replay_input() {
|
||||
void replay_input(void) {
|
||||
if(global.menu) {
|
||||
menu_input(global.menu);
|
||||
return;
|
||||
|
@ -108,7 +108,7 @@ void replay_input() {
|
|||
player_applymovement(&global.plr);
|
||||
}
|
||||
|
||||
void stage_input() {
|
||||
void stage_input(void) {
|
||||
if(global.menu) {
|
||||
menu_input(global.menu);
|
||||
return;
|
||||
|
@ -161,7 +161,7 @@ void stage_input() {
|
|||
player_applymovement(&global.plr);
|
||||
}
|
||||
|
||||
void draw_hud() {
|
||||
void draw_hud(void) {
|
||||
draw_texture(SCREEN_W/2.0, SCREEN_H/2.0, "hud");
|
||||
|
||||
char buf[16], *diff;
|
||||
|
@ -449,7 +449,7 @@ void stage_logic(int time) {
|
|||
global.game_over = GAMEOVER_WIN;
|
||||
}
|
||||
|
||||
void stage_end() {
|
||||
void stage_end(void) {
|
||||
delete_enemies(&global.enemies);
|
||||
delete_items();
|
||||
delete_lasers();
|
||||
|
|
12
src/stage.h
12
src/stage.h
|
@ -51,11 +51,11 @@ void apply_bg_shaders(ShaderRule *shaderrules);
|
|||
|
||||
void draw_stage_title(StageInfo *info);
|
||||
|
||||
void stage1_loop();
|
||||
void stage2_loop();
|
||||
void stage3_loop();
|
||||
void stage4_loop();
|
||||
void stage5_loop();
|
||||
void stage6_loop();
|
||||
void stage1_loop(void);
|
||||
void stage2_loop(void);
|
||||
void stage3_loop(void);
|
||||
void stage4_loop(void);
|
||||
void stage5_loop(void);
|
||||
void stage6_loop(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
static Stage3D bgcontext;
|
||||
|
||||
Dialog *stage1_dialog() {
|
||||
Dialog *stage1_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
|
||||
|
||||
dadd_msg(d, Right, "Hey! Who is there?");
|
||||
|
@ -99,7 +99,7 @@ void stage1_fog(int fbonum) {
|
|||
glUseProgram(0);
|
||||
}
|
||||
|
||||
void stage1_draw() {
|
||||
void stage1_draw(void) {
|
||||
set_perspective(&bgcontext, 500, 5000);
|
||||
|
||||
draw_stage3d(&bgcontext, 7000);
|
||||
|
@ -203,7 +203,7 @@ void cirno_pfreeze_bg(Boss *c, int time) {
|
|||
glColor4f(1,1,1,1);
|
||||
}
|
||||
|
||||
Boss *create_cirno_mid() {
|
||||
Boss *create_cirno_mid(void) {
|
||||
Boss* cirno = create_boss("Cirno", "cirno", VIEWPORT_W + 220 + 30I);
|
||||
boss_add_attack(cirno, AT_Move, "Introduction", 2, 0, cirno_intro, NULL);
|
||||
boss_add_attack(cirno, AT_Normal, "Icy Storm", 20, 20000, cirno_icy, NULL);
|
||||
|
@ -343,7 +343,7 @@ void cirno_icicle_fall(Boss *c, int time) {
|
|||
}
|
||||
}
|
||||
|
||||
Boss *create_cirno() {
|
||||
Boss *create_cirno(void) {
|
||||
Boss* cirno = create_boss("Cirno", "cirno", -230 + 100I);
|
||||
boss_add_attack(cirno, AT_Move, "Introduction", 2, 0, cirno_intro_boss, NULL);
|
||||
boss_add_attack(cirno, AT_Normal, "Iceplosion 0", 20, 20000, cirno_iceplosion0, NULL);
|
||||
|
@ -556,7 +556,7 @@ int stage1_tritoss(Enemy *e, int t) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void stage1_events() {
|
||||
void stage1_events(void) {
|
||||
TIMER(&global.timer);
|
||||
|
||||
// AT(0)
|
||||
|
@ -642,7 +642,7 @@ void stage1_events() {
|
|||
|
||||
}
|
||||
|
||||
void stage1_start() {
|
||||
void stage1_start(void) {
|
||||
init_stage3d(&bgcontext);
|
||||
add_model(&bgcontext, stage1_bg_draw, stage1_bg_pos);
|
||||
add_model(&bgcontext, stage1_smoke_draw, stage1_smoke_pos);
|
||||
|
@ -652,11 +652,11 @@ void stage1_start() {
|
|||
bgcontext.cv[1] = 7;
|
||||
}
|
||||
|
||||
void stage1_end() {
|
||||
void stage1_end(void) {
|
||||
free_stage3d(&bgcontext);
|
||||
}
|
||||
|
||||
void stage1_loop() {
|
||||
void stage1_loop(void) {
|
||||
ShaderRule list[] = { stage1_fog, NULL };
|
||||
stage_loop(stage_get(1), stage1_start, stage1_end, stage1_draw, stage1_events, list, 5200);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE1_H
|
||||
#define STAGE1_H
|
||||
|
||||
void stage1_loop();
|
||||
void stage1_loop(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -126,7 +126,7 @@ void stage2_bloom(int fbonum) {
|
|||
glUseProgram(0);
|
||||
}
|
||||
|
||||
void stage2_start() {
|
||||
void stage2_start(void) {
|
||||
init_stage3d(&bgcontext);
|
||||
bgcontext.cx[2] = 1000;
|
||||
bgcontext.cx[0] = -850;
|
||||
|
@ -139,11 +139,11 @@ void stage2_start() {
|
|||
add_model(&bgcontext, stage2_bg_leaves_draw, stage2_bg_pos);
|
||||
}
|
||||
|
||||
void stage2_end() {
|
||||
void stage2_end(void) {
|
||||
free_stage3d(&bgcontext);
|
||||
}
|
||||
|
||||
void stage2_draw() {
|
||||
void stage2_draw(void) {
|
||||
TIMER(&global.frames);
|
||||
|
||||
set_perspective(&bgcontext, 500, 5000);
|
||||
|
@ -158,7 +158,7 @@ void stage2_draw() {
|
|||
|
||||
}
|
||||
|
||||
void stage2_loop() {
|
||||
void stage2_loop(void) {
|
||||
ShaderRule shaderrules[] = { stage2_fog, stage2_bloom, NULL };
|
||||
stage_loop(stage_get(2), stage2_start, stage2_end, stage2_draw, stage2_events, shaderrules, 5240);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE2_H
|
||||
#define STAGE2_H
|
||||
|
||||
void stage2_loop();
|
||||
void stage2_loop(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "stage.h"
|
||||
#include "enemy.h"
|
||||
|
||||
Dialog *stage2_dialog() {
|
||||
Dialog *stage2_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "dialog/hina");
|
||||
|
||||
if(global.plr.cha == Marisa) {
|
||||
|
@ -33,7 +33,7 @@ Dialog *stage2_dialog() {
|
|||
return d;
|
||||
}
|
||||
|
||||
Dialog *stage2_post_dialog() {
|
||||
Dialog *stage2_post_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", NULL);
|
||||
|
||||
dadd_msg(d, Right, "Well, let's go then.");
|
||||
|
@ -243,7 +243,7 @@ void wriggle_small_storm(Boss *w, int time) {
|
|||
}
|
||||
}
|
||||
|
||||
Boss *create_wriggle_mid() {
|
||||
Boss *create_wriggle_mid(void) {
|
||||
Boss* wriggle = create_boss("Wriggle", "wriggle", VIEWPORT_W + 150 - 30I);
|
||||
boss_add_attack(wriggle, AT_Move, "Introduction", 4, 0, wriggle_intro, NULL);
|
||||
boss_add_attack(wriggle, AT_Normal, "Small Bug Storm", 20, 20000, wriggle_small_storm, NULL);
|
||||
|
@ -391,7 +391,7 @@ void hina_spell_bg(Boss *h, int time) {
|
|||
|
||||
}
|
||||
|
||||
Boss *create_hina() {
|
||||
Boss *create_hina(void) {
|
||||
Boss* hina = create_boss("Kagiyama Hina", "hina", VIEWPORT_W + 150 + 100I);
|
||||
boss_add_attack(hina, AT_Move, "Introduction", 2, 0, hina_intro, NULL);
|
||||
boss_add_attack(hina, AT_Normal, "Cards1", 20, 15000, hina_cards1, NULL);
|
||||
|
@ -404,7 +404,7 @@ Boss *create_hina() {
|
|||
return hina;
|
||||
}
|
||||
|
||||
void stage2_events() {
|
||||
void stage2_events(void) {
|
||||
TIMER(&global.timer);
|
||||
|
||||
AT(300) {
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE2_EVENTS_H
|
||||
#define STAGE2_EVENTS_H
|
||||
|
||||
void stage2_events();
|
||||
void stage2_events(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -110,7 +110,7 @@ void stage3_fog(int fbonum) {
|
|||
glUseProgram(0);
|
||||
}
|
||||
|
||||
void stage3_start() {
|
||||
void stage3_start(void) {
|
||||
init_stage3d(&bgcontext);
|
||||
|
||||
bgcontext.cx[2] = -10;
|
||||
|
@ -129,11 +129,11 @@ void stage3_start() {
|
|||
// stgstate.fog_exp = 5.0;
|
||||
}
|
||||
|
||||
void stage3_end() {
|
||||
void stage3_end(void) {
|
||||
free_stage3d(&bgcontext);
|
||||
}
|
||||
|
||||
void stage3_draw() {
|
||||
void stage3_draw(void) {
|
||||
TIMER(&global.timer)
|
||||
|
||||
set_perspective(&bgcontext, 300, 5000);
|
||||
|
@ -278,7 +278,7 @@ void stage3_draw() {
|
|||
draw_stage3d(&bgcontext, 7000);
|
||||
}
|
||||
|
||||
void stage3_loop() {
|
||||
void stage3_loop(void) {
|
||||
ShaderRule shaderrules[] = { stage3_fog, stage3_tunnel, NULL };
|
||||
stage_loop(stage_get(3), stage3_start, stage3_end, stage3_draw, stage3_events, shaderrules, 5700);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE3_H
|
||||
#define STAGE3_H
|
||||
|
||||
void stage3_loop();
|
||||
void stage3_loop(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stage.h"
|
||||
#include "enemy.h"
|
||||
|
||||
Dialog *stage3_dialog() {
|
||||
Dialog *stage3_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
|
||||
|
||||
dadd_msg(d, Left, "Ugh, it's like bugs being attracted\nby the light ...");
|
||||
|
@ -420,7 +420,7 @@ void stage3_boss_spellbg(Boss *b, int time) {
|
|||
glColor4f(1,1,1,1);
|
||||
}
|
||||
|
||||
Boss* stage3_create_midboss() {
|
||||
Boss* stage3_create_midboss(void) {
|
||||
Boss *scuttle = create_boss("Scuttle", "scuttle", VIEWPORT_W/2 - 200I);
|
||||
boss_add_attack(scuttle, AT_Move, "Introduction", 2, 0, stage3_mid_intro, NULL);
|
||||
boss_add_attack(scuttle, AT_Normal, "Lethal Bite", 30, 25000, stage3_mid_a0, NULL);
|
||||
|
@ -750,7 +750,7 @@ void stage3_boss_intro(Boss *boss, int time) {
|
|||
GO_TO(boss, VIEWPORT_W/2.0 + 100I, 0.03);
|
||||
}
|
||||
|
||||
Boss* stage3_create_boss() {
|
||||
Boss* stage3_create_boss(void) {
|
||||
Boss *wriggle = create_boss("EX Wriggle", "wriggle", VIEWPORT_W/2 - 200I);
|
||||
boss_add_attack(wriggle, AT_Move, "Introduction", 2, 0, stage3_boss_intro, NULL);
|
||||
|
||||
|
@ -765,7 +765,7 @@ Boss* stage3_create_boss() {
|
|||
return wriggle;
|
||||
}
|
||||
|
||||
void stage3_events() {
|
||||
void stage3_events(void) {
|
||||
TIMER(&global.timer);
|
||||
|
||||
FROM_TO(160, 300, 10) {
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
#ifndef STAGE3_EVENTS_H
|
||||
#define STAGE3_EVENTS_H
|
||||
|
||||
void stage3_events();
|
||||
void stage3_events(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -189,7 +189,7 @@ void stage4_corridor_draw(Vector pos) {
|
|||
glColor3f(1,1,1);
|
||||
}
|
||||
|
||||
void stage4_start() {
|
||||
void stage4_start(void) {
|
||||
init_stage3d(&bgcontext);
|
||||
|
||||
bgcontext.cx[2] = -10000;
|
||||
|
@ -207,11 +207,11 @@ void stage4_start() {
|
|||
add_model(&bgcontext, stage4_corridor_draw, stage4_corridor_pos);
|
||||
}
|
||||
|
||||
void stage4_end() {
|
||||
void stage4_end(void) {
|
||||
free_stage3d(&bgcontext);
|
||||
}
|
||||
|
||||
void stage4_draw() {
|
||||
void stage4_draw(void) {
|
||||
set_perspective(&bgcontext, 130, 3000);
|
||||
|
||||
draw_stage3d(&bgcontext, 4000);
|
||||
|
@ -229,7 +229,7 @@ void stage4_draw() {
|
|||
bgcontext.cv[1] += 0.02;
|
||||
}
|
||||
|
||||
void stage4_loop() {
|
||||
void stage4_loop(void) {
|
||||
ShaderRule shaderrules[] = { stage4_fog, NULL };
|
||||
stage_loop(stage_get(4), stage4_start, stage4_end, stage4_draw, stage4_events, shaderrules, 5550);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE4_H
|
||||
#define STAGE4_H
|
||||
|
||||
void stage4_loop();
|
||||
void stage4_loop(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "enemy.h"
|
||||
#include "laser.h"
|
||||
|
||||
Dialog *stage4_dialog() {
|
||||
Dialog *stage4_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
|
||||
|
||||
dadd_msg(d, Right, "Ah! Intruder! Stop being so persistent!");
|
||||
|
@ -34,7 +34,7 @@ Dialog *stage4_dialog() {
|
|||
return d;
|
||||
}
|
||||
|
||||
Dialog *stage4_dialog_end() {
|
||||
Dialog *stage4_dialog_end(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
|
||||
|
||||
dadd_msg(d, Left, "Where is your master now?");
|
||||
|
@ -359,7 +359,7 @@ void kurumi_outro(Boss *b, int time) {
|
|||
b->pos += -5-I;
|
||||
}
|
||||
|
||||
Boss *create_kurumi_mid() {
|
||||
Boss *create_kurumi_mid(void) {
|
||||
Boss* b = create_boss("Kurumi", "kurumi", VIEWPORT_W/2-400I);
|
||||
boss_add_attack(b, AT_Move, "Introduction", 4, 0, kurumi_intro, NULL);
|
||||
boss_add_attack(b, AT_Spellcard, "Bloodless ~ Gate of Walachia", 25, 20000, kurumi_slaveburst, kurumi_spell_bg);
|
||||
|
@ -695,7 +695,7 @@ void kurumi_danmaku(Boss *b, int time) {
|
|||
}
|
||||
|
||||
|
||||
Boss *create_kurumi() {
|
||||
Boss *create_kurumi(void) {
|
||||
Boss* b = create_boss("Kurumi", "kurumi", -400I);
|
||||
boss_add_attack(b, AT_Move, "Introduction", 4, 0, kurumi_boss_intro, NULL);
|
||||
boss_add_attack(b, AT_Normal, "Sin Breaker", 20, 20000, kurumi_sbreaker, NULL);
|
||||
|
@ -711,7 +711,7 @@ Boss *create_kurumi() {
|
|||
|
||||
|
||||
|
||||
void stage4_events() {
|
||||
void stage4_events(void) {
|
||||
TIMER(&global.timer);
|
||||
|
||||
AT(70) {
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE4_EVENTS_H
|
||||
#define STAGE4_EVENTS_H
|
||||
|
||||
void stage4_events();
|
||||
void stage4_events(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -55,7 +55,7 @@ void stage5_stairs_draw(Vector pos) {
|
|||
glUseProgram(0);
|
||||
}
|
||||
|
||||
void stage5_draw() {
|
||||
void stage5_draw(void) {
|
||||
set_perspective(&bgcontext, 100, 20000);
|
||||
draw_stage3d(&bgcontext, 30000);
|
||||
|
||||
|
@ -113,7 +113,7 @@ void iku_spell_bg(Boss *b, int t) {
|
|||
glColor4f(1,1,1,1);
|
||||
}
|
||||
|
||||
void stage5_start() {
|
||||
void stage5_start(void) {
|
||||
memset(&stagedata, 0, sizeof(stagedata));
|
||||
|
||||
init_stage3d(&bgcontext);
|
||||
|
@ -124,10 +124,10 @@ void stage5_start() {
|
|||
stagedata.rad = 2800;
|
||||
}
|
||||
|
||||
void stage5_end() {
|
||||
void stage5_end(void) {
|
||||
free_stage3d(&bgcontext);
|
||||
}
|
||||
|
||||
void stage5_loop() {
|
||||
void stage5_loop(void) {
|
||||
stage_loop(stage_get(5), stage5_start, stage5_end, stage5_draw, stage5_events, NULL, 5700);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE5_H
|
||||
#define STAGE5_H
|
||||
|
||||
void stage5_loop();
|
||||
void stage5_loop(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "stage5.h"
|
||||
#include <global.h>
|
||||
|
||||
Dialog *stage5_post_mid_dialog() {
|
||||
Dialog *stage5_post_mid_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", NULL);
|
||||
|
||||
dadd_msg(d, Left, "Hey! Stop!");
|
||||
|
@ -17,7 +17,7 @@ Dialog *stage5_post_mid_dialog() {
|
|||
return d;
|
||||
}
|
||||
|
||||
Dialog *stage5_boss_dialog() {
|
||||
Dialog *stage5_boss_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
|
||||
|
||||
dadd_msg(d, Left, "Finally!");
|
||||
|
@ -30,7 +30,7 @@ Dialog *stage5_boss_dialog() {
|
|||
return d;
|
||||
}
|
||||
|
||||
Dialog *stage5_post_boss_dialog() {
|
||||
Dialog *stage5_post_boss_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", NULL);
|
||||
|
||||
dadd_msg(d, Left, "I can see the top!");
|
||||
|
@ -201,7 +201,7 @@ void iku_mid_intro(Boss *b, int t) {
|
|||
killall(global.enemies);
|
||||
}
|
||||
|
||||
Boss *create_iku_mid() {
|
||||
Boss *create_iku_mid(void) {
|
||||
Boss *b = create_boss("Bombs?", "iku", VIEWPORT_W+800I);
|
||||
|
||||
boss_add_attack(b, AT_SurvivalSpell, "Static Bombs", 16, 10, iku_mid_intro, NULL);
|
||||
|
@ -479,7 +479,7 @@ void iku_induction(Boss *b, int t) {
|
|||
|
||||
void iku_spell_bg(Boss *b, int t);
|
||||
|
||||
Boss *create_iku() {
|
||||
Boss *create_iku(void) {
|
||||
Boss *b = create_boss("Nagae Iku", "iku", VIEWPORT_W/2-200I);
|
||||
|
||||
boss_add_attack(b, AT_Move, "Introduction", 3, 0, iku_intro, NULL);
|
||||
|
@ -494,7 +494,7 @@ Boss *create_iku() {
|
|||
return b;
|
||||
}
|
||||
|
||||
void stage5_events() {
|
||||
void stage5_events(void) {
|
||||
TIMER(&global.timer);
|
||||
|
||||
FROM_TO(60, 120, 10)
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
#ifndef STAGE5_EVENTS_H
|
||||
#define STAGE5_EVENTS_H
|
||||
|
||||
void stage5_events();
|
||||
void stage5_events(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -93,7 +93,7 @@ void stage6_skysphere_draw(Vector pos) {
|
|||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
void stage6_draw() {
|
||||
void stage6_draw(void) {
|
||||
set_perspective(&bgcontext, 100, 9000);
|
||||
draw_stage3d(&bgcontext, 10000);
|
||||
|
||||
|
@ -143,11 +143,11 @@ void stage6_draw() {
|
|||
bgcontext.crot[2] += 180/M_PI*g*w;
|
||||
}
|
||||
|
||||
void start_fall_over() { //troll
|
||||
void start_fall_over(void) { //troll
|
||||
fall_over = global.frames;
|
||||
}
|
||||
|
||||
void stage6_start() {
|
||||
void stage6_start(void) {
|
||||
init_stage3d(&bgcontext);
|
||||
fall_over = 0;
|
||||
|
||||
|
@ -169,11 +169,11 @@ void stage6_start() {
|
|||
|
||||
}
|
||||
|
||||
void stage6_end() {
|
||||
void stage6_end(void) {
|
||||
free_stage3d(&bgcontext);
|
||||
}
|
||||
|
||||
void stage6_loop() {
|
||||
void stage6_loop(void) {
|
||||
// ShaderRule shaderrules[] = { stage6_bloom, NULL };
|
||||
stage_loop(stage_get(6), stage6_start, stage6_end, stage6_draw, stage6_events, NULL, 3900);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifndef STAGE6_H
|
||||
#define STAGE6_H
|
||||
|
||||
void stage6_loop();
|
||||
void start_fall_over();
|
||||
void stage6_loop(void);
|
||||
void start_fall_over(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "stage6.h"
|
||||
#include <global.h>
|
||||
|
||||
Dialog *stage6_dialog() {
|
||||
Dialog *stage6_dialog(void) {
|
||||
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
|
||||
|
||||
dadd_msg(d, Left, "You are responsible?");
|
||||
|
@ -878,7 +878,7 @@ void elly_spellbg_modern(Boss *b, int t) {
|
|||
glColor4f(1,1,1,1);
|
||||