_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"#include "action/action_built.h"#include "action/action_research.h"#include "action/action_train.h"#include "action/action_upgradeto.h"#include "font.h"#include "icons.h"#include "interface.h"#include "map.h"#include "menus.h"#include "network.h"#include "player.h"#include "settings.h"#include "sound.h"#include "spells.h"#include "translate.h"#include "trigger.h"#include "ui/contenttype.h"#include "ui.h"#include "unit.h"#include "unitsound.h"#include "unittype.h"#include "upgrade.h"#include "video.h"#include <sstream>Classes | |
| struct | UStrInt |
| class | MessagesDisplay |
mainscr.cpp - The main screen. | |
| #define | MESSAGES_MAX 10 |
| enum | UStrIntType { USTRINT_STR, USTRINT_INT, USTRINT_STR, USTRINT_INT, USTRINT_STR, USTRINT_INT } |
| static char | MessagesEvent [MESSAGES_MAX][256] |
| static Vec2i | MessagesEventPos [MESSAGES_MAX] |
| Array of event messages. More... | |
| static int | MessagesEventCount |
| coordinate of event More... | |
| static int | MessagesEventIndex |
| Number of event messages. More... | |
| static int | MaxMessagesCount = MESSAGES_MAX |
| FIXME: docu. More... | |
| static MessagesDisplay | allmessages |
| static void | DrawMenuButtonArea_noNetwork () |
| static void | DrawMenuButtonArea_Network () |
| void | DrawMenuButtonArea () |
| Draw menu button area. More... | |
| void | DrawUserDefinedButtons () |
| Draw user defined buttons. More... | |
| static void | UiDrawLifeBar (const CUnit &unit, int x, int y) |
| static void | UiDrawManaBar (const CUnit &unit, int x, int y) |
| static bool | CanShowContent (const ConditionPanel *condition, const CUnit &unit) |
| UStrInt | GetComponent (const CUnit &unit, int index, EnumVariable e, int t) |
| Get component for unit variable. More... | |
| UStrInt | GetComponent (const CUnitType &type, int index, EnumVariable e, int t) |
| Get component for unit type variable. More... | |
| static void | DrawUnitInfo_Training (const CUnit &unit) |
| static bool | DrawTypePortrait (const CUnitType &type) |
| static void | DrawUnitInfo_portrait (const CUnit &unit) |
| static bool | DrawUnitInfo_single_selection (const CUnit &unit) |
| static void | DrawUnitInfo_transporter (CUnit &unit) |
| static void | DrawUnitInfo (CUnit &unit) |
| void | DrawResources () |
| Draw the player resource in resource line. More... | |
| void | UpdateMessages () |
| Update messages. More... | |
| void | CleanMessages () |
| Cleanup all messages. More... | |
| void | DrawMessages () |
| Draw messages as overlay over of the map. More... | |
| void | SetMessage (const char *fmt,...) |
| void | ShiftMessagesEvent () |
| void | SetMessageEvent (const Vec2i &pos, const char *fmt,...) |
| void | CenterOnMessage () |
| Center view-point on last event message. More... | |
| void | ToggleShowMessages () |
| show/hide messages More... | |
| void | SetMaxMessageCount (int newMax) |
| max message count More... | |
| static void | DrawInfoPanelBackground (unsigned frame) |
| static void | InfoPanel_draw_no_selection () |
| static void | InfoPanel_draw_single_selection (CUnit *selUnit) |
| static void | InfoPanel_draw_multiple_selection () |
| void | DrawTimer () |
| Draw the timer. More... | |
| void | UpdateTimer () |
| Update the timer. More... | |
| #define MESSAGES_MAX 10 |
| enum UStrIntType |
|
static |
Tell if we can show the content. verify each sub condition for that.
| condition | condition to verify. |
| unit | unit that certain condition can refer. |
| void CenterOnMessage | ( | ) |
Center view-point on last event message.
Goto message origin.
| void CleanMessages | ( | ) |
Cleanup all messages.
Clean messages
|
static |
Draw info panel background.
| frame | frame nr. of the info panel background. |
| void DrawMenuButtonArea | ( | ) |
Draw menu button area.
Draw menu button area.
|
static |
|
static |
| void DrawMessages | ( | ) |
Draw messages as overlay over of the map.
Draw messages
| void DrawResources | ( | ) |
Draw the player resource in resource line.
Draw the player resource in top line.
| void DrawTimer | ( | ) |
|
static |
Draw the unit info into top-panel.
| unit | Pointer to unit. |
|
static |
| void DrawUserDefinedButtons | ( | ) |
Draw user defined buttons.
| UStrInt GetComponent | ( | const CUnit & | unit, |
| int | index, | ||
| EnumVariable | e, | ||
| int | t | ||
| ) |
Get component for unit variable.
Return the value corresponding.
| unit | Unit. |
| index | Index of the variable. |
| e | Component of the variable. |
| t | Which var use (0:unit, 1:Type, 2:Stats) |
| UStrInt GetComponent | ( | const CUnitType & | type, |
| int | index, | ||
| EnumVariable | e, | ||
| int | t | ||
| ) |
Get component for unit type variable.
|
static |
|
static |
| void SetMaxMessageCount | ( | int | newMax | ) |
max message count
| void SetMessage | ( | const char * | fmt, |
| ... | |||
| ) |
Set message to display.
| fmt | To be displayed in text overlay. |
Set message to display.
| pos | Message pos map origin. |
| fmt | To be displayed in text overlay. |
| void ShiftMessagesEvent | ( | ) |
Shift messages events array by one.
| void ToggleShowMessages | ( | ) |
show/hide messages
Draw life bar of a unit at x,y. Placed under icons on top-panel.
| unit | Pointer to unit. |
| x | Screen X position of icon |
| y | Screen Y position of icon |
Draw mana bar of a unit at x,y. Placed under icons on top-panel.
| unit | Pointer to unit. |
| x | Screen X position of icon |
| y | Screen Y position of icon |
| void UpdateMessages | ( | ) |
Update messages.
Update messages
| void UpdateTimer | ( | ) |
Update the timer.
Update the timer
|
static |
|
static |
FIXME: docu.
|
static |
|
static |
coordinate of event
|
static |
Number of event messages.
|
static |
Array of event messages.
1.8.17
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.