Organization stuff

This commit is contained in:
onpon4 2015-03-11 15:36:42 -04:00
parent 199ee7a58b
commit 1834011314
3 changed files with 13 additions and 13 deletions

View File

@ -878,7 +878,7 @@ void alien_addSmallAsteroid(object *hostAlien)
int debris = 1 + rand() % 10;
for (int i = 0 ; i < debris ; i++)
addBullet(&weapon[W_ROCKETS], hostAlien, 0, 0);
bullet_add(&weapon[W_ROCKETS], hostAlien, 0, 0);
for (int i = 10 ; i < 20 ; i++)
if (!aliens[i].active)

View File

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "Starfighter.h"
void addBullet(object *theWeapon, object *attacker, int y, int dy)
void bullet_add(object *theWeapon, object *attacker, int y, int dy)
{
object *bullet;
signed char imageIndex;
@ -172,34 +172,34 @@ void fireBullet(object *attacker, int weaponType)
if (theWeapon->flags & WF_SPREAD && theWeapon->ammo[0] >= 3)
{
addBullet(theWeapon, attacker, y * 1, -2);
bullet_add(theWeapon, attacker, y * 1, -2);
if(theWeapon->ammo[0] != 4)
addBullet(theWeapon, attacker, y * 3, 0);
bullet_add(theWeapon, attacker, y * 3, 0);
if(theWeapon->ammo[0] != 3)
{
addBullet(theWeapon, attacker, y * 2, -1);
addBullet(theWeapon, attacker, y * 4, 1);
bullet_add(theWeapon, attacker, y * 2, -1);
bullet_add(theWeapon, attacker, y * 4, 1);
}
addBullet(theWeapon, attacker, y * 5, 2);
bullet_add(theWeapon, attacker, y * 5, 2);
}
else
{
if(theWeapon->ammo[0] & 1)
addBullet(theWeapon, attacker, y * 3, 0);
bullet_add(theWeapon, attacker, y * 3, 0);
if(theWeapon->ammo[0] >= 2)
{
addBullet(theWeapon, attacker, y * 2, 0);
addBullet(theWeapon, attacker, y * 4, 0);
bullet_add(theWeapon, attacker, y * 2, 0);
bullet_add(theWeapon, attacker, y * 4, 0);
}
if(theWeapon->ammo[0] >= 4)
{
addBullet(theWeapon, attacker, y * 1, 0);
addBullet(theWeapon, attacker, y * 5, 0);
bullet_add(theWeapon, attacker, y * 1, 0);
bullet_add(theWeapon, attacker, y * 5, 0);
}
}

View File

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef BULLETS_H
#define BULLETS_H
extern void addBullet(object *theWeapon, object *attacker, int y, int dy);
void bullet_add(object *theWeapon, object *attacker, int y, int dy);
extern void fireBullet(object *attacker, int weaponType);
extern char checkPlayerShockDamage(float x, float y);
extern void fireRay(object *attacker);