what is the (HBRUSH) in (HBRUSH)GetStockObject(WHITE_BRUSH)
do? is it type-casting? and if it is, how come it''s not like this
HBRUSH(GetStockObject(WHITE_BRUSH));
okey more questions hope you guys don''t mind,
palette -> in games nowadays, is this still being used? palettes are only used in 256 colors right? and games nowadays don''t have the few colors right? more explanation in palettes are greatly appreciated thanks!
DDB and DIB -> okey, i know what this two thing means, what i don''t know is how to differentiate between them. Anyway, are there still DDB''s around? again, more explanation will be greatly appreciated, thanks guys!
p.s., do i have to concern myself about these 2 things in games programming?
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
quote: Original post by mickey
...is it type-casting?
Yes.
quote: ..how come it''s not like this
HBRUSH(GetStockObject(WHITE_BRUSH));
Convention. Both ways work fine; the first is C-style casting while the second is the C++-encouraged style.
quote: palette..
Palettes aren''t strictly restricted to 256-color games, but most games these days don''t need/have/use them. You may still find instances where palettes come in useful, especially if you target handheld platforms (PocketPC, GBA...)
quote: DDB and DIB...
I haven''t seen any good reason to worry about device-dependent bitmaps in recent years. Various operating system libraries/APIs seem to take care of that in entirety.
December 04, 2001 10:04 AM
wow, thanks that helped a bit
anyway okey last question, correct me if i''m wrong, the only use for a palette is to change the colors of a bit? hehe, please it would be better if you could explain it yourself and how come games nowadays don''t use them? thanks
anyway okey last question, correct me if i''m wrong, the only use for a palette is to change the colors of a bit? hehe, please it would be better if you could explain it yourself and how come games nowadays don''t use them? thanks
The palette was created on earlier video cards to give access to all the available colours. However, the limitation is that you can only display 256 of them at any one time. The palette is an index to an 8 bit memory location, and the 2 that follow, that holds the red, green and blue colour components. The cool thing you can do with a palette is to change the colour values in the memory location and all colours on the screen, that point to that index, will instantly change to the new colour.
---
Make it work.
Make it right.
Make it fast.
---
Make it work.
Make it right.
Make it fast.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
please please answer this, coz i wanna make sure if i understand it thoroughly, so basically am right?
and... palettes are no longer used today coz 256 colors are now rarely used in windows games platforms?
Edited by - mickey on December 6, 2001 12:00:12 PM
and... palettes are no longer used today coz 256 colors are now rarely used in windows games platforms?
Edited by - mickey on December 6, 2001 12:00:12 PM
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
quote: Original post by mickey
please please answer this, coz i wanna make sure if i understand it thoroughly, so basically am right?
and... palettes are no longer used today coz 256 colors are now rarely used in windows games platforms?
Edited by - mickey on December 6, 2001 12:00:12 PM
Thats right. Today programmers prefer 16/24/32 bits.
Hello from my world
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement