____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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 <unit_manager.h>
Public Member Functions | |
| void | Init () |
| CUnit * | AllocUnit () |
| void | ReleaseUnit (CUnit *unit) |
| void | Save (CFile *file) |
Definition at line 48 of file unit_manager.h.
| void CUnitManager::Init | ( | void | ) |
Initial memory allocation for units.
Definition at line 59 of file unit_manager.cpp.
References MAX_UNIT_SLOTS, and UnitSlotFree.
Referenced by CleanUnits(), InitUnits(), and main1().
| CUnit * CUnitManager::AllocUnit | ( | ) |
Allocate a new unit
Definition at line 78 of file unit_manager.cpp.
References GameCycle, CUnit::Init(), NoUnitP, CUnit::Slot, and UnitSlotFree.
Referenced by MakeUnit().
| void CUnitManager::ReleaseUnit | ( | CUnit * | unit | ) |
Release a unit
| unit | Unit to release |
Definition at line 110 of file unit_manager.cpp.
References GameCycle, and CUnit::Refs.
Referenced by CclSlotUsage(), and CUnit::Release().
| void CUnitManager::Save | ( | CFile * | file | ) |
Save state of unit manager to file.
| file | Output file. |
Definition at line 121 of file unit_manager.cpp.
References CFile::printf(), and UnitSlotFree.
Referenced by SaveUnits().
1.5.6