.include "entity_templates.h.s"
.include "entity.h.s"
.include "animations.h.s"
.include "sys/ia.h.s"

.globl _spr_player1_00
.globl _spr_player2_00
.globl _spr_zombie_00
.globl _spr_arcoiris_0
.globl _spr_shotArcoiris_4
.globl _spr_shotArcoiris_2
.globl _spr_vida_0
.globl _spr_pato_00
.globl _spr_cangrejo_00
.globl _spr_topo_0
.globl _spr_canion2_0
.globl _spr_fantasma_00
.globl _spr_boss_0


player_tmp_cmps   = e_cmp_render | e_cmp_movable | e_cmp_input | e_cmp_animated | e_cmp_collider
zombie_tmp_cmps   = e_cmp_render | e_cmp_ia | e_cmp_movable | e_cmp_collider | e_cmp_animated
boss_tmp_cmps   = e_cmp_render | e_cmp_ia | e_cmp_movable | e_cmp_collider | e_cmp_animated | e_cmp_vidaextra
shot_tmp_cmps     = e_cmp_render | e_cmp_movable | e_cmp_collider | e_cmp_ia
arcoiris_tmp_cmps = e_cmp_render | e_cmp_collider | e_cmp_animated
vida_tmp_cmps     = e_cmp_render | e_cmp_collider | e_cmp_animated
shotArc_tmp_cmps  = e_cmp_render | e_cmp_movable | e_cmp_collider ;; shot del arquero

;; OJO ES UNA PRUEBA PORQUE LAS ANIMACIONES CAMBIAN EL SPRITE (es solo para quitar la animacion)
escudero_tmp_cmps   = e_cmp_render | e_cmp_ia | e_cmp_movable | e_cmp_collider | e_cmp_animated
muriendo_tmp_cmps = e_cmp_render | e_cmp_animated


player_tmp_collider   = e_type_arcoiris | e_type_vida  ;; el player colisiona contra arcoiris y vida
zombie_tmp_collider   = e_type_player                  ;; el enemigo colisiona contra el player (al reves no)
shot_tmp_collider     = e_type_zombie                  ;; la bala de momento no colisiona
arcoiris_tmp_collider = #0x00
vida_tmp_collider     = #0x00
shotArq_tmp_collider  = e_type_player

;; Ojo   ->  las posiciones iniciales de Y deben ser multiplos de 4
player_tmp:
    ;;                       Tipo               cmps            x       y     vx     vy     width  height  sprite            ia                     anim              anim_st anim_count    collides           last_dir last_dirY  playerShot actualizaMove contMove aimX    aimY    HP    ptr      tbl_anim                    anim_espacial   invencible atacando
    DefineEntity player1, e_type_player,  player_tmp_cmps,      #0x27, #0x28, #0x00, #0x00, #0x06, #0x1C, #_spr_player1_00, #0x0000,                #player1_wait_down, #0x00, #0x0C,  player_tmp_collider,    #0x00,    #0x04,   #0x00,      #0x01,      #0x00,     #0x00, #0x00,  #0x03, #0x0000, #animations_player1_array,  #0x00,           #0x00,     #0x00

player2_tmp:
    DefineEntity player2, e_type_player,  player_tmp_cmps,      #0x27, #0x40, #0x00, #0x00, #0x06, #0x1C, #_spr_player2_00, #0x0000,                #player2_wait_down, #0x00, #0x0C,  player_tmp_collider,    #0x00,    #0x04,   #0x00,      #0x01,      #0x00,     #0x00, #0x00,  #0x03, #0x0000, #animations_player2_array,  #0x00,           #0x00,     #0x00


zombie_tmp:
    DefineEntity zombie, e_type_zombie,    zombie_tmp_cmps,     #0x39, #0x20, #0x00, #0x00, #0x06, #0x1C, #_spr_fantasma_00,  #ia_seguimiento_player, #fantasma_wait_down, #0x00, #0x0C,  zombie_tmp_collider, #0x00,    #0x00,   #0x00,      #0x06,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_fantasma_array,#0x00,           #0x00,     #0x00

zombieBoss_tmp:
    DefineEntity zBoss, e_type_zombie,    boss_tmp_cmps,     #0x39, #0x20, #0x00, #0x00, #0x08, #0x24, #_spr_boss_0,          #ia_seguimiento_player, #boss_walk, #0x00, #0x0C,          zombie_tmp_collider, #0x00,    #0x00,   #0x00,      #0x0A,      #0x00,     #0x00,  #0x00,  #0x05, #0x0000, ##animations_boss_array , #0x00,           #0x00,     #0x00

arquero_tmp:
    DefineEntity arquero, e_type_zombie,    zombie_tmp_cmps,    #0x39, #0x20, #0x00, #0x04, #0x05, #0x1A, #_spr_canion2_0,  #ia_arquero,          #canion2_walk_down,  #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x03,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_canion2_array,  #0x00,           #0x00,     #0x00

ghostX_tmp: ;; se mueve solo en eje X
    DefineEntity ghostX, e_type_zombie,    zombie_tmp_cmps,     #0x39, #0x20, #0xFF, #0x00, #0x06, #0x1C, #_spr_zombie_00,  #ia_mover_drcha_izq, #zombie_walk_down,    #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x02,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_zombie_array,   #0x00,           #0x00,     #0x00

ghostY_tmp: ;; se mueve solo en eje Y
    DefineEntity ghostY, e_type_zombie,    zombie_tmp_cmps,     #0x39, #0x20, #0xFF, #0x00, #0x06, #0x1C, #_spr_zombie_00,  #ia_mover_arriba_abajo, #zombie_walk_down, #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x02,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_zombie_array,   #0x00,           #0x00,     #0x00

monster_tmp: ;; este es el del patron aleatorio
    DefineEntity monster, e_type_zombie,    zombie_tmp_cmps,   #0x12, #0x40, #0x00, #0x00, #0x06, #0x18, #_spr_pato_00,  #ia_patron,          #pato_walk_down,         #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x03,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_pato_array,     #0x00,           #0x00,     #0x00

;;                          Tipo               cmps            x       y     vx     vy     width  height  sprite            ia                     anim              anim_st anim_count    collides           last_dir last_dirY  playerShot actualizaMove contMove aimX    aimY    HP    ptr      tbl_anim                    anim_espacial   invencible 

semiseguidor_tmp: ;; este es el que te sigue de vez en cuando
    DefineEntity semiseguidor, e_type_zombie, zombie_tmp_cmps, #0x12, #0x40, #0x00, #0x00, #0x06, #0x18, #_spr_pato_00,  #ia_variable_tiempo, #pato_walk_down,     #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x03,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_pato_array,         #0x00,           #0x00,     #0x00

cangrejo_tmp: ;; cuando ve una bala se esconde y no le puedes disparar
    DefineEntity cangrejo, e_type_zombie,    escudero_tmp_cmps,  #0x39, #0x20, #0x00, #0x00, #0x09, #0x18, #_spr_cangrejo_00,  #ia_cangrejo,   #cangrejo_walk_down,    #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x07,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_cangrejo_array,       #0x00,           #0x00,     #0x00

topo_tmp: 
    DefineEntity topo, e_type_zombie,    escudero_tmp_cmps,      #0x39, #0x20, #0x00, #0x00, #0x08, #0x14, #_spr_topo_0,  #ia_topo,            #topo_walk_down,   #0x00, #0x0C,  zombie_tmp_collider,    #0x00,    #0x00,   #0x00,      #0x07,      #0x00,     #0x00,  #0x00,  #0x01, #0x0000, #animations_topo_array,                 #0x00,           #0x01,     #0x00

shot_tmp:
    DefineEntity shot1, e_type_shot,      shot_tmp_cmps,        #0x00, #0x00, #0x01, #0x00, #0x04, #0x10, #_spr_shotArcoiris_2, #ia_update_cont_shot,  #shot_muere,        #0x00, #0x01,  shot_tmp_collider,      #0x00,    #0x00,   #0x00,      #0x00,      #0x00,     #0x00,  #0x00,  #0x00, #0x0000, #animations_shot_array,       #0x01,           #0x00,     #0x00

arcoiris_tmp:
    DefineEntity arcoiris, e_type_arcoiris, arcoiris_tmp_cmps,  #0x20, #0x40, #0x00, #0x00, #0x06, #0x08, #_spr_arcoiris_0,   #0x0000,         #arcoiris_objeto,           #0x00, #0x0C,  arcoiris_tmp_collider,  #0x00,    #0x00,   #0x00,      #0x00,      #0x00,     #0x00,  #0x00,  #0x00, #0x0000, #animations_arcoiris_array,    0x00,           #0x00,     #0x00

vida_tmp:
    DefineEntity vida,      e_type_vida,    vida_tmp_cmps,      #0x29, #0x60, #0x00, #0x00, #0x04, #0x0A, #_spr_vida_0    ,   #0x0000,            #vida_objeto,           #0x00, #0x0C,  vida_tmp_collider,      #0x00,    #0x00,   #0x00,      #0x00,      #0x00,     #0x00,  #0x00,  #0x00, #0x0000, #animations_vida_array,        #0x00,           #0x00,     #0x00


shot_arquero_tmp:
    DefineEntity shot_arquero, e_type_shot, shotArc_tmp_cmps,  #0x00, #0x00, #0x00, #0x00, #0x04, #0x10, #_spr_shotArcoiris_4,  #0x0000,           #shot_muere,            #0x00, #0x01,  shotArq_tmp_collider    #0x00,    #0x00,   #0x00,      #0x00,      #0x00,     #0x00,  #0x00,  #0x00, #0x0000, #animations_shot_array,       #0x01,           #0x00,     #0x00
   




