This is the doxygen documentation for gtkboard.

.
Main Page   Data Structures   File List   Data Fields   Globals  

wordtris.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.

Data Structures

struct  Wordtris_state

Defines

#define WORDTRIS_CELL_SIZE   36
#define WORDTRIS_NUM_PIECES   27
#define WORDTRIS_BOARD_WID   4
#define WORDTRIS_BOARD_HEIT   14
#define WORDTRIS_LEN   4
#define WORDTRIS_EMPTY   0
#define WORDTRIS_WILDCARD   27

Functions

int wordtris_wordcmp (const void *p1, const void *p2)
void wordtris_init ()
int wordtris_getmove (Pos *, int, int, GtkboardEventType, Player, byte **, int **)
int wordtris_getmove_kb (Pos *, int, Player, byte **, int **)
void wordtris_free ()
ResultType wordtris_who_won (Pos *, Player, char **)
int wordtris_animate (Pos *pos, byte **movp)
void* wordtris_newstate (Pos *, byte *)
char** wordtris_getbgxpm ()
int diffcnt (const char *w1, const char *w2, int len)
void wordtris_set_init_pos (Pos *pos)
void wordtris_set_init_render (Pos *pos)
gboolean wordtris_findletter (byte *board, int letter, int *x, int *y)
int wordtris_get_rand_char ()

Variables

char wordtris_colors [9] = {0xd7, 0xd7, 0xd7, 0xd7, 0xd7, 0xd7, 0, 0, 0xff}
char wordtris_highlight_colors [9] = {0x0, 0x0, 0xff, 0, 0, 0, 0, 0, 0}
char* smiley_xpm []
char** wordtris_pixmaps []
const int lava_xpm_header_size = 253+1
char* lava_xpm_header []
char* lava_xpm_data []
int total_lives = 10
Game Wordtris
float charcounts [26]
int wordtris_curx = 0
int wordtris_cury = 0


Define Documentation

#define WORDTRIS_BOARD_HEIT   14
 

Definition at line 37 of file wordtris.c.

#define WORDTRIS_BOARD_WID   4
 

Definition at line 36 of file wordtris.c.

#define WORDTRIS_CELL_SIZE   36
 

Definition at line 32 of file wordtris.c.

#define WORDTRIS_EMPTY   0
 

Definition at line 41 of file wordtris.c.

#define WORDTRIS_LEN   4
 

Definition at line 39 of file wordtris.c.

#define WORDTRIS_NUM_PIECES   27
 

Definition at line 34 of file wordtris.c.

#define WORDTRIS_WILDCARD   27
 

Definition at line 42 of file wordtris.c.


Function Documentation

int diffcnt ( const char * w1,
const char * w2,
int len ) [static]
 

Definition at line 507 of file wordtris.c.

Referenced by wordtris_set_init_pos().

int wordtris_animate ( Pos * pos,
byte ** movp )
 

Definition at line 748 of file wordtris.c.

gboolean wordtris_findletter ( byte * board,
int letter,
int * x,
int * y )
 

Definition at line 639 of file wordtris.c.

Referenced by wordtris_getmove_kb().

void wordtris_free ( )
 

Definition at line 728 of file wordtris.c.

int wordtris_get_rand_char ( )
 

Definition at line 733 of file wordtris.c.

Referenced by wordtris_animate().

char** wordtris_getbgxpm ( ) [static]
 

Definition at line 490 of file wordtris.c.

Referenced by wordtris_init().

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

Definition at line 615 of file wordtris.c.

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

Definition at line 671 of file wordtris.c.

void wordtris_init ( ) [static]
 

Definition at line 539 of file wordtris.c.

void* wordtris_newstate ( Pos * pos,
byte * move ) [static]
 

Definition at line 596 of file wordtris.c.

void wordtris_set_init_pos ( Pos * pos ) [static]
 

Definition at line 516 of file wordtris.c.

void wordtris_set_init_render ( Pos * pos ) [static]
 

Definition at line 534 of file wordtris.c.

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

Definition at line 577 of file wordtris.c.

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

Definition at line 434 of file wordtris.c.


Variable Documentation

Game Wordtris
 

Initial value:

 { WORDTRIS_CELL_SIZE, WORDTRIS_BOARD_WID, WORDTRIS_BOARD_HEIT, 
        WORDTRIS_NUM_PIECES, 
        wordtris_colors, NULL, wordtris_pixmaps, 
        "Wordtris", 
        wordtris_init}

Definition at line 447 of file wordtris.c.

float charcounts[26] [static]
 

Initial value:

 
{
        629,
        223,
        205,
        302,
        746,
        152,
        186,
        182,
        395,
        30,
        167,
        460,
        234,
        338,
        503,
        272,
        6,
        395,
        622,
        404,
        276,
        63,
        173,
        24,
        125,
        28,
}

Definition at line 460 of file wordtris.c.

char* lava_xpm_data[] [static]
 

Definition at line 384 of file wordtris.c.

char* lava_xpm_header[] [static]
 

Definition at line 126 of file wordtris.c.

const int lava_xpm_header_size = 253+1 [static]
 

Definition at line 125 of file wordtris.c.

char* smiley_xpm[] [static]
 

Definition at line 47 of file wordtris.c.

int total_lives = 10 [static]
 

Definition at line 431 of file wordtris.c.

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

Definition at line 44 of file wordtris.c.

int wordtris_curx = 0 [static]
 

Definition at line 575 of file wordtris.c.

int wordtris_cury = 0 [static]
 

Definition at line 575 of file wordtris.c.

char wordtris_highlight_colors[9] = {0x0, 0x0, 0xff, 0, 0, 0, 0, 0, 0}
 

Definition at line 45 of file wordtris.c.

char** wordtris_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,
        smiley_xpm,
}

Definition at line 90 of file wordtris.c.