Header file for UFOpaedia script interpreter. More...
Go to the source code of this file.
Data Structures | |
struct | pediaChapter_s |
Defines | |
#define | MAX_PEDIACHAPTERS 16 |
Typedefs | |
typedef struct pediaChapter_s | pediaChapter_t |
Functions | |
void | UP_InitStartup (void) |
void | UP_Shutdown (void) |
void | UP_ParseChapters (const char *name, const char **text) |
Parse the UFOpaedia chapters from scripts. | |
void | UP_OpenWith (const char *name) |
Opens the UFOpaedia from everywhere with the entry given through name. | |
void | UP_OpenCopyWith (const char *name) |
Opens the UFOpaedia with the entry given through name, not deleting copies. | |
void | UP_AircraftItemDescription (const objDef_t *item) |
Prints the (UFOpaedia and other) description for aircraft items. | |
int | UP_GetUnreadMails (void) |
Sets the amount of unread/new mails. | |
void | UP_OpenEventMail (const char *eventMailID) |
Header file for UFOpaedia script interpreter.
Definition in file cp_ufopedia.h.
#define MAX_PEDIACHAPTERS 16 |
Definition at line 29 of file cp_ufopedia.h.
Referenced by UP_GenerateSummary(), and UP_ParseChapters().
typedef struct pediaChapter_s pediaChapter_t |
void UP_AircraftItemDescription | ( | const objDef_t * | item | ) |
Prints the (UFOpaedia and other) description for aircraft items.
item | The object definition of the item |
Definition at line 248 of file cp_ufopedia.c.
References _, AC_ITEM_AMMO, AC_ITEM_WEAPON, AII_GetItemWeightBySize(), AII_WeightToName(), AIR_STATS_MAX, AIR_STATS_WRANGE, objDef_s::ammo, CL_AircraftMenuStatsValues(), CL_AircraftStatToName(), objDef_s::craftitem, Cvar_Set(), i, objDef_s::id, INV_ItemDescription(), technology_s::mdl, technology_s::name, Q_strcat(), RS_GetTechForItem(), RS_IsResearched_ptr(), craftitem_s::stats, TEXT_ITEMDESCRIPTION, craftitem_s::type, UI_RegisterText(), UI_ResetData(), va(), craftitem_s::weaponDamage, and craftitem_s::weaponDelay.
Referenced by AIM_UpdateItemDescription(), BDEF_SelectItem_f(), BS_BuyType(), BS_MarketClick_f(), and UP_Article().
int UP_GetUnreadMails | ( | void | ) |
Sets the amount of unread/new mails.
Definition at line 414 of file cp_ufopedia.c.
References ccs, cp_messageStack, Cvar_Set(), message_s::eventMail, techMail_s::from, m, technology_s::mail, MSG_EVENT, MSG_NEWS, MSG_RESEARCH_FINISHED, MSG_RESEARCH_PROPOSAL, message_s::next, ccs_s::numUnreadMails, message_s::pedia, eventMail_s::read, techMail_s::read, RS_IsResearched_ptr(), TECHMAIL_PRE, TECHMAIL_RESEARCHED, message_s::type, and va().
Referenced by CL_CampaignRun().
void UP_InitStartup | ( | void | ) |
Definition at line 1220 of file cp_ufopedia.c.
References Cmd_AddCommand(), Cvar_Get(), Cvar_Set(), UP_Click_f(), UP_Content_f(), UP_FindEntry_f(), UP_MailClientClick_f(), UP_OpenMail_f(), UP_ResearchedLinkClick_f(), UP_SetAllMailsRead_f(), UP_SetMailButtons_f(), UP_TechTreeClick_f(), and UP_Update_f().
Referenced by CP_InitStartup().
void UP_OpenCopyWith | ( | const char * | techID | ) |
Opens the UFOpaedia with the entry given through name, not deleting copies.
techID | UFOpaedia entry id (technology script id) |
Definition at line 727 of file cp_ufopedia.c.
References Cbuf_AddText(), Cmd_ExecuteString(), and va().
Referenced by RS_ShowPedia_f().
void UP_OpenEventMail | ( | const char * | eventMailID | ) |
Definition at line 683 of file cp_ufopedia.c.
References CL_GetEventMail(), qfalse, UI_PushWindow(), and UP_Article().
Referenced by UP_MailClientClick_f().
void UP_OpenWith | ( | const char * | techID | ) |
Opens the UFOpaedia from everywhere with the entry given through name.
techID | UFOpaedia entry id (technology script id) |
Definition at line 713 of file cp_ufopedia.c.
References Cbuf_AddText(), UI_PushWindow(), and va().
Referenced by AC_OpenUFOpedia_f(), B_BuildingInfoClick_f(), B_BuildingOpenAfterClick(), BS_MarketInfoClick_f(), PR_ProductionListRightClick_f(), UP_ResearchedLinkClick_f(), and UP_TechTreeClick_f().
void UP_ParseChapters | ( | const char * | name, | |
const char ** | text | |||
) |
Parse the UFOpaedia chapters from scripts.
[in] | name | Chapter ID |
[in] | text | Text for chapter ID |
Definition at line 1269 of file cp_ufopedia.c.
References ccs, Com_EParse(), Com_Parse(), Com_Printf(), cp_campaignPool, pediaChapter_s::id, pediaChapter_s::idx, MAX_PEDIACHAPTERS, Mem_PoolStrDup, pediaChapter_s::name, ccs_s::numChapters, and ccs_s::upChapters.
Referenced by CL_ParseScriptFirst().
void UP_Shutdown | ( | void | ) |
Definition at line 1243 of file cp_ufopedia.c.
References Cmd_RemoveCommand(), and Cvar_Delete().
Referenced by CP_RemoveCampaignCallbackCommands().