power level

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

power level

Post by Ezio » 17 Nov 2014, 12:55

we had

Code: Select all

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

Image
Image
Please Read FAQ, Dev Wiki and Search forum for same post before posting

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 » 18 Nov 2014, 03:34

Ah! So that's where those pixels went. I have been looking all over for them.

User avatar
Iluvalar
Regular
Regular
Posts: 1782
Joined: 02 Oct 2010, 18:44

Re: power level

Post by Iluvalar » 21 Nov 2014, 02:47

the curve each side is outside the box I guess...
Heretic 2.3 improver and proud of it.

User avatar
Ezio
Trained
Trained
Posts: 305
Joined: 24 Apr 2010, 16:42

Re: power level

Post by Ezio » 22 Nov 2014, 08:16

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 ).
Image
Please Read FAQ, Dev Wiki and Search forum for same post before posting

CesarIII
New user
Posts: 5
Joined: 15 Dec 2014, 00:02

Re: power level

Post by CesarIII » 22 Dec 2014, 03:20

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: 712
Joined: 17 Jan 2010, 23:35

Re: power level

Post by Cyp » 24 Dec 2014, 10:32

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