diff --git a/README.md b/README.md index 26df2a9..1c3f77b 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,33 @@ Programa escrito en C para mostrar una serie de diapositivas de forma molona y sencilla. fanta 2026 + +Dependencias: + +
+apt-get install libxmp-dev libsdl2-dev libsdl2-image-dev
+
+ +Compilar: + +
+make
+
+ +Ejecutar: + +
+./presentator
+
+ +Teclas: + +**1-9** para reproducir los modulos que se encuentran en el directorio mods. +**Down/UP** para controlar el sonido. +**Left/Right** para pasar las slides. +**q** para salir (q de quit). + +Y eso es todo amigo/a/e. Si quieres añadir más diapositivas mira en el directorio slides y pon tus propias diapositivas. +Indica el orden en el archivo index. + +Un saludo cordial. diff --git a/presentator.c b/presentator.c index 4323089..c525a91 100644 --- a/presentator.c +++ b/presentator.c @@ -24,6 +24,7 @@ SDL_Window * window; SDL_Renderer * render; SDL_Texture *textureVolume = NULL; SDL_Texture *textureSlide = NULL; +SDL_Texture *textureProgressRect = NULL; SDL_Event evento; xmp_context ctx; @@ -46,7 +47,7 @@ int refreshVolumeArea(int iv){ static void playBuffer(void *udata, Uint8 *stream, int len) { - if (xmp_play_buffer((xmp_context)udata, stream, len, 0) < 0){ modPlaying = 0; } + if (xmp_play_buffer((xmp_context)udata, stream, len, 0) < 0){ modPlaying = 0; } } static int initAudio(xmp_context ctx) { @@ -99,6 +100,7 @@ int loadSlide(int nslide){ nline = nline +1; } fclose(fp); + nline = nline - 1; if (line){ free(line); }; return 0; }