Compare commits
3 Commits
bca688a9a7
...
1f4d7ce042
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f4d7ce042 | |||
| 657d43de5a | |||
| 735e5299f9 |
@@ -1,43 +1,41 @@
|
||||
## GAME
|
||||
gameWidth 320
|
||||
gameWidth 320
|
||||
gameHeight 240
|
||||
itemSize 20
|
||||
itemSize 20
|
||||
autofire true
|
||||
|
||||
## FADE
|
||||
numSquaresWidth 160
|
||||
numSquaresHeight 120
|
||||
fadeRandomSquaresDelay 1
|
||||
numSquaresWidth 160
|
||||
numSquaresHeight 120
|
||||
fadeRandomSquaresDelay 1
|
||||
fadeRandomSquaresMult 500
|
||||
fadePostDuration 80
|
||||
venetianSize 16
|
||||
fadePostDuration 80
|
||||
venetianSize 16
|
||||
|
||||
## SCOREBOARD
|
||||
scoreboard.x 0
|
||||
scoreboard.x 0
|
||||
scoreboard.y 200
|
||||
scoreboard.w 320
|
||||
scoreboard.h 40
|
||||
scoreboard.h 40
|
||||
|
||||
## TITLE
|
||||
pressStart 170
|
||||
titleCounter 800
|
||||
pressStart 170
|
||||
titleCounter 800
|
||||
arcadeEdition 123
|
||||
titleCC 80
|
||||
titleCC 80
|
||||
|
||||
## BACKGROUND
|
||||
backgroundAttenuateColor.r 255
|
||||
backgroundAttenuateColor.g 255
|
||||
backgroundAttenuateColor.b 255
|
||||
backgroundAttenuateColor.a 0
|
||||
backgroundAttenuateColor.a 0
|
||||
|
||||
## BALLOONS
|
||||
balloon1.vel 2.6f
|
||||
balloon1.vel 2.70f
|
||||
balloon1.grav 0.09f
|
||||
|
||||
balloon2.vel 3.5f
|
||||
balloon2.vel 3.70f
|
||||
balloon2.grav 0.10f
|
||||
|
||||
balloon3.vel 4.50f
|
||||
balloon3.vel 4.70f
|
||||
balloon3.grav 0.10f
|
||||
|
||||
balloon4.vel 4.95f
|
||||
balloon4.vel 5.45f
|
||||
balloon4.grav 0.10f
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 858 B |
@@ -4,16 +4,18 @@
|
||||
// Constructor
|
||||
Bullet::Bullet(int x, int y, int kind, bool poweredUp, int owner, Texture *texture)
|
||||
{
|
||||
sprite = new Sprite({x, y, 10, 10}, texture);
|
||||
|
||||
// Posición inicial del objeto
|
||||
posX = x;
|
||||
posY = y;
|
||||
|
||||
// Alto y ancho del objeto
|
||||
width = 10;
|
||||
height = 10;
|
||||
width = 12;
|
||||
height = 12;
|
||||
|
||||
// Crea el sprite
|
||||
sprite = new Sprite({x, y, width, height}, texture);
|
||||
|
||||
// Velocidad inicial en el eje Y
|
||||
velY = -3;
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ struct op_game_t
|
||||
{
|
||||
Uint8 difficulty; // Dificultad del juego
|
||||
Uint8 language; // Idioma usado en el juego
|
||||
bool autofire; // Indica si se va a usar el disparo automático para el disparo normal
|
||||
std::vector<hiScoreEntry_t> hiScoreTable; // Tabla con las mejores puntuaciones
|
||||
};
|
||||
|
||||
@@ -194,7 +195,8 @@ struct param_t
|
||||
// GAME
|
||||
int gameWidth; // Ancho de la resolucion nativa del juego
|
||||
int gameHeight; // Alto de la resolucion nativa del juego
|
||||
int itemSize; // Tamañoi de los items del juego
|
||||
int itemSize; // Tamaño de los items del juego
|
||||
int autofire; // Indica si se va a usar el disparo automático para el disparo normal
|
||||
|
||||
// FADE
|
||||
int numSquaresWidth; // Cantidad total de cuadraditos en horizontal para el FADE_RANDOM_SQUARE
|
||||
|
||||
@@ -424,6 +424,8 @@ void Director::loadParams()
|
||||
|
||||
loadParam(param, asset->get("param.txt"));
|
||||
|
||||
// Modifica las opciones desde el fichero de parametros
|
||||
options->game.autofire = param->autofire;
|
||||
options->video.window.width = options->video.window.size * param->gameWidth;
|
||||
options->video.window.height = options->video.window.size * param->gameHeight;
|
||||
options->video.gameWidth = param->gameWidth;
|
||||
|
||||
@@ -2235,6 +2235,7 @@ void Game::checkInput()
|
||||
int i = 0;
|
||||
for (auto player : players)
|
||||
{
|
||||
const bool autofire = player->isPowerUp() || options->game.autofire;
|
||||
if (player->isAlive() && player->isEnabled())
|
||||
{
|
||||
// Input a la izquierda
|
||||
@@ -2265,7 +2266,7 @@ void Game::checkInput()
|
||||
}
|
||||
}
|
||||
// Comprueba el input de disparar al centro
|
||||
if (input->checkInput(input_fire_center, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||
if (input->checkInput(input_fire_center, autofire, options->controller[i].deviceType, options->controller[i].index))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2282,7 +2283,7 @@ void Game::checkInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de disparar a la izquierda
|
||||
else if (input->checkInput(input_fire_left, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||
else if (input->checkInput(input_fire_left, autofire, options->controller[i].deviceType, options->controller[i].index))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2299,7 +2300,7 @@ void Game::checkInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de disparar a la derecha
|
||||
else if (input->checkInput(input_fire_right, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||
else if (input->checkInput(input_fire_right, autofire, options->controller[i].deviceType, options->controller[i].index))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ void initParam(param_t *param)
|
||||
param->gameWidth = 320;
|
||||
param->gameHeight = 240;
|
||||
param->itemSize = 20;
|
||||
param->autofire = true;
|
||||
|
||||
// SCOREBOARD
|
||||
param->scoreboard = {0, 200, 320, 40};
|
||||
@@ -154,6 +155,11 @@ bool setOptions(param_t *param, std::string var, std::string value)
|
||||
param->itemSize = std::stoi(value);
|
||||
}
|
||||
|
||||
else if (var == "autofire")
|
||||
{
|
||||
param->autofire = stringToBool(value);
|
||||
}
|
||||
|
||||
// FADE
|
||||
else if (var == "numSquaresWidth")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user