Advertisement

Simple game programming question

Started by November 15, 2000 12:33 PM
2 comments, last by astrocyberhound 24 years, 2 months ago
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.--==
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 *)

Advertisement
(this is called casting, by the way)

==============================
"Need more eeenput..."

- #5, "Short Circuit"
==============================

Drew Sikora
Executive Producer
GameDev.net

Thank you very much for answering that even though its a begginers question
==--When the time comes you will realize but no sooner.--==

This topic is closed to new replies.

Advertisement