]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/galdov.cpp
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / galdov.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 6ef5762..00bd898
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -130,7 +131,7 @@ void galdovReact()
 
 void galdovSplit(int i)
 {
-       audio.playSound(SND_BOSSCUSTOM1, CH_AMBIANCE);
+       audio.playSound(SND_BOSSCUSTOM1, CH_AMBIANCE, map.boss[0]->x);
        
        map.boss[i]->active = true;
        map.boss[i]->health = 4 * game.skill;
@@ -388,7 +389,7 @@ void galdovDie()
        if (map.mainBossPart != NULL)
        {
                map.mainBossPart = NULL;
-               audio.playSound(SND_BOSSCUSTOM2, CH_AMBIANCE);
+               audio.playSound(SND_BOSSCUSTOM2, CH_AMBIANCE, self->x);
        }
        
        if ((self->health % 5) == 0)
@@ -456,7 +457,7 @@ void galdovInit()
        debug(("galdovInit\n"));
        
        map.boss[0] = new Boss();
-       strcpy(map.boss[0]->name, "Galdov");
+       strlcpy(map.boss[0]->name, "Galdov", sizeof map.boss[0]->name);
        map.boss[0]->health = 45 * game.skill;
        map.boss[0]->maxHealth = 45 * game.skill;
        map.boss[0]->setSprites(graphics.getSprite("GaldovRight", true), graphics.getSprite("GaldovLeft", true), graphics.getSprite("GaldovLeft", true));
@@ -474,13 +475,13 @@ void galdovInit()
        
        Math::addBit(&map.boss[0]->flags, ENT_AIMS);
        
-       SDL_SetAlpha(graphics.getSprite("GaldovInvsLeft", true)->image[0], SDL_SRCALPHA|SDL_RLEACCEL, 100);
-       SDL_SetAlpha(graphics.getSprite("GaldovInvsRight", true)->image[0], SDL_SRCALPHA|SDL_RLEACCEL, 100);
+       SDL_SetAlpha(graphics.getSprite("GaldovInvsLeft", true)->image[0], 100);
+       SDL_SetAlpha(graphics.getSprite("GaldovInvsRight", true)->image[0], 100);
        
        for (int i = 1 ; i < 10 ; i++)
        {
                map.boss[i] = new Boss();
-               strcpy(map.boss[i]->name, "Fake");
+               strlcpy(map.boss[i]->name, "Fake", sizeof map.boss[i]->name);
                map.boss[i]->setSprites(graphics.getSprite("GaldovRight", true), graphics.getSprite("GaldovLeft", true), graphics.getSprite("GaldovLeft", true));
                map.boss[i]->x = 9999;
                map.boss[i]->y = 9999;
@@ -492,8 +493,8 @@ void galdovInit()
        
        map.setMainBossPart(map.boss[0]);
        
-       audio.loadSound(SND_BOSSCUSTOM1, "sound/galdovSplit.wav");
-       audio.loadSound(SND_BOSSCUSTOM2, "sound/galdovPain.wav");
+       audio.loadSound(SND_BOSSCUSTOM1, "sound/galdovSplit");
+       audio.loadSound(SND_BOSSCUSTOM2, "sound/galdovPain");
        
        debug(("galdovInit: Done\n"));
 }