Skip to content

Commit 94486cf

Browse files
committed
Arreglado Switch de cambio de nivel correctamente, Fix de consumo de DMA al cargar mapas sistema MAP, apagado de info en pantalla, Añadido 240p para PAL, Añadido espacio oscuro zonas
1 parent 781fe8d commit 94486cf

11 files changed

Lines changed: 107 additions & 164 deletions

File tree

inc/global.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
#include "../res/basicos.h"//fuente, pinguno jug,
55
#include "../res/musica.h"
66
//-----------------------------------------------
7-
u8 padtipo;
8-
u8 pad6;
9-
u8 padraton;
10-
u8 padmouse;
117

12-
u16 BUTTONS[12];
8+
u8 ScreenY; //27/29
9+
u8 ScreenMY; //112/120
10+
u8 ScreenTY; //224/240
11+
s8 fixAlturaY; //-24/-32
12+
13+
u8 padtipo; //JOY_getPortType(PORT_1);
14+
u8 pad6; //JOY_getJoypadType(JOY_1);
15+
u8 padraton; //JOY_getPortType(PORT_2);
16+
17+
u16 BUTTONS[13];
1318

1419
s16 readedX;
1520
s16 readedY;
@@ -38,6 +43,7 @@ typedef struct {
3843
const bool const PlanA;
3944
const u8 const musica;
4045
const u8 const Xtop;
46+
const u8 const Ytop;
4147
const u8 const *casillas;
4248
const u8 const top_blxpri;
4349
const u16 const *blockpri;

res/Zona1/h0.png

-49 Bytes
Loading

res/Zona1/h1.png

-827 Bytes
Loading

res/Zona1/h1b.png

381 Bytes
Loading

res/Zona1/h2.png

29 Bytes
Loading

res/Zona1/h3.png

-528 Bytes
Loading

res/Zona1/h3b.png

902 Bytes
Loading

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 "13/5"
7+
#define Version "24/6"
88

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

src/main.c

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,32 @@
1010
static void inputHandler(u16,u16,u16);
1111

1212
/////////////////////////////INICIO DE TODO//////////////////////////////////////////////////
13-
void main(){
13+
void main(u16 hard){
14+
if(!hard){
15+
SYS_hardReset(); //si se hace Soft-Reset, probocamos limpieza total de la RAM!
16+
KLog("RESET!");
17+
}
1418

15-
//--------------------------------------
19+
if(IS_PALSYSTEM){
20+
KLog("PAL-240");
21+
VDP_setScreenHeight240();//29(30) tiles x8 (Solo para PAL = 50FPS) NTSC No puede usar este modo!
22+
ScreenY=29;
23+
fixAlturaY=-32;
24+
}
25+
else {
26+
KLog("NTSC-224");
27+
ScreenY=27;
28+
fixAlturaY=-24;
29+
}
30+
KLog_U1("ScreenY:",ScreenY);
31+
KLog_S1("fixAlturaY:",fixAlturaY);
32+
ScreenTY=8+(ScreenY*8);//224/240
33+
ScreenMY=ScreenTY/2;//112/120
1634

35+
KLog_U1("ScreenTY:",ScreenTY);
36+
KLog_U1("ScreenMY:",ScreenMY);
37+
//--------------------------------------
38+
KLog("---------------");
1739

1840
padtipo=JOY_getPortType(PORT_1);//13 =
1941
//padtipo=15;//NINGUNO
@@ -78,8 +100,7 @@ void inputHandler(u16 joy, u16 state, u16 changed){
78100
BUTTONS[4]=changed & BUTTON_RIGHT;
79101

80102
BUTTONS[8]=changed & BUTTON_START;
81-
82-
if(pad6==JOY_TYPE_PAD6){
103+
if(pad6==1){
83104
BUTTONS[9]=changed & BUTTON_X;
84105
BUTTONS[10]=changed & BUTTON_Y;
85106
BUTTONS[11]=changed & BUTTON_Z;
@@ -95,13 +116,12 @@ void inputHandler(u16 joy, u16 state, u16 changed){
95116

96117

97118
void _JOYsetXY ( s16 x, s16 y )
98-
{
99-
119+
{
100120
readedX = JOY_readJoypadX(JOY_2);
101121
readedY = JOY_readJoypadY(JOY_2);
102-
103-
joypos.x = x;
104-
joypos.y = y;
122+
123+
joypos.x = x;
124+
joypos.y = y;
105125
}
106126

107127

@@ -117,7 +137,7 @@ void _JOYupdateMouse ()
117137
else if(joypos.x>319)joypos.x=319;
118138

119139
if(joypos.y<0)joypos.y=0;
120-
else if(joypos.y>223)joypos.y=223;
140+
else if(joypos.y>ScreenTY-1)joypos.y=ScreenTY-1;
121141

122142
readedX = readX;
123143
readedY = readY;

src/zona1dat.c

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

@@ -83,6 +83,7 @@ const t_zona zona1dat[TOP_ZONAS] = {
8383
FALSE, //PlanA
8484
2,//musica
8585
8,//Xtop
86+
5,//Ytop
8687
casillas_0,//casillas /* 0 = null*/
8788
0,//top_blxpri
8889
0 //blockpri
@@ -91,6 +92,7 @@ const t_zona zona1dat[TOP_ZONAS] = {
9192
TRUE, //PlanA
9293
2, //musica
9394
8,//Xtop
95+
5,//Ytop
9496
casillas_1,//casillas
9597
9, //top_blxpri
9698
blxpri_0 //blockpri
@@ -100,6 +102,7 @@ const t_zona zona1dat[TOP_ZONAS] = {
100102
FALSE, //PlanA
101103
0, //musica
102104
16,//Xtop
105+
11,//Ytop
103106
casillas_2,//casillas
104107
3, //top_blxpri
105108
blxpri_2 //blockpri
@@ -109,6 +112,7 @@ const t_zona zona1dat[TOP_ZONAS] = {
109112
TRUE, //PlanA
110113
0, //musica
111114
16,//Xtop
115+
11,//Ytop
112116
casillas_3,//casillas
113117
6, //top_blxpri
114118
blxpri_3 //blockpri

0 commit comments

Comments
 (0)