Eliminat "const.h"
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "const.h"
|
||||
#include "bullet.h"
|
||||
#include "param.h"
|
||||
|
||||
// Constructor
|
||||
Bullet::Bullet(int x, int y, int kind, bool poweredUp, int owner, SDL_Rect *playArea, Texture *texture)
|
||||
@@ -108,10 +108,10 @@ Uint8 Bullet::move()
|
||||
posX += velX;
|
||||
|
||||
// Si el objeto se sale del area de juego por los laterales
|
||||
if ((posX < PLAY_AREA_LEFT - width) || (posX > playArea->w))
|
||||
if ((posX < param.game.playArea.rect.x - width) || (posX > playArea->w))
|
||||
{
|
||||
// Se deshabilita
|
||||
kind = NO_KIND;
|
||||
kind = BULLET_NULL;
|
||||
|
||||
// Mensaje de salida
|
||||
msg = BULLET_MOVE_OUT;
|
||||
@@ -121,10 +121,10 @@ Uint8 Bullet::move()
|
||||
posY += int(velY);
|
||||
|
||||
// Si el objeto se sale del area de juego por la parte superior
|
||||
if (posY < PLAY_AREA_TOP - height)
|
||||
if (posY < param.game.playArea.rect.y - height)
|
||||
{
|
||||
// Se deshabilita
|
||||
kind = NO_KIND;
|
||||
kind = BULLET_NULL;
|
||||
|
||||
// Mensaje de salida
|
||||
msg = BULLET_MOVE_OUT;
|
||||
@@ -143,7 +143,7 @@ Uint8 Bullet::move()
|
||||
// Comprueba si el objeto está habilitado
|
||||
bool Bullet::isEnabled()
|
||||
{
|
||||
if (kind == NO_KIND)
|
||||
if (kind == BULLET_NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -156,7 +156,7 @@ bool Bullet::isEnabled()
|
||||
// Deshabilita el objeto
|
||||
void Bullet::disable()
|
||||
{
|
||||
kind = NO_KIND;
|
||||
kind = BULLET_NULL;
|
||||
}
|
||||
|
||||
// Obtiene el valor de la variable
|
||||
|
||||
Reference in New Issue
Block a user