Author Topic: Improvements and some bug fixes, will someone merge?  (Read 7122 times)

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #30 on: March 11, 2013, 07:00:19 PM »
The crafting.h thing is my mistake, I'll revert it once I get home.

As for //CAT: I can just remove it before making a pull request.

The code is up to date with the latest, at least whatever was latest last night.

I can add you as a contributor to the branch but you have to make an account and get git to do anything.

It seems to me you then able to merge any of those changes, all I need is some way to upload updates to lazycat branch and then you can merge with the master whatever you like whenever you like. As far as I am concern I can upload files to Mediafire  or directly to git, whichever suits you.

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #31 on: March 11, 2013, 08:01:03 PM »
FYI, I tried to review your changes, but you shuffled things around so much that it's too much trouble to review.  If you want this considered for inclusion, please either post clean patches with just the functional changes, or make a github account and make some clean commits.

I think my changes are extremely simple and clean. Can you be more specific, what is confusing you, exactly?


Quote
By clean I mean without extraneous whitespace, line ordering, or bracketing style changes.  Those make the changes too difficult to review.  I can't tell what you did in map::draw(), which is the part I'm most interested in.

Ay, caramba! White-spaces and proper bracketing is what makes it easier to read. Anyway, in map:draw I commented out these lines:

Code: [Select]
/*
   // Don't display area as shadowy if it's outside and illuminated by natural light
   else if (dist <= g->u.sight_range(g->natural_light_level()))
   {
       lowlight_sight_range = std::max(g_light_level, natural_sight_range);
   }
*/

As I said that's all it matters to fix the bug. Everything else that is there or other things that are missing is just bunch of stuff for my personal musings. All that other stuff which I did not mention when I explained these changes were not meant for merge, they just happen to be there as well. Eventually, in the meantime, it became this (rounded lights):


Flashlight, outdoors and indoors.


Three flashlights and a candle on the ground, holding a torch.

Offline Reservoir

  • Survivor
  • ***
  • Posts: 303
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #32 on: March 11, 2013, 09:21:42 PM »
Did you fix the craft thing? I cant board up windows or move furniture

Offline Tase

  • Zombie Food
  • *
  • Posts: 99
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #33 on: March 11, 2013, 09:46:17 PM »
The crafting.h thing is my mistake, I'll revert it once I get home.

As for //CAT: I can just remove it before making a pull request.

The code is up to date with the latest, at least whatever was latest last night.

I can add you as a contributor to the branch but you have to make an account and get git to do anything.

It seems to me you then able to merge any of those changes, all I need is some way to upload updates to lazycat branch and then you can merge with the master whatever you like whenever you like. As far as I am concern I can upload files to Mediafire  or directly to git, whichever suits you.

It's not as simple as uploading files, you need to connect to git with a client to upload your modifications.

Anyway, for now you can upload (mediafire) a clean map.cpp with just your changes (no reordering variables, no changing indentation, no new brackets, just different numbers and characters) so Kevin can check out what you did in map.cpp.

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #34 on: March 12, 2013, 03:39:29 AM »
Did you fix the craft thing? I cant board up windows or move furniture

This is not release build, only to test the change mentioned in the opening post. Yes, moving furniture has been fixed since I made the compile, it works in this build Tase merged yesterday. I have nothing to do with how crafting works or doesn't work, my changes could only impact whether display gets refreshed properly.


EDIT: Ooops, funny enough moving furniture actually still doesn't work in the master build. Have no idea why does it work in my branch then, Tase mergining somehow fixed it.

EDIT2: Nope, it sometimes works and sometimes it doesn't, for some strange reason. Try to restart the game or start a new one and maybe it will work.
« Last Edit: March 12, 2013, 03:59:53 AM by LazyCat »

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #35 on: March 12, 2013, 04:38:55 AM »
It's not as simple as uploading files, you need to connect to git with a client to upload your modifications.

Anyway, for now you can upload (mediafire) a clean map.cpp with just your changes (no reordering variables, no changing indentation, no new brackets, just different numbers and characters) so Kevin can check out what you did in map.cpp.

Just comment out these lines:
Code: [Select]
/*
   // Don't display area as shadowy if it's outside and illuminated by natural light
   else if (dist <= g->u.sight_range(g_light_level)) {
    low_sight_range = std::max(g_light_level, natural_sight_range);
   }
*/

He needs to check his own code, it's not me who wrote that.

I write code the way I write, and it's much better than how you guys write it. I will not lower my standard to suit that awful formatting. I don't see how such trivial things as indentation and bracketing matter anyway, you can make it ugly yourself, plus you can always make those changes from scratch if you think that would be easier. I can't be any more helpful than to give you the source code. Take it or leave it.

Offline Shades

  • Contributor
  • Zombie Food
  • ****
  • Posts: 61
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #36 on: March 12, 2013, 08:24:39 AM »
I write code the way I write, and it's much better than how you guys write it.

Yes the style we have inherited is poor, and it's slowly being shifted but we'd rather do it function at a time as people make major changes. Besides which it's just common courtesy to match your changes to whomever's code your modifying, it's not like it's hard.
« Last Edit: March 12, 2013, 08:26:40 AM by Shades »

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #37 on: March 12, 2013, 09:10:14 AM »
I write code the way I write, and it's much better than how you guys write it.

Yes the style we have inherited is poor, and it's slowly being shifted but we'd rather do it function at a time as people make major changes. Besides which it's just common courtesy to match your changes to whomever's code your modifying, it's not like it's hard.

When it is properly formatted with tabs you can still use editor settings to display it the way you want it. But when you use spaces then you can not, at least my editor can't. If you prefer to waste time typing multiple spaces instead of one tab stroke that's fine, but don't ask me to do it, it's unproductive and impractical, it's wrong way to do it. Why would I make things worse and harder for myself? That would be insane. It's enough trouble I have to unscramble it  first in order read it properly, to see where one thing ends and another one begins, due to that terrible bracketing style.

I will not be merging this anyway, and who ever does can format it however they like, rename variables and do other such modification. I need my copy of the code to be functional and practical for me. But what are we even talking about here, I just wrote this block of code:

Code: [Select]
float cat_vel= veh->velocity*1.5;
if(cat_vel > 10000) cat_vel= 10000;
float cat_sin = sin(veh->turn_dir*M_PI/180)* cat_vel;
float cat_cos = cos(veh->turn_dir*M_PI/180)* cat_vel;

u.view_offset_y= (int)cat_sin/1000;
u.view_offset_x= (int)cat_cos/1000;

The rest are one line changes and 90% of that are just commenting out existing stuff. So what are we even talking about here? You want me to write above code by using 24 space characters instead of 6 tabs, and minus one enter, like this:

Code: [Select]
    float cat_vel= veh->velocity*1.5;
    if(cat_vel > 10000) cat_vel= 10000;
    float cat_sin = sin(veh->turn_dir*M_PI/180)* cat_vel;
    float cat_cos = cos(veh->turn_dir*M_PI/180)* cat_vel;
    u.view_offset_y= (int)cat_sin/1000;
    u.view_offset_x= (int)cat_cos/1000;

Well, there it is.

Offline Shades

  • Contributor
  • Zombie Food
  • ****
  • Posts: 61
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #38 on: March 12, 2013, 12:32:33 PM »
If your using tabs, which is also my preferred method, you can convert to the single space system by just piping your changes through tr '\t' ' ' before sharing it for a merge.

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #39 on: March 12, 2013, 06:24:42 PM »
If your using tabs, which is also my preferred method, you can convert to the single space system by just piping your changes through tr '\t' ' ' before sharing it for a merge.

Perhaps if it was me making changes to the master branch, but it's not. Beside there is nothing to reformat, it's all at least as good as the rest of the code where you already have anything from one to four spaces indents, and tabs, and both styles of bracketing. This is non-issue and not worth talking about. Whoever is reviewing, copy pasting or re-creating these changes can in the same time format it and rename variables anyway they like. There are bugs, and there are bug fixes. Apply or use those bug fixes any way you want, just fix the bugs already, that's all it matters.

Offline Tase

  • Zombie Food
  • *
  • Posts: 99
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #40 on: March 13, 2013, 01:24:15 AM »
Apply or use those bug fixes any way you want, just fix the bugs already, that's all it matters.

Ok I've fixed it up, should be up to date with your changes and the latest revision.
« Last Edit: March 13, 2013, 02:13:46 AM by Tase »

Offline LazyCat

  • Survivor
  • ***
  • Posts: 406
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #41 on: March 14, 2013, 10:44:29 AM »
Updates...

Windows binary and source code:
http://www.mediafire.com/?kzbw5lajzxncjhb


NEW BUG FIXES:
- more optimisation, all windows should be refreshing properly
- fixed disappearing headlights when car gets out of the view
- included torch to give off light when on the ground 

NEW MODIFICATION:
- cruise speed does not turn off upon hard impact, just sets to zero
- (Windows) messages use light gray text instead of dark gray
- (Windows) some brighter colors and more similar to Linux version

NEW ADDITIONS:
- rounded lights for carrying light sources and on the ground
- road yellow lines visible with night vision and under low light
- night vision with  two shades of green, for lit and non-lit areas



Offline Drakasin

  • NPC
  • **
  • Posts: 178
    • View Profile
Re: Improvements and some bug fixes, will someone merge?
« Reply #42 on: March 15, 2013, 05:53:35 PM »
Thanks!

He who fights with monsters should look to it that he himself does not become a monster. And when you gaze long into an abyss the abyss also gazes into you.