power level

For code related discussions and questions
Post Reply
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

power level

Post by Ezio »

we had

Code: Select all

#define POW_BARWIDTH	308
but actual image from screenshot was 316px, where did extra 8px comes from?.

Image
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: power level

Post by stiv »

Ah! So that's where those pixels went. I have been looking all over for them.
User avatar
Iluvalar
Regular
Regular
Posts: 1828
Joined: 02 Oct 2010, 18:44

Re: power level

Post by Iluvalar »

the curve each side is outside the box I guess...
Heretic 2.3 improver and proud of it.
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

Re: power level

Post by Ezio »

Iluvalar wrote:the curve each side is outside the box I guess...
assuming you use 640x480

Code: Select all

int POW_X = OBJ_BACKX + 12; //  24 + 132 + 6 + 12= 174
int POW_Y = (OBJ_BACKY + OBJ_BACKHEIGHT + 6); //  324+ 115  +6 = 445
int POW_BARWIDTH = 308;
X and Y would give most top-left of power bar, added with 308 it would end at most right of 'build screen' (menu above power bar). still there's an appendix near map ( 8px extra ).
CesarIII
New user
Posts: 5
Joined: 15 Dec 2014, 00:02

Re: power level

Post by CesarIII »

Ezio wrote:X and Y would give most top-left of power bar, added with 308 it would end at most right of 'build screen' (menu above power bar). still there's an appendix near map ( 8px extra ).
I suppose you are talking about this:

Image

The 8px you mention could be because of the rounded parts (4px + 4px). The size of both the bar and the building menu stay the same in this old screenshot (couldn't find the game version), so my guess is that it should be a problem with the bar position (which confirms the appendix you are talking about):

Image
Cyp
Evitcani
Evitcani
Posts: 784
Joined: 17 Jan 2010, 23:35

Re: power level

Post by Cyp »

Think there's a way of seeing the bounding rectangles in the master branch by pressing some key combination. But as far as I remember, some of the bounding rectangles don't actually make sense.
Post Reply