Convirtiendo el código a cpp

This commit is contained in:
2022-08-13 15:11:25 +02:00
parent 896a61ed0d
commit c8838aa450

View File

@@ -1,5 +1,6 @@
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include <vector> #include <vector>
#include <string>
#define MARGE_DALT 20 #define MARGE_DALT 20
#define MARGE_BAIX 460 #define MARGE_BAIX 460
@@ -32,7 +33,7 @@ struct triangle
float velocitat; float velocitat;
}; };
std::vector<ipunt> ivector(MAX_IPUNTS); typedef std::vector<ipunt> ivector();
struct poligon struct poligon
{ {
@@ -47,18 +48,19 @@ struct poligon
bool esta; bool esta;
}; };
pvirt = array[1..38400] of byte; std::vector<Uint8> pvirt(38400);
var nau:triangle;pol:poligon; triangle nau;
ang:real; poligon pol;
ch:char; float ang;
Dx,Dy:word; std::string ch;
i,aux:byte; Uint16 Dx, Dy;
dist:integer; Uint8 i, aux;
puntaux:punt; int dist;
orni:array [1..MAX_ORNIS] of poligon; punt puntaux;
virt:^pvirt; std::vector<poligon> orni(MAX_ORNIS);
bales:array [1..MAX_BALES] of poligon; std::vector<poligon> bales(MAX_BALES);
virt : ^pvirt;
procedure volca; procedure volca;
var i:word; var i:word;