UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cp_ufopedia.h File Reference

Header file for UFOpaedia script interpreter. More...

Go to the source code of this file.

Data Structures

struct  pediaChapter_s
 

Macros

#define MAX_PEDIACHAPTERS   16
 

Typedefs

typedef struct pediaChapter_s pediaChapter_t
 

Functions

void UP_InitStartup (void)
 
void UP_Shutdown (void)
 
void UP_ParseChapter (const char *name, const char **text)
 Parse the UFOpaedia chapters from scripts. More...
 
void UP_OpenWith (const char *name)
 Opens the UFOpaedia from everywhere with the entry given through name. More...
 
void UP_OpenCopyWith (const char *name)
 Opens the UFOpaedia with the entry given through name, not deleting copies. More...
 
void UP_AircraftItemDescription (const objDef_t *item)
 Prints the (UFOpaedia and other) description for aircraft items. More...
 
int UP_GetUnreadMails (void)
 Sets the amount of unread/new mails. More...
 
void UP_OpenEventMail (const char *eventMailID)
 

Detailed Description

Header file for UFOpaedia script interpreter.

Definition in file cp_ufopedia.h.

Macro Definition Documentation

#define MAX_PEDIACHAPTERS   16

Definition at line 28 of file cp_ufopedia.h.

Referenced by UP_ParseChapter().

Typedef Documentation

Function Documentation

void UP_AircraftItemDescription ( const objDef_t item)

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

Parameters
itemThe 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 227 of file cp_ufopedia.cpp.

References _, AC_ITEM_AMMO, AC_ITEM_BASE_LASER, AC_ITEM_BASE_MISSILE, AC_ITEM_WEAPON, AII_GetItemWeightBySize(), AII_WeightToName(), AIR_AircraftMenuStatsValues(), AIR_STATS_MAX, AIR_STATS_WRANGE, objDef_s::ammo, objDef_s::ammos, cgi, objDef_s::craftitem, cgame_import_s::Cvar_Set(), EQUAL, i, objDef_s::id, objDef_s::isVirtual, technology_s::mdl, objDef_s::name, objDef_s::numAmmos, Q_strcat(), RS_GetTechForItem(), RS_IsResearched_ptr(), craftitem_s::stats, TEXT_ITEMDESCRIPTION, craftitem_s::type, UP_AircraftStatToName(), craftitem_s::weaponDamage, and craftitem_s::weaponDelay.

Referenced by AIM_UpdateItemDescription(), BDEF_SelectItem_f(), BS_ShowInfo_f(), and UP_Article().

void UP_InitStartup ( void  )
See also
cgi->UI_InitStartup

Definition at line 1156 of file cp_ufopedia.cpp.

References cgi, cgame_import_s::Cvar_Get(), and cgame_import_s::Cvar_Set().

Referenced by CP_InitStartup().

void UP_OpenCopyWith ( const char *  techID)

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

Parameters
techIDUFOpaedia entry id (technology script id)
See also
UP_FindEntry_f

Definition at line 751 of file cp_ufopedia.cpp.

References cgi.

void UP_OpenEventMail ( const char *  eventMailID)
See also
CL_EventAddMail_f

Definition at line 707 of file cp_ufopedia.cpp.

References cgi, CL_GetEventMail(), and UP_Article().

Referenced by CL_EventAddMail(), and UP_MailClientClick_f().

void UP_OpenWith ( const char *  techID)

Opens the UFOpaedia from everywhere with the entry given through name.

Parameters
techIDUFOpaedia entry id (technology script id)
See also
UP_FindEntry_f

Definition at line 737 of file cp_ufopedia.cpp.

References cgi.

Referenced by B_BuildingOpenAfterClick_f(), BS_MarketInfoClick_f(), PR_ProductionListRightClick_f(), RS_ResearchFinish(), UP_ResearchedLinkClick_f(), and UP_TechTreeClick_f().

void UP_ParseChapter ( const char *  name,
const char **  text 
)

Parse the UFOpaedia chapters from scripts.

Parameters
[in]nameChapter ID
[in]textText for chapter ID
See also
CL_ParseFirstScript

Definition at line 1187 of file cp_ufopedia.cpp.

References ccs, cgi, cgame_import_s::Com_EParse(), Com_Parse(), cp_campaignPool, ERR_DROP, pediaChapter_s::id, pediaChapter_s::idx, MAX_PEDIACHAPTERS, pediaChapter_s::name, ccs_s::numChapters, OBJZERO, cgame_import_s::PoolStrDup(), Q_streq, and ccs_s::upChapters.

Referenced by CP_ParseScriptFirst().

void UP_Shutdown ( void  )
See also
UI_InitStartup

Definition at line 1170 of file cp_ufopedia.cpp.

References cgi.

Referenced by CP_RemoveCampaignCallbackCommands().