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 L}objetos[ESCALERA].hab=0;objetos[ESCALERA].lotengo=1;printf("\nHas cogido las escaleras.");} else {printf("\nEl perro gruñe y ladra y no te <strong>de</strong>ja cogerlo.");}if (accion == 0)printf("\nNo pue<strong>de</strong>s hacer eso.");}// darif (!strcmp(verbo,"dar")) {accion = 0;// Huesoif (!strcmp(nombre,"hueso") && objetos[HUESO].lotengo == 1 && objetos[PERRO].hab ==habitacionActual) {accion = 1;objetos[HUESO].lotengo=0;objetos[PERRO].estado=2;printf("\nEl perro coge el hueso y se retira a comerselo tranquilamente.");}}if (accion == 0)printf("\nNo pue<strong>de</strong>s hacer eso.");// usarif (!strcmp(verbo,"usar")) {accion = 0;// Huesoif (!strcmp(nombre,"llave") && objetos[LLAVE].lotengo == 1 && habitacionActual == 8) {accion = 1;printf("\nENHORABUENA!!! Has escapado <strong>de</strong> la mansión <strong>de</strong>l terror.");done = 1;}}if (accion == 0)printf("\nNo pue<strong>de</strong>s hacer eso.");// irif (!strcmp(verbo,"ir")) {accion = 0;// norteif (!strcmp(nombre,"norte") && habitaciones[habitacionActual].norte != 0) {accion = 1;habitacionActual=habitaciones[habitacionActual].norte;}// surif (!strcmp(nombre,"sur") && habitaciones[habitacionActual].sur != 0) {accion = 1;habitacionActual=habitaciones[habitacionActual].sur;}// esteif (!strcmp(nombre,"este") && habitaciones[habitacionActual].este != 0) {accion = 1;habitacionActual=habitaciones[habitacionActual].este;}// oesteif (!strcmp(nombre,"oeste") && habitaciones[habitacionActual].oeste != 0) {accion = 1;habitacionActual=habitaciones[habitacionActual].oeste;}21

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

Saved successfully!

Ooh no, something went wrong!