NerdsVsZombies entrega 1.h


/ Published in: C
Save to your folder(s)

NerdsVsZombies entrega 1 . h


Copy this code and paste it in your HTML
  1. typedef struct regDades
  2. {
  3. int x;
  4. int y;
  5. struct T_SPRITE *apuntador;
  6. };
  7.  
  8. typedef struct regDadesZombie
  9. {
  10. struct regDades dades;
  11. int graficZombieActiu;
  12. int vidaZombie;
  13. };
  14.  
  15. typedef struct regDadesNerd
  16. {
  17. struct regDades dades;
  18. struct regDades dispar;
  19. int graficNerdActiu;
  20. int disparActiu;
  21. int zombieDavant;
  22. };
  23.  
  24. typedef struct regInfo
  25. {
  26. struct regDadesZombie tZombie[10];
  27. struct regDadesNerd tNerd[5];
  28. struct T_SPRITE *background;
  29. int ZombiesMorts;
  30. int JocFinalitzat;
  31. };
  32.  
  33. int NerdsVsZombies_Init(struct regInfo *reg);
  34.  
  35. int NerdsVsZombies_Tick(struct regInfo *reg);
  36.  
  37. void NerdsVsZombies_Draw(struct regInfo *reg);
  38.  
  39. void CreacioZombie(struct regInfo *reg);
  40.  
  41. void AvancarZombie(struct regInfo *reg);
  42.  
  43. void FinalitzarJoc(struct regInfo *reg);
  44.  
  45. int ComprovarObjectiu(struct regInfo *reg);
  46.  
  47. int ComprovarZombieEsquerra(struct regInfo *reg);
  48.  
  49. int ComprovarZombieMort(struct regInfo *reg, int index);
  50.  
  51. void AugmentarZombiesMorts(struct regInfo *reg);
  52.  
  53. void EsborrarZombie(struct regInfo *reg, int index);
  54.  
  55. void AvancarDispars(struct regInfo *reg);
  56.  
  57. void ComprovarZombieDavant(struct regInfo *reg, int indexNerd, int indexZombie);
  58.  
  59. void ActivarDispar(struct regInfo *reg, int indexNerd);
  60.  
  61. int ComprovarXocDisparZombie(struct regInfo *reg, int indexNerd,int indexZombie);
  62.  
  63. void DisminuirVidaZombie(struct regInfo *reg, int indexZombie);
  64.  
  65. void EsborrarDispar(struct regInfo *reg, int indexNerd);
  66.  
  67. int ComprovarXocNerdZombie(struct regInfo *reg, int indexNerd,int indexZombie);
  68.  
  69. void EliminarNerd(struct regInfo *reg, int indexNerd);
  70.  
  71. int ComprovarNerdsMaxims(struct regInfo *reg, int maximNerds);
  72.  
  73. int UltimLlocLliureNerd(struct regInfo *reg);
  74.  
  75. void CrearNerd(struct regInfo *reg, int indexNerd);
  76.  
  77. int UltimNerdCreat(struct regInfo *reg, int maximNerds);
  78.  
  79. void NerdsVsZombies_Release();
  80.  
  81. enum{
  82. TICK_RESULT_EXIT,
  83. TICK_RESULT_OK
  84. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.