forked from littlebalup/Zelda3T
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommon.h
115 lines (88 loc) · 6.02 KB
/
Common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
Zelda Time to Triumph
Copyright (C) 2007-2009 Vincent Jouillat
Please send bugreports with examples or suggestions to www.zeldaroth.fr
*/
#ifndef __COMMON_H__
#define __COMMON_H__
#define CASE 16 // taille d'une case en pixel
#define ANIM_REFRESH 120 // intervale entre les anims
#include <sstream>
#include <iostream>
#include <fstream>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
using namespace std;
enum Direction {N, S, O, E};
enum Collision { VIDE = -1, LIBRE = 0, PLEIN = 1, SEMI_PLEIN = 2, BAS = 3,
HAUT = 4, DROITE = 5, GAUCHE = 6, BAS_DROITE = 7, BAS_GAUCHE = 8,
HAUT_DROITE = 9, HAUT_GAUCHE = 10, BOIS = 11, EAU = 12, GLACE = 13, BLOC = 14};
enum Type_Anim {AUCUNE, MARCHE, EPEE, SPIN, NAGE, ARC, GRAPPIN, BOMBE, BFEU, BGLACE,
LANTERNE, MARTEAU, JOUE, BOIRE, NOYADE, FLOTTE, LOURD, SOULEVE, PORTE, EMMENE, TOUCHE,
LANCE, POUSSE, CHUTE, MORT, PECHE, RAME, BARQUE, WAGON};
enum Type_Attaque {COUP_EPEE, EPEE_SPIN, FLECHE, COUP_GRAPPIN, FEU, COUP_GLACE, PROJECTILE,
EXPLOSION,COUP_MARTEAU, POT, CAISSE, MAGIE, ENNEMI, LAPIN, RETOUR, DEMI, VENIN, HYMNE_VIDE,
CHANT_ESPRIT, COLERE, ASPIRE, MORTEL, SAOUL, ARGENT, OMBRE};
enum Type_Def {CRAINT, X2, RESISTE, INVUL};
enum Type_Objets {O_ARC, O_GRAPPIN, O_SAC_BOMBES, O_BFEU, O_BGLACE, O_LANTERNE,
O_MARTEAU, O_PALMES, O_GANTS, O_LIVRE, O_BOTTES, O_CARTE, O_ENCYCL, O_OCARINA,
O_MASQUE, O_CANNE, O_BOUTEILLE, O_TROC1, O_TROC2, O_TROC3, O_TROC4, O_FFEU,
O_FGLACE, O_FLUM, O_PERLE, O_CLE_TEMPS, O_ARC_OR, O_DETECTEUR, O_POISSONS,
O_SAC_TROC, O_BARQUE, O_RECUP_FLECHE, O_RECUP_BOMBE, O_BONUS_FORCE, O_BONUS_DEFENSE};
enum Type_Marchandises {M_RIZ, M_EPICES, M_OLIVES, M_PERLES, M_PLUME, M_POULET, M_TAPISSERIE,
M_AMULETTE, M_PARFUM, M_ROC_MAGMA, M_ROC_GIVRE, M_POIVRON, M_ROUAGE, M_JAUGE, M_ROUE,
M_SOURCE_ENERGIE};
enum Type_Items {I_RIEN, I_RUBIS_VERT, I_RUBIS_BLEU, I_RUBIS_ROUGE, I_PETIT_COEUR,
I_FLECHE, I_BOMBE, I_MAGIE_PEU, I_MAGIE_BCP, I_QUART_COEUR, I_EPEE, I_CRISTAL,
I_EXCALIBUR, I_PETITE_CLE, I_TRIFORCE, I_ARC, I_COEUR, I_GEMME, I_PLANCHES,
I_DETECTEUR, I_BOUTEILLE, I_BONUS_FORCE, I_BONUS_DEFENSE,I_PIECE_1,I_PIECE_2,I_PIECE_3,
I_GANON_1,I_GANON_2,I_GANON_5, I_PENDENTIF_V, I_PENDENTIF_B, I_PENDENTIF_R, I_CLE_TEMPS,
I_GEMME_JAUNE, I_GEMME_VERTE, I_GEMME_BLEUE, I_GEMME_ROUGE};
enum Type_Contenu {C_RIEN = 0, C_BOUCLIER = 1011, C_EPEE = 316, C_QUART_COEUR = 3, C_BOTTES = 267,
C_BOUTEILLE = 392, C_CARTE=325, C_BOUSSOLE=943, C_CLE_BOSS=944, C_CLE=945, C_GANTS=951,
C_CRISTAL=198, C_BOUCLIER_R=332, C_GRAPPIN=634, C_LANTERNE=955, C_PALMES=956, C_MARTEAU=963,
C_BFEU=970, C_BGLACE=968, C_EXCALIBUR=328, C_TRIFORCE=1110, C_LIVRE=760, C_MEDAILLON=948,
C_MIMAGIE=361, C_POTION_ROUGE=417, C_POTION_VERTE=418, C_POTION_BLEUE=419,C_ARC=947,
C_PAIE=436, C_EPEE_R=747, C_GANTS_R=964, C_ARC_FEE=966, C_COEUR=946, C_SAC_BOMBES=143,
C_TUNIQUE_BLEUE=961, C_TUNIQUE_ROUGE=1091, C_OCARINA=1080, C_MASQUE=1342, C_BOUCLIER_J=972,
C_MASQUE_ONI=1342, C_TEMPS_INV=904, C_CHANT_ENVOL=903, C_TEMPS_ACC=905,
C_GEMME=39, C_RIZ=101, C_EPICES=152, C_OLIVES=104, C_PERLES=149, C_PLUME=98, C_POULET=94,
C_TAPISSERIE=217, C_AMULETTE=170, C_PARFUM=270, C_ROC_MAGMA=146, C_ROC_GIVRE=280,
C_POIVRON=623, C_ROUAGE=79, C_JAUGE=349, C_ROUE=140, C_SOURCE_ENERGIE=1058, C_BOURSE_1 = 1012,
C_BOURSE_2=85, C_BOURSE_3=88, C_BOURSE_4=91, C_BALAIS=111, C_CONFITURE=184,
C_PERLE_LUNE=128, C_BOURSE_11=695, C_BOURSE_12=131, C_BOURSE_13=134, C_BOURSE_14=137,
C_BOURSE_21=772, C_BOURSE_22=161, C_BOURSE_23=164, C_BOURSE_24=167, C_DETTE=208,
C_MARTEAU2=244, C_POUDRE_OR=294, C_ENCLUME=303, C_HACHE=313, C_CARTE_V=455,
C_RIZ_10=334, C_EPICES_10=335, C_OLIVES_10=336, C_PLANCHES=340, C_DETECTEUR=389,
C_BONUS_FORCE=397, C_BONUS_DEFENSE=402, C_FAC_RIEN=430, C_CANNE_1=477,
C_CANNE_2=489, C_CANNE_3=494, C_VIRE=499, C_VIELLE_BOTTE=510, C_FFEU=573,
C_FGLACE=579, C_FLUM=584, C_PLAN_PONT=618, C_BIJOUX=684, C_CROISSANT=692,
C_FER_A_CHEVAL=725, C_CLOCHETTE=732, C_MIRROIR=738, C_BIERRE=784, C_CORDE=827,
C_MARTEAU3=831, C_ALL_RIEN=838, C_LETTRE=863, C_SCIE=892, C_BOUTEILLE_VIN=900,
C_ALLIANCE=912, C_CRANE=920, C_CARTE_D=942, C_CLE_TEMPS=962, C_GEMME_JAUNE=965,
C_GEMME_VERTE=967, C_GEMME_BLEUE=969, C_GEMME_ROUGE=971, C_EPEE_J=999, C_ARC_OR=1000,
C_CLOUS=1077, C_CUILLIERE=1089, C_BOUCLIER_OR=1316, C_TUNIQUE_OR=1321};
enum Type_Poisson {P_ECREVISSE=9, P_EPERLAN=10, P_POISSON_ZEBRE=11, P_GOBIE=12,
P_CRABE=13, P_PIBALE=14, P_VAIRON=15, P_CARASSIN_DORE=16, P_ABLETTE=17,
P_GOUJON=18, P_LOCHE=19, P_EPINOCHE=20, P_GREMILLE=21, P_BLENNIE=22, P_MAGICARPE=23,
P_TRUITE=24, P_AYU=25, P_PERCHE_NOIRE=26, P_ANGUILLE=27, P_POISSON_CHAT=28,
P_BLACK_BASS=29, P_HUCHON=30, P_BARBEAU=31, P_LAMPROIE=32, P_HOTU=33, P_SAUMON=34,
P_ESTURGEON=35, P_OMBLE_CHEVALIER=36, P_CARPE=37, P_SILURE=38};
enum Type_IA {IA_RIEN, IA_FONCE, IA_SNIPE, IA_ATTEND, IA_RANDOM, IA_SUIT, IA_HAUT_BAS,
IA_SPECIAL, IA_STATUE};
enum Type_Ennemi {E_SIMPLE, E_MONO_DIR, E_PROFIL};
enum Type_Pnj {P_SIMPLE, P_MONO_DIR, P_PROFIL};
enum Type_Temps {T_PASSE, T_PRESENT, T_FUTUR};
enum Type_Avancement {DEPART, PARLE_GARDE_DEVANT_CHEZ_LINK, PARLE_GARDE_PALAIS,
PARLE_GARDE_RESERVE, RESERVE_VIDE, PARLE_ZELDA_PALAIS, PARLE_GARDE_CH_FORTE,
PARLE_GARDE_SOUS_SOL, ZELDA_SOUS_SOL, RIDEAUX_REPERES, PASSAGE_TROUVE,
STELE_LUE, PARLE_ZELDA_GROTTE, PARLE_PECHE, PANCARTE_MINE_LUE, PARLE_GARS_MINE_SALOON,
PARLE_BARMAN_SALOON, APPREND_POUR_ROC_GIVRE, DETTE_PAYEE,
GARS_MINE_AIDE, PARLE_GARS_MINE_MINE, PORTAIL_F_OUVERT, PORTAIL_F_UTILISE,
CLE_PRISON_F_TROUVEE, BOWSER_AIDE, MOT_DE_PASSE_CONNU, MOT_DE_PASSE_DONNE, MULTIPASS,
MULTIPASSE_UTILISE, SAGES_GROTTE, PORTAIL_PRE_PRESENT_OUVERT, PORTAIL_PRE_PRESENT_UTILISE,
PLANCHES_TROUVEES, PONT_CONSTRUIT, EXPLOSE_MUR, PORTAIL_PRE_PRESENT_FERME, RETOUR_PRESENT,
ARRIVE_PASSE, INFO_PASSE_OK, TEMPETE_NEIGE_FINIE, GANON_CAPTURE, SPEECH_AGAHNIM,
TELE_ZELDA, SPEECH_GANON, SPEECH_GANONDORF};
const int MAX_QUIZZ = 40;
#endif // Common.h