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

Go to the source code of this file.

Data Structures

struct  texai_msg
 
struct  texai_req
 

Macros

#define SPECENUM_NAME   texaimsgtype
 
#define SPECENUM_VALUE0   TEXAI_MSG_THR_EXIT
 
#define SPECENUM_VALUE0NAME   "Exit"
 
#define SPECENUM_VALUE1   TEXAI_MSG_FIRST_ACTIVITIES
 
#define SPECENUM_VALUE1NAME   "FirstActivities"
 
#define SPECENUM_VALUE2   TEXAI_MSG_PHASE_FINISHED
 
#define SPECENUM_VALUE2NAME   "PhaseFinished"
 
#define SPECENUM_VALUE3   TEXAI_MSG_TILE_INFO
 
#define SPECENUM_VALUE3NAME   "TileInfo"
 
#define SPECENUM_VALUE4   TEXAI_MSG_MAP_ALLOC
 
#define SPECENUM_VALUE4NAME   "MapAlloc"
 
#define SPECENUM_VALUE5   TEXAI_MSG_MAP_FREE
 
#define SPECENUM_VALUE5NAME   "MapFree"
 
#define SPECENUM_VALUE6   TEXAI_MSG_CITY_CREATED
 
#define SPECENUM_VALUE6NAME   "CityCreated"
 
#define SPECENUM_VALUE7   TEXAI_MSG_CITY_CHANGED
 
#define SPECENUM_VALUE7NAME   "CityChanged"
 
#define SPECENUM_VALUE8   TEXAI_MSG_CITY_DESTROYED
 
#define SPECENUM_VALUE8NAME   "CityDestroyed"
 
#define SPECENUM_VALUE9   TEXAI_MSG_UNIT_CREATED
 
#define SPECENUM_VALUE9NAME   "UnitCreated"
 
#define SPECENUM_VALUE10   TEXAI_MSG_UNIT_CHANGED
 
#define SPECENUM_VALUE10NAME   "UnitChanged"
 
#define SPECENUM_VALUE11   TEXAI_MSG_UNIT_DESTROYED
 
#define SPECENUM_VALUE11NAME   "UnitDestroyed"
 
#define SPECENUM_VALUE12   TEXAI_MSG_UNIT_MOVED
 
#define SPECENUM_VALUE12NAME   "UnitMoved"
 
#define SPECENUM_NAME   texaireqtype
 
#define SPECENUM_VALUE0   TEXAI_REQ_WORKER_TASK
 
#define SPECENUM_VALUE0NAME   "WorkerTask"
 
#define SPECENUM_VALUE1   TEXAI_REQ_TURN_DONE
 
#define SPECENUM_VALUE1NAME   "TurnDone"
 
#define SPECENUM_VALUE2   TEXAI_BUILD_CHOICE
 
#define SPECENUM_VALUE2NAME   "BuildChoice"
 
#define SPECLIST_TAG   texaimsg
 
#define SPECLIST_TYPE   struct texai_msg
 
#define SPECLIST_TAG   texaireq
 
#define SPECLIST_TYPE   struct texai_req
 

Functions

void texai_send_msg (enum texaimsgtype type, struct player *pplayer, void *data)
 
void texai_send_req (enum texaireqtype type, struct player *pplayer, void *data)
 
void texai_first_activities (struct ai_type *ait, struct player *pplayer)
 
void texai_phase_finished (struct ai_type *ait, struct player *pplayer)
 

Macro Definition Documentation

◆ SPECENUM_NAME [1/2]

Definition at line 16 of file texaimsg.h.

◆ SPECENUM_NAME [2/2]

Definition at line 16 of file texaimsg.h.

◆ SPECENUM_VALUE0 [1/2]

#define SPECENUM_VALUE0   TEXAI_MSG_THR_EXIT

Definition at line 17 of file texaimsg.h.

◆ SPECENUM_VALUE0 [2/2]

#define SPECENUM_VALUE0   TEXAI_REQ_WORKER_TASK

Definition at line 17 of file texaimsg.h.

◆ SPECENUM_VALUE0NAME [1/2]

#define SPECENUM_VALUE0NAME   "Exit"

Definition at line 18 of file texaimsg.h.

◆ SPECENUM_VALUE0NAME [2/2]

#define SPECENUM_VALUE0NAME   "WorkerTask"

Definition at line 18 of file texaimsg.h.

◆ SPECENUM_VALUE1 [1/2]

#define SPECENUM_VALUE1   TEXAI_MSG_FIRST_ACTIVITIES

Definition at line 19 of file texaimsg.h.

◆ SPECENUM_VALUE1 [2/2]

#define SPECENUM_VALUE1   TEXAI_REQ_TURN_DONE

Definition at line 19 of file texaimsg.h.

◆ SPECENUM_VALUE10

#define SPECENUM_VALUE10   TEXAI_MSG_UNIT_CHANGED

Definition at line 37 of file texaimsg.h.

◆ SPECENUM_VALUE10NAME

#define SPECENUM_VALUE10NAME   "UnitChanged"

Definition at line 38 of file texaimsg.h.

◆ SPECENUM_VALUE11

#define SPECENUM_VALUE11   TEXAI_MSG_UNIT_DESTROYED

Definition at line 39 of file texaimsg.h.

◆ SPECENUM_VALUE11NAME

#define SPECENUM_VALUE11NAME   "UnitDestroyed"

Definition at line 40 of file texaimsg.h.

◆ SPECENUM_VALUE12

#define SPECENUM_VALUE12   TEXAI_MSG_UNIT_MOVED

Definition at line 41 of file texaimsg.h.

◆ SPECENUM_VALUE12NAME

#define SPECENUM_VALUE12NAME   "UnitMoved"

Definition at line 42 of file texaimsg.h.

◆ SPECENUM_VALUE1NAME [1/2]

#define SPECENUM_VALUE1NAME   "FirstActivities"

Definition at line 20 of file texaimsg.h.

◆ SPECENUM_VALUE1NAME [2/2]

#define SPECENUM_VALUE1NAME   "TurnDone"

Definition at line 20 of file texaimsg.h.

◆ SPECENUM_VALUE2 [1/2]

#define SPECENUM_VALUE2   TEXAI_MSG_PHASE_FINISHED

Definition at line 21 of file texaimsg.h.

◆ SPECENUM_VALUE2 [2/2]

#define SPECENUM_VALUE2   TEXAI_BUILD_CHOICE

Definition at line 21 of file texaimsg.h.

◆ SPECENUM_VALUE2NAME [1/2]

#define SPECENUM_VALUE2NAME   "PhaseFinished"

Definition at line 22 of file texaimsg.h.

◆ SPECENUM_VALUE2NAME [2/2]

#define SPECENUM_VALUE2NAME   "BuildChoice"

Definition at line 22 of file texaimsg.h.

◆ SPECENUM_VALUE3

#define SPECENUM_VALUE3   TEXAI_MSG_TILE_INFO

Definition at line 23 of file texaimsg.h.

◆ SPECENUM_VALUE3NAME

#define SPECENUM_VALUE3NAME   "TileInfo"

Definition at line 24 of file texaimsg.h.

◆ SPECENUM_VALUE4

#define SPECENUM_VALUE4   TEXAI_MSG_MAP_ALLOC

Definition at line 25 of file texaimsg.h.

◆ SPECENUM_VALUE4NAME

#define SPECENUM_VALUE4NAME   "MapAlloc"

Definition at line 26 of file texaimsg.h.

◆ SPECENUM_VALUE5

#define SPECENUM_VALUE5   TEXAI_MSG_MAP_FREE

Definition at line 27 of file texaimsg.h.

◆ SPECENUM_VALUE5NAME

#define SPECENUM_VALUE5NAME   "MapFree"

Definition at line 28 of file texaimsg.h.

◆ SPECENUM_VALUE6

#define SPECENUM_VALUE6   TEXAI_MSG_CITY_CREATED

Definition at line 29 of file texaimsg.h.

◆ SPECENUM_VALUE6NAME

#define SPECENUM_VALUE6NAME   "CityCreated"

Definition at line 30 of file texaimsg.h.

◆ SPECENUM_VALUE7

#define SPECENUM_VALUE7   TEXAI_MSG_CITY_CHANGED

Definition at line 31 of file texaimsg.h.

◆ SPECENUM_VALUE7NAME

#define SPECENUM_VALUE7NAME   "CityChanged"

Definition at line 32 of file texaimsg.h.

◆ SPECENUM_VALUE8

#define SPECENUM_VALUE8   TEXAI_MSG_CITY_DESTROYED

Definition at line 33 of file texaimsg.h.

◆ SPECENUM_VALUE8NAME

#define SPECENUM_VALUE8NAME   "CityDestroyed"

Definition at line 34 of file texaimsg.h.

◆ SPECENUM_VALUE9

#define SPECENUM_VALUE9   TEXAI_MSG_UNIT_CREATED

Definition at line 35 of file texaimsg.h.

◆ SPECENUM_VALUE9NAME

#define SPECENUM_VALUE9NAME   "UnitCreated"

Definition at line 36 of file texaimsg.h.

◆ SPECLIST_TAG [1/2]

#define SPECLIST_TAG   texaimsg

Definition at line 68 of file texaimsg.h.

◆ SPECLIST_TAG [2/2]

#define SPECLIST_TAG   texaireq

Definition at line 68 of file texaimsg.h.

◆ SPECLIST_TYPE [1/2]

#define SPECLIST_TYPE   struct texai_msg

Definition at line 69 of file texaimsg.h.

◆ SPECLIST_TYPE [2/2]

#define SPECLIST_TYPE   struct texai_req

Definition at line 69 of file texaimsg.h.

Function Documentation

◆ texai_first_activities()

void texai_first_activities ( struct ai_type ait,
struct player pplayer 
)

Time for phase first activities

Definition at line 63 of file texaimsg.c.

Referenced by texwai_first_activities(), and texwai_restart_phase().

◆ texai_phase_finished()

void texai_phase_finished ( struct ai_type ait,
struct player pplayer 
)

Player phase has finished

Definition at line 71 of file texaimsg.c.

Referenced by texwai_phase_finished().

◆ texai_send_msg()

void texai_send_msg ( enum texaimsgtype  type,
struct player pplayer,
void data 
)

◆ texai_send_req()

void texai_send_req ( enum texaireqtype  type,
struct player pplayer,
void data 
)

Construct and send request from player thread.

Definition at line 48 of file texaimsg.c.

Referenced by texai_check_messages(), and texai_city_worker_requests_create().