$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <stdio.h>
#include <stdlib.h>
#include "stratagus.h"
#include "unittype.h"
#include "player.h"
#include "unit.h"
#include "actions.h"
#include "map.h"
#include "interface.h"
#include "pathfinder.h"
Functions | |
action_unload.cpp - The unload action. | |
static bool | FindUnloadPosition (const CUnit &transporter, const CUnit &unit, const Vec2i startPos, int maxRange, Vec2i *res) |
static int | UnloadUnit (CUnit &transporter, CUnit &unit) |
static bool | IsDropZonePossible (const CUnit &transporter, const Vec2i &pos) |
static bool | ClosestFreeDropZone_internal (const CUnit &transporter, const Vec2i &startPos, int maxRange, Vec2i *resPos) |
static int | ClosestFreeDropZone (CUnit &transporter, const Vec2i &startPos, int maxRange, Vec2i *resPos) |
static int | MoveToDropZone (CUnit &unit) |
static void | LeaveTransporter (CUnit &transporter) |
void | HandleActionUnload (CUnit &unit) |
Handle command unload. |
static int ClosestFreeDropZone | ( | CUnit & | transporter, | |
const Vec2i & | startPos, | |||
int | maxRange, | |||
Vec2i * | resPos | |||
) | [static] |
Find the closest available drop zone for a transporter. Fail if transporter don't transport any unit..
transporter | the transporter | |
startPos | start location for the search | |
maxRange | The maximum distance from initial position to search... | |
resPos | drop zone position |
static bool ClosestFreeDropZone_internal | ( | const CUnit & | transporter, | |
const Vec2i & | startPos, | |||
int | maxRange, | |||
Vec2i * | resPos | |||
) | [static] |
Find the closest available drop zone for a transporter. Fail if transporter don't transport any unit..
transporter | the transporter | |
startPos | start location for the search | |
maxRange | The maximum distance from initial position to search... | |
resPos | drop zone position |
static bool FindUnloadPosition | ( | const CUnit & | transporter, | |
const CUnit & | unit, | |||
const Vec2i | startPos, | |||
int | maxRange, | |||
Vec2i * | res | |||
) | [static] |
Find a free position close to startPos
transporter | ||
unit | Unit to unload. | |
startPos | Original search position | |
maxrange | maximal range to unload. | |
res | Unload position. |
void HandleActionUnload | ( | CUnit & | unit | ) |
Handle command unload.
The transporter unloads a unit.
unit | Pointer to unit. |
Return true is possition is a correct place to drop out units.
transporter | Transporter unit. | |
pos | position to drop out units. |
static void LeaveTransporter | ( | CUnit & | transporter | ) | [static] |
Make one or more unit leave the transporter.
unit | Pointer to unit. |
static int MoveToDropZone | ( | CUnit & | unit | ) | [static] |
Move to dropzone.
unit | Pointer to unit. |
Reappear unit on map.
unit | Unit to drop out. |