This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

dirmaze.c File Reference

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include <gdk/gdkkeysyms.h>
#include "game.h"
#include "../pixmaps/arrows.xpm"
#include "aaball.h"

Go to the source code of this file.

Defines

#define HYPERMAZE_CELL_SIZE   20
#define HYPERMAZE_NUM_PIECES   10
#define HYPERMAZE_BOARD_WID   25
#define HYPERMAZE_BOARD_HEIT   25
#define HYPERMAZE_CUR   1
#define HYPERMAZE_N   2
#define HYPERMAZE_E   3
#define HYPERMAZE_S   4
#define HYPERMAZE_W   5
#define HYPERMAZE_NE   6
#define HYPERMAZE_SE   7
#define HYPERMAZE_SW   8
#define HYPERMAZE_NW   9
#define HYPERMAZE_WALL   10

Functions

void hypermaze_init ()
void hypermaze_set_init_pos (Pos *pos)
char** hypermaze_get_pixmap (int idx, int color)
int hypermaze_getmove_kb (Pos *, int, Player, byte **, int **)
int hypermaze_getmove (Pos *pos, int, int, GtkboardEventType, Player, byte **, int **)
ResultType hypermaze_who_won (Pos *, Player, char **)
void hypermaze_get_cur_pos (byte *pos, int *x, int *y)
int hypermaze_canmove (byte *board, int curx, int cury, int incx, int incy)
int hypermaze_getmove_common (Pos *pos, byte **movp, int x, int y, int curx, int cury, int incx, int incy)
void recursive_pathgen (byte *board, int x, int y, int val)
char** hypermaze_pixmap_square_gen (int idx, char *col)

Variables

char hypermaze_colors [6] = {100, 150, 200, 100, 150, 200}
int* hypermaze_init_pos = NULL
int hypermaze_hypermaze [HYPERMAZE_BOARD_WID][HYPERMAZE_BOARD_HEIT] = {{0}}
SCORE_FIELD hypermaze_score_fields [] = {SCORE_FIELD_USER, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE}
char* hypermaze_score_field_names [] = {"User", "Time", "Date", NULL}
Game Hypermaze


Define Documentation

#define HYPERMAZE_BOARD_HEIT   25
 

Definition at line 34 of file dirmaze.c.

#define HYPERMAZE_BOARD_WID   25
 

Definition at line 33 of file dirmaze.c.

#define HYPERMAZE_CELL_SIZE   20
 

Definition at line 30 of file dirmaze.c.

#define HYPERMAZE_CUR   1
 

Definition at line 42 of file dirmaze.c.

#define HYPERMAZE_E   3
 

Definition at line 44 of file dirmaze.c.

#define HYPERMAZE_N   2
 

Definition at line 43 of file dirmaze.c.

#define HYPERMAZE_NE   6
 

Definition at line 47 of file dirmaze.c.

#define HYPERMAZE_NUM_PIECES   10
 

Definition at line 31 of file dirmaze.c.

#define HYPERMAZE_NW   9
 

Definition at line 50 of file dirmaze.c.

#define HYPERMAZE_S   4
 

Definition at line 45 of file dirmaze.c.

#define HYPERMAZE_SE   7
 

Definition at line 48 of file dirmaze.c.

#define HYPERMAZE_SW   8
 

Definition at line 49 of file dirmaze.c.

#define HYPERMAZE_W   5
 

Definition at line 46 of file dirmaze.c.

#define HYPERMAZE_WALL   10
 

Definition at line 51 of file dirmaze.c.


Function Documentation

int hypermaze_canmove ( byte * board,
int curx,
int cury,
int incx,
int incy )
 

Definition at line 116 of file dirmaze.c.

Referenced by hypermaze_getmove_common(), and recursive_pathgen().

void hypermaze_get_cur_pos ( byte * pos,
int * x,
int * y )
 

Definition at line 94 of file dirmaze.c.

Referenced by hypermaze_getmove(), and hypermaze_getmove_kb().

char** hypermaze_get_pixmap ( int idx,
int color ) [static]
 

Definition at line 252 of file dirmaze.c.

int hypermaze_getmove ( Pos * pos,
int x,
int y,
GtkboardEventType type,
Player to_play,
byte ** movp,
int ** rmovep )
 

Definition at line 147 of file dirmaze.c.

int hypermaze_getmove_common ( Pos * pos,
byte ** movp,
int x,
int y,
int curx,
int cury,
int incx,
int incy )
 

Definition at line 133 of file dirmaze.c.

Referenced by hypermaze_getmove(), and hypermaze_getmove_kb().

int hypermaze_getmove_kb ( Pos * pos,
int key,
Player glob_to_play,
byte ** movp,
int ** rmovp ) [static]
 

Definition at line 163 of file dirmaze.c.

void hypermaze_init ( void )
 

Definition at line 69 of file dirmaze.c.

char** hypermaze_pixmap_square_gen ( int idx,
char * col )
 

Definition at line 241 of file dirmaze.c.

Referenced by hypermaze_get_pixmap().

void hypermaze_set_init_pos ( Pos * pos ) [static]
 

Definition at line 206 of file dirmaze.c.

ResultType hypermaze_who_won ( Pos * pos,
Player to_play,
char ** commp )
 

Definition at line 105 of file dirmaze.c.

void recursive_pathgen ( byte * board,
int x,
int y,
int val ) [static]
 

Definition at line 192 of file dirmaze.c.


Variable Documentation

Game Hypermaze
 

Initial value:

 { HYPERMAZE_CELL_SIZE, HYPERMAZE_BOARD_WID, HYPERMAZE_BOARD_HEIT, 
        HYPERMAZE_NUM_PIECES, hypermaze_colors,  NULL, NULL, "Hypermaze", hypermaze_init}

Definition at line 58 of file dirmaze.c.

char hypermaze_colors[6] = {100, 150, 200, 100, 150, 200}
 

Definition at line 36 of file dirmaze.c.

int hypermaze_hypermaze[HYPERMAZE_BOARD_WID][HYPERMAZE_BOARD_HEIT] = {{0}}
 

Definition at line 40 of file dirmaze.c.

int* hypermaze_init_pos = NULL
 

Definition at line 38 of file dirmaze.c.

char* hypermaze_score_field_names[] = {"User", "Time", "Date", NULL}
 

Definition at line 56 of file dirmaze.c.

SCORE_FIELD hypermaze_score_fields[] = {SCORE_FIELD_USER, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE}
 

Definition at line 55 of file dirmaze.c.