$treeview $search $mathjax
Stratagus  2.2.7
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

src/action/action_resource.cpp File Reference

#include "stratagus.h"
#include "action/action_resource.h"
#include "animation.h"
#include "interface.h"
#include "iolib.h"
#include "map.h"
#include "pathfinder.h"
#include "player.h"
#include "script.h"
#include "sound.h"
#include "ui.h"
#include "unit.h"
#include "unit_find.h"
#include "unittype.h"

Classes

class  NearReachableTerrainFinder

action_resource.cpp - The generic resource action.

#define SUB_START_RESOURCE   0
#define SUB_MOVE_TO_RESOURCE   5
#define SUB_UNREACHABLE_RESOURCE   31
#define SUB_START_GATHERING   55
#define SUB_GATHER_RESOURCE   60
#define SUB_STOP_GATHERING   65
#define SUB_MOVE_TO_DEPOT   70
#define SUB_UNREACHABLE_DEPOT   100
#define SUB_RETURN_RESOURCE   120
static bool FindNearestReachableTerrainType (int movemask, int resmask, int range, const CPlayer &player, const Vec2i &startPos, Vec2i *terrainPos)
static void AnimateActionHarvest (CUnit &unit)
int GetNumWaitingWorkers (const CUnit &mine)
 Hash calculated to find sync failures.
void AiNewDepotRequest (CUnit &worker)

Define Documentation

#define SUB_GATHER_RESOURCE   60

#define SUB_MOVE_TO_DEPOT   70

#define SUB_MOVE_TO_RESOURCE   5

#define SUB_RETURN_RESOURCE   120

#define SUB_START_GATHERING   55

#define SUB_START_RESOURCE   0

#define SUB_STOP_GATHERING   65

#define SUB_UNREACHABLE_DEPOT   100

#define SUB_UNREACHABLE_RESOURCE   31


Function Documentation

void AiNewDepotRequest ( CUnit worker  ) 

static void AnimateActionHarvest ( CUnit unit  )  [static]

Animate a unit that is harvesting

Parameters:
unit Unit to animate

static bool FindNearestReachableTerrainType ( int  movemask,
int  resmask,
int  range,
const CPlayer player,
const Vec2i startPos,
Vec2i terrainPos 
) [static]

int GetNumWaitingWorkers ( const CUnit mine  ) 

Hash calculated to find sync failures.

(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.