cp_ufopedia.h File Reference

Header file for UFOpaedia script interpreter. More...

This graph shows which files directly or indirectly include this file:

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)

Detailed Description

Header file for UFOpaedia script interpreter.

Definition in file cp_ufopedia.h.


Define Documentation

#define MAX_PEDIACHAPTERS   16

Definition at line 29 of file cp_ufopedia.h.

Referenced by UP_GenerateSummary(), and UP_ParseChapters().


Typedef Documentation


Function Documentation

void UP_AircraftItemDescription ( const objDef_t item  ) 

Prints the (UFOpaedia and other) description for aircraft items.

Parameters:
item The object definition of the item
See also:
UP_Article Not only called from UFOpaedia but also from other places to display
Todo:
Don't display things like speed for base defence items - a missile facility isn't getting slower or faster due a special weapon or ammunition

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.

Note:
This is called every campaign frame - to update ccs.numUnreadMails just set it to -1 before calling this function
See also:
CL_CampaignRun

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   ) 
void UP_OpenCopyWith ( const char *  techID  ) 

Opens the UFOpaedia with the entry given through name, not deleting copies.

Parameters:
techID UFOpaedia entry id (technology script id)
See also:
UP_FindEntry_f

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  ) 
See also:
CL_EventAddMail_f

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.

Parameters:
techID UFOpaedia entry id (technology script id)
See also:
UP_FindEntry_f

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.

Parameters:
[in] name Chapter ID
[in] text Text for chapter ID
See also:
CL_ParseFirstScript

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   ) 
See also:
UI_InitStartup

Definition at line 1243 of file cp_ufopedia.c.

References Cmd_RemoveCommand(), and Cvar_Delete().

Referenced by CP_RemoveCampaignCallbackCommands().


Generated by  doxygen 1.6.2