From 533410baee424b4587dd92b4b034f3d3701c856b Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Fri, 13 Jul 2012 11:05:38 +0200 Subject: [PATCH] This is Super Derpy: Muffin Attack 0.1a --- ChangeLog | 4 ++++ SuperDerpy.creator.user | 4 ++-- src/about.c | 4 ++-- src/levels/actions.c | 8 ++++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba3c03a..817a0a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-07-13 Sebastian Krzyszkowiak + + * src/levels/actions.c: fix crash on displaying letter from Twilight + 2012-07-12 Sebastian Krzyszkowiak * SuperDerpy.sh, doc/html/about_8c.html, doc/html/about_8h.html, diff --git a/SuperDerpy.creator.user b/SuperDerpy.creator.user index d67a3f8..23409f1 100644 --- a/SuperDerpy.creator.user +++ b/SuperDerpy.creator.user @@ -1,6 +1,6 @@ - + GenericProjectManager.GenericProject.Toolchain @@ -60,7 +60,7 @@ GenericProjectManager.GenericTarget 0 0 - 0 + 1 /home/dos/git/SuperDerpy ProjectExplorer.ToolChain.Gcc:{2a0f2a2f-6b3a-4e88-a8f0-c4e642a21298} diff --git a/src/about.c b/src/about.c index a3ff528..3ed1326 100644 --- a/src/about.c +++ b/src/about.c @@ -93,7 +93,7 @@ void About_Preload(struct Game *game, void (*progress)(struct Game*, float)) { al_set_target_bitmap(game->about.text_bitmap); al_clear_to_color(al_map_rgba(0,0,0,0)); al_draw_text(game->about.font, al_map_rgb(0,0,0), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.015*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Super Derpy: Muffin Attack"); - al_draw_text(game->about.font, al_map_rgb(0,0,0), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.035*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Version 0.1 (prealpha)"); + al_draw_text(game->about.font, al_map_rgb(0,0,0), 0.5*al_get_bitmap_width(game->about.text_bitmap), 0.035*al_get_bitmap_height(game->about.text_bitmap), ALLEGRO_ALIGN_CENTRE, "Version 0.1a (Development Preview)"); float y=0.07; void draw_text(char* text) { @@ -113,7 +113,7 @@ void About_Preload(struct Game *game, void (*progress)(struct Game*, float)) { /*draw_text(" - BaldDumboRat"); draw_text(" Derpy Hooves");*/ draw_text(" - MEMJ0123"); - draw_text(" http://memj0123.tumblr.com/"); + draw_text(" http://www.youtube.com/user/MEMJ0123"); draw_text(" Princess Celestia"); draw_text(" - Meredith Sims (Emichwan88)"); draw_text(" http://www.youtube.com/Emichwan88"); diff --git a/src/levels/actions.c b/src/levels/actions.c index ce04826..f28f29c 100644 --- a/src/levels/actions.c +++ b/src/levels/actions.c @@ -213,18 +213,22 @@ bool Letter(struct Game *game, struct TM_Action *action, enum TM_ActionState sta ALLEGRO_AUDIO_STREAM** stream = (ALLEGRO_AUDIO_STREAM**)action->arguments->next->value; al_set_audio_stream_playing(*stream, false); al_destroy_audio_stream(*stream); + free(action->arguments->next->value); + free(action->arguments->value); + TM_DestroyArgs(action->arguments); } if (state != TM_ACTIONSTATE_RUNNING) return false; if (!action->arguments) { action->arguments = TM_AddToArgs(action->arguments, malloc(sizeof(float))); float* f = (float*)action->arguments->value; *f = 0; - action->arguments->next = TM_AddToArgs(action->arguments, malloc(sizeof(ALLEGRO_AUDIO_STREAM*))); + action->arguments = TM_AddToArgs(action->arguments, malloc(sizeof(ALLEGRO_AUDIO_STREAM*))); ALLEGRO_AUDIO_STREAM** stream = (ALLEGRO_AUDIO_STREAM**)action->arguments->next->value; *stream = al_load_audio_stream("data/levels/letter.flac", 4, 1024); al_attach_audio_stream_to_mixer(*stream, game->audio.voice); al_set_audio_stream_playing(*stream, true); - al_set_audio_stream_gain(*stream, 1.75); + al_set_audio_stream_gain(*stream, 2.00); + action->arguments->next->next = NULL; } float* f = (float*)action->arguments->value; *f+=tps(game,350);