Skip to content

Commit 84cd512

Browse files
committed
Merge remote-tracking branch 'origin/ColisionZone' into ColisionZone
# Conflicts: # inc/zona1dat.h
2 parents f70bf30 + 7ddfebe commit 84cd512

3 files changed

Lines changed: 29 additions & 14 deletions

File tree

src/logos-titulo.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ void TITUTLO(){
2727
VDP_drawImageEx(BG_B,&disclaimer,1,20-10,14-6,TRUE,TRUE);
2828
JOY_waitPressBtnTime(900);
2929
VDP_clearPlane(BG_B,TRUE);
30-
30+
31+
SYS_doVBlankProcess();
3132
XGM_startPlay(M_titulo);
33+
3234
SEGALOGO();
3335
if(BUTTONS[0]==0) SGDKlogo();
3436
if(BUTTONS[0]==0) ALICESIM1();
@@ -73,7 +75,7 @@ void TITUTLO(){
7375
for(num_lin=9;num_lin<120;num_lin+=2) VDP_setHorizontalScrollLine(BG_A,num_lin,vectorB,2,CPU);
7476
if(BUTTONS[0]>9){
7577
PAL_interruptFade();
76-
PAL_setColors(0,&paleta64[0],64); //paleta en negro, PAL2
78+
PAL_setColors(0,&paleta64[0],64);//restaura las paletas
7779
}
7880
PAL_setPalette(2,palette_black);
7981

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void main(){
1515
//--------------------------------------
1616
JOY_setEventHandler(&inputHandler);
1717

18-
TITUTLO();
18+
//TITUTLO();
1919

2020
ZoneMap();
2121

src/zone-jugpri.c

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static void object2D_maker(SpriteDefinition sprited,u8 , u8, u16 , u16 , bool ,
7474
void ZoneMap(){
7575

7676
//--------------------------------------
77-
VDP_setPalette(2,palette_green);VDP_setPalette(3,palette_blue);
77+
PAL_setColors(0,palette_black,64);
7878

7979
VDP_setWindowVPos(1,26);// 27max vertical Windows
8080
VDP_setTextPlane(WINDOW);//Textos "normales SGDK" se pintan en Window es temporal
@@ -87,8 +87,10 @@ void ZoneMap(){
8787
jugcontrol=3;
8888

8989
jugpri=jugpricpy=TRUE;
90-
91-
memcpy(&paleta32[16],penguin.palette->data,8*2);//16+8
90+
91+
memcpy(&paleta64[16],penguin.palette->data,8*2);//16+8
92+
memcpy(&paleta64[32],&palette_green, 16 * 2);
93+
memcpy(&paleta64[48],&palette_blue, 16 * 2);
9294

9395
SPR_init();
9496

@@ -109,7 +111,9 @@ void ZoneMap(){
109111
case 3:{SPR_setAnim(penguinsp,1);pflag=TRUE;}
110112
break;
111113
case 4:{SPR_setAnim(penguinsp,0);pflag=FALSE;}
114+
112115
}
116+
113117
SPR_setHFlip(penguinsp,pflag);
114118
SPR_setFrame(penguinsp,1);//parado
115119

@@ -122,7 +126,14 @@ void ZoneMap(){
122126

123127
SPR_ACT=FALSE;
124128

125-
PAL_fadeIn(0,32,&paleta32[0],20,0);
129+
XGM_startPlay(M_zone1);
130+
131+
PAL_fadeInAll(paleta64,20,TRUE);
132+
133+
VDP_drawInt(zona1dat[0].ancho,0,0,26);
134+
VDP_drawInt(zona1dat[0].casillas[1],0,2,26);
135+
VDP_drawInt(zona1dat[0].blockpri[0],0,0,27);
136+
126137

127138
bool gat=TRUE;
128139
while(1){//LOOP BASICO(NUNCA SE SALE!)
@@ -136,6 +147,8 @@ void ZoneMap(){
136147

137148

138149
if(!gat){
150+
151+
139152
if(BUTTONS[8]){ gat=TRUE;
140153
jugcontrol++;if(jugcontrol==4)jugcontrol=0;
141154
VDP_drawInt(jugcontrol,0,0,26);
@@ -176,9 +189,9 @@ static void object2D_maker(SpriteDefinition sprited, u8 num_obj , u8 pal , u16 X
176189
}
177190

178191
static void pintarAB(){
179-
VDP_drawInt(PX,3,20,26);VDP_drawInt(PY,3,20,27);
192+
//VDP_drawInt(PX,3,20,26);VDP_drawInt(PY,3,20,27);
180193

181-
VDP_drawInt(posX,3,5,26);VDP_drawInt(posY,3,5,27);
194+
//VDP_drawInt(posX,3,5,26);VDP_drawInt(posY,3,5,27);
182195
MAP_scrollTo(bgb,posX,posY);MAP_scrollTo(bga,posX,posY);
183196
move_scroll=FALSE;
184197

@@ -193,10 +206,10 @@ static void pintarAB(){
193206

194207

195208
SPR_setDepth(penguinsp,-posY);
196-
VDP_drawInt(-posY,3,0,27);
209+
//VDP_drawInt(-posY,3,0,27);
197210

198211
posXt=posX+160;posYt=posY+112;//centro de la pantalla
199-
VDP_drawInt(posXt,3,10,26);VDP_drawInt(posYt,3,10,27);
212+
//VDP_drawInt(posXt,3,10,26);VDP_drawInt(posYt,3,10,27);
200213

201214
jugpri=TRUE;
202215
for(i=0;i<top_blxpri;i++){
@@ -214,9 +227,9 @@ static void pintarAB(){
214227

215228
static void loadzona(){
216229

217-
memcpy(&paleta32[0],zona1[0]->palette->data,16*2);
218-
paleta32[0]=0;//colro de fondo 100% negro
219-
paleta32[15]=RGB24_TO_VDPCOLOR(0xFFFFFF);//color 15 (texo...) Blanco
230+
memcpy(&paleta64[0],zona1[0]->palette->data,16*2);
231+
paleta64[0]=0;//colro de fondo 100% negro
232+
paleta64[15]=RGB24_TO_VDPCOLOR(0xFFFFFF);//color 15 (texo...) Blanco
220233

221234
u8 ind=0;
222235
VDP_loadTileSet(zona1[0]->tileset,ind,DMA);

0 commit comments

Comments
 (0)