first commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.exe
|
||||
pepe
|
||||
BIN
datos/comp.dat
Executable file
BIN
datos/comp.dat
Executable file
Binary file not shown.
BIN
datos/fm.dat
Executable file
BIN
datos/fm.dat
Executable file
Binary file not shown.
20268
datos/graf.mif
Executable file
20268
datos/graf.mif
Executable file
File diff suppressed because one or more lines are too long
BIN
datos/mFinalbo.dat
Executable file
BIN
datos/mFinalbo.dat
Executable file
Binary file not shown.
BIN
datos/mTimeA.dat
Executable file
BIN
datos/mTimeA.dat
Executable file
Binary file not shown.
BIN
datos/mcampana.dat
Executable file
BIN
datos/mcampana.dat
Executable file
Binary file not shown.
BIN
datos/mfase01.dat
Executable file
BIN
datos/mfase01.dat
Executable file
Binary file not shown.
BIN
datos/mfase02.dat
Executable file
BIN
datos/mfase02.dat
Executable file
Binary file not shown.
BIN
datos/mfase10.dat
Executable file
BIN
datos/mfase10.dat
Executable file
Binary file not shown.
BIN
datos/mfinalf.dat
Executable file
BIN
datos/mfinalf.dat
Executable file
Binary file not shown.
BIN
datos/mgover.dat
Executable file
BIN
datos/mgover.dat
Executable file
Binary file not shown.
BIN
datos/mhist.dat
Executable file
BIN
datos/mhist.dat
Executable file
Binary file not shown.
BIN
datos/mlevelc.dat
Executable file
BIN
datos/mlevelc.dat
Executable file
Binary file not shown.
BIN
datos/mlevelcn.dat
Executable file
BIN
datos/mlevelcn.dat
Executable file
Binary file not shown.
BIN
datos/mlogo.dat
Executable file
BIN
datos/mlogo.dat
Executable file
Binary file not shown.
BIN
datos/mnit.dat
Executable file
BIN
datos/mnit.dat
Executable file
Binary file not shown.
BIN
datos/mnitfase.dat
Executable file
BIN
datos/mnitfase.dat
Executable file
Binary file not shown.
BIN
datos/moptions.dat
Executable file
BIN
datos/moptions.dat
Executable file
Binary file not shown.
BIN
datos/mtitle.dat
Executable file
BIN
datos/mtitle.dat
Executable file
Binary file not shown.
BIN
datos/sprites.dat
Executable file
BIN
datos/sprites.dat
Executable file
Binary file not shown.
10
datos/story.dat
Executable file
10
datos/story.dat
Executable file
@@ -0,0 +1,10 @@
|
||||
SERGI
|
||||
200000
|
||||
PEPE
|
||||
150000
|
||||
ICEKAS
|
||||
125000
|
||||
ROSITA
|
||||
100000
|
||||
JOB
|
||||
50000
|
||||
15
datos/time.dat
Executable file
15
datos/time.dat
Executable file
@@ -0,0 +1,15 @@
|
||||
SERGI
|
||||
1
|
||||
45
|
||||
PEPE
|
||||
2
|
||||
0
|
||||
ICEKAS
|
||||
2
|
||||
10
|
||||
ROSITA
|
||||
2
|
||||
20
|
||||
JOB
|
||||
2
|
||||
30
|
||||
BIN
delphi/._main.dcu
Normal file
BIN
delphi/._main.dcu
Normal file
Binary file not shown.
BIN
delphi/._pepe.dsk
Normal file
BIN
delphi/._pepe.dsk
Normal file
Binary file not shown.
BIN
delphi/._pepe.~dsk
Normal file
BIN
delphi/._pepe.~dsk
Normal file
Binary file not shown.
BIN
delphi/Fases.bmp
Normal file
BIN
delphi/Fases.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 188 KiB |
BIN
delphi/barra1.bmp
Normal file
BIN
delphi/barra1.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
delphi/fondo1.bmp
Normal file
BIN
delphi/fondo1.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
BIN
delphi/layout1.bmp
Normal file
BIN
delphi/layout1.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
478
delphi/main.pas
Normal file
478
delphi/main.pas
Normal file
@@ -0,0 +1,478 @@
|
||||
unit main;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||
ExtCtrls, DXDraws, MPlayer, DXClass;
|
||||
|
||||
type
|
||||
TForm1 = class(TDXForm)
|
||||
VGA: TDXDraw;
|
||||
Pics: TDXImageList;
|
||||
Pinta: TTimer;
|
||||
mover: TTimer;
|
||||
Musica: TMediaPlayer;
|
||||
procedure NouNivell;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure PintaTimer(Sender: TObject);
|
||||
procedure VGAClick(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure FormKeyUp(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure moverTimer(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
const
|
||||
MAPAWIDTH = 39;
|
||||
MAPAHEIGHT = 29;
|
||||
pUP = 38;
|
||||
pLEFT = 37;
|
||||
pRIGHT = 39;
|
||||
pDOWN = 40;
|
||||
|
||||
STATERUNNING = 0;
|
||||
STATEPINTURA = 1;
|
||||
STATEINICIANT = 2;
|
||||
|
||||
SENTITHORIZ = 1;
|
||||
SENTITVERT = 0;
|
||||
|
||||
FACIL = 4;
|
||||
NORMAL = 2;
|
||||
DIFICIL = 0;
|
||||
|
||||
type
|
||||
TPersonatge = record
|
||||
x, y : byte;
|
||||
mUP, mDOWN, mLEFT, mRIGHT : boolean;
|
||||
pintura, vides : byte;
|
||||
punts : word;
|
||||
tUP, tDOWN, tLEFT, tRIGHT : byte;
|
||||
gNormal, gNoPint,
|
||||
gMort1, gMort2,
|
||||
gFin1, gFin2 : byte;
|
||||
end;
|
||||
|
||||
TMalo = record
|
||||
X, Y : byte;
|
||||
Sentit : byte;
|
||||
Viu : boolean;
|
||||
Dibuix : byte;
|
||||
end;
|
||||
|
||||
TFase = record
|
||||
Mapa : array[0..MAPAWIDTH-1, 0..MAPAHEIGHT-1] of byte;
|
||||
BlocsTotal, BlocsActual : integer;
|
||||
NumEnemics : byte;
|
||||
Disp1, Disp2, Disp3 : integer;
|
||||
gBloc, gPintat, gPot : byte;
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
Form1 : TForm1;
|
||||
Pepe : TPersonatge;
|
||||
malo : array[0..2] of TMalo;
|
||||
Fase : TFase;
|
||||
Nivell : byte;
|
||||
AugPunts : word;
|
||||
estat : byte;
|
||||
dificultat : byte;
|
||||
RAIVAR1,RAIVAR2,RAIVAR3 : integer;
|
||||
RAI : byte;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
|
||||
procedure TForm1.NouNivell;
|
||||
var
|
||||
fitxer : file of char;
|
||||
i,j : byte;
|
||||
tmp : char;
|
||||
begin
|
||||
Fase.BlocsTotal := 0;
|
||||
AugPunts := 2;
|
||||
assignfile(fitxer,'mapa.txt');
|
||||
reset(fitxer);
|
||||
seek(fitxer, 1178*(Nivell-1));
|
||||
for i:= 0 to MAPAWIDTH-2 do
|
||||
begin
|
||||
for j := 0 to MAPAHEIGHT-1 do
|
||||
begin
|
||||
blockread(fitxer, tmp, 1);
|
||||
Fase.Mapa[i,j] := ord(tmp) - 48;
|
||||
if Fase.Mapa[i,j] = 0 then inc(Fase.BlocsTotal);
|
||||
// if mapa[i,j] = 3 then begin pepe.x := i; pepe.y := j; end;
|
||||
end;
|
||||
blockread(fitxer, tmp, 1);
|
||||
blockread(fitxer, tmp, 1);
|
||||
end;
|
||||
closefile(fitxer);
|
||||
Fase.Mapa[38,14] := 3;
|
||||
|
||||
RAIVAR1 := 0;
|
||||
RAI := 0;
|
||||
|
||||
pepe.x := 38;
|
||||
pepe.y := 14;
|
||||
pepe.mRIGHT := false;
|
||||
pepe.mLEFT := false;
|
||||
pepe.mDOWN := false;
|
||||
pepe.mUP := false;
|
||||
pepe.pintura := 255;
|
||||
pepe.tUP := pUP;
|
||||
pepe.tDOWN := pDOWN;
|
||||
pepe.tLEFT := pLEFT;
|
||||
pepe.tRIGHT := pRIGHT;
|
||||
pepe.vides := 5;
|
||||
pepe.gNormal := 3;
|
||||
pepe.gNoPint := 4;
|
||||
pepe.gMort1 := 5;
|
||||
pepe.gMort2 := 6;
|
||||
pepe.gFin1 := 7;
|
||||
pepe.gFin2 := 8;
|
||||
|
||||
Fase.BlocsActual := Fase.BlocsTotal;
|
||||
Fase.gBloc := 31;
|
||||
Fase.gPintat := 44;
|
||||
Fase.gPot := 30;
|
||||
Fase.Disp1 := (Fase.BlocsTotal div 4)*3;
|
||||
Fase.Disp2 := (Fase.BlocsTotal div 4)*2;
|
||||
Fase.Disp3 := (Fase.BlocsTotal div 4)*1;
|
||||
|
||||
estat := STATEINICIANT;
|
||||
mover.Interval := 1;
|
||||
dificultat := FACIL;
|
||||
|
||||
Malo[0].viu := False;
|
||||
Malo[1].viu := False;
|
||||
Malo[2].viu := False;
|
||||
|
||||
if Musica.Mode <> mpNotReady then
|
||||
begin Musica.Close; end;
|
||||
If Nivell mod 2 = 1
|
||||
then Musica.FileName := ExtractFilePath(Application.Exename)+'musica\mfase01.mid'
|
||||
else Musica.FileName := ExtractFilePath(Application.Exename)+'musica\mfase02.mid';
|
||||
Musica.Open;
|
||||
Musica.Play;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
randomize;
|
||||
VGA.Cursor := crNone;
|
||||
Nivell := 1;
|
||||
NouNivell;
|
||||
Pepe.Punts := 0;
|
||||
//Musica.FileName := 'musica\mfase01.mid';
|
||||
//Musica.Open;
|
||||
end;
|
||||
|
||||
|
||||
procedure TForm1.PintaTimer(Sender: TObject);
|
||||
var
|
||||
i,j : byte;
|
||||
begin
|
||||
if not(VGA.CanDraw) then exit;
|
||||
|
||||
if estat = STATEINICIANT then
|
||||
begin
|
||||
VGA.Surface.Fill(0);
|
||||
if RAI = 0 then
|
||||
begin
|
||||
pics.items[1].DrawWaveXAlpha(VGA.Surface,
|
||||
0, 0, 250, 200, 0, 64-RAIVAR1, 64-RAIVAR1,
|
||||
255-(RAIVAR1*4), RAIVAR1*4);
|
||||
end;
|
||||
if RAI = 1 then
|
||||
begin
|
||||
pics.items[1].draw(VGA.surface, 0, 0, 0);
|
||||
pics.items[2].DrawWaveXAlpha(VGA.Surface,
|
||||
250, 0, 70, 200, 0, 64-RAIVAR1, 64-RAIVAR1, 255-(RAIVAR1*4), RAIVAR1*4);
|
||||
end;
|
||||
if RAI = 2 then
|
||||
begin
|
||||
pics.items[1].draw(VGA.surface, 0, 0, 0);
|
||||
pics.items[2].draw(VGA.surface, 250, 0, 0);
|
||||
pics.items[4].DrawWaveXAlpha(VGA.Surface,
|
||||
80, 80, 160, 40, 0, 64-RAIVAR1, 64-RAIVAR1, 255-(RAIVAR1*4), RAIVAR1*4);
|
||||
// pics.items[1].draw(VGA.surface, 0, 0, 0);
|
||||
// pics.items[2].draw(VGA.surface, 250, 0, 0);
|
||||
// pics.items[4].draw(VGA.surface,RAIVAR1,80,nivell-1);
|
||||
end;
|
||||
if RAI = 3 then
|
||||
begin
|
||||
pics.items[1].draw(VGA.surface, 0, 0, 0);
|
||||
pics.items[2].draw(VGA.surface, 250, 0, 0);
|
||||
pics.items[4].draw(VGA.surface,80,80,nivell-1);
|
||||
end;
|
||||
if RAI = 4 then
|
||||
begin
|
||||
pics.items[1].draw(VGA.surface, 0, 0, 0);
|
||||
pics.items[2].draw(VGA.surface, 250, 0, 0);
|
||||
pics.items[4].DrawWaveXAlpha(VGA.Surface,
|
||||
80, 80, 160, 40, 0, 64-RAIVAR1, 64-RAIVAR1, 255-(RAIVAR1*4), RAIVAR1*4);
|
||||
end;
|
||||
end;
|
||||
|
||||
if (estat = STATERUNNING) or (estat = STATEPINTURA) then
|
||||
begin
|
||||
// PINTEM EL FONDO, LA BARRA I LA PINTURA QUE LI QUEDA
|
||||
pics.items[1].draw(VGA.surface, 0, 0, 0);
|
||||
pics.items[2].draw(VGA.surface, 250, 0, 0);
|
||||
If Pepe.Pintura > 0 then pics.items[0].stretchdraw(VGA.Surface, Rect(266,180-(pepe.pintura div 5),277,181), 44);
|
||||
|
||||
// PINTEM EL MAPA
|
||||
for j := 0 to MAPAHEIGHT-1 do
|
||||
for i := 0 to MAPAWIDTH-2 do
|
||||
begin
|
||||
If Fase.mapa[i,j] = 1 then pics.Items[0].draw(VGA.Surface, 11+(i*6), 13+(j*6), Fase.gBloc);
|
||||
If Fase.mapa[i,j] = 2 then pics.Items[0].draw(VGA.Surface, 11+(i*6), 13+(j*6), Fase.gPintat);
|
||||
end;
|
||||
pics.Items[0].draw(VGA.Surface, 11+(38*6), 13+(14*6), Fase.gPot);
|
||||
|
||||
//PINTEM EL NIVELL ACTUAL, LES VIDES I EL INDICADOR DEL S<>
|
||||
pics.Items[3].draw(VGA.Surface, 2, 2, 12+Nivell);
|
||||
pics.Items[3].draw(VGA.Surface, 269, 170, 12+Pepe.vides);
|
||||
pics.Items[3].draw(VGA.Surface, 3, 189, 11);
|
||||
|
||||
// PINTEM A PEPE
|
||||
if pepe.pintura > 0
|
||||
then pics.Items[0].draw(VGA.Surface, 11+(pepe.x*6), 13+(pepe.y*6), Pepe.gNormal)
|
||||
else pics.Items[0].draw(VGA.Surface, 11+(pepe.x*6), 13+(pepe.y*6), Pepe.gNoPint);
|
||||
|
||||
// PINTEM ALS MALOS
|
||||
for i := 0 to 2 do
|
||||
if malo[i].viu then
|
||||
pics.Items[0].draw(VGA.Surface, 11+(Malo[i].x*6), 13+(Malo[i].y*6), Malo[i].dibuix);
|
||||
|
||||
// PINTEM EL MARCADOR DE PUNTS
|
||||
pics.items[3].draw(VGA.Surface, 266, 74, 12+( Pepe.Punts DIV 1000000));
|
||||
pics.items[3].draw(VGA.Surface, 272, 74, 12+((Pepe.Punts MOD 1000000) DIV 100000 ));
|
||||
pics.items[3].draw(VGA.Surface, 278, 74, 12+((Pepe.Punts MOD 100000) DIV 10000 ));
|
||||
pics.items[3].draw(VGA.Surface, 284, 74, 12+((Pepe.Punts MOD 10000) DIV 1000 ));
|
||||
pics.items[3].draw(VGA.Surface, 290, 74, 12+((Pepe.Punts MOD 1000) DIV 100 ));
|
||||
pics.items[3].draw(VGA.Surface, 296, 74, 12+((Pepe.Punts MOD 100) DIV 10 ));
|
||||
pics.items[3].draw(VGA.Surface, 302, 74, 12+( Pepe.Punts MOD 10 ));
|
||||
end;
|
||||
|
||||
VGA.Flip;
|
||||
end;
|
||||
|
||||
procedure TForm1.VGAClick(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if key = pepe.tUP then pepe.mUP := true;
|
||||
if key = pepe.tDOWN then pepe.mDOWN := true;
|
||||
if key = pepe.tLEFT then pepe.mLEFT := true;
|
||||
if key = pepe.tRIGHT then pepe.mRIGHT := true;
|
||||
inc(augPunts, 1);
|
||||
|
||||
// TRUCOS
|
||||
if key = 65 then Fase.BlocsActual := 0;
|
||||
end;
|
||||
|
||||
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if key = pepe.tUP then pepe.mUP := false;
|
||||
if key = pepe.tDOWN then pepe.mDOWN := false;
|
||||
if key = pepe.tLEFT then pepe.mLEFT := false;
|
||||
if key = pepe.tRIGHT then pepe.mRIGHT := false;
|
||||
augPunts := 2;
|
||||
end;
|
||||
|
||||
Procedure Moure_Malos;
|
||||
var
|
||||
i : byte;
|
||||
begin
|
||||
for i:=0 to 2 do
|
||||
if malo[i].viu then
|
||||
begin
|
||||
case malo[i].sentit of
|
||||
|
||||
SENTITHORIZ:
|
||||
if malo[i].x > Pepe.x then
|
||||
begin
|
||||
//if (malo[i].x-1 = Pepe.x) and (malo[i].y = Pepe.y) then
|
||||
if Fase.Mapa[malo[i].x-1,malo[i].y] = 2 then dec(malo[i].x);
|
||||
//mou_malo(i,esquerra);
|
||||
malo[i].sentit:=random(2+dificultat);
|
||||
end
|
||||
else if malo[i].x < Pepe.x then
|
||||
begin
|
||||
if Fase.Mapa[malo[i].x+1,malo[i].y] = 2 then inc(malo[i].x);
|
||||
//mou_malo(i,dreta);
|
||||
malo[i].sentit:=random(2+dificultat);
|
||||
end
|
||||
else malo[i].sentit:=SENTITVERT;
|
||||
|
||||
SENTITVERT:
|
||||
if malo[i].y > Pepe.y then
|
||||
begin
|
||||
if Fase.Mapa[malo[i].x,malo[i].y-1] = 2 then dec(malo[i].y);
|
||||
//mou_malo(i,amunt);
|
||||
malo[i].sentit:=random(2+dificultat);
|
||||
end
|
||||
else if malo[i].y < Pepe.y then
|
||||
begin
|
||||
if Fase.Mapa[malo[i].x,malo[i].y+1] = 2 then inc(malo[i].y);
|
||||
//mou_malo(i,avall);
|
||||
malo[i].sentit:=random(2+dificultat);
|
||||
end
|
||||
else malo[i].sentit:=SENTITHORIZ;
|
||||
|
||||
2,3,4,5: malo[i].sentit:=random(2+dificultat);
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CreateMalos;
|
||||
begin
|
||||
if Fase.BlocsActual <= Fase.Disp1 then
|
||||
if not(malo[0].viu) then
|
||||
begin
|
||||
malo[0].x := random(38);
|
||||
malo[0].y := random(29);
|
||||
if Fase.Mapa[malo[0].x,malo[0].y] = 2 then
|
||||
begin
|
||||
malo[0].dibuix := 22; malo[0].sentit := SENTITVERT;
|
||||
malo[0].viu := True;
|
||||
end;
|
||||
end;
|
||||
if Fase.BlocsActual <= Fase.Disp2 then
|
||||
if not(malo[1].viu) then
|
||||
begin
|
||||
malo[1].x := random(38);
|
||||
malo[1].y := random(29);
|
||||
if Fase.Mapa[malo[1].x,malo[1].y] = 2 then
|
||||
begin
|
||||
malo[1].dibuix := 23; malo[1].sentit := SENTITVERT;
|
||||
malo[1].viu := True;
|
||||
end;
|
||||
end;
|
||||
(*
|
||||
{ rellontge }
|
||||
if story_mode_mode then
|
||||
if blocs_per_pintar=(total_blocs_per_pintar div 3) then
|
||||
if (not(rellontge.viu)) and (sense_rellontge) and (num_fase<10) then ini_rellontge;
|
||||
*)
|
||||
//if (Nivell=10) or (dificultat=DIFICIL)(* or (mode_nocturne)*) then
|
||||
if Fase.BlocsActual <= Fase.Disp3 then
|
||||
if not(malo[2].viu) then
|
||||
begin
|
||||
malo[2].x := random(38);
|
||||
malo[2].y := random(29);
|
||||
if Fase.Mapa[malo[2].x,malo[2].y] = 2 then
|
||||
begin
|
||||
malo[2].dibuix := 24; malo[2].sentit := SENTITVERT;
|
||||
malo[2].viu := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TForm1.moverTimer(Sender: TObject);
|
||||
var
|
||||
tmpX, tmpY : byte;
|
||||
begin
|
||||
// LOOP DE LA MUSICA
|
||||
if Musica.Mode <> mpPlaying then Musica.Play;
|
||||
|
||||
if estat = STATEINICIANT then
|
||||
begin
|
||||
if RAI = 0 then
|
||||
if RAIVAR1 < 64 then inc(RAIVAR1,4) else begin RAI := 1; RAIVAR1 := 0; end;
|
||||
if RAI = 1 then
|
||||
if RAIVAR1 < 64 then inc(RAIVAR1,1) else begin RAI := 2; RAIVAR1 := 0; end;
|
||||
if RAI = 2 then
|
||||
if RAIVAR1 < 64 then inc(RAIVAR1,1) else begin RAI := 3; RAIVAR1 := 0; end;
|
||||
if RAI = 3 then
|
||||
if RAIVAR1 < 100 then inc(RAIVAR1,1) else begin RAI := 4; RAIVAR1 := 64; end;
|
||||
if RAI = 4 then
|
||||
if RAIVAR1 > 0 then dec(RAIVAR1,1) else begin RAI := 0; RAIVAR1 := 0;
|
||||
estat := STATERUNNING; mover.Interval := 50; end;
|
||||
end;
|
||||
|
||||
// ESTEM CARREGANT PINTURA
|
||||
if estat = STATEPINTURA then
|
||||
begin
|
||||
if pepe.pintura+5 >= 255 then
|
||||
begin
|
||||
pepe.pintura := 255;
|
||||
mover.Interval := 50;
|
||||
estat := STATERUNNING;
|
||||
end
|
||||
else inc(pepe.pintura,5);
|
||||
end;
|
||||
|
||||
// ESTEM JUGANT NORMAL
|
||||
if estat = STATERUNNING then
|
||||
begin
|
||||
createmalos;
|
||||
moure_malos;
|
||||
|
||||
if (pepe.pintura < 254) and (Fase.mapa[pepe.x, pepe.y] = 3) then
|
||||
begin
|
||||
mover.Interval := 1;
|
||||
estat := STATEPINTURA;
|
||||
end;
|
||||
|
||||
if (Fase.mapa[pepe.x, pepe.y] = 3) and (Fase.BlocsActual = 0) then
|
||||
begin inc(Nivell); NouNivell; end;
|
||||
|
||||
tmpX := pepe.x; tmpY := pepe.y;
|
||||
if pepe.mDOWN and (pepe.y<28) and (Pepe.x<38) then inc(pepe.y,1) else
|
||||
if pepe.mUP and (pepe.y>0) and (Pepe.x<38) then dec(pepe.y,1) else
|
||||
if pepe.mLEFT and (pepe.x>0) then dec(pepe.x,1) else
|
||||
if pepe.mRIGHT and
|
||||
( ( (pepe.y <> 14) and (pepe.x < 37) ) or
|
||||
( (pepe.y = 14) and (pepe.x < 38) ) )
|
||||
then inc(pepe.x,1) else exit;
|
||||
|
||||
if Fase.mapa[pepe.x, pepe.y] = 1 then
|
||||
begin
|
||||
pepe.x := tmpX; pepe.y := tmpY;
|
||||
end
|
||||
else
|
||||
begin
|
||||
If pepe.pintura > 0 then
|
||||
begin
|
||||
if Fase.mapa[tmpX, tmpY] <> 3 then
|
||||
begin
|
||||
if Fase.mapa[tmpX, tmpY] = 0 then
|
||||
begin
|
||||
dec(Fase.BlocsActual);
|
||||
inc(pepe.punts);//, augPunts);
|
||||
end;
|
||||
Fase.mapa[tmpX, tmpY] := 2;
|
||||
dec(pepe.pintura,1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Musica.Stop;
|
||||
end;
|
||||
|
||||
end.
|
||||
381
delphi/mapa.txt
Normal file
381
delphi/mapa.txt
Normal file
@@ -0,0 +1,381 @@
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000001010000000000000
|
||||
00000000000011011000000000000
|
||||
00000000000111011100000000000
|
||||
11101111111111011111111110111
|
||||
11101111111111011111111110111
|
||||
00000000000111011100000000000
|
||||
00000000000011011000000000000
|
||||
00000000000001010000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
11111111111111111111111111111
|
||||
11111111110000000001111111111
|
||||
11111111100111011100111111111
|
||||
11111111001111011110011111111
|
||||
11111110011111011111001111111
|
||||
11111100111111011111100111111
|
||||
11111001111111011111110011111
|
||||
11110011111111011111111001111
|
||||
11100111111111011111111100111
|
||||
11001111111111011111111110011
|
||||
10011111111111011111111111001
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
10100000000000000000000000101
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
11111101111100000111110111111
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
11110000000000000000000001111
|
||||
00001000000000000000000010000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00001000000000000000000010000
|
||||
11110000000000000000000001111
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
11111101111100000111110111111
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000010001000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00011111111111011111111111000
|
||||
00010000000000000000000001000
|
||||
00010000000000000000000001000
|
||||
00010000000000000000000001000
|
||||
00010001111111011111110001000
|
||||
00010001000000000000010001000
|
||||
00010001000000000000010001000
|
||||
00010001000000000000010001000
|
||||
00010001000111011100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00000000000000100000000000000
|
||||
00000000000000100000000000000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000100000100010001000
|
||||
00010001000111011100010001000
|
||||
00010001000000000000010001000
|
||||
00010001000000000000010001000
|
||||
00010001000000000000010001000
|
||||
00010001111111011111110001000
|
||||
00010000000000000000000001000
|
||||
00010000000000000000000001000
|
||||
00010000000000000000000001000
|
||||
00011111111111011111111111000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000001000000010000000000
|
||||
00000000001000000010000000000
|
||||
00000000001111111110000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
11111000010000000001000011111
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00001000010000000001000010000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000010000000001000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000001000000000000010000000
|
||||
00000011100000000000111000000
|
||||
00000111110000000001111100000
|
||||
00001111111000000011111110000
|
||||
00011111111100000111111111000
|
||||
00110000000000000000000001100
|
||||
00011111111100000111111111000
|
||||
00001111111000000011111110000
|
||||
00000111110000000001111100000
|
||||
00000011100000000000111000000
|
||||
00000001000000000000010000000
|
||||
10000000000000000000000000001
|
||||
11000000000001010000000000011
|
||||
11100000000011011000000000111
|
||||
11110000000111011100000001111
|
||||
11111000001111011110000011111
|
||||
00000000011111011111000000000
|
||||
11111000001111011110000011111
|
||||
11110000000111011100000001111
|
||||
11100000000011011000000000111
|
||||
11000000000001110000000000011
|
||||
10000000000000100000000000001
|
||||
00000001000000000000010000000
|
||||
00000011100000000000111000000
|
||||
00000111110000000001111100000
|
||||
00001111111000000011111110000
|
||||
00011111111100000111111111000
|
||||
00000000000110001100000000000
|
||||
00011111111100000111111111000
|
||||
00001111111000000011111110000
|
||||
00000111110000000001111100000
|
||||
00000011100000000000111000000
|
||||
00000001000000000000010000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000011111111011111111000000
|
||||
00000001111111011111110000000
|
||||
00000001111111011111110000000
|
||||
00000000111111011111100000000
|
||||
00000000111111011111100000000
|
||||
00000000011111011111000000000
|
||||
00000000011111011111000000000
|
||||
00000000001111011110000000000
|
||||
00000000000111011100000000000
|
||||
00000000000011011000000000000
|
||||
00000000000001010000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
10000000000000000000000000001
|
||||
11100000000000000000000000111
|
||||
11111000000000000000000011111
|
||||
11111110000000000000001111111
|
||||
11111111100000000000111111111
|
||||
11111111111000000011111111111
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
11111111111000000011111111111
|
||||
11111111100000000000111111111
|
||||
11111110000000000000001111111
|
||||
11111000000000000000000011111
|
||||
11100000000000000000000000111
|
||||
10000000000000000000000000001
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000001010000000000000
|
||||
00000000000011011000000000000
|
||||
00000000000111011100000000000
|
||||
00000000001111011110000000000
|
||||
00000000011111011111000000000
|
||||
00000000111111011111100000000
|
||||
00000001111111011111110000000
|
||||
00000011111111011111111000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000001111111111111110000000
|
||||
00000111111111111111111100000
|
||||
00001111111111111111111110000
|
||||
00001111111111111111111110000
|
||||
00001112221111121111111110000
|
||||
00001111111111122111111110000
|
||||
00001111111111122111111110000
|
||||
00001112221111121111111110000
|
||||
00001111111111111111111110000
|
||||
00001111111111111111111110000
|
||||
00000111111111111111111100000
|
||||
00000001111111111111110000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
11111100000000000000000111111
|
||||
11110000000000000000000001111
|
||||
11000000000000000000000000011
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
10000000000000000000000000001
|
||||
11100000000000000000000000111
|
||||
11111000000000000000000011111
|
||||
11111110000000000000001111111
|
||||
11111111100000000000111111111
|
||||
11111111111000000011111111111
|
||||
11111111111110001111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
11111111111111011111111111111
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
00000000000000000000000000000
|
||||
11111111111111011111111111111
|
||||
11111111111111111111111111111
|
||||
11111111111111111111111111111
|
||||
11111111111111111111111111111
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
10000000000000000000000000001
|
||||
|
||||
BIN
delphi/sprites1.bmp
Normal file
BIN
delphi/sprites1.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
delphi/sprites2.bmp
Normal file
BIN
delphi/sprites2.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
1
midiplay.h
Normal file
1
midiplay.h
Normal file
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
3971
pepe2000_utf8.cpp
Normal file
3971
pepe2000_utf8.cpp
Normal file
File diff suppressed because it is too large
Load Diff
4017
pepe2000_utf8.pas
Normal file
4017
pepe2000_utf8.pas
Normal file
File diff suppressed because it is too large
Load Diff
0
pepe_vell.h
Normal file
0
pepe_vell.h
Normal file
Reference in New Issue
Block a user