Freeciv-3.1
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
taimsg.h File Reference
#include "specenum_gen.h"
#include "speclist.h"

Go to the source code of this file.

Data Structures

struct  tai_msg
 
struct  tai_req
 

Macros

#define SPECENUM_NAME   taimsgtype
 
#define SPECENUM_VALUE0   TAI_MSG_THR_EXIT
 
#define SPECENUM_VALUE0NAME   "Exit"
 
#define SPECENUM_VALUE1   TAI_MSG_FIRST_ACTIVITIES
 
#define SPECENUM_VALUE1NAME   "FirstActivities"
 
#define SPECENUM_VALUE2   TAI_MSG_PHASE_FINISHED
 
#define SPECENUM_VALUE2NAME   "PhaseFinished"
 
#define SPECENUM_NAME   taireqtype
 
#define SPECENUM_VALUE0   TAI_REQ_WORKER_TASK
 
#define SPECENUM_VALUE0NAME   "WorkerTask"
 
#define SPECENUM_VALUE1   TAI_REQ_TURN_DONE
 
#define SPECENUM_VALUE1NAME   "TurnDone"
 
#define SPECLIST_TAG   taimsg
 
#define SPECLIST_TYPE   struct tai_msg
 
#define SPECLIST_TAG   taireq
 
#define SPECLIST_TYPE   struct tai_req
 

Functions

void tai_send_msg (enum taimsgtype type, struct player *pplayer, void *data)
 
void tai_send_req (enum taireqtype type, struct player *pplayer, void *data)
 
void tai_first_activities (struct ai_type *ait, struct player *pplayer)
 
void tai_phase_finished (struct ai_type *ait, struct player *pplayer)
 

Macro Definition Documentation

◆ SPECENUM_NAME [1/2]

#define SPECENUM_NAME   taimsgtype

Definition at line 16 of file taimsg.h.

◆ SPECENUM_NAME [2/2]

#define SPECENUM_NAME   taireqtype

Definition at line 16 of file taimsg.h.

◆ SPECENUM_VALUE0 [1/2]

#define SPECENUM_VALUE0   TAI_MSG_THR_EXIT

Definition at line 17 of file taimsg.h.

◆ SPECENUM_VALUE0 [2/2]

#define SPECENUM_VALUE0   TAI_REQ_WORKER_TASK

Definition at line 17 of file taimsg.h.

◆ SPECENUM_VALUE0NAME [1/2]

#define SPECENUM_VALUE0NAME   "Exit"

Definition at line 18 of file taimsg.h.

◆ SPECENUM_VALUE0NAME [2/2]

#define SPECENUM_VALUE0NAME   "WorkerTask"

Definition at line 18 of file taimsg.h.

◆ SPECENUM_VALUE1 [1/2]

#define SPECENUM_VALUE1   TAI_MSG_FIRST_ACTIVITIES

Definition at line 19 of file taimsg.h.

◆ SPECENUM_VALUE1 [2/2]

#define SPECENUM_VALUE1   TAI_REQ_TURN_DONE

Definition at line 19 of file taimsg.h.

◆ SPECENUM_VALUE1NAME [1/2]

#define SPECENUM_VALUE1NAME   "FirstActivities"

Definition at line 20 of file taimsg.h.

◆ SPECENUM_VALUE1NAME [2/2]

#define SPECENUM_VALUE1NAME   "TurnDone"

Definition at line 20 of file taimsg.h.

◆ SPECENUM_VALUE2

#define SPECENUM_VALUE2   TAI_MSG_PHASE_FINISHED

Definition at line 21 of file taimsg.h.

◆ SPECENUM_VALUE2NAME

#define SPECENUM_VALUE2NAME   "PhaseFinished"

Definition at line 22 of file taimsg.h.

◆ SPECLIST_TAG [1/2]

#define SPECLIST_TAG   taimsg

Definition at line 46 of file taimsg.h.

◆ SPECLIST_TAG [2/2]

#define SPECLIST_TAG   taireq

Definition at line 46 of file taimsg.h.

◆ SPECLIST_TYPE [1/2]

#define SPECLIST_TYPE   struct tai_msg

Definition at line 47 of file taimsg.h.

◆ SPECLIST_TYPE [2/2]

#define SPECLIST_TYPE   struct tai_req

Definition at line 47 of file taimsg.h.

Function Documentation

◆ tai_first_activities()

void tai_first_activities ( struct ai_type ait,
struct player pplayer 
)

Time for phase first activities

Definition at line 63 of file taimsg.c.

Referenced by twai_first_activities(), and twai_restart_phase().

◆ tai_phase_finished()

void tai_phase_finished ( struct ai_type ait,
struct player pplayer 
)

Player phase has finished

Definition at line 71 of file taimsg.c.

Referenced by twai_phase_finished().

◆ tai_send_msg()

void tai_send_msg ( enum taimsgtype  type,
struct player pplayer,
void *  data 
)

Construct and send message to player thread.

Definition at line 26 of file taimsg.c.

Referenced by tai_control_lost(), tai_first_activities(), and tai_phase_finished().

◆ tai_send_req()

void tai_send_req ( enum taireqtype  type,
struct player pplayer,
void *  data 
)

Construct and send request from player thread.

Definition at line 48 of file taimsg.c.

Referenced by tai_check_messages(), and tai_city_worker_requests_create().