[AStyle]
This commit is contained in:
parent
e295fc7d0e
commit
ef28ab5a84
4 changed files with 8 additions and 7 deletions
src
|
@ -110,7 +110,7 @@ private:
|
|||
void DrawMapFogOfWar() const;
|
||||
|
||||
public:
|
||||
//private:
|
||||
//private:
|
||||
PixelPos TopLeftPos; /// Screen pixel top-left corner
|
||||
PixelPos BottomRightPos; /// Screen pixel bottom-right corner
|
||||
|
||||
|
|
|
@ -778,8 +778,8 @@ void DrawPopup(const ButtonAction *button, const CUIButton *uibutton)
|
|||
case ButtonBuild:
|
||||
case ButtonTrain:
|
||||
case ButtonUpgradeTo:
|
||||
memcpy(Costs, UnitTypes[button->Value]->Stats[ThisPlayer->Index].Costs,
|
||||
sizeof(UnitTypes[button->Value]->Stats[ThisPlayer->Index].Costs));
|
||||
memcpy(Costs, UnitTypes[button->Value]->Stats[ThisPlayer->Index].Costs,
|
||||
sizeof(UnitTypes[button->Value]->Stats[ThisPlayer->Index].Costs));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -617,7 +617,7 @@ static void HandleMouseOn(int x, int y)
|
|||
if (NumSelected == 1 && Selected[0]->Type->CanTransport() && Selected[0]->BoardCount) {
|
||||
const size_t size = UI.TransportingButtons.size();
|
||||
|
||||
for (size_t i = std::min<size_t>(Selected[0]->BoardCount, size); i != 0; ) {
|
||||
for (size_t i = std::min<size_t>(Selected[0]->BoardCount, size); i != 0;) {
|
||||
--i;
|
||||
if (UI.TransportingButtons[i].Contains(screenPos)) {
|
||||
ButtonAreaUnderCursor = ButtonAreaTransporting;
|
||||
|
@ -909,7 +909,7 @@ void UIHandleMouseMove(int x, int y)
|
|||
// NOTE: If unit is not selectable as a goal, you can't get a cursor hint
|
||||
if (UnitUnderCursor != NULL && !UnitUnderCursor->IsVisibleAsGoal(*ThisPlayer) &&
|
||||
!ReplayRevealMap) {
|
||||
UnitUnderCursor = NoUnitP;
|
||||
UnitUnderCursor = NoUnitP;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1477,8 +1477,9 @@ bool CUnit::IsVisibleInViewport(const CViewport *vp) const
|
|||
int x = tilePos.x * PixelTileSize.x + IX - (Type->Width - Type->TileWidth * PixelTileSize.x) / 2 + Type->OffsetX;
|
||||
int y = tilePos.y * PixelTileSize.y + IY - (Type->Height - Type->TileHeight * PixelTileSize.y) / 2 + Type->OffsetY;
|
||||
const PixelSize vpSize = vp->GetPixelSize();
|
||||
const PixelPos vpTopLeftMapPos = {vp->MapX * PixelTileSize.x + vp->OffsetX,
|
||||
vp->MapY * PixelTileSize.y + vp->OffsetY};
|
||||
const PixelPos vpTopLeftMapPos = {vp->MapX *PixelTileSize.x + vp->OffsetX,
|
||||
vp->MapY *PixelTileSize.y + vp->OffsetY
|
||||
};
|
||||
const PixelPos vpBottomRightMapPos = vpTopLeftMapPos + vpSize;
|
||||
|
||||
if (x + Type->Width < vpTopLeftMapPos.x || x > vpBottomRightMapPos.x
|
||||
|
|
Loading…
Add table
Reference in a new issue