Skip to content

Commit f70bf30

Browse files
committed
Añadido musica zona1 de pruebas + Datos de zona añadidos
1 parent 7357a90 commit f70bf30

12 files changed

Lines changed: 110 additions & 17 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
out/
1+
out/
2+
temp/

.vscode/c_cpp_properties.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Win32",
5+
"includePath": [
6+
"${workspaceFolder}/**"
7+
],
8+
"defines": [
9+
"_DEBUG",
10+
"UNICODE",
11+
"_UNICODE"
12+
],
13+
"cStandard": "gnu11",
14+
"cppStandard": "c++17",
15+
"intelliSenseMode": "windows-gcc-x64"
16+
}
17+
],
18+
"version": 4
19+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"files.associations": {
3+
"global.h": "c",
4+
"basicos.h": "c"
5+
}
6+
}

inc/global.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifndef _GLOBAL_H
2+
#define _GLOBAL_H
13
//------------------------------------------------------------------------------------------
24
#include "../res/basicos.h"//fuente, pinguno jug,
35
//-----------------------------------------------
@@ -12,3 +14,13 @@ u16 paleta64[64]; //copia Paletas 0,1,2,3 ,para fades completos
1214

1315
void TITUTLO();
1416
void ZoneMap();
17+
18+
19+
typedef struct {
20+
const u8 const ancho;
21+
const u8 const alto;
22+
const u8 const *casillas;
23+
const u16 const *blockpri;
24+
} t_zona;
25+
26+
#endif

inc/zona1dat.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#ifndef _ZONA1DAT_H
2+
#define _ZONA1DAT_H
3+
4+
5+
#define TOP_ZONAS 2
6+
7+
const u8 const casillas_0[];
8+
const u16 const blxpri_0[];
9+
10+
const t_zona zona1dat[TOP_ZONAS];
11+
12+
13+
14+
#endif
55.6 KB
Binary file not shown.

res/zona1.h

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

4+
extern const u8 M_zone1[25344];
45
extern const TileSet z1h1_t;
56
extern const TileSet z1h1b_t;
67
extern const MapDefinition z1h1;

res/zona1.res

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ 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
5+
MAP z1h1b "Zona1/h1b.png" z1h1b_t BEST
6+
7+
XGM M_zone1 "Zona1/18 - Riddle, Darkness World.vgm"

src/logos-titulo.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void TITUTLO(){
7373
for(num_lin=9;num_lin<120;num_lin+=2) VDP_setHorizontalScrollLine(BG_A,num_lin,vectorB,2,CPU);
7474
if(BUTTONS[0]>9){
7575
PAL_interruptFade();
76-
VDP_setPaletteColors(0,&paleta64[0],64); //paleta en negro, PAL2
76+
PAL_setColors(0,&paleta64[0],64); //paleta en negro, PAL2
7777
}
78-
VDP_setPalette(2,palette_black);
78+
PAL_setPalette(2,palette_black);
7979

8080
VDP_drawImageEx(BG_B,&titush,TILE_ATTR_FULL(PAL2,FALSE,FALSE,FALSE,ind),3,0,FALSE,TRUE);
8181
ind+=titulo.tileset->numTile;
@@ -144,6 +144,7 @@ void TITUTLO(){
144144
XGM_stopPlay();
145145
SYS_doVBlankProcess();//necesita VSync para parar la musica por completo
146146

147+
147148
}
148149

149150

@@ -153,7 +154,7 @@ static void SEGALOGO(){
153154

154155
u16 paleta16or[16];
155156
memcpy(&paleta16or[0],logosega.palette->data, 16 * 2);
156-
VDP_setPaletteColors(0,palette_black,16);
157+
PAL_setPalette(0,palette_black);
157158

158159
VDP_drawImageEx(BG_B,&logosega,1,20-6,14-2,FALSE,TRUE);
159160

@@ -165,7 +166,7 @@ static void SEGALOGO(){
165166
PAL_fadeIn(14,15,&paleta16or[14],15,TRUE);
166167

167168
if(BUTTONS[0]==0)JOY_waitPressBtnTime(900);
168-
else VDP_setPalette(PAL0,logosega.palette->data);
169+
else PAL_setPalette(PAL0,logosega.palette->data);
169170

170171
PAL_fadeOutAll(20,FALSE);
171172
VDP_clearPlane(BG_B,TRUE);
@@ -177,13 +178,13 @@ static void SGDKlogo(){
177178

178179
u16 paleta16or[16];
179180
memcpy(&paleta16or[0],sgdklogo.palette->data, 16 * 2);
180-
VDP_setPaletteColors(0,palette_black,16);
181+
PAL_setPalette(0,palette_black);
181182

182183
VDP_drawImageEx(BG_B,&sgdklogo,1,20-4,14-4,FALSE,TRUE);
183184
PAL_fadeIn(0,15,&paleta16or[0],10,TRUE);
184185

185186
if(BUTTONS[0]==0)JOY_waitPressBtnTime(750);
186-
else VDP_setPalette(PAL0,sgdklogo.palette->data);
187+
else PAL_setPalette(PAL0,sgdklogo.palette->data);
187188

188189
PAL_fadeOutAll(20,FALSE);
189190
VDP_clearPlane(BG_B,TRUE);
@@ -197,8 +198,8 @@ static void ALICESIM1(){
197198
u16 paleta16or[16];
198199

199200
memcpy(&paleta16or[0],alicesim1.palette->data, 16 * 2);
200-
VDP_setPalette(0,palette_black);
201-
VDP_setPalette(1,palette_grey);
201+
PAL_setPalette(0,palette_black);
202+
PAL_setPalette(1,palette_grey);
202203
VDP_setTextPalette(PAL1);
203204

204205
VDP_drawImageEx(BG_B,&alicesim1,1,20-11,14-4,FALSE,TRUE);
@@ -221,7 +222,7 @@ static void ALICESIM1(){
221222
}
222223

223224
if(BUTTONS[0]==0)JOY_waitPressBtnTime(750);
224-
else VDP_setPaletteColors(0,&paleta16or[0],16);
225+
else PAL_setPalette(0,paleta16or);
225226

226227
PAL_fadeOutAll(20,FALSE);
227228

src/main.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,19 @@
33
* @Title: PENGUIN WORLD
44
* @Author: Alicia Sanchez Martos "AliceSim1"
55
***********************************************************************************/
6-
7-
//----------------------------
8-
96
#include "../inc/global.h"
107
//-----------------------------------------------------
118

12-
139
//Definiciones de las funciones---------------------------------------------------
1410
static void inputHandler(u16,u16,u16);
1511

1612
/////////////////////////////INICIO DE TODO//////////////////////////////////////////////////
17-
void main(){
13+
void main(){
1814

1915
//--------------------------------------
2016
JOY_setEventHandler(&inputHandler);
2117

22-
//TITUTLO();
18+
TITUTLO();
2319

2420
ZoneMap();
2521

0 commit comments

Comments
 (0)