[AStyle]
This commit is contained in:
parent
c43b9c2e1d
commit
359d0078e3
5 changed files with 5 additions and 6 deletions
src
|
@ -233,8 +233,7 @@ private:
|
|||
class AiBuildQueue
|
||||
{
|
||||
public:
|
||||
AiBuildQueue() : Want(0), Made(0), Type(NULL), Wait(0)
|
||||
{
|
||||
AiBuildQueue() : Want(0), Made(0), Type(NULL), Wait(0) {
|
||||
Pos.x = Pos.y = -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -484,7 +484,7 @@ static bool AiRequestSupply()
|
|||
if (j) {
|
||||
if (!cache[0].needmask) {
|
||||
CUnitType &type = *cache[0].type;
|
||||
Vec2i invalidPos = {-1, -1};
|
||||
Vec2i invalidPos = { -1, -1};
|
||||
if (AiMakeUnit(type, invalidPos)) {
|
||||
AiBuildQueue newqueue;
|
||||
newqueue.Type = &type;
|
||||
|
|
|
@ -1198,7 +1198,7 @@ static void CclParseBuildQueue(lua_State *l, PlayerAi *ai, int offset)
|
|||
LuaError(l, "incorrect argument");
|
||||
}
|
||||
|
||||
Vec2i pos = {-1, -1};
|
||||
Vec2i pos = { -1, -1};
|
||||
|
||||
const int args = lua_rawlen(l, offset);
|
||||
for (int k = 0; k < args; ++k) {
|
||||
|
|
|
@ -178,7 +178,7 @@ extern long isqrt(long num);
|
|||
|
||||
|
||||
template <typename T>
|
||||
void clamp(T* value, T minValue, T maxValue)
|
||||
void clamp(T *value, T minValue, T maxValue)
|
||||
{
|
||||
Assert(minValue < maxValue);
|
||||
|
||||
|
|
|
@ -252,7 +252,7 @@ static unsigned char CalculateVolume(bool isVolume, int power, unsigned char ran
|
|||
static char CalculateStereo(const CUnit &unit)
|
||||
{
|
||||
int stereo = ((unit.tilePos.x * PixelTileSize.x + unit.Type->TileWidth * PixelTileSize.x / 2 +
|
||||
unit.IX - UI.SelectedViewport->MapPos.x * PixelTileSize.x) * 256 /
|
||||
unit.IX - UI.SelectedViewport->MapPos.x * PixelTileSize.x) * 256 /
|
||||
((UI.SelectedViewport->MapWidth - 1) * PixelTileSize.x)) - 128;
|
||||
clamp(&stereo, -128, 127);
|
||||
return stereo;
|
||||
|
|
Loading…
Add table
Reference in a new issue