Browse Source

cleaned up include directives

feature/2015
Christian Kroll 15 years ago
parent
commit
e23f079ae9
  1. 5
      games/tetris/bucket.c
  2. 2
      games/tetris/bucket.h
  3. 4
      games/tetris/highscore.c
  4. 2
      games/tetris/highscore.h
  5. 1
      games/tetris/piece.c
  6. 1
      games/tetris/tetris_main.c
  7. 10
      games/tetris/variant_bastet.c
  8. 13
      games/tetris/variant_bastet.h
  9. 24
      games/tetris/variant_fp.c
  10. 6
      games/tetris/variant_fp.h
  11. 18
      games/tetris/variant_std.c
  12. 4
      games/tetris/variant_std.h
  13. 5
      games/tetris/variants.h
  14. 15
      games/tetris/view.c
  15. 3
      games/tetris/view.h

5
games/tetris/bucket.c

@ -2,7 +2,7 @@
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include "../../autoconf.h"
#include "../../config.h"
#include "bucket.h"
#include "piece.h"
@ -290,7 +290,8 @@ void tetris_bucket_advancePiece(tetris_bucket_t *pBucket)
uint16_t nPiece = tetris_piece_getBitmap(pBucket->pPiece);
// Is the bucket filled up?
if ((pBucket->nRow < 0) && (nPiece & (0x0FFF >> ((3 + pBucket->nRow) << 2))) != 0)
if ((pBucket->nRow < 0) &&
(nPiece & (0x0FFF >> ((3 + pBucket->nRow) << 2))) != 0)
{
pBucket->status = TETRIS_BUS_GAMEOVER;
}

2
games/tetris/bucket.h

@ -2,7 +2,7 @@
#define BUCKET_H_
#include <stdint.h>
#include "../../autoconf.h"
#include "../../config.h"
#include "piece.h"

4
games/tetris/highscore.c

@ -1,11 +1,11 @@
#include <string.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "highscore.h"
#include "../../config.h"
#include "../../scrolltext/scrolltext.h"
#include "../../joystick/joystick.h"
#include "../../compat/eeprom.h"
#include "highscore.h"
// global array for the high score
uint16_t tetris_highscore[TETRIS_HISCORE_END] EEMEM;

2
games/tetris/highscore.h

@ -1,6 +1,8 @@
#ifndef TETRIS_HIGHSCORE_H_
#define TETRIS_HIGHSCORE_H_
#include <stdint.h>
/**
* indexes for different tetris variants
*/

1
games/tetris/piece.c

@ -1,7 +1,6 @@
#include <stdlib.h>
#include <assert.h>
#include <stdint.h>
#include "../../compat/pgmspace.h"
#include "piece.h"

1
games/tetris/tetris_main.c

@ -1,5 +1,4 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>

10
games/tetris/variant_bastet.c

@ -1,17 +1,17 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include "../../random/prng.h"
#include "../../compat/pgmspace.h"
#include "../../menu/menu.h"
#include "variants.h"
#include "tetris_main.h"
#include "input.h"
#include "bearing.h"
#include "piece.h"
#include "highscore.h"
#include "bucket.h"
#include "bearing.h"
#include "input.h"
#include "variants.h"
#include "tetris_main.h"
#include "variant_bastet.h"

13
games/tetris/variant_bastet.h

@ -1,12 +1,13 @@
#ifndef BAST_H_
#define BAST_H_
#ifndef VARIANT_BASTET_H_
#define VARIANT_BASTET_H_
#include <stdint.h>
#include "variants.h"
#include "bucket.h"
#include "piece.h"
#include "bearing.h"
#include "piece.h"
#include "highscore.h"
#include "bucket.h"
#include "input.h"
#include "variants.h"
/***************
* entry point *
@ -226,4 +227,4 @@ void tetris_bastet_setLastInput(void *pVariantData,
*/
tetris_bearing_t tetris_bastet_getBearing(void *pVariantData);
#endif /* BAST_H_ */
#endif /*VARIANT_BASTET_H_*/

24
games/tetris/variant_fp.c

@ -1,20 +1,18 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include "../../random/prng.h"
#include "../../compat/pgmspace.h"
#include "../../menu/menu.h"
#include "variant_fp.h"
#include "variant_std.h"
#include "variants.h"
#include "tetris_main.h"
#include "bearing.h"
#include "piece.h"
#include "bucket.h"
#include "highscore.h"
#include "bearing.h"
#include "bucket.h"
#include "input.h"
#include "variants.h"
#include "tetris_main.h"
#include "variant_std.h"
#include "variant_fp.h"
/***************
@ -83,12 +81,6 @@ void tetris_fp_setLastInput(void *pVariantData,
tetris_standard_variant_t *pStdVariant =
(tetris_standard_variant_t *)pVariantData;
if (inCmd == TETRIS_INCMD_ROT_CW)
{
pStdVariant->nBearing = (pStdVariant->nBearing + 1) % 4;
}
else if (inCmd == TETRIS_INCMD_ROT_CCW)
{
pStdVariant->nBearing = (pStdVariant->nBearing + 3) % 4;
}
pStdVariant->nBearing =
(pStdVariant->nBearing + (TETRIS_INCMD_ROT_CW ? 1 : 3)) % 4;
}

6
games/tetris/variant_fp.h

@ -2,11 +2,9 @@
#define VARIANT_FP_H_
#include <stdint.h>
#include "variant_std.h"
#include "variants.h"
#include "highscore.h"
#include "piece.h"
#include "bearing.h"
#include "highscore.h"
#include "variants.h"
#include "input.h"

18
games/tetris/variant_std.c

@ -1,25 +1,19 @@
/* Borgtris
* by: Christian Kroll
* date: Tuesday, 2007/09/16
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include "../../autoconf.h"
#include "../../config.h"
#include "../../random/prng.h"
#include "../../compat/pgmspace.h"
#include "../../menu/menu.h"
#include "variant_std.h"
#include "variants.h"
#include "tetris_main.h"
#include "bearing.h"
#include "piece.h"
#include "bucket.h"
#include "highscore.h"
#include "bearing.h"
#include "bucket.h"
#include "input.h"
#include "variants.h"
#include "tetris_main.h"
#include "variant_std.h"
/***************

4
games/tetris/variant_std.h

@ -2,11 +2,11 @@
#define VARIANT_STD_H_
#include <stdint.h>
#include "../../autoconf.h"
#include "variants.h"
#include "../../config.h"
#include "piece.h"
#include "bearing.h"
#include "input.h"
#include "variants.h"
/***************

5
games/tetris/variants.h

@ -2,10 +2,10 @@
#define VARIANTS_H_
#include <stdint.h>
#include "bucket.h"
#include "bearing.h"
#include "piece.h"
#include "highscore.h"
#include "bearing.h"
#include "bucket.h"
#include "input.h"
typedef struct tetris_variant_t
@ -132,6 +132,7 @@ typedef struct tetris_variant_t
*/
tetris_highscore_index_t (*getHighscoreIndex)(void *pVariantData);
/**
* inform the variant about the player's last input
* @param pVariantData the variant data object we want to modify

15
games/tetris/view.c

@ -1,18 +1,17 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include "../../autoconf.h"
#include "../../config.h"
#include "../../pixel.h"
#include "../../util.h"
#include "../../scrolltext/scrolltext.h"
#include "variants.h"
#include "piece.h"
#include "bucket.h"
#include "piece.h"
#include "variants.h"
#include "view.h"
#define WAIT(ms) wait(ms)
/**
* \defgroup TetrisViewDefinesPrivate View: Internal constants
@ -459,9 +458,9 @@ void tetris_view_blinkBorders(tetris_view_t *pV)
for (uint8_t i = 0; i < TETRIS_VIEW_BORDER_BLINK_COUNT; ++i)
{
tetris_view_drawBorders(pV, TETRIS_VIEW_COLORPIECE);
WAIT(TETRIS_VIEW_BORDER_BLINK_DELAY);
wait(TETRIS_VIEW_BORDER_BLINK_DELAY);
tetris_view_drawBorders(pV, TETRIS_VIEW_COLORBORDER);
WAIT(TETRIS_VIEW_BORDER_BLINK_DELAY);
wait(TETRIS_VIEW_BORDER_BLINK_DELAY);
}
}
@ -512,7 +511,7 @@ void tetris_view_blinkLines(tetris_view_t *pV)
}
}
// wait a few ms to make the blink effect visible
WAIT(TETRIS_VIEW_LINE_BLINK_DELAY);
wait(TETRIS_VIEW_LINE_BLINK_DELAY);
}
}
}

3
games/tetris/view.h

@ -2,9 +2,10 @@
#define TETRIS_VIEW_H_
#include <stdint.h>
#include "variants.h"
#include "bearing.h"
#include "piece.h"
#include "bucket.h"
#include "variants.h"
/**

Loading…
Cancel
Save