Afr0Games / Project-Dollhouse

A project aiming to rebuild TSO (The Sims Online) from the ground up. Inspired by CorsixTH.
http://www.afr0games.com
117 stars 24 forks source link

Change resolution via parameters #159

Closed ghost closed 9 years ago

ghost commented 9 years ago

You got code from me. Thanks to @LetsRaceBwoi for helping me figure out this one last compiler error I faced.

xezno commented 9 years ago

You could have made it dynamic (i.e. remove -r from the string and parse the two integers) but hey this is a good start. Welcome to the code. Permission to merge? @Afr0Games/owners

Afr0 commented 9 years ago

Looks OK on a glance. I'm trusting you on this one, LetsRace. Merge!

riperiperi commented 9 years ago

I can't make code comments because I'm blocked from your repository apparently? I'll just post them all here.

The old implementation that inferred the resolution from the string seemed like a more eloquent and flexible solution, why not fix that up?

        // 
        /// <summary>
        /// Converts and outputs a string array into a proper
        /// string using the Join method.
        /// </summary>
        /// <remarks>http://www.dotnetperls.com/convert-string-array-string</remarks>
        /// <param name="array"></param>
        static string ConvertStringArrayToStringJoin(string[] array)
        {
            //
            // Use string Join to concatenate the string elements.
            //
            string result = string.Join("", array);
            return result;
        }

Why did you implement a function for a one liner? Considering string.Join("", array); is pretty self explanatory anyways, this is a waste of space.

ghost commented 9 years ago

I was tired. I'll get rid of it.

riperiperi commented 9 years ago

Not the summary, the existence of the function in the first place.

ghost commented 9 years ago

Oh. It was the only way I could make it work without getting errors.

riperiperi commented 9 years ago
string userRes = string.Join("", args);

????

ghost commented 9 years ago

Hey, it worked. xD Anyway, phasing that out for the old implementation. Will commit it in a sec.

ghost commented 9 years ago

My implementation has been removed in favour of the older, more dynamic, one. Feel free to merge.

xezno commented 9 years ago

Looks good from my perspective.

Afr0 commented 9 years ago

Merged.

ghost commented 9 years ago

Thank you.