Skip to content

Commit 2492ce1

Browse files
committed
Añadido sistema de colisión por grilla + datos de bloques de prioridades + lista de musicas con numero
1 parent 84cd512 commit 2492ce1

11 files changed

Lines changed: 91 additions & 65 deletions

File tree

inc/global.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
#define _GLOBAL_H
33
//------------------------------------------------------------------------------------------
44
#include "../res/basicos.h"//fuente, pinguno jug,
5+
#include "../res/musica.h"
56
//-----------------------------------------------
67
u16 BUTTONS[9];
78

8-
char char_salida[16];
9+
char char_salida[8];
910
void VDP_drawInt(s32,u8,u8,u8);
1011

12+
void play_music(u8);
13+
1114
u8 randU8(u8,u8);
1215

1316
u16 paleta64[64]; //copia Paletas 0,1,2,3 ,para fades completos
@@ -17,9 +20,9 @@ void ZoneMap();
1720

1821

1922
typedef struct {
20-
const u8 const ancho;
21-
const u8 const alto;
23+
const u8 const musica;
2224
const u8 const *casillas;
25+
const u8 const top_blxpri;
2326
const u16 const *blockpri;
2427
} t_zona;
2528

res/musica.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#ifndef _RES_MUSICA_H_
2+
#define _RES_MUSICA_H_
3+
4+
extern const u8 M_titulo[27392];
5+
extern const u8 M_zone1[25344];
6+
7+
#endif // _RES_MUSICA_H_

res/musica.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
XGM M_titulo "Titulo/20 - Zombie World.vgm"
2+
XGM M_zone1 "Zona1/18 - Riddle, Darkness World.vgm"

res/titulo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef _RES_TITULO_H_
22
#define _RES_TITULO_H_
33

4-
extern const u8 M_titulo[27392];
54
extern const Image titulo;
65
extern const Image titush;
76
extern const Image fondogr;

res/titulo.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
XGM M_titulo "Titulo/20 - Zombie World.vgm"
21
IMAGE titulo "Titulo/titulo.png" BEST
32
IMAGE titush "Titulo/titulo-shader.png" BEST
43
IMAGE fondogr "Titulo/fondo.png" BEST

res/zona1.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef _RES_ZONA1_H_
22
#define _RES_ZONA1_H_
33

4-
extern const u8 M_zone1[25344];
54
extern const TileSet z1h1_t;
65
extern const TileSet z1h1b_t;
76
extern const MapDefinition z1h1;

res/zona1.res

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ TILESET z1h1_t "Zona1/h1.png" BEST
22
MAP z1h1 "Zona1/h1.png" z1h1_t BEST
33

44
TILESET z1h1b_t "Zona1/h1b.png" BEST
5-
MAP z1h1b "Zona1/h1b.png" z1h1b_t BEST
6-
7-
XGM M_zone1 "Zona1/18 - Riddle, Darkness World.vgm"
5+
MAP z1h1b "Zona1/h1b.png" z1h1b_t BEST

src/logos-titulo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @Author: Alicia Sanchez Martos "AliceSim1"
55
***********************************************************************************/
66
#include "../inc/global.h"
7-
#define Version "26/3"
7+
#define Version "11/4"
88

99
//res ficheros
1010
#include "../res/logos.h"

src/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ void main(){
2222
}
2323

2424

25-
25+
void play_music(u8 indice){
26+
switch(indice){
27+
case 1:XGM_startPlay(M_titulo);break;
28+
case 2:XGM_startPlay(M_zone1);
29+
}
30+
}
2631

2732
//https://github.com/diegomtassis/yamd-library/blob/master/src/fwk/commons.c#L40
2833
u8 randU8(u8 lower, u8 higher) {

src/zona1dat.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,30 @@ const u8 const casillas_0[] = {
1010
9,1,1,0,0,0,0,0,//16-23
1111
1,1,1,1,1,1,1,1,//24-31
1212
9,1,1,1,1,1,1,0,//32-39
13-
9,1,1,1,1,1,1,0 //40-47
14-
//--0,1,2,3,4,5,6,7
13+
9,1,1,1,1,1,1,0,//40-47
14+
0,0,0,0,0,0,0,0 //48-55
15+
//--0,1,2,3,4,5,6,7 = 8
1516
};
1617

1718
const u16 const blxpri_0[] = {
1819
159,143,//0,1 puerta
1920
319,159,//2,3 bloque
2021
351,175,//4,5
2122
393,191,//6,7
22-
415,207 //8,9
23+
415,207 //8,9 (top_blxpri=9)
2324
};
2425

2526
const t_zona zona1dat[TOP_ZONAS] = {
2627
{
27-
8, //ancho
28-
6, //alto
28+
2, //musica
2929
casillas_0, //casillas
30+
9, //top_blxpri
3031
blxpri_0 //blockpri
3132
},
3233
{
33-
8,//ancho
34-
8,//alto
34+
0,//ancho
3535
0,//casillas /* 0 = null*/
36+
0,
3637
0
3738
}
3839
};

0 commit comments

Comments
 (0)