This is the doxygen documentation for gtkboard.
.#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include <gdk/gdkkeysyms.h>
#include "game.h"
#include "aaball.h"
Go to the source code of this file.
Defines | |
#define | PACMAN_CELL_SIZE 25 |
#define | PACMAN_NUM_PIECES 48 |
#define | PACMAN_BOARD_WID 26 |
#define | PACMAN_BOARD_HEIT 25 |
#define | PACMAN_FOOD 1 |
#define | PACMAN_POWER 2 |
#define | PACMAN_EMPTY 3 |
#define | PACMAN_IS_EDIBLE(x) (x>=1 && x<=3) |
#define | PACMAN_PAC_MIN 28 |
#define | PACMAN_PAC_MAX 32 |
#define | PACMAN_PAC_UP 28 |
#define | PACMAN_PAC_DOWN 29 |
#define | PACMAN_PAC_RIGHT 30 |
#define | PACMAN_PAC_LEFT 31 |
#define | PACMAN_IS_PAC(x) ((x) >= PACMAN_PAC_MIN && (x) < PACMAN_PAC_MAX) |
#define | PACMAN_IS_GHOST(x) ((x) >= 4 && x < 20) |
#define | PACMAN_GET_GHOST(x) ((x)-(x)%4) |
#define | PACMAN_GET_GHOST_NUM(x) (PACMAN_GET_GHOST(x)/4-1) |
#define | PACMAN_WALL_MASK 32 |
#define | PACMAN_WALL_UP 8 |
#define | PACMAN_WALL_DOWN 4 |
#define | PACMAN_WALL_LEFT 2 |
#define | PACMAN_WALL_RIGHT 1 |
Functions | |
void | pacman_init () |
void | pacman_set_init_pos (Pos *pos) |
char** | pacman_get_pixmap (int idx, int color) |
int | pacman_getmove_kb (Pos *cur_pos, int key, Player glob_to_play, byte **move, int **) |
int | pacman_animate (Pos *pos, byte **movp) |
void | pacman_get_cur_pos (byte *pos, int *x, int *y) |
void | pacman_recursive_dist (byte *pos, int x, int y, int val) |
void | pacman_set_dist (byte *pos) |
float | get_angle (float x, float y) |
char** | pacman_pixmap_ghost_gen (char *pixbuf) |
char** | pacman_pixmap_wall_gen (int idx, char *pixbuf) |
char** | pacman_pixmap_pac_gen (float dir, float gap, char *pixbuf) |
Variables | |
char | pacman_colors [6] = {100, 150, 200, 100, 150, 200} |
int* | pacman_init_pos = NULL |
int | pacman_maze [PACMAN_BOARD_HEIT][PACMAN_BOARD_WID] |
char* | brown_square_25_xpm [] |
Game | Pacman |
short | dist [PACMAN_BOARD_WID][PACMAN_BOARD_HEIT] |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 53 of file pacman.c. Referenced by pacman_animate(). |
|
Definition at line 54 of file pacman.c. Referenced by pacman_animate(). |
|
Definition at line 43 of file pacman.c. Referenced by pacman_animate(). |
|
Definition at line 52 of file pacman.c. Referenced by pacman_animate(), and pacman_get_pixmap(). |
|
Definition at line 50 of file pacman.c. Referenced by pacman_get_cur_pos(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 159 of file pacman.c. Referenced by pacman_animate(), pacman_getmove_kb(), and pacman_set_dist(). |
|
|
|
|
|
|
|
Definition at line 340 of file pacman.c. Referenced by pacman_get_pixmap(). |
|
Definition at line 416 of file pacman.c. Referenced by pacman_get_pixmap(). |
|
Definition at line 368 of file pacman.c. Referenced by pacman_get_pixmap(). |
|
Definition at line 172 of file pacman.c. Referenced by pacman_set_dist(). |
|
Definition at line 184 of file pacman.c. Referenced by pacman_animate(). |
|
|
|
Initial value: { PACMAN_CELL_SIZE, PACMAN_BOARD_WID, PACMAN_BOARD_HEIT, PACMAN_NUM_PIECES, pacman_colors, NULL, NULL, "Pacman", pacman_init} |
|
|
|
|
|
|
|
|
|
Initial value: { {32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32}, {32, 2, 1, 1, 1, 1, 1,32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,32, 1, 1, 1, 1, 1, 2,32}, {32, 1,32,32,32,32, 1,32, 1,32,32,32,32,32,32,32,32, 1,32, 1,32,32,32,32, 1,32}, {32, 1,32,32,32,32, 1,32, 1,32,32,32,32,32,32,32,32, 1,32, 1,32,32,32,32, 1,32}, {32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,32}, {32,32,32, 1,32,32, 1,32,32,32,32, 1,32,32, 1,32,32,32,32, 1,32,32, 1,32,32,32}, {32,32,32, 1,32,32, 1, 1, 1, 1, 1, 1,32,32, 1, 1, 1, 1, 1, 1,32,32, 1,32,32,32}, {32, 1, 1, 1,32,32,32,32, 1,32,32,32,32,32,32,32,32, 1,32,32,32,32, 1, 1, 1,32}, {32, 1, 1, 1,32,32,32,32, 1,32,32,32,32,32,32,32,32, 1,32,32,32,32, 1, 1, 1,32}, {32,32,32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,32,32,32}, {32,32,32, 1,32,32,32,32, 1,32,32,32,32,32,32, 1,32, 1,32,32,32,32, 1,32,32,32}, {32,32,32, 1,32,32,32,32, 1,32, 7, 3,15, 3, 3, 3,32, 1,32,32,32,32, 1,32,32,32}, {32,32,32, 1,32,32, 1, 1, 1,32, 3,11, 3,19, 3, 3,32, 1, 1, 1,32,32, 1,32,32,32}, {32,32,32, 1,32,32, 1,32, 1,32,32,32,32,32,32,32,32, 1,32, 1,32,32, 1,32,32,32}, {32, 1, 1, 1, 1, 1, 1,32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,32, 1, 1, 1, 1, 1, 1,32}, {32,32,32, 1,32,32,32,32,32,32,32, 1,32,32, 1,32,32,32,32,32,32,32, 1,32,32,32}, {32,32,32, 1, 1, 1, 1, 1, 1, 1, 1, 1,32,32, 1, 1, 1, 1, 1, 1, 1, 1, 1,32,32,32}, {32,32,32, 1,32,32,32,32, 1,32,32,32,32,32,32,32,32, 1,32,32,32,32, 1,32,32,32}, {32,32,32, 1,32,32,32,32, 1,32,32,32,32,32,32,32,32, 1,32,32,32,32, 1,32,32,32}, {32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,32}, {32, 1,32,32,32, 1,32,32,32,32,32, 1,32,32, 1,32,32,32,32,32, 1,32,32,32, 1,32}, {32, 1,32,32,32, 1,32,32, 1, 1, 1, 1,32,32, 1, 1, 1, 1,32,32, 1,32,32,32, 1,32}, {32, 1,32,32,32, 1,32,32, 1,32,32,32,32,32,32,32,32, 1,32,32, 1,32,32,32, 1,32}, {32, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,32}, {32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32}, } |