Some minor fixes of sources to remove inadequate differences from upstream

This commit is contained in:
makise-homura 2017-01-24 17:35:23 +03:00
parent 815ae7b23b
commit 165a8fb6d8
16 changed files with 12 additions and 36 deletions

View file

@ -45,7 +45,6 @@ void delete_dialog(Dialog *d) {
}
void draw_dialog(Dialog *dialog) {
glPushMatrix();
glTranslatef(VIEWPORT_W/2.0, VIEWPORT_H*3.0/4.0, 0);

View file

@ -42,7 +42,6 @@ void taisei_shutdown(void) {
if (!tconfig.intval[NO_AUDIO]) shutdown_sfx();
if (!tconfig.intval[NO_MUSIC]) shutdown_bgm();
free_resources();
video_shutdown();
gamepad_shutdown();
@ -87,7 +86,6 @@ int main(int argc, char** argv) {
init_sfx(&argc, argv);
init_bgm(&argc, argv);
load_resources();
printf("initialization complete.\n");
atexit(taisei_shutdown);

View file

@ -182,21 +182,12 @@ void play_sound_p(char *name, int unconditional)
}
if(res != -1) {
//#ifdef DEBUG
// For debug only
if (res > 20) warnx("play_sound_p(): %d sources consumed", res);
//#endif
alSourcei(resources.sndsrc[res],AL_BUFFER, snd->alsnd);
warn_alut_error("changing buffer of sfx source");
alSourcePlay(resources.sndsrc[res]);
warn_alut_error("starting playback of sfx source");
} else {
//#ifdef DEBUG
// It is normal situation since there definitely may be more
// than SNDSRC_COUNT simultaneous sounds; we will spam output
// with tons of these warnings only in DEBUG mode.
warnx("play_sound_p():\n!- not enough sources");
//#endif
}
}

View file

@ -5,4 +5,4 @@
int load_ogg(char *filename, ALenum *format, char **buffer, ALsizei *size, ALsizei *freq);
#endif
#endif

View file

@ -291,11 +291,8 @@ void stage_draw(StageInfo *info, StageRule bgdraw, ShaderRule *shaderrules, int
// BGM handling
if(global.dialog && global.dialog->messages[global.dialog->pos].side == BGM)
{
printf("bgm dialog entry\n");
start_bgm(global.dialog->messages[global.dialog->pos].msg);
printf("paging dialog\n");
page_dialog(&global.dialog);
printf("dialog paged");
}
if (global.dialog)
@ -543,12 +540,11 @@ void stage_loop(StageInfo* info, StageRule start, StageRule end, StageRule draw,
SDL_EnableKeyRepeat(TS_KR_DELAY, TS_KR_INTERVAL);
}
void draw_title(int t, StageInfo *info, Alignment al, int x, int y, const char *text, TTF_Font *font)
{
void draw_title(int t, StageInfo *info, Alignment al, int x, int y, const char *text, TTF_Font *font) {
int i;
float f = 0;
if(t < 30 || t > 220) return;
if(t < 30 || t > 220)
return;
if((i = abs(t-135)) >= 50) {
i -= 50;

View file

@ -654,16 +654,14 @@ void stage1_events(void) {
AT(4200)
create_enemy2c(VIEWPORT_W/2.0, 4000, BigFairy, stage1_tritoss, 2.0I, -2.6I);
AT(5000) {
AT(5000)
global.boss = create_cirno();
}
}
void stage1_start(void) {
init_stage3d(&bgcontext);
start_bgm("bgm_stage1");
add_model(&bgcontext, stage1_bg_draw, stage1_bg_pos);
add_model(&bgcontext, stage1_smoke_draw, stage1_smoke_pos);

View file

@ -136,7 +136,6 @@ void stage2_start(void) {
bgcontext.cv[0] = 9;
start_bgm("bgm_stage2");
add_model(&bgcontext, stage2_bg_ground_draw, stage2_bg_pos);
add_model(&bgcontext, stage2_bg_leaves_draw, stage2_bg_pos);
}

View file

@ -31,12 +31,12 @@ Dialog *stage2_dialog(void) {
}
dadd_msg(d, BGM, "bgm_stage2boss");
return d;
}
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.");
return d;

View file

@ -114,7 +114,6 @@ void stage3_start(void) {
init_stage3d(&bgcontext);
start_bgm("bgm_stage3");
bgcontext.cx[2] = -10;
bgcontext.crot[0] = -95;
bgcontext.cv[1] = 20;

View file

@ -758,6 +758,7 @@ void stage3_boss_intro(Boss *boss, int time) {
Boss* stage3_create_boss(void) {
Boss *wriggle = create_boss("Wriggle EX", "wriggleex", VIEWPORT_W/2 - 200.0I);
boss_add_attack(wriggle, AT_Move, "Introduction", 2, 0, stage3_boss_intro, NULL);
boss_add_attack(wriggle, AT_Normal, "", 20, 15000, stage3_boss_prea1, NULL);
boss_add_attack(wriggle, AT_Spellcard, "Firefly Sign ~ Moonlight Rocket", 30, 20000, stage3_boss_a1, stage3_boss_spellbg);
boss_add_attack(wriggle, AT_Normal, "", 20, 15000, stage3_boss_prea2, NULL);
@ -854,5 +855,4 @@ void stage3_events(void) {
AT(5300)
global.boss = stage3_create_boss();
}

View file

@ -193,7 +193,6 @@ void stage4_start(void) {
init_stage3d(&bgcontext);
start_bgm("bgm_stage4");
bgcontext.cx[2] = -10000;
bgcontext.cv[2] = 19.7;
bgcontext.crot[0] = 80;

View file

@ -30,14 +30,14 @@ Dialog *stage4_dialog(void) {
dadd_msg(d, Left, "...");
dadd_msg(d, Right, "So stop asking questions!\nSecrets are secret!\n...\nAnd I will beat you now!");
}
dadd_msg(d, BGM, "bgm_stage4boss");
return d;
}
Dialog *stage4_dialog_end(void) {
Dialog *d = create_dialog(global.plr.cha == Marisa ? "dialog/marisa" : "dialog/youmu", "masterspark");
dadd_msg(d, Left, "Now, where is your master?");
dadd_msg(d, Right, "Didn't I tell you? At the end of this corridor,\nthere is a door.");
dadd_msg(d, Right, "Just leave me alone.");
@ -415,7 +415,7 @@ void kurumi_boss_intro(Boss *b, int t) {
TIMER(&t);
GO_TO(b, VIEWPORT_W/2.0+200.0I, 0.01);
AT(120)
AT(400)
global.dialog = stage4_dialog();
}

View file

@ -120,7 +120,6 @@ void stage5_start(void) {
add_model(&bgcontext, stage5_stairs_draw, stage5_stairs_pos);
start_bgm("bgm_stage5");
bgcontext.crot[0] = 60;
stagedata.rotshift = 140;
stagedata.rad = 2800;

View file

@ -26,14 +26,14 @@ Dialog *stage5_boss_dialog(void) {
dadd_msg(d, Right, "I don't have time for your suspicions now.");
dadd_msg(d, Left, "Sounds very suspicious, actually.");
dadd_msg(d, Right, "Ok, let's finish this quickly.");
dadd_msg(d, BGM, "bgm_stage5boss");
return d;
}
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!");
dadd_msg(d, Left, "Hopefully climbing all those stairs\nwas worth it.");

View file

@ -152,7 +152,6 @@ void stage6_start(void) {
fall_over = 0;
start_bgm("bgm_stage6");
add_model(&bgcontext, stage6_skysphere_draw, stage6_skysphere_pos);
add_model(&bgcontext, stage6_towertop_draw, stage6_towertop_pos);
add_model(&bgcontext, stage6_towerwall_draw, stage6_towerwall_pos);

View file

@ -33,7 +33,6 @@ Dialog *stage6_dialog(void) {
dadd_msg(d, Right, "...\nSorry, this is more important than you!");
dadd_msg(d, BGM, "bgm_stage6boss");
return d;
}