Commit a43c8080 authored by Kiste's avatar Kiste
Browse files

Fix compiler warnings

parent 9689f9a1
...@@ -157,7 +157,7 @@ static int quickAppType; ...@@ -157,7 +157,7 @@ static int quickAppType;
* Make the barrage pattern of this scene. * Make the barrage pattern of this scene.
*/ */
void setBarrages(float level, int bm, int midMode) { void setBarrages(float level, int bm, int midMode) {
int bpn = 0, bn, i; int bpn = 0, bn;
int barrageMax, addFrqLoop = 0; int barrageMax, addFrqLoop = 0;
barrageNum = 0; barrageNum = 0;
......
...@@ -57,7 +57,7 @@ void removeFoe(Foe *fe) { ...@@ -57,7 +57,7 @@ void removeFoe(Foe *fe) {
} }
void initFoes() { void initFoes() {
int i, j; int i;
for ( i=0 ; i<FOE_MAX ; i++ ) { for ( i=0 ; i<FOE_MAX ; i++ ) {
removeFoeForced(&(foe[i])); removeFoeForced(&(foe[i]));
} }
...@@ -68,7 +68,7 @@ void initFoes() { ...@@ -68,7 +68,7 @@ void initFoes() {
} }
void closeFoes() { void closeFoes() {
int i, j; int i;
for ( i=0 ; i<FOE_MAX ; i++ ) { for ( i=0 ; i<FOE_MAX ; i++ ) {
if ( foe[i].cmd ) delete foe[i].cmd; if ( foe[i].cmd ) delete foe[i].cmd;
} }
...@@ -88,7 +88,6 @@ static Foe* getNextFoe() { ...@@ -88,7 +88,6 @@ static Foe* getNextFoe() {
Foe* addFoe(int x, int y, double rank, int d, int spd, int type, int shield, Foe* addFoe(int x, int y, double rank, int d, int spd, int type, int shield,
BulletMLParser *parser) { BulletMLParser *parser) {
int i;
Foe *fe = getNextFoe(); Foe *fe = getNextFoe();
if ( !fe ) return NULL; if ( !fe ) return NULL;
...@@ -332,7 +331,7 @@ static int foeColor[][2] = { ...@@ -332,7 +331,7 @@ static int foeColor[][2] = {
void drawFoes() { void drawFoes() {
int i, j; int i, j;
Foe *fe; Foe *fe;
int x, y, px, py; int x, y;
int sz, cl1, cl2; int sz, cl1, cl2;
int d, md, di; int d, md, di;
for ( i=0 ; i<FOE_MAX ; i++ ) { for ( i=0 ; i<FOE_MAX ; i++ ) {
......
...@@ -92,7 +92,6 @@ void addEnemyFrag(Vector *p, int mx, int my, int type) { ...@@ -92,7 +92,6 @@ void addEnemyFrag(Vector *p, int mx, int my, int type) {
void addShipFrag(Vector *p) { void addShipFrag(Vector *p) {
Vector pos, vel; Vector pos, vel;
int cmx, cmy;
int i; int i;
pos.x = (p->x/SCAN_WIDTH*LAYER_WIDTH)>>8; pos.x = (p->x/SCAN_WIDTH*LAYER_WIDTH)>>8;
pos.y = (p->y/SCAN_HEIGHT*LAYER_HEIGHT)>>8; pos.y = (p->y/SCAN_HEIGHT*LAYER_HEIGHT)>>8;
...@@ -137,7 +136,7 @@ static int fragColor[3][2][2] = { ...@@ -137,7 +136,7 @@ static int fragColor[3][2][2] = {
}; };
void drawFrags() { void drawFrags() {
int x, y, c; int c;
int i; int i;
Frag *fr; Frag *fr;
for ( i=0 ; i<FRAG_MAX ; i++ ) { for ( i=0 ; i<FRAG_MAX ; i++ ) {
......
...@@ -263,7 +263,6 @@ int main(int argc, char *argv[]) { ...@@ -263,7 +263,6 @@ int main(int argc, char *argv[]) {
int done = 0; int done = 0;
long prvTickCount = 0; long prvTickCount = 0;
int i; int i;
int btn;
SDL_Event event; SDL_Event event;
long nowTick; long nowTick;
int frame; int frame;
......
...@@ -316,7 +316,7 @@ void drawThickLine(int x1, int y1, int x2, int y2, ...@@ -316,7 +316,7 @@ void drawThickLine(int x1, int y1, int x2, int y2,
LayerBit color1, LayerBit color2, int width) { LayerBit color1, LayerBit color2, int width) {
int lx, ly, ax, ay, x, y, ptr, i, j; int lx, ly, ax, ay, x, y, ptr, i, j;
int xMax, yMax; int xMax, yMax;
int width1, width2; int width1;
lx = abs(x2 - x1); lx = abs(x2 - x1);
ly = abs(y2 - y1); ly = abs(y2 - y1);
...@@ -409,8 +409,7 @@ void drawThickLine(int x1, int y1, int x2, int y2, ...@@ -409,8 +409,7 @@ void drawThickLine(int x1, int y1, int x2, int y2,
void drawBox(int x, int y, int width, int height, void drawBox(int x, int y, int width, int height,
LayerBit color1, LayerBit color2, LayerBit *buf) { LayerBit color1, LayerBit color2, LayerBit *buf) {
int i, j; int i;
LayerBit cl;
int ptr; int ptr;
x -= width>>1; y -= height>>1; x -= width>>1; y -= height>>1;
...@@ -445,8 +444,7 @@ void drawBox(int x, int y, int width, int height, ...@@ -445,8 +444,7 @@ void drawBox(int x, int y, int width, int height,
void drawBoxPanel(int x, int y, int width, int height, void drawBoxPanel(int x, int y, int width, int height,
LayerBit color1, LayerBit color2, LayerBit *buf) { LayerBit color1, LayerBit color2, LayerBit *buf) {
int i, j; int i;
LayerBit cl;
int ptr; int ptr;
x -= width>>1; y -= height>>1; x -= width>>1; y -= height>>1;
......
...@@ -87,7 +87,6 @@ void initSound() { ...@@ -87,7 +87,6 @@ void initSound() {
Uint16 audio_format; Uint16 audio_format;
int audio_channels; int audio_channels;
int audio_buffers; int audio_buffers;
int interactive = 0;
if ( SDL_InitSubSystem(SDL_INIT_AUDIO) < 0 ) { if ( SDL_InitSubSystem(SDL_INIT_AUDIO) < 0 ) {
fprintf(stderr, "Unable to initialize SDL_AUDIO: %s\n", SDL_GetError()); fprintf(stderr, "Unable to initialize SDL_AUDIO: %s\n", SDL_GetError());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment