Commit ac7d3942 authored by Nicolas LIENART's avatar Nicolas LIENART

Update game

parent 60f7648a
images/sprite-gui/LoseMenu.jpg

104 KB | W: | H:

images/sprite-gui/LoseMenu.jpg

144 KB | W: | H:

images/sprite-gui/LoseMenu.jpg
images/sprite-gui/LoseMenu.jpg
images/sprite-gui/LoseMenu.jpg
images/sprite-gui/LoseMenu.jpg
  • 2-up
  • Swipe
  • Onion skin
images/sprite-gui/MainMenu.jpg

285 KB | W: | H:

images/sprite-gui/MainMenu.jpg

488 KB | W: | H:

images/sprite-gui/MainMenu.jpg
images/sprite-gui/MainMenu.jpg
images/sprite-gui/MainMenu.jpg
images/sprite-gui/MainMenu.jpg
  • 2-up
  • Swipe
  • Onion skin
images/sprite-gui/WinMenu.jpg

101 KB | W: | H:

images/sprite-gui/WinMenu.jpg

102 KB | W: | H:

images/sprite-gui/WinMenu.jpg
images/sprite-gui/WinMenu.jpg
images/sprite-gui/WinMenu.jpg
images/sprite-gui/WinMenu.jpg
  • 2-up
  • Swipe
  • Onion skin
images/tests/plank.png

2.66 KB | W: | H:

images/tests/plank.png

27.1 KB | W: | H:

images/tests/plank.png
images/tests/plank.png
images/tests/plank.png
images/tests/plank.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
No preview for this file type
......@@ -120,7 +120,7 @@ void display_genBatimentList(TypeCase type)
glPushMatrix();
glTranslatef(15, position*35+15, 0);
sprintf(str, "%d", tour_getAlimentation(type));
display_drawSingleStat(generalType, str, FOOD_TEX, NULL);
display_drawSingleStat(generalType, str, FOOD_HIGH_TEX, NULL);
position++;
glPopMatrix();
......@@ -169,7 +169,7 @@ void display_genTourList(Tour* tour)
glTranslatef(15, position*35+15, 0);
sprintf(str, "%d", tour_getAlimentation(tour->type));
sprintf(str2, "%d",tour->centrale);
display_drawSingleStat(generalType, str, FOOD_TEX, str2);
display_drawSingleStat(generalType, str, FOOD_HIGH_TEX, str2);
position++;
glPopMatrix();
......@@ -282,7 +282,7 @@ void display_initDefaultList()
glPushMatrix();
glTranslatef(15, position*35+15, 0);
sprintf(str, "%d", mapData->constructionData[i].alimentation);
display_drawSingleStat(generalType, str, FOOD_TEX, NULL);
display_drawSingleStat(generalType, str, FOOD_HIGH_TEX, NULL);
position++;
glPopMatrix();
......@@ -343,7 +343,7 @@ void display_initDefaultList()
glPushMatrix();
glTranslatef(15, position*35+15, 0);
sprintf(str, "%d", mapData->constructionData[i].alimentation);
display_drawSingleStat(generalType, str, FOOD_TEX, NULL);
display_drawSingleStat(generalType, str, FOOD_HIGH_TEX, NULL);
position++;
glPopMatrix();
......@@ -1015,7 +1015,7 @@ void display_menuButtonText(Button* button)
glColor3f(1,1,1);
sprite_displayFixedTexture(button->texture_name);
glScalef(0.7, 0.7, 1);
glScalef(0.5, 0.5, 1);
glTranslatef(-0.5, 0,0);
//glTranslatef(0.5,0.5,0);
......
......@@ -149,7 +149,7 @@ void mouse_handleClick()
{
GUI *current_section = mouse_getSection();
if (gameData->button_hover) {
Mix_PlayChannel(-1, gameData->sound[HITWOOD], 0);
Mix_PlayChannel(-2, gameData->sound[HITWOOD], 0);
mouse_handleButtonClick(gameData->button_hover);
}
else if (current_section->name == PLATEAU && gameData->gameState == LEVELPLAY) {
......
......@@ -2,6 +2,7 @@
void sound_init()
{
Mix_Init(MIX_INIT_MOD | MIX_INIT_MP3 | MIX_INIT_OGG);
if(Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 1024) == -1) {
printf("%s", Mix_GetError());
}
......@@ -19,10 +20,10 @@ void sound_init()
Mix_AllocateChannels(16);
Mix_Chunk *son;
son = Mix_LoadWAV("sound/addTower.wav");
son = Mix_LoadWAV("sound/addTower.ogg");
gameData->sound[TOWER] = son;
son = Mix_LoadWAV("sound/addCentrale.wav");
son = Mix_LoadWAV("sound/addCentrale.wav");
gameData->sound[CENTRAL] = son;
son = Mix_LoadWAV("sound/projectile.wav");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment