Search found 4373 matches

by albinopapa
January 4th, 2022, 10:40 pm
Forum: Everything
Topic: Trouble reading bitmap files 2
Replies: 10
Views: 5295

Re: Trouble reading bitmap files 2

There is also a C/C++ utility function that you could have used: std::isprint.

If you want to read about it: std::isprint
by albinopapa
January 4th, 2022, 10:37 pm
Forum: Everything
Topic: Common issues
Replies: 11
Views: 33841

Re: Common issues

Maybe. You could also try uninstalling, then reinstalling. I know the videos start with VS2015, but later move to VS 2017 and I can't remember if the tutorials use any features that aren't available in VS2015. I know if you follow the "STD Gems" videos you'll need at least VS2017, so maybe at least ...
by albinopapa
January 4th, 2022, 9:02 am
Forum: Everything
Topic: Trouble reading bitmap files 2
Replies: 10
Views: 5295

Re: Trouble reading bitmap files 2

Looks like you fixed most of the things I had posted about previously. The only thing I still see is: if (count < numplayers) Game(*wind); The compiler will probably skip over this because you aren't assigning Game to anything. Right now, the only other advice I might have is not using new/delete, b...
by albinopapa
January 4th, 2022, 8:45 am
Forum: Everything
Topic: Trouble reading bitmap files 2
Replies: 10
Views: 5295

Re: Trouble reading bitmap files 2

Look at this line in Font::drawText

Code: Select all

		if (ch >= '~')
You sure ch should be >= '~'?
Printable characters are between space ' ' and tilde '~' or 30 - 126 inclusive.
by albinopapa
January 4th, 2022, 6:01 am
Forum: Everything
Topic: C++ function declarations
Replies: 1
Views: 10934

C++ function declarations

template<rectangle RectType, math_vector VectorType, dimensions SizeType> [[nodiscard]] constexpr auto from_center( VectorType const& position, SizeType const& dimension )noexcept { using element_type = typename RectType::element_type; return from_center<RectType>( static_cast< element_type >( posi...
by albinopapa
January 4th, 2022, 5:36 am
Forum: Everything
Topic: Should I use VStudio 19 or VStudio 22?
Replies: 5
Views: 2849

Re: Should I use VStudio 19 or VStudio 22?

Glad to hear it. Good luck with the tutorials.
by albinopapa
January 3rd, 2022, 11:35 pm
Forum: Everything
Topic: Trouble reading bitmap files 2
Replies: 10
Views: 5295

Re: Trouble reading bitmap files 2

sweet
by albinopapa
January 3rd, 2022, 9:50 pm
Forum: Everything
Topic: Trouble reading bitmap files 2
Replies: 10
Views: 5295

Re: Trouble reading bitmap files 2

The other thing I would do is initialize your bitmap header and bitmap info header using = {}; This sets all members to 0. Without initializing to 0, you get random numbers like the 52428 number for instance. This would be another indicator that something didn't load. This also makes it way simpler ...
by albinopapa
January 3rd, 2022, 9:47 pm
Forum: Everything
Topic: Trouble reading bitmap files 2
Replies: 10
Views: 5295

Re: Trouble reading bitmap files 2

There are several things to address here, but I'll address the bitmap info thing first. Something to add to the loading of the file in Surface that might shed some light on the subject. std::ifstream file( filename, std::ios::binary ); if( !file.is_open() ) throw std::runtime_error( "File not in cur...
by albinopapa
January 3rd, 2022, 7:14 pm
Forum: Everything
Topic: Common issues
Replies: 11
Views: 33841

Re: Common issues

Good deal, glad it worked out.