Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trying to compile on VS 2013 Community  (Read 1819 times)

Reelya

  • Bay Watcher
    • View Profile
Trying to compile on VS 2013 Community
« on: September 06, 2015, 08:46:31 am »

<EDIT> Scratch everything I wrote about not being able to compile. I found my mistake (reading the readme should have been the first thing I did).

I did find an actual issue that was an error in the source code, one of the files uses mem_fun but doesn't reference the header where this is defined, which is <functional>. I just stuck that in the file that needed it rather than throw in in the include.h path.

Doing everything through one huge #include is really dumb. I'm sure that adds a heap to compile time. I'm a big fan of every cpp file #including just the functionality that they need. That way, you can see the dependencies quickly for any file by looking at the top of the file rather than having to guess which files might break if you change a specific thing.
« Last Edit: September 06, 2015, 11:51:34 am by Reelya »
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Trying to compile on VS 2013 Community
« Reply #1 on: September 12, 2015, 11:31:37 am »

Doing everything through one huge #include is really dumb. I'm sure that adds a heap to compile time. I'm a big fan of every cpp file #including just the functionality that they need. That way, you can see the dependencies quickly for any file by looking at the top of the file rather than having to guess which files might break if you change a specific thing.
I agree entirely.  In Eclipse, it even complains if you try to do that with Java (sort of).
Putting everything in includes.h completely defeats some central aspects of object oriented programming.
Fixing it, however, is likely a bigger challenge than what we're working on already.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Purple Gorilla

  • Bay Watcher
    • View Profile
Re: Trying to compile on VS 2013 Community
« Reply #2 on: September 13, 2015, 02:49:29 pm »

Other problems are also some unfortunate macros and the interface methods.

The macros GIVE_WEAPON_CIVILLIAN, GIVE_GENDER_MALE and GIVE_GENDER_FEMALE in creaturetypes.cpp insert big chunks of code, and should be repaced with functions. If you use compiler optimisation, the compiler chokes on this file, probably trying to find it out itself.

The other problems are the interface methods, that do nothing than returning a value. Declaring everything public will make a lot of things easier. I am pretty sure, the compiler will resolve interface methods itself, but it still increases readability. Another problem with interface methods is, that it is more difficult to write "cheats" for debugging, as changing a variable in an object from outside isn't possible without another interface method.

Further, should it be avoided to use features that the unmodded game didn't use. In the LCS-nightly Mod, the modder used nullptr instead of NULL, and Java-style for loops, breaking the downward compatiblity with no gain at all. This is easy to fix for an experienced programmer, but Taberone now tried two months to compile it -> http://www.bay12forums.com/smf/index.php?topic=152165.0 .

Reelya

  • Bay Watcher
    • View Profile
Re: Trying to compile on VS 2013 Community
« Reply #3 on: September 13, 2015, 10:50:00 pm »

I was wondering, who has admin rights for the SVN etc, I made some productive improvements to one of the source files as a test in refactoring and streamlining the code (in a totally-not-breaking-compatibility way), but I really want to be able to integrate these changes back into the project before I spend any significant time on doing something like that. A lot of bad features have been in there for a long time and I think the game needs a big refactoring effort more than it needs piecemeal mods. Basically for the reason that every time people want to mod something basic into the game we need to tell them the same pile of bullshit about all the lines of code that need to change. Reducing that would spur more, and more comprehensive mods.

Carlos Gustavos

  • Bay Watcher
    • View Profile
Re: Trying to compile on VS 2013 Community
« Reply #4 on: September 16, 2015, 07:16:01 am »

Jonathan has admin rights.
Logged

Reelya

  • Bay Watcher
    • View Profile
Re: Trying to compile on VS 2013 Community
« Reply #5 on: September 16, 2015, 07:53:45 am »

I was kinda afraid if that. Jonathan hasn't logged in since the start of the year. So can you clarify/confirm what that means in terms of updating the trunk build? Is it impossible to push/merge etc without admin privileges? Or is admin a higher level than general contributor?

If there's no other way, making a new repo for further development would be necessary at some point.
« Last Edit: September 16, 2015, 07:59:03 am by Reelya »
Logged

SlatersQuest

  • Bay Watcher
    • View Profile
Re: Trying to compile on VS 2013 Community
« Reply #6 on: September 16, 2015, 09:21:01 am »

Is it possible to reach Jonathan? We kinda need him.
Logged

Carlos Gustavos

  • Bay Watcher
    • View Profile
Re: Trying to compile on VS 2013 Community
« Reply #7 on: September 16, 2015, 10:08:16 am »

I and a bunch of others can commit changes without Jonathan. He'd probably give you commit rights too if you asked. He's been permissive on allowing people to participate.

As for reaching him, if pming doesn't work his website gives his email address: jonathansfox@gmail.com
Logged