1
//*****************************************************************************
2
// copyright (c) 1998-2004 TLK Games all rights reserved
3
//-----------------------------------------------------------------------------
5
// created : 1999-08-17
6
// updates : 2004-08-04
7
//-----------------------------------------------------------------------------
8
// This program is free software; you can redistribute it and/or modify it under
9
// the terms of the GNU General Public License as published by the Free Software
10
// Foundation; either version 2 of the License, or (at your option) any later
13
// This program is distributed in the hope that it will be useful, but WITHOUT
14
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18
// You should have received a copy of the GNU General Public License along with
19
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20
// Place - Suite 330, Boston, MA 02111-1307, USA.
22
//*****************************************************************************
1
//*****************************************************************************
2
// copyright (c) 1998-2003 TLK Games all rights reserved
3
//-----------------------------------------------------------------------------
5
// created : 1999-08-17
6
// updates : 2003-06-28
7
//-----------------------------------------------------------------------------
8
// This program is free software; you can redistribute it and/or modify it under
9
// the terms of the GNU General Public License as published by the Free Software
10
// Foundation; either version 2 of the License, or (at your option) any later
13
// This program is distributed in the hope that it will be useful, but WITHOUT
14
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18
// You should have received a copy of the GNU General Public License along with
19
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20
// Place - Suite 330, Boston, MA 02111-1307, USA.
22
//*****************************************************************************
24
24
#define __LINUXHPP__
26
26
//////////////////////////
40
//..............................................................................
49
#include <sys/utsname.h>
40
//..............................................................................
49
#include <sys/utsname.h>
52
52
#include <sys/types.h>
58
#define _S_ISDIR(__mode) (__mode & _S_IFDIR)
61
//..............................................................................
66
//gestion fichier graphique en memoire ...........................................
68
{ unsigned int iLargeur; //image width
69
unsigned int iHauteur; //image height
70
unsigned int iProfond; //bits per pixels
71
unsigned int iTaille; //memory size
72
char* pAdresse; //pointer to the image data
73
unsigned char tPaletteGif[768] ; //palette
76
//"xwindow.cpp"....................................................................
78
int reserve_ecran_ram();
79
int charge_palette(char* _pNomFichier);
81
int change_resolution();
83
char *Xload_pcx(char* _pNomFichier);
84
int Xload_pcx(char* _pNomFichier, char* _pMem);
85
char *convertit_16ou24(sDescriptionGfx* _pSrc);
86
void copie_gfx(sDescriptionGfx* _pGfx);
87
int reserve_ecranPlayanim();
88
void kill_ecranPlayanim();
92
int init_video_mode();
95
//linuxroutines.cpp ------------------------------------------------------------
96
int mem_initialise(unsigned int _iNombreZones);
97
char* reserveMemoire(unsigned int _iTailleMemoire);
98
void libereMemoire(char* _pMemoire);
99
int mem_retourneTaille(char* _pMem);
100
void mem_libereTous();
101
int load_pcx(char*, char*);
102
sDescriptionGfx* load_pcx(char*);
103
unsigned int littleWord(char* _pMem);
104
short litMot16bits(short* _pMem);
105
int litMot32bits(int* _pMem);
106
void convert32bits_2bigendian (unsigned char* memory);
107
int chaine_cmp(char* _pChaine1, char* _pChaine2, unsigned int _iTaille);
108
char* chargeFichier(char* _pNomFichier);
109
char* chargeFichier(char* _pNomFichier, unsigned int* pTaille);
110
int chargeFichier(char* _pMemoire, char* _pNomFichier);
113
void afficheMessage(char* _Message);
114
void afficheMessage(char* _Message1, char* _Message2);
115
void afficheErreur(char* _pErreur1, char* _pErreur2);
116
void afficheErreur(char* _pErreur1, char* _pErreur2, int _iErreur);
117
void afficheErreur(char* _pErreur1, char* _pErreur2, char* _pErreur3);
118
int synchro_processusPause(int _iTemps);
119
int synchro_CalculDifference();
120
int synchro_CalculDifference2();
56
//..............................................................................
61
//gestion fichier graphique en memoire ...........................................
63
{ unsigned int iLargeur; //image width
64
unsigned int iHauteur; //image height
65
unsigned int iProfond; //bits per pixels
66
unsigned int iTaille; //memory size
67
char* pAdresse; //pointer to the image data
68
unsigned char tPaletteGif[768] ; //palette
71
//"xwindow.cpp"....................................................................
73
int reserve_ecran_ram();
74
int charge_palette(char* _pNomFichier);
76
int change_resolution();
78
char *Xload_pcx(char* _pNomFichier);
79
int Xload_pcx(char* _pNomFichier, char* _pMem);
80
char *convertit_16ou24(sDescriptionGfx* _pSrc);
81
void copie_gfx(sDescriptionGfx* _pGfx);
82
int reserve_ecranPlayanim();
83
void kill_ecranPlayanim();
87
int init_video_mode();
90
//linuxroutines.cpp ------------------------------------------------------------
91
int mem_initialise(unsigned int _iNombreZones);
92
char* reserveMemoire(unsigned int _iTailleMemoire);
93
void libereMemoire(char* _pMemoire);
94
int mem_retourneTaille(char* _pMem);
95
void mem_libereTous();
96
int load_pcx(char*, char*);
97
sDescriptionGfx* load_pcx(char*);
98
unsigned int littleWord(char* _pMem);
99
short litMot16bits(short* _pMem);
100
int litMot32bits(int* _pMem);
101
void convert32bits_2bigendian (unsigned char* memory);
102
int chaine_cmp(char* _pChaine1, char* _pChaine2, unsigned int _iTaille);
103
char* chargeFichier(char* _pNomFichier);
104
char* chargeFichier(char* _pNomFichier, unsigned int* pTaille);
105
int chargeFichier(char* _pMemoire, char* _pNomFichier);
108
void afficheMessage(char* _Message);
109
void afficheMessage(char* _Message1, char* _Message2);
110
void afficheErreur(char* _pErreur1, char* _pErreur2);
111
void afficheErreur(char* _pErreur1, char* _pErreur2, int _iErreur);
112
void afficheErreur(char* _pErreur1, char* _pErreur2, char* _pErreur3);
113
int synchro_processusPause(int _iTemps);
114
int synchro_CalculDifference();
115
int synchro_CalculDifference2();