Curso de introducción a videojuegos multiplataforma con SDL
Curso de introducción a videojuegos multiplataforma con SDL
Curso de introducción a videojuegos multiplataforma con SDL
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Curso</strong> <strong>de</strong> <strong>introducción</strong> a vi<strong>de</strong>ojuegos <strong>multiplataforma</strong> <strong>con</strong> <strong>SDL</strong><br />
© 2004 – Bruno González (STenyaK)<br />
Pablo Orduña (NcTrun)<br />
Eventos - II<br />
● Un “evento” será un <strong>SDL</strong>_Event<br />
– Este tipo es una unión que tendrá:<br />
● Un dato “Uint8 type”, que nos indicará el tipo<br />
<strong>de</strong> evento<br />
● Uno <strong>de</strong> los posibles tipos <strong>de</strong> datos <strong>de</strong><br />
diferentes eventos (<strong>SDL</strong>_KeyboardEvent,<br />
<strong>SDL</strong>_MouseMotionEvent...)<br />
– Es una unión, por lo que sólo se almacena<br />
uno <strong>de</strong> los datos.<br />
● Pero todos los posibles tipos <strong>de</strong> datos <strong>de</strong><br />
diferentes eventos tienen como primer dato un<br />
“Uint8” -> <strong>con</strong> ev.type sabemos el tipo.<br />
e-ghost – ESIDE – Universidad <strong>de</strong> Deusto