barryg613 / uqm-hd

Automatically exported from code.google.com/p/uqm-hd
0 stars 0 forks source link

Shipyard & Modules code need better comments #200

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For 2x Resolution graphics, requested by Jaakko.

I would like additional comments in the code on some of the variable names and 
numbers in the code so I can tweak them to match any of the graphics. Certain 
things like the shipyard appear to be halved 4x graphics which doesn't align up 
correctly.  

The things I would like documented are the shipyard, and module screens.

By documenting the code a little bit more, I can make small changes without 
requiring Jaakko and I to go back and forth like we did before.

Setting this at medium priority, because it's useless to me if it slips to the 
next milestone.  But I don't consider it that high of a priority. Just 
something nice to have.

Original issue reported on code.google.com by dczanik@gmail.com on 28 Feb 2013 at 9:42

GoogleCodeExporter commented 8 years ago
I've now commented the shipyard.c's defined constants in a better way. 

The outfit.c is a horrible clutter and commenting it would take as long as the 
fixes I've made today (3 hours, give or take).  If there's not anything 
pressing there I won't start commenting it any time soon although that might be 
shooting myself in the foot :-p

Original comment by Jaakko.M...@gmail.com on 10 Mar 2013 at 10:41

GoogleCodeExporter commented 8 years ago
Make no mistake, it would indeed benefit me and other programmers enormously to 
comment the outfit.c code properly - to see which drawRectangle() draws a black 
box to hide the uppermost lines of an empty slot box etc.

However, it wouldn't be as much use to you as a graphician since the 
coordinates, widths and heights are given in the code in quite a convoluted 
way... because of the multiple resolutions, there are no simple defined 
constants any more. In many places it takes multiplications of constants by 
RESOLUTION_FACTOR and an added RES_CASE plus maybe some other ugly fixes. This 
makes it pretty difficult to read.

It's IMO much faster to just play the game and use an on-screen ruler to 
measure how many pixels all necessary gfx should be apart / tall / wide etc.

Original comment by Jaakko.M...@gmail.com on 11 Mar 2013 at 8:35