Displaying the score???

Started by
12 comments, last by viper716 20 years, 11 months ago
quote:
How do I space out the text I have on the same line?

#include <sstream>

std::stringstream ss;
ss << "Score: " << iScore;

dc.DrawText(ss.str().c_str(), ...);

quote:Also how do I update the score?

I haven't used DrawText() before, but I would guess that you redraw it in the update part of your main game loop.

[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]

[edited by - Lektrix on May 28, 2003 6:23:02 PM]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]
Advertisement
quote:Original post by micepick
0x00BBGGRR
Isn''t that supposed to be 0x00RRGGBB ? I just wrote an image processing program and I remember that I did >> 16 to extract the red value.

quote:Original post by alnite
Isn't that supposed to be 0x00RRGGBB ? I just wrote an image processing program and I remember that I did >> 16 to extract the red value.

I thought so too, but I looked it up on MSDN. Apparently, the GDI uses BBGGRR.

[edited by - micepick on May 28, 2003 7:16:17 PM]
lol, I wrote my program in Java, no wonder it works.
damn, why don''t they just stick with one universal format..this is confusing.

This topic is closed to new replies.

Advertisement