Pacman  1.0
Pacman game
Macros | Variables
Référence du fichier constants.h
#include <SDL2/SDL.h>
Graphe des dépendances par inclusion de constants.h:
Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier :

Aller au code source de ce fichier.

Macros

#define CELL_SIZE   16
 Constants used in the game. Plus de détails...
 
#define X_CELLS   28
 
#define Y_CELLS   36
 
#define CELL_CENTER   ((CELL_SIZE / 2) + 1)
 
#define SCREEN_WIDTH   (X_CELLS * CELL_SIZE)
 
#define SCREEN_HEIGHT   (Y_CELLS * CELL_SIZE)
 
#define FPS   60
 
#define STARTING   0
 
#define PLAYING   1
 
#define WIN   2
 
#define LOSE   3
 
#define GAMEOVER   0
 
#define CONTINUE   1
 
#define RIGHT   0
 
#define LEFT   1
 
#define UP   2
 
#define DOWN   3
 
#define STOP   4
 
#define CHASE   0
 
#define SCATTER   1
 
#define FRIGHTENED   2
 
#define EYES   3
 
#define GUM   0
 
#define PACGUM   1
 
#define FRUIT   2
 
#define UNDEFINED   3
 

Variables

const SDL_Rect SRC_BG = {228, 0, 224, 248}
 
const SDL_Rect BG = {0, 3 * CELL_SIZE, X_CELLS *CELL_SIZE, (Y_CELLS - 5) * CELL_SIZE}
 
const SDL_Rect SRC_GUM = {8, 8, 8, 8}
 
const SDL_Rect SRC_PACGUM = {8, 24, 8, 8}
 

Documentation des macros

◆ CELL_CENTER

#define CELL_CENTER   ((CELL_SIZE / 2) + 1)

◆ CELL_SIZE

#define CELL_SIZE   16

Constants used in the game.

◆ CHASE

#define CHASE   0

◆ CONTINUE

#define CONTINUE   1

◆ DOWN

#define DOWN   3

◆ EYES

#define EYES   3

◆ FPS

#define FPS   60

◆ FRIGHTENED

#define FRIGHTENED   2

◆ FRUIT

#define FRUIT   2

◆ GAMEOVER

#define GAMEOVER   0

◆ GUM

#define GUM   0

◆ LEFT

#define LEFT   1

◆ LOSE

#define LOSE   3

◆ PACGUM

#define PACGUM   1

◆ PLAYING

#define PLAYING   1

◆ RIGHT

#define RIGHT   0

◆ SCATTER

#define SCATTER   1

◆ SCREEN_HEIGHT

#define SCREEN_HEIGHT   (Y_CELLS * CELL_SIZE)

◆ SCREEN_WIDTH

#define SCREEN_WIDTH   (X_CELLS * CELL_SIZE)

◆ STARTING

#define STARTING   0

◆ STOP

#define STOP   4

◆ UNDEFINED

#define UNDEFINED   3

◆ UP

#define UP   2

◆ WIN

#define WIN   2

◆ X_CELLS

#define X_CELLS   28

◆ Y_CELLS

#define Y_CELLS   36

Documentation des variables

◆ BG

const SDL_Rect BG = {0, 3 * CELL_SIZE, X_CELLS *CELL_SIZE, (Y_CELLS - 5) * CELL_SIZE}

◆ SRC_BG

const SDL_Rect SRC_BG = {228, 0, 224, 248}

◆ SRC_GUM

const SDL_Rect SRC_GUM = {8, 8, 8, 8}

◆ SRC_PACGUM

const SDL_Rect SRC_PACGUM = {8, 24, 8, 8}