[Scummvm-cvs-logs] SF.net SVN: scummvm: [28273] scummvm/trunk/engines/drascula
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Sat Jul 28 17:18:22 CEST 2007
Revision: 28273
http://scummvm.svn.sourceforge.net/scummvm/?rev=28273&view=rev
Author: aquadran
Date: 2007-07-28 08:18:21 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
few more fixes
Modified Paths:
--------------
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2007-07-28 15:15:23 UTC (rev 28272)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2007-07-28 15:18:21 UTC (rev 28273)
@@ -205,21 +205,21 @@
}
void DrasculaEngine::asigna_memoria() {
- dir_zona_pantalla = (char *)malloc(64000);
+ dir_zona_pantalla = (byte *)malloc(64000);
assert(dir_zona_pantalla);
- dir_dibujo1 = (char *)malloc(64000);
+ dir_dibujo1 = (byte *)malloc(64000);
assert(dir_dibujo1);
- dir_hare_fondo = (char *)malloc(64000);
+ dir_hare_fondo = (byte *)malloc(64000);
assert(dir_hare_fondo);
- dir_dibujo3 = (char *)malloc(64000);
+ dir_dibujo3 = (byte *)malloc(64000);
assert(dir_dibujo3);
- dir_dibujo2 = (char *)malloc(64000);
+ dir_dibujo2 = (byte *)malloc(64000);
assert(dir_dibujo2);
- dir_mesa = (char *)malloc(64000);
+ dir_mesa = (byte *)malloc(64000);
assert(dir_mesa);
- dir_hare_dch = (char *)malloc(64000);
+ dir_hare_dch = (byte *)malloc(64000);
assert(dir_hare_dch);
- dir_hare_frente = (char *)malloc(64000);
+ dir_hare_frente = (byte *)malloc(64000);
assert(dir_hare_frente);
}
@@ -273,10 +273,10 @@
file.close();
}
-void DrasculaEngine::descomprime_dibujo(char *dir_escritura, int plt) {
+void DrasculaEngine::descomprime_dibujo(byte *dir_escritura, int plt) {
memcpy(dir_escritura, Buffer_pcx, 64000);
free(Buffer_pcx);
- asigna_rgb((unsigned char *)cPal, plt);
+ asigna_rgb((byte *)cPal, plt);
if (plt > 1)
funde_rgb(plt);
}
@@ -290,7 +290,7 @@
}
-void DrasculaEngine::asigna_rgb(unsigned char *dir_lectura, int plt) {
+void DrasculaEngine::asigna_rgb(byte *dir_lectura, int plt) {
int x, cnt = 0;
for (x = 0; x < plt; x++) {
@@ -348,7 +348,7 @@
}
void DrasculaEngine::DIBUJA_FONDO(int xorg, int yorg, int xdes, int ydes, int Ancho,
- int Alto, char *Origen, char *Destino) {
+ int Alto, byte *Origen, byte *Destino) {
int x;
Destino += xdes + ydes * 320;
Origen += xorg + yorg * 320;
@@ -360,7 +360,7 @@
}
void DrasculaEngine::DIBUJA_BLOQUE(int xorg, int yorg, int xdes, int ydes, int Ancho,
- int Alto, char *Origen, char *Destino) {
+ int Alto, byte *Origen, byte *Destino) {
int y, x;
Destino += xdes + ydes * 320;
@@ -372,7 +372,7 @@
Destino[x + y * 320] = Origen[x + y * 320];
}
-void DrasculaEngine::DIBUJA_BLOQUE_CUT(int *Array, char *Origen, char *Destino) {
+void DrasculaEngine::DIBUJA_BLOQUE_CUT(int *Array, byte *Origen, byte *Destino) {
int y, x;
int xorg = Array[0];
int yorg = Array[1];
@@ -405,7 +405,7 @@
Destino[x + y * 320] = Origen[x + y * 320];
}
-void DrasculaEngine::VUELCA_PANTALLA(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, char *Buffer) {
+void DrasculaEngine::VUELCA_PANTALLA(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, byte *Buffer) {
int x;
VGA += xdes + ydes * 320;
@@ -465,8 +465,8 @@
bucles:
if (hare_se_mueve == 0) {
- paso_x=PASO_HARE_X;
- paso_y=PASO_HARE_Y;
+ paso_x = PASO_HARE_X;
+ paso_y = PASO_HARE_Y;
}
if (hare_se_mueve == 0 && anda_a_objeto==1) {
sentido_hare = sentido_final;
@@ -2120,7 +2120,7 @@
setvgapalette256((byte *)&palJuego);
}
-char DrasculaEngine::LimitaVGA(char valor) {
+byte DrasculaEngine::LimitaVGA(byte valor) {
return (valor & 0x3F) * (valor > 0);
}
@@ -2213,8 +2213,8 @@
int cnt = 2;
TimeMed = CLOCKS_PER_SEC / FPS;
- AuxBuffLast = (char *)malloc(65000);
- AuxBuffDes = (char *)malloc(65000);
+ AuxBuffLast = (byte *)malloc(65000);
+ AuxBuffDes = (byte *)malloc(65000);
FileIn.open(animacion);
@@ -2224,7 +2224,7 @@
FileIn.read(&NFrames, sizeof(NFrames));
FileIn.read(&Leng, sizeof(Leng));
- AuxBuffOrg = (char *)malloc(Leng);
+ AuxBuffOrg = (byte *)malloc(Leng);
FileIn.read(AuxBuffOrg, Leng);
FileIn.read(cPal, 768);
carga_pcx(AuxBuffOrg);
@@ -2237,7 +2237,7 @@
WaitForNext(TimeMed);
while (cnt < NFrames) {
FileIn.read(&Leng, sizeof(Leng));
- AuxBuffOrg = (char *)malloc(Leng);
+ AuxBuffOrg = (byte *)malloc(Leng);
FileIn.read(AuxBuffOrg, Leng);
FileIn.read(cPal, 768);
carga_pcx(AuxBuffOrg);
@@ -2278,7 +2278,6 @@
for (color = 0; color < 256; color++) {
for (componente = 0; componente < 3; componente++) {
palFundido[color][componente] = LimitaVGA(palJuego[color][componente] - 63 + fundido);
- palFundido[color][3] = 0;
}
}
pausa(VelocidadDeFundido);
@@ -3855,12 +3854,12 @@
return 0;
}
-char *DrasculaEngine::carga_pcx(char *NamePcc) {
+byte *DrasculaEngine::carga_pcx(byte *NamePcc) {
signed int con = 0;
unsigned int X = 0;
unsigned int fExit = 0;
char ch, rep;
- char *AuxPun;
+ byte *AuxPun;
AuxPun = AuxBuffDes;
@@ -3895,7 +3894,7 @@
return _system->getMillis() / 1000;
}
-void DrasculaEngine::reduce_hare_chico(int x1,int y1, int x2,int y2, int ancho,int alto, int factor, char *dir_inicio, char *dir_fin) {
+void DrasculaEngine::reduce_hare_chico(int x1,int y1, int x2,int y2, int ancho,int alto, int factor, byte *dir_inicio, byte *dir_fin) {
float suma_x, suma_y;
int n, m;
float pixel_x, pixel_y;
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2007-07-28 15:15:23 UTC (rev 28272)
+++ scummvm/trunk/engines/drascula/drascula.h 2007-07-28 15:18:21 UTC (rev 28273)
@@ -354,21 +354,21 @@
void salir_al_dos(int r);
void lee_dibujos(const char *);
- void descomprime_dibujo(char *dir_escritura, int plt);
+ void descomprime_dibujo(byte *dir_escritura, int plt);
- typedef unsigned char DacPalette256[256][3];
+ typedef byte DacPalette256[256][3];
- void asigna_rgb(unsigned char *dir_lectura, int plt);
+ void asigna_rgb(byte *dir_lectura, int plt);
void funde_rgb(int plt);
void paleta_hare();
void ActualizaPaleta();
void setvgapalette256(byte *PalBuf);
void DIBUJA_FONDO(int xorg, int yorg, int xdes, int ydes, int Ancho,
- int Alto, char *Origen, char *Destino);
+ int Alto, byte *Origen, byte *Destino);
void DIBUJA_BLOQUE(int xorg, int yorg, int xdes, int ydes, int Ancho,
- int Alto, char *Origen, char *Destino);
- void DIBUJA_BLOQUE_CUT(int *Array, char *Origen, char *Destino);
- void VUELCA_PANTALLA(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, char *Buffer);
+ int Alto, byte *Origen, byte *Destino);
+ void DIBUJA_BLOQUE_CUT(int *Array, byte *Origen, byte *Destino);
+ void VUELCA_PANTALLA(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, byte *Buffer);
DacPalette256 palJuego;
DacPalette256 palHare;
@@ -377,16 +377,16 @@
byte *VGA;
- char *dir_dibujo1;
- char *dir_hare_fondo;
- char *dir_dibujo3;
- char *dir_dibujo2;
- char *dir_mesa;
- char *dir_hare_dch;
- char *dir_zona_pantalla;
- char *dir_hare_frente;
- char *dir_texto;
- char *dir_pendulo;
+ byte *dir_dibujo1;
+ byte *dir_hare_fondo;
+ byte *dir_dibujo3;
+ byte *dir_dibujo2;
+ byte *dir_mesa;
+ byte *dir_hare_dch;
+ byte *dir_zona_pantalla;
+ byte *dir_hare_frente;
+ byte *dir_texto;
+ byte *dir_pendulo;
byte cPal[768];
byte *Buffer_pcx;
@@ -413,7 +413,7 @@
int con_voces;
int menu_bar, menu_scr, hay_nombre;
char texto_nombre[13];
- char key;
+ byte key;
int flags[NUM_BANDERAS];
@@ -497,7 +497,7 @@
int resta_objeto(int osj);
void fliplay(const char *filefli, int vel);
void FundeDelNegro(int VelocidadDeFundido);
- char LimitaVGA(char valor);
+ byte LimitaVGA(byte valor);
void color_abc(int cl);
void centra_texto(const char *,int,int);
void comienza_sound(const char *);
@@ -547,7 +547,7 @@
void introduce_nombre();
void para_grabar(char[]);
int LookForFree();
- void OpenSSN(const char *Name,int Pause);
+ void OpenSSN(const char *Name, int Pause);
void WaitFrameSSN();
void MixVideo(byte *OldScreen, byte *NewScreen);
void Des_RLE(byte *BufferRLE, byte *MiVideoRLE);
@@ -558,10 +558,9 @@
int PlayFrameSSN();
int chkkey();
- char *AuxBuffOrg;
- char *AuxBuffLast;
- char *AuxBuffDes;
- //TODO duplicate char cPal[768];
+ byte *AuxBuffOrg;
+ byte *AuxBuffLast;
+ byte *AuxBuffDes;
int Leng;
byte *pointer;
@@ -579,11 +578,11 @@
long TimeLast;
long TimeMed;
- char *carga_pcx(char *NamePcc);
+ byte *carga_pcx(byte *NamePcc);
void set_dac(byte *dac);
void WaitForNext(long TimeMed);
float vez();
- void reduce_hare_chico(int, int, int, int, int, int, int, char *,char *);
+ void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *);
char codifica(char);
void cuadrante_1();
void cuadrante_2();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list