LOGO explota

This commit is contained in:
2025-12-02 08:50:38 +01:00
parent 73f222fcb7
commit 20538af4c6
22 changed files with 1754 additions and 1598 deletions

View File

@@ -1,4 +1,5 @@
#include <SDL2/SDL.h>
#include <string>
#include <vector>
@@ -13,34 +14,34 @@
#define MAX_BALES 3
struct ipunt {
float r;
float angle;
float r;
float angle;
};
struct punt {
int x;
int y;
int x;
int y;
};
struct triangle {
ipunt p1, p2, p3;
punt centre;
float angle;
float velocitat;
ipunt p1, p2, p3;
punt centre;
float angle;
float velocitat;
};
typedef std::vector<ipunt> ivector();
struct poligon {
ivector *ipunts;
ivector ipuntx;
punt centre;
float angl;
float velocitat;
Uint8 n;
float drotacio;
float rotacio;
bool esta;
ivector* ipunts;
ivector ipuntx;
punt centre;
float angl;
float velocitat;
Uint8 n;
float drotacio;
float rotacio;
bool esta;
};
std::vector<Uint8> pvirt(38400);
@@ -385,7 +386,7 @@ begin
instalarkb;
repeat
{
rota_tri(nau, nau.angle, nau.velocitat, 0);}
rota_tri(nau, nau.angle, nau.velocitat, 0);}
clsvirt;
if teclapuls(KEYarrowright) then nau.angle:=nau.angle+0.157079632;
@@ -413,19 +414,19 @@ begin
nau.centre.x:=Dx;
if (nau.velocitat>0.1) then nau.velocitat:=nau.velocitat-0.1;
{
dist:
= distancia(nau.centre, pol.centre);
diferencia(pol.centre, nau.centre, puntaux);
if dist
< (pol.ipuntx[1].r + 30) then begin nau.centre.x
: = nau.centre.x + round(dist * cos(angle(puntaux) + 0.031415));
nau.centre.y
: = nau.centre.y + round(dist * sin(angle(puntaux) + 0.031415));
end;}
dist:
= distancia(nau.centre, pol.centre);
diferencia(pol.centre, nau.centre, puntaux);
if dist
< (pol.ipuntx[1].r + 30) then begin nau.centre.x
: = nau.centre.x + round(dist * cos(angle(puntaux) + 0.031415));
nau.centre.y
: = nau.centre.y + round(dist * sin(angle(puntaux) + 0.031415));
end;}
{ for
i:
= 1 to 5 do begin rota_pol(orni[i], ang, 0);
end;}
i:
= 1 to 5 do begin rota_pol(orni[i], ang, 0);
end;}
for i:=1 to MAX_ORNIS do begin
mou_orni(orni[i]);
rota_pol(orni[i],orni[i].rotacio,1);
@@ -440,26 +441,26 @@ begin
waitretrace;
volca;
{
if aux
= 1 then begin {
gotoxy(0, 0);
write('tocado') tocado;
delay(200);
end;
}
gotoxy(50, 24);
write('<EFBFBD> Visente i Sergi');
gotoxy(50, 25);
write('<EFBFBD>ETA 2.2 2/6/99');
until teclapuls(keyesc);
desinstalarkb;
ang:
= 0;
repeat waitretrace;
rota_pol(pol, ang, 0);
ang:
= ang + 0.031415;
rota_pol(pol, ang, 1);
until keypressed;
text;
end.
if aux
= 1 then begin {
gotoxy(0, 0);
write('tocado') tocado;
delay(200);
end;
}
gotoxy(50, 24);
write('<EFBFBD> Visente i Sergi');
gotoxy(50, 25);
write('<EFBFBD>ETA 2.2 2/6/99');
until teclapuls(keyesc);
desinstalarkb;
ang:
= 0;
repeat waitretrace;
rota_pol(pol, ang, 0);
ang:
= ang + 0.031415;
rota_pol(pol, ang, 1);
until keypressed;
text;
end.