Simple game programming question
In all the game programming books I see a type that Im unfamiliar with BYTE what is it and what does it mean when
dest = (BYTE*)ddsd.lpSurface;
Thank You for your help
==--When the time comes you will realize but no sooner.--==
November 15, 2000 12:40 PM
BYTE is defined as an unsigned char
i.e. an 8bits which can hold a number from 0-255
BYTE* means a pointer to type BYTE
so,
dest = (BYTE*)ddsd.lpSurface
takes the address ddsd.lpSurface, and converts it to a pointer to type BYTE, and puts this in dest (which should be of type BYTE *)
i.e. an 8bits which can hold a number from 0-255
BYTE* means a pointer to type BYTE
so,
dest = (BYTE*)ddsd.lpSurface
takes the address ddsd.lpSurface, and converts it to a pointer to type BYTE, and puts this in dest (which should be of type BYTE *)
(this is called casting, by the way)
==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================
==============================
"Need more eeenput..."
- #5, "Short Circuit"
==============================
Drew Sikora
Executive Producer
GameDev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement