This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

flw.c File Reference

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <gdk/gdkkeysyms.h>
#include "game.h"
#include "../pixmaps/alpha.xpm"
#include "flwords.h"

Go to the source code of this file.

Defines

#define FLW_CELL_SIZE   36
#define FLW_NUM_PIECES   26
#define FLW_BOARD_WID   4
#define FLW_BOARD_HEIT   6
#define FLW_LEN   4

Functions

int flw_wordcmp (const void *p1, const void *p2)
void flw_find_chain (char chain[FLW_LEN+1][FLW_LEN+1])
void flw_init ()
int flw_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **)
int flw_getmove_kb (Pos *, int, Player, byte **, int **)
void flw_free ()
ResultType flw_who_won (Pos *, Player, char **)
void flw_set_init_pos (Pos *pos)
int flw_get_cur_row (byte *board)
void flw_get_render (Pos *pos, byte *move, int type, int **rmovp)

Variables

char flw_colors [9] = {0xd7, 0xd7, 0xd7, 0xd7, 0xd7, 0xd7, 0, 0, 0xff}
char flw_highlight_colors [9] = {0xff, 0, 0, 0, 0, 0, 0, 0, 0}
char** flw_pixmaps []
SCORE_FIELD flw_score_fields [] = {SCORE_FIELD_USER, SCORE_FIELD_TIME, SCORE_FIELD_DATE, SCORE_FIELD_NONE}
char* flw_score_field_names [] = {"User", "Time", "Date", NULL}
Game Flw
char flw_chain [FLW_LEN+1][FLW_LEN+1]
int flw_curx = -1
int flw_cury = -1


Define Documentation

#define FLW_BOARD_HEIT   6
 

Definition at line 37 of file flw.c.

#define FLW_BOARD_WID   4
 

Definition at line 36 of file flw.c.

#define FLW_CELL_SIZE   36
 

Definition at line 32 of file flw.c.

#define FLW_LEN   4
 

Definition at line 39 of file flw.c.

#define FLW_NUM_PIECES   26
 

Definition at line 34 of file flw.c.


Function Documentation

void flw_find_chain ( char chain[FLW_LEN+1][FLW_LEN+1] )
 

Definition at line 82 of file flw.c.

Referenced by flw_set_init_pos().

void flw_free ( )
 

Definition at line 339 of file flw.c.

int flw_get_cur_row ( byte * board ) [static]
 

Definition at line 180 of file flw.c.

Referenced by flw_get_render(), and flw_getmove_kb().

void flw_get_render ( Pos * pos,
byte * move,
int type,
int ** rmovp )
 

Definition at line 189 of file flw.c.

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

Definition at line 213 of file flw.c.

int flw_getmove_kb ( Pos * pos,
int key,
Player glob_to_play,
byte ** movp,
int ** rmovp )
 

Definition at line 233 of file flw.c.

void flw_init ( ) [static]
 

Definition at line 142 of file flw.c.

void flw_set_init_pos ( Pos * pos ) [static]
 

Definition at line 129 of file flw.c.

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

Definition at line 169 of file flw.c.

int flw_wordcmp ( const void * p1,
const void * p2 ) [static]
 

Definition at line 77 of file flw.c.


Variable Documentation

Game Flw
 

Initial value:

 { FLW_CELL_SIZE, FLW_BOARD_WID, FLW_BOARD_HEIT, 
        FLW_NUM_PIECES, 
        flw_colors, NULL, flw_pixmaps, 
        "Four Letter Words", 
        flw_init}

Definition at line 119 of file flw.c.

char flw_chain[FLW_LEN+1][FLW_LEN+1] [static]
 

Definition at line 126 of file flw.c.

char flw_colors[9] = {0xd7, 0xd7, 0xd7, 0xd7, 0xd7, 0xd7, 0, 0, 0xff}
 

Definition at line 41 of file flw.c.

int flw_curx = -1 [static]
 

Definition at line 167 of file flw.c.

int flw_cury = -1 [static]
 

Definition at line 167 of file flw.c.

char flw_highlight_colors[9] = {0xff, 0, 0, 0, 0, 0, 0, 0, 0}
 

Definition at line 42 of file flw.c.

char** flw_pixmaps[] [static]
 

Initial value:

 
{
        char_A_grey_36_36_xpm,
        char_B_grey_36_36_xpm,
        char_C_grey_36_36_xpm,
        char_D_grey_36_36_xpm,
        char_E_grey_36_36_xpm,
        char_F_grey_36_36_xpm,
        char_G_grey_36_36_xpm,
        char_H_grey_36_36_xpm,
        char_I_grey_36_36_xpm,
        char_J_grey_36_36_xpm,
        char_K_grey_36_36_xpm,
        char_L_grey_36_36_xpm,
        char_M_grey_36_36_xpm,
        char_N_grey_36_36_xpm,
        char_O_grey_36_36_xpm,
        char_P_grey_36_36_xpm,
        char_Q_grey_36_36_xpm,
        char_R_grey_36_36_xpm,
        char_S_grey_36_36_xpm,
        char_T_grey_36_36_xpm,
        char_U_grey_36_36_xpm,
        char_V_grey_36_36_xpm,
        char_W_grey_36_36_xpm,
        char_X_grey_36_36_xpm,
        char_Y_grey_36_36_xpm,
        char_Z_grey_36_36_xpm,
}

Definition at line 44 of file flw.c.

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

Definition at line 75 of file flw.c.

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

Definition at line 74 of file flw.c.