1
1
//******************************************************************************
2
// copyright (c) 1998-2003 TLK Games all rights reserved
2
// copyright (c) 1998-2005 TLK Games all rights reserved
3
3
//------------------------------------------------------------------------------
4
4
// file : "fntscrol.cpp"
6
// updates : 2003-07-20
6
// updates : 2005-01-07
7
7
//------------------------------------------------------------------------------
8
8
// functions : Init_Scroll_Present()
9
9
// : Destruct_Scroll_Font(int)
27
27
// You should have received a copy of the GNU General Public License along with
28
28
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
29
29
// Place - Suite 330, Boston, MA 02111-1307, USA.
31
30
//******************************************************************************
32
31
#include "powermanga.hpp"
33
32
//..............................................................................
33
extern configfile* power_conf;
34
34
extern fonte fnt_scroll[NBR_FONTES_SCROLL]; //Tableau de variables utilise pour l'affichage des caracteres qui scrollent.
35
35
extern int liste_fnt_scroll[NBR_FNT_SCROLL_MAX]; // D�finit la liste de toutes les fontes qui scrollent que l'on doit g�r�s � chaque VBLs.
36
36
extern int cmpt_fnt_scroll; // Utilis� dans les bcles pour compter le nombre de fontes qui scrollent.
54
54
bool dir_font_y; // Indique le sens des deplacements.
55
55
char *s_empty =" ";
57
"WELCOME TO THE MENU OF POWERMANGA. USE THE UP AND DOWN ARROWS TO SELECT A \
58
MENU OPTION AND PRESS ENTER TO VALIDATE. DURING THE GAME, USE THE ARROWS TO MOVE THE \
59
SHIP, SPACE FOR SHOOTING AND CONTROL TO SELECT AN OPTION, THE P KEY TO PAUSE THE GAME \
60
AND THE ESCAPE KEY TO RETURN TO THIS MENU. \
61
THE GREEN GEMS INCREASE THE OPTION BY ONE, THE RED GEMS INCREASE THE OPTION BY TWO. \
62
THE YELLOW GEMS INCREASE THE NUMBER OF PROTECTION BALLS. \
63
WHEN YOU TAKE 6 YELLOW GEMS WITHOUT LOSING A PROTECTION BALL, YOU'LL HAVE A SPECIAL WEAPON. \
64
THE PINK GEMS INCREASE YOUR ENERGY AND IF YOUR ENERGY WAS ALREADY FULL IT WILL GIVE YOU A \
65
MEGA-BLAST WHICH DESTROYS ALL ENEMIES. POWERMANGA (C) 2003 TLK GAMES. ";
57
// scroll text (now loaded from a file in Load_Scroll_Text())
58
char* s_present = NULL;
61
//------------------------------------------------------------------------------
63
//------------------------------------------------------------------------------
64
int Load_Scroll_Text()
66
char* pLang = power_conf->get_txtlang();
68
sprintf(fname, "texts/scroll_%s.txt", pLang);
70
char *pTemp = chargeFichier(fname, &bsize);
73
s_present = reserveMemoire(bsize);
75
{ libereMemoire(pTemp);
80
for(Uint32 i = 0; i < bsize; i++)
81
{ if(pTemp[i] >= ' ' && pTemp[i] != '"')
82
s_present[j++] = pTemp[i];
88
//------------------------------------------------------------------------------
90
//------------------------------------------------------------------------------
91
void Free_Scroll_Text()
94
{ libereMemoire (s_present);
67
100
//------------------------------------------------------------------------------
68
101
// initialize scroll-text