Skip to content

Commit

Permalink
Rename music loading function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpcmcquen authored Oct 19, 2020
1 parent 77dfbde commit 2c05fca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/mechanics.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SDL_Texture* load_texture(App* app, char* file)
return texture;
}

void load_music(Game* game)
void load_background_music(Game* game)
{
int flags = MIX_INIT_OGG;
int initted = Mix_Init(flags);
Expand All @@ -35,7 +35,7 @@ void prepare_scene(App* app, Game* game)
{
game->player_image = load_texture(app, PLAYER_IMAGE);
game->background_image = load_texture(app, BACKGROUND_IMAGE);
load_music(game);
load_background_music(game);
}

void sprite_blit(App* app, SDL_Texture* texture, int x, int y, int direction)
Expand Down

1 comment on commit 2c05fca

@ryanpcmcquen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently SDL may already have a load_music function, found by this error:
emscripten-ports/SDL2_mixer#2

Please sign in to comment.