08.05.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<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 />

Filtrado <strong>de</strong> eventos - II<br />

● Po<strong>de</strong>mos <strong>de</strong>finir una función tal que:<br />

– int miFuncion(<strong>con</strong>st <strong>SDL</strong>_Event * ev);<br />

● que <strong>de</strong>vuelva 1 cuando queramos que se<br />

incluya en la cola<br />

● que <strong>de</strong>vuelva 0 cuando NO queremos que sea<br />

incluida.<br />

● Y luego establecerla como filtro <strong>con</strong>:<br />

– void <strong>SDL</strong>_SetEventFilter(<strong>SDL</strong>_EventFilter filtro);<br />

– type<strong>de</strong>f (*<strong>SDL</strong>_EventFilter)(<strong>con</strong>st <strong>SDL</strong>_Event*ev);<br />

© 2004 – Bruno González (STenyaK)<br />

Pablo Orduña (NcTrun)<br />

e-ghost – ESIDE – Universidad <strong>de</strong> Deusto

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!