Search found 3801 matches

by albinopapa
September 14th, 2019, 10:28 pm
Forum: Everything
Topic: Got tired of naming things
Replies: 2
Views: 18

Re: Got tired of naming things

Yeah. I'm working on a few tasks right now. I'm kind of struggling with some choices though. My mind is all over the place, I could probably benefit from some medication lol. One of the things I like about C++ over other languages is operator and function overloading. I love being able to call a sin...
by albinopapa
September 14th, 2019, 2:02 am
Forum: Everything
Topic: Collision Functions
Replies: 6
Views: 76

Re: Collision Functions

by albinopapa
September 14th, 2019, 2:01 am
Forum: Everything
Topic: Sprite Drawing Tools
Replies: 11
Views: 111

Re: Sprite Drawing Tools

Don't know why I took your original comment as snobbish, sorry. Welcome.
by albinopapa
September 12th, 2019, 11:48 am
Forum: Everything
Topic: Got tired of naming things
Replies: 2
Views: 18

Got tired of naming things

template<typename T> auto __vectorcall operator<<( T left, int _count )noexcept { assert( _count >= 0 && "_count must be positive." ); if constexpr( traits::is_floating_point_v<T> ) { auto const false_mask = _mm_setzero_ps(); auto const true_mask = _mm_cmpeq_ps( _mm_setzero_ps(), _mm_setzero_ps() )...
by albinopapa
September 9th, 2019, 6:33 pm
Forum: Everything
Topic: Sprite Drawing Tools
Replies: 11
Views: 111

Re: Sprite Drawing Tools

Hope the explanation or reason for your previous usage was in error was helpful at least.
by albinopapa
September 9th, 2019, 6:31 pm
Forum: Everything
Topic: Collision Functions
Replies: 6
Views: 76

Re: Collision Functions

It's been kind of slow around here lately.
by albinopapa
September 6th, 2019, 7:26 am
Forum: Everything
Topic: Sprite Drawing Tools
Replies: 11
Views: 111

Re: Sprite Drawing Tools

You are reserving, but not resizing.
rects.reserve(NUMRECTS);
All this does is allocates space for NUMRECTS, but the size is still 0. You can use rects.resize(NUMRECTS)

Or, you can call .emplace_back() or .push_back() on all the new elements.
by albinopapa
September 5th, 2019, 7:07 pm
Forum: Everything
Topic: Learning and messing around
Replies: 17
Views: 1043

Re: Learning and messing around

good luck
by albinopapa
August 28th, 2019, 11:08 pm
Forum: Everything
Topic: Creating a Visual Studio Solution for a large c++ project
Replies: 1
Views: 50

Re: Creating a Visual Studio Solution for a large c++ project

Visual Studio does support cmake building of projects, but using CMake GUI is a lot easier. You have a source ( where the CMakeLists.txt is ) You have a destination ( where you want to "build" your project. There's a "Configure" button where you can choose your compiler and architecture. Once you cl...
by albinopapa
August 27th, 2019, 6:36 pm
Forum: Everything
Topic: Convoluted code
Replies: 2
Views: 56

Re: Convoluted code

struct main_loop_vars { Timer fps_timer; int frame_count = 0; bool is_quit = false; }; for( auto vars = main_loop_vars{}; !vars.is_quit; vars.frame_count = ( vars.frame_count + 1 ) % 600 ) { for( auto msg = MSG{}; PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) && msg.message != WM_QUIT; vars.is_quit = ...