add music on each moves lighbulb / mark and when an error occurs
This commit is contained in:
1 parent
459b66b955
commit
76e4d87d70
15 files changed
+141
-52
No files matched your search
@@ -2,7 +2,8 @@
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h> // required to load transparent texture from PNG
|
||||
#include <SDL_ttf.h> // required to use TTF fonts
|
||||
#include <SDL_mixer.h>
|
||||
#include <SDL_ttf.h> // required to use TTF fonts
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include "model.h"
|
||||
@@ -11,12 +12,14 @@
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
/* initialize SDL2 and some extensions */
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0)
|
||||
ERROR("Error: SDL_Init VIDEO (%s)", SDL_GetError());
|
||||
if (IMG_Init(IMG_INIT_PNG & IMG_INIT_PNG) != IMG_INIT_PNG)
|
||||
ERROR("Error: IMG_Init PNG (%s)", SDL_GetError());
|
||||
if (TTF_Init() != 0)
|
||||
ERROR("Error: TTF_Init (%s)", SDL_GetError());
|
||||
if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 2048) < 0)
|
||||
ERROR("SDL_mixer could not initialize! SDL_mixer Error: %s\n", Mix_GetError());
|
||||
|
||||
/* create window and renderer */
|
||||
SDL_Window* win =
|
||||
|
||||
Reference in new issue
Block a user