Fixed -O2 compile options (ignoring unused result)
This commit is contained in:
parent
fa9386d545
commit
5d6ddb25b9
1
makefile
1
makefile
|
@ -14,6 +14,7 @@ include common.mk
|
||||||
CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
|
CXXFLAGS += `sdl2-config --cflags` -DVERSION=$(VERSION) -DREVISION=$(REVISION) -DDATA_DIR=\"$(DATA_DIR)\" -DLOCALE_DIR=\"$(LOCALE_DIR)\"
|
||||||
CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes
|
CXXFLAGS += -Wall -Wempty-body -ansi -pedantic -Werror -Wstrict-prototypes
|
||||||
CXXFLAGS += -g -lefence
|
CXXFLAGS += -g -lefence
|
||||||
|
#CXXFLAGS += -O2 -Wno-unused-result
|
||||||
|
|
||||||
LFLAGS := `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
|
LFLAGS := `sdl2-config --libs` -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lm
|
||||||
|
|
||||||
|
|
|
@ -335,6 +335,8 @@ void fireGuns(Entity *owner)
|
||||||
int i;
|
int i;
|
||||||
float x, y;
|
float x, y;
|
||||||
float c, s;
|
float c, s;
|
||||||
|
|
||||||
|
b = NULL;
|
||||||
|
|
||||||
for (i = 0 ; i < MAX_FIGHTER_GUNS ; i++)
|
for (i = 0 ; i < MAX_FIGHTER_GUNS ; i++)
|
||||||
{
|
{
|
||||||
|
@ -360,7 +362,10 @@ void fireGuns(Entity *owner)
|
||||||
|
|
||||||
owner->reload = owner->reloadTime;
|
owner->reload = owner->reloadTime;
|
||||||
|
|
||||||
playBattleSound(b->sound, owner->x, owner->y);
|
if (b)
|
||||||
|
{
|
||||||
|
playBattleSound(b->sound, owner->x, owner->y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fireRocket(Entity *owner)
|
void fireRocket(Entity *owner)
|
||||||
|
|
|
@ -67,7 +67,7 @@ void doEntities(void)
|
||||||
|
|
||||||
prev = &battle.entityHead;
|
prev = &battle.entityHead;
|
||||||
|
|
||||||
numAllies = numEnemies = numActiveAllies = numActiveEnemies = 0;
|
numAllies = numEnemies = numActiveAllies = numActiveEnemies = numSpawnedEnemies = 0;
|
||||||
|
|
||||||
if (dev.playerImmortal)
|
if (dev.playerImmortal)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define SCREEN_HEIGHT 720
|
#define SCREEN_HEIGHT 720
|
||||||
|
|
||||||
#define MAX_KEYBOARD_KEYS 350
|
#define MAX_KEYBOARD_KEYS 350
|
||||||
#define MAX_MOUSE_BUTTONS 5
|
#define MAX_MOUSE_BUTTONS 6
|
||||||
|
|
||||||
#define FPS 60
|
#define FPS 60
|
||||||
#define LOGIC_RATE (1000 / FPS)
|
#define LOGIC_RATE (1000 / FPS)
|
||||||
|
|
Loading…
Reference in New Issue