____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "unittype.h"
#include "upgrade.h"
#include "interface.h"
#include "network.h"
#include "player.h"
Go to the source code of this file.
Functions | |
| bool | ButtonCheckTrue (const CUnit *unit, const ButtonAction *button) |
| < Check is always true | |
| bool | ButtonCheckFalse (const CUnit *unit, const ButtonAction *button) |
| Check if allowed units exists. | |
| bool | ButtonCheckUnitsOr (const CUnit *unit, const ButtonAction *button) |
| Check if allowed units exists. | |
| bool | ButtonCheckUnitsAnd (const CUnit *unit, const ButtonAction *button) |
| Check if have network play. | |
| bool | ButtonCheckNetwork (const CUnit *unit, const ButtonAction *button) |
| Check if don't have network play. | |
| bool | ButtonCheckNoNetwork (const CUnit *unit, const ButtonAction *button) |
| Check if unit isn't working (train). | |
| bool | ButtonCheckNoWork (const CUnit *unit, const ButtonAction *button) |
| Check if all requirements for an attack to are meet. | |
| bool | ButtonCheckAttack (const CUnit *unit, const ButtonAction *button) |
Definition in file button_checks.cpp.
| bool ButtonCheckAttack | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if all requirements for an attack are met.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 180 of file button_checks.cpp.
References CUnitType::CanAttack, and CUnit::Type.
Referenced by CclDefineButton(), and IsButtonAllowed().
| bool ButtonCheckFalse | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if allowed units exists.
Check for button enabled, always false. This needed to overwrite the internal tests.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 73 of file button_checks.cpp.
Referenced by CclDefineButton().
| bool ButtonCheckNetwork | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if don't have network play.
Check if network play is enabled.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 138 of file button_checks.cpp.
References IsNetworkGame.
Referenced by CclDefineButton().
| bool ButtonCheckNoNetwork | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if unit isn't working (train).
Check if network play is disabled.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 153 of file button_checks.cpp.
References IsNetworkGame.
Referenced by CclDefineButton().
| bool ButtonCheckNoWork | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if all requirements for an attack to are meet.
Check for button enabled, if the unit isn't working. Working is training.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 167 of file button_checks.cpp.
References CUnit::Orders, and UnitActionTrain.
Referenced by CclDefineButton().
| bool ButtonCheckTrue | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
< Check is always true
ButtonCheck for button enabled, always true. This needed to overwrite the internal tests.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 59 of file button_checks.cpp.
Referenced by CclDefineButton().
| bool ButtonCheckUnitsAnd | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if have network play.
Check for button enabled, if all units are available.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 111 of file button_checks.cpp.
References ButtonAction::AllowStr, CPlayer::HaveUnitTypeByIdent(), new_strdup(), and CUnit::Player.
Referenced by CclDefineButton().
| bool ButtonCheckUnitsOr | ( | const CUnit * | unit, | |
| const ButtonAction * | button | |||
| ) |
Check if allowed units exists.
Check for button enabled, if any unit is available.
| unit | Pointer to unit for button. | |
| button | Pointer to button to check/enable. |
Definition at line 86 of file button_checks.cpp.
References ButtonAction::AllowStr, CPlayer::HaveUnitTypeByIdent(), new_strdup(), and CUnit::Player.
Referenced by CclDefineButton().
1.5.6