mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-08 06:06:43 +01:00
replace sounds with flac files
This commit is contained in:
parent
516aa77853
commit
c2ef5e6d22
4 changed files with 13 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
||||||
*~
|
*~
|
||||||
|
allegro.log
|
||||||
superderpy
|
superderpy
|
||||||
|
others
|
||||||
|
|
16
main.c
16
main.c
|
@ -9,10 +9,10 @@ float FPS = 60;
|
||||||
int DISPLAY_WIDTH = 800;
|
int DISPLAY_WIDTH = 800;
|
||||||
int DISPLAY_HEIGHT = 500;
|
int DISPLAY_HEIGHT = 500;
|
||||||
bool FULLSCREEN = true;
|
bool FULLSCREEN = true;
|
||||||
bool DEBUG = true;
|
bool DEBUG_MODE = true;
|
||||||
|
|
||||||
void PrintConsole(struct Game *game, char* text) {
|
void PrintConsole(struct Game *game, char* text) {
|
||||||
if (DEBUG) printf("%s\n", text);
|
if (DEBUG_MODE) printf("%s\n", text);
|
||||||
ALLEGRO_BITMAP *con = al_create_bitmap(al_get_bitmap_width(game->console), al_get_bitmap_height(game->console)*1.0);
|
ALLEGRO_BITMAP *con = al_create_bitmap(al_get_bitmap_width(game->console), al_get_bitmap_height(game->console)*1.0);
|
||||||
al_set_target_bitmap(con);
|
al_set_target_bitmap(con);
|
||||||
al_clear_to_color(al_map_rgba(0,0,0,80));
|
al_clear_to_color(al_map_rgba(0,0,0,80));
|
||||||
|
@ -137,6 +137,11 @@ int main(int argc, char **argv){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!al_init_acodec_addon()){
|
||||||
|
fprintf(stderr, "failed to initialize audio codecs!\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if(!al_install_audio()){
|
if(!al_install_audio()){
|
||||||
fprintf(stderr, "failed to initialize audio!\n");
|
fprintf(stderr, "failed to initialize audio!\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -147,11 +152,6 @@ int main(int argc, char **argv){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!al_init_acodec_addon()){
|
|
||||||
fprintf(stderr, "failed to initialize audio codecs!\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!al_reserve_samples(2)){
|
if (!al_reserve_samples(2)){
|
||||||
fprintf(stderr, "failed to reserve samples!\n");
|
fprintf(stderr, "failed to reserve samples!\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -186,7 +186,7 @@ int main(int argc, char **argv){
|
||||||
al_register_event_source(game.event_queue, al_get_timer_event_source(game.timer));
|
al_register_event_source(game.event_queue, al_get_timer_event_source(game.timer));
|
||||||
al_register_event_source(game.event_queue, al_get_keyboard_event_source());
|
al_register_event_source(game.event_queue, al_get_keyboard_event_source());
|
||||||
|
|
||||||
game.showconsole = DEBUG;
|
game.showconsole = DEBUG_MODE;
|
||||||
game.console = al_create_bitmap(al_get_display_width(game.display), al_get_display_height(game.display)*0.12);
|
game.console = al_create_bitmap(al_get_display_width(game.display), al_get_display_height(game.display)*0.12);
|
||||||
al_set_target_bitmap(game.console);
|
al_set_target_bitmap(game.console);
|
||||||
al_clear_to_color(al_map_rgba(0,0,0,80));
|
al_clear_to_color(al_map_rgba(0,0,0,80));
|
||||||
|
|
2
make
2
make
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
gcc loading.c main.c menu.c about.c intro.c map.c -o superderpy -lallegro -lallegro_audio -lallegro_acodec -lallegro_image -lallegro_font -lallegro_ttf -std=gnu99 -g && ./superderpy
|
gcc loading.c main.c menu.c about.c intro.c map.c -o superderpy -lallegro -lallegro_audio-debug -lallegro_acodec-debug -lallegro_image-debug -lallegro_font-debug -lallegro_ttf-debug -DDEBUG -std=gnu99 -g && ./superderpy
|
||||||
|
|
4
menu.c
4
menu.c
|
@ -63,8 +63,8 @@ void Menu_Preload(struct Game *game) {
|
||||||
//al_destroy_bitmap(game->menu.image); // ugh...
|
//al_destroy_bitmap(game->menu.image); // ugh...
|
||||||
game->menu.image = al_load_bitmap( "data/menu.png" );
|
game->menu.image = al_load_bitmap( "data/menu.png" );
|
||||||
game->menu.mountain = al_load_bitmap( "data/mountain.png" );
|
game->menu.mountain = al_load_bitmap( "data/mountain.png" );
|
||||||
game->menu.sample = al_load_sample( "data/menu.wav" );
|
game->menu.sample = al_load_sample( "data/menu.flac" );
|
||||||
game->menu.rain_sample = al_load_sample( "data/rain.wav" );
|
game->menu.rain_sample = al_load_sample( "data/rain.flac" );
|
||||||
game->menu.cloud = al_load_bitmap( "data/cloud.png" );
|
game->menu.cloud = al_load_bitmap( "data/cloud.png" );
|
||||||
game->menu.cloud2 = al_load_bitmap( "data/cloud2.png" );
|
game->menu.cloud2 = al_load_bitmap( "data/cloud2.png" );
|
||||||
game->menu.pinkcloud = al_load_bitmap( "data/pinkcloud.png" );
|
game->menu.pinkcloud = al_load_bitmap( "data/pinkcloud.png" );
|
||||||
|
|
Loading…
Reference in a new issue