// MTE MK1 (la Churrera) v5.0
// Copyleft 2010-2014, 2020 by the Mojon Twins


#if defined SOUND_ARKOS	
unsigned char isrc, isrc_max;
	unsigned char arkc;
// MUSICAS

extern unsigned char mus_0 [0];
// extern unsigned char mus_1 [0];
extern unsigned char mus_2 [0];
// extern unsigned char mus_3 [0];
extern unsigned char mus_4 [0];
extern unsigned char mus_5 [0];
extern unsigned char mus_6 [0];
extern unsigned char mus_7 [0];
extern unsigned char mus_8 [0];

#asm
	._mus_0
	BINARY "../bin/arkos/m0.c.bin"	
	// ._mus_1
	// BINARY "../bin/arkos/m1.c.bin"
	._mus_2
	BINARY "../bin/arkos/m2.c.bin"
	// ._mus_3
	// BINARY "../bin/arkos/m3.c.bin"
	._mus_4
	BINARY "../bin/arkos/m4.c.bin"	
	._mus_5
	BINARY "../bin/arkos/m5.c.bin"
	._mus_6
	BINARY "../bin/arkos/m6.c.bin"
	._mus_7
	BINARY "../bin/arkos/m7.c.bin"
	._mus_8
	BINARY "../bin/arkos/m8.c.bin"
#endasm

unsigned char *musics [] = {
	mus_0, ZONA_MUSICA2, ZONA_MUSICA, mus_2, mus_4, mus_5, mus_6, mus_7, mus_8
};

#endif

unsigned char musica_contador; // cuenta cuantas veces hay que poner la misma musica
unsigned char musica_id; // id de la musica actual

unsigned char frames_counter, subframes_counter, enemigo0, enemigo2, canal_fx, nota_fx;

signed int diferencia;
unsigned int aux1;
signed char aux4;
unsigned char aux2, aux3, vueltas_intro;
unsigned char cavando, frames_cavando, x_hoyo, y_hoyo;
unsigned char en_estado, en_hoyo;
unsigned char x_llave, y_llave, tengo_llave;
unsigned char x_start, y_start, x_respawn, y_respawn, enem_actual, running_snakes;
unsigned char teleportable, tele_x1, tele_x2, tele_y1, tele_y2;
unsigned char power_time, power_time_old, power_type, power_x, power_y, power_t_desaparece, current_screen_pow, enemigos_matados;

unsigned int score, old_score, hiscore, next_extra_life;
unsigned int tiempo_nivel, bonus_time, next_bonus;
unsigned int press_up, press_down, press_left, press_right, picado;

unsigned int records_score[] = {
	40000, 35000, 30000, 25000, 20000,
	18000, 15000, 10000, 7000, 5000
};

// Nombre maximas puntuaciones
	 unsigned char record_0 [] = "CANDELA";
     unsigned char record_1 [] = "LUCA.P";
     unsigned char record_2 [] = "MCKLAIN";
     unsigned char record_3 [] = "AIGOR";
     unsigned char record_4 [] = "NATHAN";
     unsigned char record_5 [] = "ED.VERDE";
     unsigned char record_6 [] = "VOLATIL";
     unsigned char record_7 [] = "ANTXIKO";
     unsigned char record_8 [] = "CARLOSPG";
     unsigned char record_9 [] = "ANJUEL";
     unsigned char record_10 [] = "PLAYER <>";

    const unsigned char *record_names [] = {
      record_0, record_1, record_2, record_3, record_4, 
	  record_5, record_6, record_7, record_8, record_9,
	  record_10
    };