Logo Search packages:      
Sourcecode: warzone2100 version File versions

hci.c File Reference


Detailed Description

Functions for the in game interface. (Human Computer Interface - thanks to Alex for the file name).

Definition in file hci.c.

#include <string.h>
#include "lib/framework/frame.h"
#include "lib/framework/strres.h"
#include "lib/gamelib/gtime.h"
#include "lib/ivis_common/rendmode.h"
#include "lib/ivis_common/piepalette.h"
#include "lib/ivis_opengl/screen.h"
#include "lib/script/script.h"
#include "action.h"
#include "lib/sound/audio_id.h"
#include "lib/sound/audio.h"
#include "console.h"
#include "design.h"
#include "display.h"
#include "display3d.h"
#include "drive.h"
#include "edit3d.h"
#include "effects.h"
#include "game.h"
#include "hci.h"
#include "ingameop.h"
#include "intdisplay.h"
#include "intelmap.h"
#include "intorder.h"
#include "keymap.h"
#include "loadsave.h"
#include "loop.h"
#include "mapdisplay.h"
#include "mission.h"
#include "multimenu.h"
#include "multiplay.h"
#include "multigifts.h"
#include "radar.h"
#include "research.h"
#include "scriptcb.h"
#include "scriptextern.h"
#include "scripttabs.h"
#include "seqdisp.h"
#include "transporter.h"
#include "warcam.h"
#include "main.h"
#include "wrappers.h"
#include "keybind.h"

Go to the source code of this file.

Classes

struct  BUTOFFSET
struct  BUTSTATE

Defines

#define ED_BUTHEIGHT   20
#define ED_BUTWIDTH   60
#define ED_GAP   5
#define ED_HEIGHT   105
#define ED_WIDTH   80
#define ED_X   32
#define ED_Y   200
#define IDED_CLOSE   2002
#define IDED_FORM   2000
#define IDED_LABEL   2001
#define IDED_STATFORM   2003
#define IDOPT_CLOSE   1006
#define IDOPT_DROID   1037
#define IDOPT_EDIT   1005
#define IDOPT_FEATURE   1039
#define IDOPT_FORM   1000
#define IDOPT_LABEL   1007
#define IDOPT_MAPFORM   1001
#define IDOPT_MAPHEIGHT   1034
#define IDOPT_MAPLABEL   1004
#define IDOPT_MAPLOAD   1002
#define IDOPT_MAPNEW   1032
#define IDOPT_MAPSAVE   1003
#define IDOPT_MAPWIDTH   1033
#define IDOPT_PAUSE   1041
#define IDOPT_PLAYEREND   1030
#define IDOPT_PLAYERFORM   1008
#define IDOPT_PLAYERLABEL   1009
#define IDOPT_PLAYERSTART   1010
#define IDOPT_QUIT   1031
#define IDOPT_STRUCT   1038
#define IDOPT_TILE   1040
#define IDOPT_ZALIGN   1042
#define IDPOW_FORM   100
#define IDPROX_END   12019
#define IDPROX_START   12000
#define NUMRETBUTS   7
#define OPT_BUTHEIGHT   20
#define OPT_BUTWIDTH   60
#define OPT_EDITY   100
#define OPT_HEIGHT   350
#define OPT_LOADY   260
#define OPT_MAPY   25
#define OPT_PLAYERY   150
#define OPT_WIDTH   275
#define OPT_X   (640-300)
#define OPT_Y   20
#define ORDERED_LIST_SIZE   (NUM_FACTORY_TYPES * MAX_FACTORY)
#define PROX_BUTHEIGHT   9
#define PROX_BUTWIDTH   9
#define RET_BUTGAPX   6
#define RET_BUTGAPY   6
#define RET_BUTHEIGHT   28
#define RET_BUTWIDTH   25
#define RETXOFFSET   (0)
#define RETYOFFSET   (0)
#define STAT_BASEHEIGHT   254
#define STAT_BASEWIDTH   134
#define STAT_BUTHEIGHT   46
#define STAT_BUTWIDTH   60
#define STAT_BUTX   4
#define STAT_BUTY   2
#define STAT_GAP   2
#define STAT_TABOFFSET   2

Typedefs

typedef BASE_STATS *(* OBJ_GETSTATS )(BASE_OBJECT *psObj)
typedef BOOL(* OBJ_SELECT )(BASE_OBJECT *psObj)
typedef BOOL(* OBJ_SETSTATS )(BASE_OBJECT *psObj, BASE_STATS *psStats)

Enumerations

enum  {
  RETBUT_CANCEL, RETBUT_FACTORY, RETBUT_RESEARCH, RETBUT_BUILD,
  RETBUT_DESIGN, RETBUT_INTELMAP, RETBUT_COMMAND
}
enum  _edit_pos_mode { IED_NOPOS, IED_POS }
enum  _obj_mode {
  IOBJ_NONE = INT_MAXMODE, IOBJ_BUILD, IOBJ_BUILDSEL, IOBJ_DEMOLISHSEL,
  IOBJ_MANUFACTURE, IOBJ_RESEARCH, IOBJ_COMMAND, IOBJ_MAX
}

Functions

void addIntelScreen (void)
void addTransporterInterface (DROID *psSelected, BOOL onMission)
void FinishStructurePosition (UDWORD xPos, UDWORD yPos, void *UserData)
void flashReticuleButton (UDWORD buttonID)
void forceHidePowerBar (void)
static BASE_STATS * getCommandStats (WZ_DECL_UNUSED BASE_OBJECT *psObj)
static BASE_STATS * getConstructionStats (BASE_OBJECT *psObj)
BASE_OBJECT * getCurrentSelected (void)
static BASE_STATS * getManufactureStats (BASE_OBJECT *psObj)
static BASE_STATS * getResearchStats (BASE_OBJECT *psObj)
void HandleClosingWindows (void)
static BOOL intAddBuild (DROID *psSelected)
static BOOL intAddCommand (DROID *psSelected)
static BOOL intAddManufacture (STRUCTURE *psSelected)
static void intAddObjectStats (BASE_OBJECT *psObj, UDWORD id)
static BOOL intAddObjectWindow (BASE_OBJECT *psObjects, BASE_OBJECT *psSelected, BOOL bForceStats)
BOOL intAddOptions (void)
static BOOL intAddPower (void)
BOOL intAddProximityButton (PROXIMITY_DISPLAY *psProxDisp, UDWORD inc)
static BOOL intAddResearch (STRUCTURE *psSelected)
BOOL intAddReticule (void)
static BOOL intAddStats (BASE_STATS **ppsStatsList, UDWORD numStats, BASE_STATS *psSelected, BASE_OBJECT *psOwner)
void intBuildFinished (DROID *psDroid)
BOOL intBuildMode (void)
BOOL intBuildSelectMode (void)
void intBuildStarted (DROID *psDroid)
static void intCalcStructCenter (STRUCTURE_STATS *psStats, UDWORD tilex, UDWORD tiley, UDWORD *pcx, UDWORD *pcy)
static DROID * intCheckForDroid (UDWORD droidType)
static STRUCTURE * intCheckForStructure (UDWORD structType)
void intCheckResearchButton (void)
BOOL intCheckReticuleButEnabled (UDWORD id)
static void intCheckReticuleButtons (void)
void intCommanderSelected (DROID *psDroid)
void intConstructorSelected (DROID *psDroid)
void intDemolishCancel (void)
BOOL intDemolishSelectMode (void)
void intDisplayWidgets (void)
static void intDoScreenRefresh (void)
STRUCTURE * interfaceStructList (void)
STRUCTURE * intFindAStructure (void)
static FLAG_POSITION * intFindSelectedDelivPoint (void)
static void intGetMapSize (void)
static BASE_OBJECT * intGetObject (UDWORD id)
BOOL intGetReopenBuild (void)
static BOOL intGetStructPosition (UDWORD *pX, UDWORD *pY)
DROID * intGotoNextDroidType (DROID *CurrDroid, UDWORD droidType, BOOL AllowGroup)
STRUCTURE * intGotoNextStructureType (UDWORD structType, BOOL JumpTo, BOOL CancelDrive)
static void intHidePowerBar (void)
BOOL intInitialise (void)
static void intInitialiseReticule (void)
BOOL intIsRefreshing (void)
void intManufactureFinished (STRUCTURE *psBuilding)
void intNewObj (BASE_OBJECT *psObj)
static SDWORD intNumSelectedDroids (UDWORD droidType)
static void intObjectDied (UDWORD objID)
static void intObjectRMBPressed (UDWORD id)
void intObjectSelected (BASE_OBJECT *psObj)
static void intObjStatRMBPressed (UDWORD id)
static void intProcessEditStats (UDWORD id)
static void intProcessObject (UDWORD id)
static void intProcessOptions (UDWORD id)
static void intProcessStats (UDWORD id)
void intRefreshScreen (void)
void intRemoveObject (void)
static void intRemoveObjectNoAnim (void)
static void intRemoveOptions (void)
void intRemoveProximityButton (PROXIMITY_DISPLAY *psProxDisp)
void intRemoveReticule (void)
void intRemoveStats (void)
void intRemoveStatsNoAnim (void)
void intReopenBuild (BOOL reopen)
void intResearchFinished (STRUCTURE *psBuilding)
void intResetPreviousObj (void)
void intResetScreen (BOOL NoAnim)
static void intResetWindows (BASE_OBJECT *psObj)
static void intRunPower (void)
static void intRunStats (void)
INT_RETVAL intRunWidgets (void)
static void intSelectDroid (BASE_OBJECT *psObj)
void intSetMapPos (UDWORD x, UDWORD y)
void intSetShadowPower (UDWORD quantity)
static void intSetStats (UDWORD id, BASE_STATS *psStats)
void intShowPowerBar (void)
void intShutDown (void)
static void intStartStructPosition (BASE_STATS *psStats, DROID *psDroid)
static void intStatsRMBPressed (UDWORD id)
static void intStopStructPosition (void)
static BOOL intUpdateObject (BASE_OBJECT *psObjects, BASE_OBJECT *psSelected, BOOL bForceStats)
UWORD numForms (UDWORD total, UDWORD perForm)
static void orderDroids (void)
static void orderFactories (void)
static void orderObjectInterface (void)
static void orderResearch (void)
static void processProximityButtons (UDWORD id)
static BOOL selectCommand (BASE_OBJECT *psObj)
static BOOL selectConstruction (BASE_OBJECT *psObj)
static BOOL selectManufacture (BASE_OBJECT *psObj)
static BOOL selectResearch (BASE_OBJECT *psObj)
static BOOL setCommandStats (WZ_DECL_UNUSED BASE_OBJECT *psObj, WZ_DECL_UNUSED BASE_STATS *psStats)
static BOOL setConstructionStats (BASE_OBJECT *psObj, BASE_STATS *psStats)
void setKeyButtonMapping (UDWORD val)
static BOOL setManufactureStats (BASE_OBJECT *psObj, BASE_STATS *psStats)
static BOOL setResearchStats (BASE_OBJECT *psObj, BASE_STATS *psStats)
static void SetReticuleButPos (UWORD ButId, W_BUTINIT *sButInit)
void stopReticuleButtonFlash (UDWORD buttonID)
void togglePowerBar (void)

Variables

static const char * apPlayerText []
static const char * apPlayerTip []
COMP_BASE_STATS ** apsComponentList
COMP_BASE_STATS ** apsExtraSysList
static FEATURE_STATS ** apsFeatureList
BASE_OBJECT ** apsListToOrder
BASE_OBJECT ** apsObjectList
static BASE_OBJECT * apsPreviousObj [IOBJ_MAX]
static STRUCTURE_STATS ** apsStructStatsList
DROID_TEMPLATE ** apsTemplateList
static Vector2i asJumpPos [IOBJ_MAX]
static BOOL bReopenBuildMenu = false
BOOL ClosingIntelMap = false
BOOL ClosingMessageView = false
static BOOL ClosingObject = false
BOOL ClosingOrder = false
static BOOL ClosingStats = false
BOOL ClosingTrans = false
BOOL ClosingTransCont = false
BOOL ClosingTransDroids = false
static DROID * CurrentDroid = NULL
static SWORD CurrentDroidType = 0
static STRUCTURE * CurrentStruct = NULL
static SWORD CurrentStructType = 0
enum _edit_pos_mode editPosMode
UDWORD intLastWidget
INTMODE intMode
static BOOL IntRefreshPending = false
static UDWORD keyButtonMapping = 0
static UDWORD newMapHeight
static UDWORD newMapWidth
UDWORD numComponent
UDWORD numExtraSys
SDWORD numObjects
static UDWORD numStatsListEntries
static BOOL objectsChanged
OBJ_GETSTATS objGetStatsFunc
static UWORD objMajor
static UWORD objMinor
enum _obj_mode objMode
static UWORD objNumTabs
static OBJ_SELECT objSelectFunc
static OBJ_SETSTATS objSetStatsFunc
UDWORD objStatID
PIELIGHT outlineNotOK
PIELIGHT outlineOK
BOOL outlineTile = false
static char pCloseText [] = "X"
static UWORD * pList
static BOOL powerBarUp = false
static RESEARCH ** ppResearchList
static BASE_STATS ** ppsStatsList
DROID_TEMPLATE * psCurrTemplate = NULL
static UWORD * pSList
static BASE_OBJECT * psObjList
static BASE_OBJECT * psObjSelected
static BASE_STATS * psPositionStats
static BASE_OBJECT * psStatsScreenOwner = NULL
W_SCREEN * psWScreen
BOOL Refreshing = false
BUTSTATE ReticuleEnabled [NUMRETBUTS]
BUTOFFSET ReticuleOffsets [NUMRETBUTS]
BOOL ReticuleUp = false
DROID_TEMPLATE sCurrDesign
static UDWORD statID
static BOOL StatsUp = false


Generated by  Doxygen 1.6.0   Back to index