[AStyle] : max-instatement-indent=60
This commit is contained in:
parent
bf3425cfbb
commit
74dc1989e1
9 changed files with 19 additions and 18 deletions
|
@ -411,7 +411,7 @@ static inline int AStarAddNode(const Vec2i &pos, int o, int costs)
|
|||
midDist = MyAbs(open->pos.x - AStarGoalX) + MyAbs(open->pos.y - AStarGoalY);
|
||||
if (costs > midcost || (costs == midcost
|
||||
&& (costToGoal > midCostToGoal || (costToGoal == midCostToGoal
|
||||
&& dist > midDist)))) {
|
||||
&& dist > midDist)))) {
|
||||
smalli = midi;
|
||||
} else if (costs < midcost || (costs == midcost
|
||||
&& (costToGoal < midCostToGoal || (costToGoal == midCostToGoal
|
||||
|
|
|
@ -651,7 +651,7 @@ static bool SelectOrganicUnitsInTable(std::vector<CUnit *> &table)
|
|||
** @return number of units found
|
||||
*/
|
||||
static void SelectSpritesInsideRectangle(int sx0, int sy0, int sx1, int sy1,
|
||||
std::vector<CUnit *> &table)
|
||||
std::vector<CUnit *> &table)
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
|
|
|
@ -921,7 +921,7 @@ int main(int argc, char **argv)
|
|||
// Look for the specified data set inside the application bundle
|
||||
// This should be a subdir of the Resources directory
|
||||
CFURLRef pluginRef = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
|
||||
CFSTR(MAC_BUNDLE_DATADIR), NULL, NULL);
|
||||
CFSTR(MAC_BUNDLE_DATADIR), NULL, NULL);
|
||||
CFStringRef macPath = CFURLCopyFileSystemPath(pluginRef, kCFURLPOSIXPathStyle);
|
||||
const char *pathPtr = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding());
|
||||
Assert(pathPtr);
|
||||
|
|
|
@ -1376,10 +1376,10 @@ void CInfoPanel::Draw()
|
|||
for (i = 0; i < (NumSelected > (int)UI.SelectedButtons.size() ?
|
||||
(int)UI.SelectedButtons.size() : NumSelected); ++i) {
|
||||
Selected[i]->Type->Icon.Icon->DrawUnitIcon(ThisPlayer,
|
||||
UI.SelectedButtons[i].Style,
|
||||
(ButtonAreaUnderCursor == ButtonAreaSelected && ButtonUnderCursor == i) ?
|
||||
(IconActive | (MouseButtons & LeftButton)) : 0,
|
||||
UI.SelectedButtons[i].X, UI.SelectedButtons[i].Y, "");
|
||||
UI.SelectedButtons[i].Style,
|
||||
(ButtonAreaUnderCursor == ButtonAreaSelected && ButtonUnderCursor == i) ?
|
||||
(IconActive | (MouseButtons & LeftButton)) : 0,
|
||||
UI.SelectedButtons[i].X, UI.SelectedButtons[i].Y, "");
|
||||
UiDrawLifeBar(Selected[i],
|
||||
UI.SelectedButtons[i].X, UI.SelectedButtons[i].Y);
|
||||
|
||||
|
@ -1481,8 +1481,8 @@ static void DrawInfoPanelMultipleSelected()
|
|||
bool mouseOver = (ButtonAreaUnderCursor == ButtonAreaSelected && ButtonUnderCursor == i);
|
||||
|
||||
Selected[i]->Type->Icon.Icon->DrawUnitIcon(button->Style,
|
||||
mouseOver ? (IconActive | (MouseButtons & LeftButton)) : 0,
|
||||
button->X, button->Y, "");
|
||||
mouseOver ? (IconActive | (MouseButtons & LeftButton)) : 0,
|
||||
button->X, button->Y, "");
|
||||
UiDrawLifeBar(*Selected[i], button->X, button->Y);
|
||||
|
||||
if (mouseOver) {
|
||||
|
|
|
@ -570,7 +570,7 @@ void LoadUnitTypeSprite(CUnitType &type)
|
|||
}
|
||||
if (!resinfo->FileWhenLoaded.empty()) {
|
||||
resinfo->SpriteWhenLoaded = CPlayerColorGraphic::New(resinfo->FileWhenLoaded,
|
||||
type.Width, type.Height);
|
||||
type.Width, type.Height);
|
||||
resinfo->SpriteWhenLoaded->Load();
|
||||
if (type.Flip) {
|
||||
resinfo->SpriteWhenLoaded->Flip();
|
||||
|
@ -578,7 +578,7 @@ void LoadUnitTypeSprite(CUnitType &type)
|
|||
}
|
||||
if (!resinfo->FileWhenEmpty.empty()) {
|
||||
resinfo->SpriteWhenEmpty = CPlayerColorGraphic::New(resinfo->FileWhenEmpty,
|
||||
type.Width, type.Height);
|
||||
type.Width, type.Height);
|
||||
resinfo->SpriteWhenEmpty->Load();
|
||||
if (type.Flip) {
|
||||
resinfo->SpriteWhenEmpty->Flip();
|
||||
|
|
|
@ -259,9 +259,9 @@ static void DrawBuildingCursor()
|
|||
|
||||
if (f && (ontop ||
|
||||
CanBuildOn(posIt, MapFogFilterFlags(*ThisPlayer, posIt,
|
||||
mask & ((NumSelected && Selected[0]->tilePos == posIt) ?
|
||||
~(MapFieldLandUnit | MapFieldSeaUnit) : -1)))) &&
|
||||
Map.IsFieldExplored(*ThisPlayer, posIt)) {
|
||||
mask & ((NumSelected && Selected[0]->tilePos == posIt) ?
|
||||
~(MapFieldLandUnit | MapFieldSeaUnit) : -1))))
|
||||
&& Map.IsFieldExplored(*ThisPlayer, posIt)) {
|
||||
color = ColorGreen;
|
||||
} else {
|
||||
color = ColorRed;
|
||||
|
|
|
@ -255,7 +255,7 @@ void CGraphic::DrawFrameClipTrans(unsigned frame, int x, int y, int alpha) const
|
|||
** @param y y coordinate on the screen
|
||||
*/
|
||||
void CPlayerColorGraphic::DrawPlayerColorFrameClip(int player, unsigned frame,
|
||||
int x, int y)
|
||||
int x, int y)
|
||||
{
|
||||
if (!UseOpenGL) {
|
||||
GraphicPlayerPixels(Players[player], *this);
|
||||
|
@ -432,7 +432,7 @@ void CGraphic::DrawFrameClipTransX(unsigned frame, int x, int y, int alpha) cons
|
|||
** @param y y coordinate on the screen
|
||||
*/
|
||||
void CPlayerColorGraphic::DrawPlayerColorFrameClipX(int player, unsigned frame,
|
||||
int x, int y)
|
||||
int x, int y)
|
||||
{
|
||||
if (!UseOpenGL) {
|
||||
GraphicPlayerPixels(Players[player], *this);
|
||||
|
@ -892,7 +892,7 @@ void CGraphic::Flip()
|
|||
|
||||
for (int frame = 0; frame < NumFrames; ++frame) {
|
||||
frameFlip_map[frame].x = (SurfaceFlip->w - (frame % (SurfaceFlip->w /
|
||||
Width)) * Width) - Width;
|
||||
Width)) * Width) - Width;
|
||||
frameFlip_map[frame].y = (frame / (SurfaceFlip->w / Width)) * Height;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ static mng_bool MNG_DECL my_readdata(mng_handle handle, mng_ptr buf, mng_uint32
|
|||
}
|
||||
|
||||
static mng_bool MNG_DECL my_processheader(mng_handle handle, mng_uint32 width,
|
||||
mng_uint32 height)
|
||||
mng_uint32 height)
|
||||
{
|
||||
Uint32 Rmask;
|
||||
Uint32 Gmask;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
--indent=force-tab=4
|
||||
--lineend=linux
|
||||
--min-conditional-indent=0
|
||||
--max-instatement-indent=60
|
||||
--keep-one-line-statements
|
||||
--keep-one-line-blocks
|
||||
--indent-preprocessor
|
||||
|
|
Loading…
Reference in a new issue