Search found 80 matches

by Slidy
January 13th, 2020, 1:44 pm
Forum: Everything
Topic: Visual Studio editing tricks
Replies: 10
Views: 3964

Re: Visual Studio editing tricks

What does outlining do exactly? Just tried it out and looks to me just like un-collapsing everything (same as Ctrl+M,P does).
by Slidy
January 11th, 2020, 1:54 am
Forum: Everything
Topic: Visual Studio editing tricks
Replies: 10
Views: 3964

Re: Visual Studio editing tricks

And a couple more code navigation shortcuts:

Ctrl + K, O - Switches between .h/.cpp
Ctrl + - - Goes "back" (could be to where your cursor was before in current file or to the previous file you were at)
by Slidy
January 11th, 2020, 1:49 am
Forum: Everything
Topic: Visual Studio editing tricks
Replies: 10
Views: 3964

Re: Visual Studio editing tricks

Reminds me of another shortcut I use often: Ctrl + X (with nothing highlighted/selected) - Cuts current line Ctrl + C (with nothing highlighted/selected) - Copys current line Whenever I want to duplicate a line multiple times I use that second one. Something like this: Ctrl + C Ctrl + V (x5) will co...
by Slidy
January 10th, 2020, 7:22 am
Forum: Everything
Topic: Visual Studio editing tricks
Replies: 10
Views: 3964

Re: Visual Studio editing tricks

Couple more shortcuts I like: Editing: Ctrl + Left/Right - Moves cursor one word in that direction Ctrl + Backspace/Delete - Deletes one word Home - Goes to beginning of line End - Goes to end of line Code navigation: Ctrl + T - Opens a textbox where you can type the name of anything you want to loo...
by Slidy
December 19th, 2019, 8:32 am
Forum: Everything
Topic: What to do?
Replies: 28
Views: 10136

Re: What to do?

ECS would be another design pattern I can't seem to wrap my head around. I had a little trouble understanding it at first too, what helped me with that was looking at open-source ECS library implementations and example usages of them. In the end, I didn't really like the very strict separation of e...
by Slidy
December 16th, 2019, 2:21 pm
Forum: Everything
Topic: What to do?
Replies: 28
Views: 10136

Re: What to do?

I feel the same way sometimes where I am stuck thinking about how I want to structure my code. Usually solve it in one of 2 ways: 1) Write out how I would want the interface / usage to be before actually writing the code for it, then work around that when implementing it 2) Abandon any thoughts abou...
by Slidy
August 27th, 2019, 1:55 am
Forum: Everything
Topic: Can someone help me set up SFML?
Replies: 9
Views: 5110

Re: Can someone help me set up SFML?

I've had troubles with vcpkg too, bit finicky and not always reliable, especially since the ports are all community maintained. Still, when it does work it's 👌
by Slidy
August 25th, 2019, 3:30 am
Forum: Everything
Topic: The usefulness of bit packing
Replies: 10
Views: 5074

Re: The usefulness of bit packing

Definitely disagree there. If I type Foo and hit my intellisense, it tells me i got 3 bools and tells me their names. EZPZ. With your situation, all I get is <int flags>. Oh great, now I gotta go digging in the docs to try and find this shit. :kms: Flags are easier for skimming code (esp. without a...
by Slidy
August 25th, 2019, 3:27 am
Forum: Everything
Topic: Re snek game tutorial 14b.
Replies: 4
Views: 2057

Re: Re snek game tutorial 14b.

When you have const objects you can only call their const functions. The issue here is that you have a const board& brd variable but getwidth() is not declared as const . The simple solution here is to just chuck a const on getwidth() Side note: I hate your all no-caps and no-underscores naming styl...
by Slidy
August 21st, 2019, 1:47 pm
Forum: Everything
Topic: The usefulness of bit packing
Replies: 10
Views: 5074

Re: The usefulness of bit packing

I'd much prefer named flags than bool params for functions, even if there's a low amount.

This:

Code: Select all

Foo( FLAG_DELETE_SYSTEM64 | FLAG_ENGAGE_NUCLEAR_REACTOR | FLAG_KILL_EVERYONE );
is sexier than this:

Code: Select all

Foo( true, false, true );