-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTexte.h
55 lines (45 loc) · 1.32 KB
/
Texte.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
/*
Zelda Oni Link Begins
Copyright (C) 2006-2008 Vincent Jouillat
Please send bugreports with examples or suggestions to www.zeldaroth.fr
*/
#ifndef __TEXTE_H__
#define __TEXTE_H__
#include <string>
class Jeu;
class Texte {
public :
Texte(Jeu* jeu);
~Texte();
void draw(SDL_Surface* gpScreen);
void setTexte(int idTxt, int vx, int vy, int vw, int vh, bool cadr, bool defil, int vit=30);
bool suite();
void affiche(SDL_Surface* gpScreen, std::string s, int a, int b);
bool isFinished();
void changeId(int i);
int getId();
private :
bool hasNext();
void drawCadre(SDL_Surface* gpScreen);
void chercheText();
void decoupeText();
int tailleMot(int deb);
void afficheLettre(SDL_Surface* gpScreen, char c, int vx, int vy);
Jeu* gpJeu;
int vitesse; // millisecondes entre 2 lettres
int av; //avancement du défilement
int x;
int y;
int w;
int h;
int id;
int idsuiv;
bool def; //si le texte doit défiler
bool cadre; //si on doit dessiner un cadre
std::string texte;
std::string buffer;
Uint32 lastAnimTime;
SDL_Surface* imageFont;
SDL_Surface* imageCoeur;
};
#endif // Texte.h