10.07.2015 Views

[ebook]Programacion de videojuegos con SDL

[ebook]Programacion de videojuegos con SDL

[ebook]Programacion de videojuegos con SDL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

P R O G R A M A C I Ó N D E V I D E O J U E G O S C O N S D Lstruct naveenemiga {int activo,x,y,dx,dy,tipo,estado,impactos,nframe;} enemigo[7];struct explosion {int activo,x,y,nframe;} exp[8];struct disparo {int activo,x,y,dx,dy,estado,time;} disp[8];int dx=2,dy=2;void creaexplosion(int);void creadispenemigo(int);void ResetTimeBase(void);void creajefe(void);void LoadLevel(int);int CurrentTime(void);void DrawScene(<strong>SDL</strong>_Surface *screen) {int i,j,t,x,y;char msg[30];// movimiento <strong>de</strong>l scenario (scroll)indice_in+=2;if (indice_in>=64) {indice_in=0;indice-=10;}if (indice

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

Saved successfully!

Ooh no, something went wrong!