Skip to main content
GameDev.net gamedev.net
🔒 Locked

color bits

Started by pag May 24, 2003 at 12:26 PM 1 replies 200+ views
Original Post
pag
pag
Why doesnt this become red, in 16-bit mode? (added spacing so you could see better) unsigned short color = 0x11111 000000 00000; instead it becomes black. In the next 80 years 6 billion people will die... [edited by - pag on May 24, 2003 1:26:53 PM]
I am a signature virus. Please add me to your signature so that I may multiply.
Namethatnobodyelsetook
Namethatnobodyelsetook
Because 0x doesn''t mean binary, it means hex. A short can hold 2 bytes (4 hex digits) of data, and your lowest 4 digits are 0, or black.
Dreamforger
Dreamforger
and what you wanted to have is 0xF800

Look next door for something similiar

[edited by - Dreamforger on May 24, 2003 2:51:33 PM]
I may be getting older, but I refuse to grow up

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.