}
void update(void) {
- Mix_Volume(0, VOLUME_MASTER);
- Mix_Volume(1, VOLUME_SFX * (VOLUME_MASTER / 100.0f));
- Mix_VolumeMusic(VOLUME_MUSIC * (VOLUME_MASTER / 100.0f));
+ Mix_Volume(0, static_cast<int>(VOLUME_SFX * (VOLUME_MASTER / 100)));
+ Mix_VolumeMusic(static_cast<int>(VOLUME_MUSIC * (VOLUME_MASTER / 100)));
}
void save(void) {
#ifdef DEBUG
DEBUG_printf("Initialized FreeType2.\n",NULL);
#endif // DEBUG
+
+ fontSize = 0;
+ }
+
+ void initSounds(void) {
dialogClick = Mix_LoadWAV("assets/sounds/click.wav");
battleStart = Mix_LoadWAV("assets/sounds/frig.wav");
sanic = Mix_LoadWAV("assets/sounds/sanic.wav");
- //Mix_Volume(1,50);
-
- fontSize = 0;
}
void destroyFonts(void) {
static unsigned int rtext_oldsize = 0;
if (rtext_oldsize != rtext.size()) {
if (!isspace(rtext[(rtext_oldsize = rtext.size()) - 1]))
- Mix_PlayChannel(1, dialogClick, 0);
+ Mix_PlayChannel(0, dialogClick, 0);
+
}
} else {
{
game::SCREEN_WIDTH = wre.x;
game::SCREEN_HEIGHT = wre.y;
-
+
glViewport(0, 0, wre.x, wre.y);
SDL_SetWindowSize(window, wre.x, wre.y);
-}
+}
#include <ui.hpp>